jdaly
September 19, 2022, 4:10pm
1
I’d like to customize my startup (boot) and shutdown screens and discovered that the plymouth package is designed for this task.
In my configuration.nix I placed the following:
#-------------------------------------------------------------------------
# Bootloader.
#-------------------------------------------------------------------------
boot.loader.systemd-boot.enable = true;
boot.loader.efi.canTouchEfiVariables = true;
boot.loader.efi.efiSysMountPoint = "/boot/efi";
boot.plymouth.enable = true;
boot.plymouth.theme="breeze";
I’m also using nvidia drivers…
services.xserver.videoDrivers = [ "nvidia" ];
hardware.opengl.enable = true;
hardware.nvidia.package = config.boot.kernelPackages.nvidiaPackages.stable;
I than ran nixos-rebuild switch
to rebuild my nixos configuration and rebooted my box.
While I don’t see all the typical boot messages that appear when plymouth was not configured – I do see the following output:
This screen is displayed for several seconds, and then I’m prompted to login as usual.
Checking the boot logs ‘sudo journalctl -b’ and searching for ‘plymouth’ I see a few plymouth entries such as those below but don’t see any real errors.
Sep 19 09:35:26 talos-devenv systemd[1]: Started Forward Password Requests to Plymouth Directory Watch.
Sep 19 09:35:26 talos-devenv systemd[1]: Started Forward Password Requests to Wall Directory Watch.
...
...
Sep 19 09:35:26 talos-devenv systemd[1]: Started Forward Password Requests to Plymouth.
...
...
Long story short - I see no splash screens at startup or shutdown.
And last but not least, I found this article (https://blog.sidhartharya.com/using-custom-plymouth-theme-on-nixos/ ) describing how to customize these splash screens but given my lack of success getting the basic system working decided to hold off.
Any help would be much appreciated. Thx.
tejing
September 19, 2022, 7:26pm
2
Give up now… maybe it will be more feasible in a while. Nvidia claims they’re going to integrate better with the linux video driver stack, but afaik early-boot graphics of any quality are still not possible.
1 Like
I mean I have plymouth working with an nvidia card no problem. Though I use systemd-stage-1
1 Like
jdaly
September 19, 2022, 7:45pm
4
Can you explain why the nvidia drives are the problem? Are there any other tools for customizing the splash screens?
jdaly
September 19, 2022, 7:45pm
5
@ElvishJerricco Can you explain/show how you got your system working?
Nothing special. Just enabled plymouth as you have. Only difference is that I also have boot.initrd.systemd.enable = true;
, which is an experimental feature that makes initrd use systemd for PID 1. IIRC it manages to start plymouth a bit earlier than the traditional scripted initrd does.
1 Like
tejing
September 19, 2022, 7:48pm
7
Basically the same reasons nvidia + sway has been impossible for so long. The nvidia driver just doesn’t conform to the linux video stack’s expectations. It makes things work with X specifically, but it bypasses all the lower down stuff, so you’re stuck with the EFI video system until X starts.
You may be able to get it to work if you enable the experimental kernel modesetting feature in the nvidia drivers, I don’t know. Last time I seriously tried to make it work, that didn’t exist yet.
1 Like
jdaly
September 19, 2022, 8:28pm
8
@ElvishJerricco @tejing
So, I added boot.initrd.systemd.enable = true;
to my configuration.nix and it works – sort of.
The initial boot screen now looks like this …
Any ideas why these boot messages are still appearing?
Then the ‘Nixos’ splash screen appears for a few seconds …
At least a splash screen is appearing now.
Lastly, I’m prompted to login as usual, however, after login, the screen shows the desktop and then goes blank… and at that point the PC is hung and a reboot is needed.
Thoughts?
Oh right, you may want boot.kernelParams = ["quiet"];
to completely silence the boot messages that come just before plymouth starts. No idea why your machine is hanging after login though.
1 Like
jdaly
September 19, 2022, 9:11pm
10
@ElvishJerricco Aaaah, yes, I didn’t realize there was a way to silence the boot process. I’ve added boot.kernelParams = ["quiet"];
– testing now.
Question – any thoughts about why or how to debug my desktop going blank and the system hang after turning adding boot.initrd.systemd.enable = true;
?
If you’re sure that option is what leads to the hang, then I’d open an issue on nixpkgs about it with whatever details you can provide.
jdaly
September 19, 2022, 9:15pm
12
@ElvishJerricco Not sure at all All this is new to me. What I do know is that after adding boot.initrd.systemd.enable = true;
– I’m getting the blank screen and the hang.
Any thoughts on how I might diagnose what may be going on?
If you don’t figure it out quickly then go ahead and open an issue.
When it hangs, is the whole system locked up or just the GUI? Can you ctrl-alt-f1 to get to a VT? Note that plymouth sometimes makes that a little finicky so you may have to try different f keys until you find one that actually gives you a VT login prompt.
If you can get a terminal either by switching VTs or by remoting in with SSH, then check journalctl -e
to see if there’s any relevant messages pertaining to the GUI crashing
jdaly
September 19, 2022, 9:41pm
14
@ElvishJerricco Ok, so I can’t get to a VT either by SSH or via CTRL+F1-F12.
I did find these issues in the journalctl
…
Sep 19 15:35:07 localhost systemd-udevd[108]: /nix/store/k677938wq20cpykn5wcbwmwz65mb70py-systemd-stage-1-250.4/lib/udev/rules.d/50-udev-default.rules:21 Unknown group 'tty', ignoring
Sep 19 15:35:07 localhost systemd-udevd[108]: /nix/store/k677938wq20cpykn5wcbwmwz65mb70py-systemd-stage-1-250.4/lib/udev/rules.d/50-udev-default.rules:22 Unknown group 'tty', ignoring
Sep 19 15:35:07 localhost systemd-udevd[108]: /nix/store/k677938wq20cpykn5wcbwmwz65mb70py-systemd-stage-1-250.4/lib/udev/rules.d/50-udev-default.rules:23 Unknown group 'tty', ignoring
Sep 19 15:35:07 localhost systemd-udevd[108]: /nix/store/k677938wq20cpykn5wcbwmwz65mb70py-systemd-stage-1-250.4/lib/udev/rules.d/50-udev-default.rules:24 Unknown group 'tty', ignoring
Sep 19 15:35:07 localhost systemd-udevd[108]: /nix/store/k677938wq20cpykn5wcbwmwz65mb70py-systemd-stage-1-250.4/lib/udev/rules.d/50-udev-default.rules:25 Unknown group 'tty', ignoring
Sep 19 15:35:07 localhost systemd-udevd[108]: /nix/store/k677938wq20cpykn5wcbwmwz65mb70py-systemd-stage-1-250.4/lib/udev/rules.d/50-udev-default.rules:26 Unknown group 'dialout', ignoring
Sep 19 15:35:07 localhost systemd-udevd[108]: /nix/store/k677938wq20cpykn5wcbwmwz65mb70py-systemd-stage-1-250.4/lib/udev/rules.d/50-udev-default.rules:28 Unknown group 'kmem', ignoring
Sep 19 15:35:07 localhost systemd-udevd[108]: /nix/store/k677938wq20cpykn5wcbwmwz65mb70py-systemd-stage-1-250.4/lib/udev/rules.d/50-udev-default.rules:30 Unknown group 'input', ignoring
Sep 19 15:35:07 localhost systemd-udevd[108]: /nix/store/k677938wq20cpykn5wcbwmwz65mb70py-systemd-stage-1-250.4/lib/udev/rules.d/50-udev-default.rules:33 Unknown group 'video', ignoring
Sep 19 15:35:07 localhost systemd-udevd[108]: /nix/store/k677938wq20cpykn5wcbwmwz65mb70py-systemd-stage-1-250.4/lib/udev/rules.d/50-udev-default.rules:34 Unknown group 'video', ignoring
Sep 19 15:35:07 localhost systemd-udevd[108]: /nix/store/k677938wq20cpykn5wcbwmwz65mb70py-systemd-stage-1-250.4/lib/udev/rules.d/50-udev-default.rules:35 Unknown group 'video', ignoring
Sep 19 15:35:07 localhost systemd-udevd[108]: /nix/store/k677938wq20cpykn5wcbwmwz65mb70py-systemd-stage-1-250.4/lib/udev/rules.d/50-udev-default.rules:36 Unknown group 'video', ignoring
Sep 19 15:35:07 localhost systemd-udevd[108]: /nix/store/k677938wq20cpykn5wcbwmwz65mb70py-systemd-stage-1-250.4/lib/udev/rules.d/50-udev-default.rules:37 Unknown group 'video', ignoring
Sep 19 15:35:07 localhost systemd-udevd[108]: /nix/store/k677938wq20cpykn5wcbwmwz65mb70py-systemd-stage-1-250.4/lib/udev/rules.d/50-udev-default.rules:38 Unknown group 'video', ignoring
Sep 19 15:35:07 localhost systemd-udevd[108]: /nix/store/k677938wq20cpykn5wcbwmwz65mb70py-systemd-stage-1-250.4/lib/udev/rules.d/50-udev-default.rules:40 Unknown group 'render', ignoring
Sep 19 15:35:07 localhost systemd-udevd[108]: /nix/store/k677938wq20cpykn5wcbwmwz65mb70py-systemd-stage-1-250.4/lib/udev/rules.d/50-udev-default.rules:41 Unknown group 'render', ignoring
Sep 19 15:35:07 localhost systemd-udevd[108]: /nix/store/k677938wq20cpykn5wcbwmwz65mb70py-systemd-stage-1-250.4/lib/udev/rules.d/50-udev-default.rules:43 Unknown group 'sgx', ignoring
Sep 19 15:35:07 localhost systemd-udevd[108]: /nix/store/k677938wq20cpykn5wcbwmwz65mb70py-systemd-stage-1-250.4/lib/udev/rules.d/50-udev-default.rules:44 Unknown group 'sgx', ignoring
Sep 19 15:35:07 localhost systemd-udevd[108]: /nix/store/k677938wq20cpykn5wcbwmwz65mb70py-systemd-stage-1-250.4/lib/udev/rules.d/50-udev-default.rules:50 Unknown group 'audio', ignoring
Sep 19 15:35:07 localhost systemd-udevd[108]: /nix/store/k677938wq20cpykn5wcbwmwz65mb70py-systemd-stage-1-250.4/lib/udev/rules.d/50-udev-default.rules:60 Unknown group 'audio', ignoring
Sep 19 15:35:07 localhost systemd-udevd[108]: /nix/store/k677938wq20cpykn5wcbwmwz65mb70py-systemd-stage-1-250.4/lib/udev/rules.d/50-udev-default.rules:61 Unknown group 'audio', ignoring
Sep 19 15:35:07 localhost systemd-udevd[108]: /nix/store/k677938wq20cpykn5wcbwmwz65mb70py-systemd-stage-1-250.4/lib/udev/rules.d/50-udev-default.rules:62 Unknown group 'video', ignoring
Yea those are an unfortunate quirk of the systemd stage 1, but nothing to worry about. Basically in stage 1 we have some udev rules that refer to groups that don’t exist until stage 2. It’s harmless.
And just in case that wasn’t a typo, it’s ctrl+alt +f1, not just ctrl+f1.
jdaly
September 19, 2022, 9:46pm
16
@ElvishJerricco My typo – yes, I tried CTRL+ALT+F1-F12 – and wasn’t able to reach a VT nor from SSH.
That definitely makes me suspect a kernel panic. Try journalctl -b -1 -e
to see if anything noteworthy is at the end of the logs from the previous boot. If not, then a kernel panic seems very likely, and we may have to look at pstore things to get any more logs
jdaly
September 19, 2022, 9:51pm
18
@ElvishJerricco
journalctl -b -1 -e
Sep 19 15:35:51 talos-devenv systemd[1]: Stopped Create Volatile Files and Directories.
Sep 19 15:35:51 talos-devenv systemd[1]: Stopped target Local File Systems.
Sep 19 15:35:51 talos-devenv systemd[1]: Unmounting /boot/efi…
Sep 19 15:35:51 talos-devenv systemd[1]: Unmounting /run/keys…
Sep 19 15:35:51 talos-devenv systemd[1]: Unmounting /run/wrappers…
Sep 19 15:35:51 talos-devenv systemd[1]: boot-efi.mount: Deactivated successfully.
Sep 19 15:35:51 talos-devenv systemd[1]: Unmounted /boot/efi.
Sep 19 15:35:51 talos-devenv systemd[1]: run-keys.mount: Deactivated successfully.
Sep 19 15:35:51 talos-devenv systemd[1]: Unmounted /run/keys.
Sep 19 15:35:51 talos-devenv systemd[1]: run-wrappers.mount: Deactivated successfully.
Sep 19 15:35:51 talos-devenv systemd[1]: Unmounted /run/wrappers.
Sep 19 15:35:51 talos-devenv systemd[1]: Stopped target Swaps.
Sep 19 15:35:51 talos-devenv systemd[1]: Deactivating swap /dev/disk/by-id/nvme-WDC_WDS500G2B0C-00PXH0_212714800611-part3…
Sep 19 15:35:51 talos-devenv systemd[1]: systemd-fsck@dev-disk-by\x2duuid-4842\x2d0D4C.service: Deactivated successfully.
Sep 19 15:35:51 talos-devenv systemd[1]: Stopped File System Check on /dev/disk/by-uuid/4842-0D4C.
Sep 19 15:35:51 talos-devenv systemd[1]: Removed slice Slice /system/systemd-fsck.
Sep 19 15:35:51 talos-devenv systemd[1]: Stopped target Preparation for Local File Systems.
Sep 19 15:35:51 talos-devenv systemd[1]: systemd-remount-fs.service: Deactivated successfully.
Sep 19 15:35:51 talos-devenv systemd[1]: Stopped Remount Root and Kernel File Systems.
Sep 19 15:35:51 talos-devenv systemd[1]: systemd-tmpfiles-setup-dev.service: Deactivated successfully.
Sep 19 15:35:51 talos-devenv systemd[1]: Stopped Create Static Device Nodes in /dev.
Sep 19 15:35:51 talos-devenv systemd[1]: dev-disk-by\x2did-nvme\x2deui.e8238fa6bf530001001b448b4187800b\x2dpart3.swap: Deactivated successfully.
Sep 19 15:35:51 talos-devenv systemd[1]: Deactivated swap /dev/disk/by-id/nvme-eui.e8238fa6bf530001001b448b4187800b-part3.
Sep 19 15:35:51 talos-devenv systemd[1]: dev-disk-by\x2dpartuuid-033ef907\x2dc113\x2dd940\x2da56c\x2dddfff18d4f15.swap: Deactivated successfully.
Sep 19 15:35:51 talos-devenv systemd[1]: Deactivated swap /dev/disk/by-partuuid/033ef907-c113-d940-a56c-ddfff18d4f15.
Sep 19 15:35:51 talos-devenv systemd[1]: dev-disk-by\x2dlabel-swap.swap: Deactivated successfully.
Sep 19 15:35:51 talos-devenv systemd[1]: Deactivated swap /dev/disk/by-label/swap.
Sep 19 15:35:51 talos-devenv systemd[1]: dev-disk-by\x2did-nvme\x2dWDC_WDS500G2B0C\x2d00PXH0_212714800611\x2dpart3.swap: Deactivated successfully.
Sep 19 15:35:51 talos-devenv systemd[1]: Deactivated swap /dev/disk/by-id/nvme-WDC_WDS500G2B0C-00PXH0_212714800611-part3.
Sep 19 15:35:51 talos-devenv systemd[1]: dev-disk-by\x2dpath-pci\x2d0000:04:00.0\x2dnvme\x2d1\x2dpart3.swap: Deactivated successfully.
Sep 19 15:35:51 talos-devenv systemd[1]: Deactivated swap /dev/disk/by-path/pci-0000:04:00.0-nvme-1-part3.
Sep 19 15:35:51 talos-devenv systemd[1]: dev-nvme0n1p3.swap: Deactivated successfully.
Sep 19 15:35:51 talos-devenv systemd[1]: Deactivated swap /dev/nvme0n1p3.
Sep 19 15:35:51 talos-devenv systemd[1]: dev-disk-by\x2duuid-0c402608\x2dbf44\x2d4efc\x2d9a44\x2d81208e37cc3b.swap: Deactivated successfully.
Sep 19 15:35:51 talos-devenv systemd[1]: Deactivated swap /dev/disk/by-uuid/0c402608-bf44-4efc-9a44-81208e37cc3b.
Sep 19 15:35:51 talos-devenv systemd[1]: Reached target Unmount All Filesystems.
Sep 19 15:35:51 talos-devenv systemd[1]: generate-shutdown-ramfs.service: Deactivated successfully.
Sep 19 15:35:51 talos-devenv systemd[1]: Finished Generate shutdown ramfs.
Sep 19 15:35:51 talos-devenv systemd[1]: Reached target System Shutdown.
Sep 19 15:35:51 talos-devenv systemd[1]: Reached target Late Shutdown Services.
Sep 19 15:35:51 talos-devenv systemd[1]: systemd-reboot.service: Deactivated successfully.
Sep 19 15:35:51 talos-devenv systemd[1]: Finished System Reboot.
Sep 19 15:35:51 talos-devenv systemd[1]: Reached target System Reboot.
Sep 19 15:35:51 talos-devenv systemd[1]: Shutting down.
Sep 19 15:35:51 talos-devenv systemd[1]: Using hardware watchdog ‘iTCO_wdt’, version 0, device /dev/watchdog0
Sep 19 15:35:51 talos-devenv systemd[1]: Watchdog running with a timeout of 10min.
Sep 19 15:35:51 talos-devenv kernel: watchdog: watchdog0: watchdog did not stop!
Sep 19 15:35:51 talos-devenv systemd-shutdown[1]: Using hardware watchdog ‘iTCO_wdt’, version 0, device /dev/watchdog0
Sep 19 15:35:51 talos-devenv systemd-shutdown[1]: Watchdog running with a timeout of 10min.
Sep 19 15:35:51 talos-devenv systemd-shutdown[1]: Syncing filesystems and block devices.
Sep 19 15:35:51 talos-devenv systemd-shutdown[1]: Sending SIGTERM to remaining processes…
Sep 19 15:35:51 talos-devenv systemd-journald[390]: Journal stopped
oh that’s just a normal reboot. Was the previous boot a crash, or did you manually reboot?
jdaly
September 19, 2022, 10:12pm
20
@ElvishJerricco Gotcha. Not sure what I’m looking for. I rebooted again, and noticed the following errors, which appear related to gnome and nvidia …
Sep 19 15:57:47 talos-devenv gnome-session[1048]: gnome-session-binary[1048]: GnomeDesktop-WARNING: Could not create transient scope for PID 1268: GDBus.Error:org.freedesktop.DBus.Error.UnixProcessIdUnknown: Process with >
Sep 19 15:57:47 talos-devenv gnome-session-binary[1048]: GnomeDesktop-WARNING: Could not create transient scope for PID 1268: GDBus.Error:org.freedesktop.DBus.Error.UnixProcessIdUnknown: Process with ID 1268 does not exis>
Sep 19 15:57:47 talos-devenv .gnome-shell-wr[1066]: Error looking up permission: GDBus.Error:org.freedesktop.portal.Error.NotFound: No entry for geolocation
Sep 19 15:57:47 talos-devenv .gsd-usb-protec[1282]: Failed to fetch USBGuard parameters: GDBus.Error:org.freedesktop.DBus.Error.ServiceUnknown: The name org.usbguard1 was not provided by any .service files
Sep 19 15:57:47 talos-devenv .gsd-media-keys[1264]: Failed to grab accelerator for keybinding settings:playback-repeat
Sep 19 15:57:47 talos-devenv .gsd-media-keys[1264]: Failed to grab accelerator for keybinding settings:rotate-video-lock
Sep 19 15:57:47 talos-devenv .gsd-media-keys[1264]: Failed to grab accelerator for keybinding settings:hibernate
Sep 19 15:57:47 talos-devenv .gsd-media-keys[1264]: Failed to grab accelerator for keybinding settings:playback-random
...
...
Sep 19 15:58:04 talos-devenv gnome-session[1584]: gnome-session-binary[1584]: GLib-GIO-CRITICAL: g_bus_get_sync: assertion 'error == NULL || *error == NULL' failed
Sep 19 15:58:04 talos-devenv gnome-session[1584]: gnome-session-binary[1584]: GLib-GIO-CRITICAL: g_bus_get_sync: assertion 'error == NULL || *error == NULL' failed
Sep 19 15:58:04 talos-devenv gnome-session-binary[1584]: GLib-GIO-CRITICAL: g_bus_get_sync: assertion 'error == NULL || *error == NULL' failed
Sep 19 15:58:04 talos-devenv gnome-session-binary[1584]: GLib-GIO-CRITICAL: g_bus_get_sync: assertion 'error == NULL || *error == NULL' failed
Sep 19 15:58:04 talos-devenv gdm-launch-environment][1604]: GLib-GObject: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
...
...
Sep 19 15:58:04 talos-devenv gdm[866]: Gdm: GdmDisplay: Session never registered, failing
Sep 19 15:58:04 talos-devenv gdm[866]: Gdm: GdmLocalDisplayFactory: maximum number of X display failures reached: check X server log for errors
Sep 19 15:58:04 talos-devenv gdm-launch-environment][1628]: GLib-GObject: g_object_unref: assertion 'G_IS_OBJECT (object)' failed
Sep 19 15:58:04 talos-devenv systemd[1]: session-c6.scope: Deactivated successfully.
Sep 19 15:58:04 talos-devenv gdm[866]: Gdm: Child process -1631 was already dead.
Sep 19 15:58:04 talos-devenv systemd-logind[651]: Session c6 logged out. Waiting for processes to exit.