-
-
Notifications
You must be signed in to change notification settings - Fork 14.6k
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
GDM wayland improvements #39615
GDM wayland improvements #39615
Conversation
Works as expected in a VM. When running it on my usual config and hardware I had to do |
Edit: This only happens when using Tried it again, turns out that I just had to wait a bit and GDM would launch. Looking at the journal it seems the first attempt to launch fails:
Afterwards systemd tries again and things seems to work.
I'm guessing (I use |
Apparently the culprit was |
Is that a regression? Anyway, playing with the session chooser lead me to want to get rid of our Xsession code in favour of the upstream session files – with the |
Haven't had any issue with I personally don't care much about having plymouth or not, but I would think it's somewhat common to use? |
This is apparent from the service file directory in plymouth. Leaving it unspecified caused gdm-wayland to crash on boot, see NixOS#39615.
Ok, looks like the plymouth service was underspecified. As can bee seen from the service files in the plymouth derivation
|
Ughh, testing it using Slim makes plymouth stick around eating a bunch of cpu 😦 |
Ok, tested a bunch of plymouth service configurations in vms. Configurations which make the plymouth -> gdm transition smooth (ie. the plymouth splash freezes until gdm is ready to display) causes plymouth to not shut down properly when using other display managers. The problem is probably that to get a smooth transition from plymouth to the display manager the display manager needs to take care of shutting plymouth down at the correct time (eg. with service files: #32556 (comment)). This works with gdm since it's built with plymouth support and will shutdown plymouth (see, gdm.service). The best short term solution is probably to just make sure that plymouth quits properly with all display managers and not bother trying to fix the longstanding issue with choppy transitions. This produces a working setup for gdm wayland on my hardware. Tested all the display managers in a VM and plymouth gets shut down properly: nixos/plymouth: multi-user.target wants plymouth-quit-wait.service
This is apparent from the service file directory in plymouth:
├── multi-user.target.wants
│ ├── plymouth-quit.service -> ../plymouth-quit.service
│ └── plymouth-quit-wait.service -> ../plymouth-quit-wait.service
Leaving it unspecified caused gdm-wayland to crash on boot, see #39615.
The change made other display managers not quit plymouth properly however. By
removing "multi-user.target" from `plymouth-quit.after` this is resolved.
diff --git a/nixos/modules/system/boot/plymouth.nix b/nixos/modules/system/boot/plymouth.nix
index f8fb8a64cb9..e4223bae7d3 100644
--- a/nixos/modules/system/boot/plymouth.nix
+++ b/nixos/modules/system/boot/plymouth.nix
@@ -87,9 +87,10 @@ in
systemd.services.plymouth-kexec.wantedBy = [ "kexec.target" ];
systemd.services.plymouth-halt.wantedBy = [ "halt.target" ];
+ systemd.services.plymouth-quit-wait.wantedBy = [ "multi-user.target" ];
systemd.services.plymouth-quit = {
wantedBy = [ "multi-user.target" ];
- after = [ "display-manager.service" "multi-user.target" ];
+ after = [ "display-manager.service" ];
};
systemd.services.plymouth-poweroff.wantedBy = [ "poweroff.target" ];
systemd.services.plymouth-reboot.wantedBy = [ "reboot.target" ]; cc @abbradar does this look sane to you, you probably know the most about how plymouth should work in nixos |
This is apparent from the service file directory in plymouth: ├── multi-user.target.wants │ ├── plymouth-quit.service -> ../plymouth-quit.service │ └── plymouth-quit-wait.service -> ../plymouth-quit-wait.service Leaving it unspecified caused gdm-wayland to crash on boot, see NixOS#39615. The change made other display managers not quit plymouth properly however. By removing "multi-user.target" from `plymouth-quit.after` this is resolved.
Apparently, wayland session were not used at all until now.
Account chooser depends on AccountsService, which is normally enabled by GNOME module but it was missing when using GDM without GNOME.
Motivation for this change
Apparently, Wayland session was not used at all until now by GDM.
Things done
build-use-sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)