Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(launcher): Exception in GNOME 3.36 due to Shell.AppLaunchGPU being undefined #1205

Open
wants to merge 1 commit into
base: master_focal
Choose a base branch
from

Conversation

mmstick
Copy link
Member

@mmstick mmstick commented Oct 6, 2021

Closes #1194

@mmstick mmstick requested review from a team October 6, 2021 15:25
@jacobgkau
Copy link
Member

Attempting to regression test this on Pop!_OS 20.04, using kitty as an example, I'm seeing wrong behavior even on the current version:

  • Start from Activities -> doesn't use dGPU
  • Start from Activities with dGPU -> uses dGPU
  • Start from Launcher -> uses dGPU
  • Start from Launcher with dGPU -> uses dGPU

The launcher seems to be starting this app on the dGPU every time, with no way to manually start on integrated graphics. As far as I can tell, this should not be the case, because its .desktop file does not have PrefersNonDefaultGPU set at all.

If I install Steam, which does have PrefersNonDefaultGPU set to true, the launcher gives me an option to launch on integrated graphics, but clicking it launches on discrete graphics anyway. (Clicking the same integrated option in Activities does launch on integrated.)

Any idea why this is happening, or should I just open a separate issue about it?

@mmstick
Copy link
Member Author

mmstick commented Oct 7, 2021

I'll look into that

@matthewtraughber
Copy link

matthewtraughber commented Feb 11, 2022

I'm very new to this, but I think these issues may be due to gnome-shell switching from gboolean to ShellAppLaunchGpu - enum defined here.

I manually updated and applied this fix locally to the latest pop-os/shell version, and got the launcher working again. I then modified things a bit (below) based on my very limited understanding - however, I don't have a discrete/default GPU config to test implementation.

        let gpuPref = null

        if (!("AppLaunchGpu" in Shell)) {
            gpuPref = false
        } else {
            gpuPref = entry.gpu_preference === "Default"
                ? Shell.AppLaunchGpu.DEFAULT
                : Shell.AppLaunchGpu.DISCRETE;
        }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Ubuntu] Applications not launching when pressing enter in the launcher
4 participants