-
-
Notifications
You must be signed in to change notification settings - Fork 15k
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
Setting xdg.portal.gtkUsePortal=true causes a significant delay when starting a GNOME session #135898
Comments
Is this on Wayland or X11? Portals seem to be a bit wonky on KDE (Wayland) too, as screensharing (obs, teams; for some bizarre reason discord does not have a problem there) complains about the relevant protocol not being supported although the compositor clearly advertises it. Maybe GNOME is trying to find some services and blocking until it times out? |
This was on X11. |
Ah, the OBS vs discord thing seems to be because discord is running in XWayland, using Xcomposite capture rather than the desktop portal (and does indeed only see other XWayland windows). Forcing OBS to run in XWayland with |
Facing the same issue, X11 GNOME 40.1, even |
I had similar issue on sway: swaywm/sway#6587 added overlay for git xdg-desktop-portal: https://github.com/ivankovnatsky/nixos-config/blob/main/overlays/xdg-desktop-portal.nix I see that this PR fixes it: https://github.com/NixOS/nixpkgs/pull/145619/files -- already landed in |
Is there any reason why this isn't closed yet? |
It is not resolved. |
Seems to still not be resolved. I have not tried setting
What issues were you experiencing with gdm? I am experiencing this thing on unstable where when the screen times out while in gnome, I'll wake the screen to find the tty is switched to the gdm lock screen. I have to switch the tty back to my current gnome session. |
GDM takes almost 3x the amount of time to load in, as well as about 5x the amount of time to start session after login. Memory usage shoots up from about 600MB on idle to 2.4GB. Suspension sometimes crashes the system, TTY switching sometimes logs out session. None of these problems occur when On GNOME 42, NixOS 22.05 |
It was never meant to be used for anything other than testing and setting it globally can cause weird loops in GTK-based portals, where the portal will end up waiting for itself until it times out. NixOS#135898 Or it can mess up fonts: NixOS#155291 (comment) Having the option in NixOS makes it look like it is okay or even desirable to enable, when in fact it is a hack that can subtly break apps. Some apps allow opting into using portal-based APIs, e.g. for Firefox, you can set `widget.use-xdg-desktop-portal.file-picker` to `1` in about:config. Otherwise, you can set the `GTK_USE_PORTAL` environment variable to 1 for individual apps. People who really want it and aware of the downsides can just set `environment.sessionVariables.GTK_USE_PORTAL = "1";` NixOS option directly to set the environment variable globally.
I think that this can now be closed, since |
We still have it in 22.05 so unless we backport #179204, it might be better to keep it open for visibility. |
With NixOS 22.11 coming soon, I guess that this can now be closed. |
Describe the bug
After setting
xdg.portal.gtkUsePortal = true
, logging into a GNOME session (with GDM) until the desktop is shown takes about 70 seconds on my system, while withxdg.portal.gtkUsePortal = false
it takes about 20 seconds.Steps To Reproduce
xdg.portal.gtkUsePortal = false
.xdg.portal.gtkUsePortal = true
.Expected behavior
I would not expect a 3x slowdown.
Additional context
Notify maintainers
Metadata
Maintainer information:
The text was updated successfully, but these errors were encountered: