Wayland crashes after short time

Hi y’all,

Recently I’ve been having issues with my setup as I have started playing around with Home Manager. NixOS boots up all fine and everything is running well but after 15 minutes it (more or less) logs me out closing everything I had open. Now to be clear, I don’t have a year long experience but I’m also not very new.
Is there any way to check the Wayland logs?

Currently my setup is like this:
Hardware:

  • Intel i5 9600K
  • Nvidia RTX2080
  • 28GB RAM

NixOs:

  • Hyprland
  • Waybar
  • Home-Manager
  • Flakes (although the flake.nix doesn’t output anything as of now)

The Home Manager configuration consists of not much more than the template that it comes with but with 2-3 extra configurations for Waybar, zsh, mangohud and git. Does anyone know anything that could be the problem in such cases? I can deliver the dotfiles if needed but they’re very much not beautifully formatted as of now.

I’d mostly suspect a broken lock screen config, or perhaps OOM (but you have plenty of memory - if a non-power-of-2 number). Followed by graphics driver issues, bloody nvidia.

By default, you can use journalctl -t xsession if this is not changed: NixOS Search

That said YMMV depending on how you start the session. Yes, wayland sessions are generally still started by the xsession wrapper, hence the confusing name, but you can configure things such that they aren’t.

Great man! Thanks for the answer!
Will try that out later when I’m back from work!

A little belated but I tried it out. There’s no xsession in journalctl but when I check systemd-logind I get following:

Mai 05 02:50:44 nixos systemd-logind[833]: Session 4 logged out. Waiting for processes to exit.
Mai 05 02:50:44 nixos systemd-logind[833]: New session c2 of user sddm.
Mai 05 02:50:49 nixos systemd-logind[833]: New session 6 of user yamborghinifly.
Mai 05 02:50:49 nixos systemd-logind[833]: Session c2 logged out. Waiting for processes to exit.
Mai 05 02:50:49 nixos systemd-logind[833]: Removed session c2.
Mai 05 02:50:49 nixos systemd-logind[833]: Removed session 4.
Mai 05 02:58:59 nixos systemd-logind[833]: Session 6 logged out. Waiting for processes to exit.
Mai 05 02:58:59 nixos systemd-logind[833]: New session c3 of user sddm.
Mai 05 02:58:59 nixos systemd-logind[833]: New session 8 of user yamborghinifly.
Mai 05 02:59:04 nixos systemd-logind[833]: New session 9 of user yamborghinifly.
Mai 05 02:59:04 nixos systemd-logind[833]: Session c3 logged out. Waiting for processes to exit.
Mai 05 02:59:04 nixos systemd-logind[833]: Removed session c3.
Mai 05 02:59:04 nixos systemd-logind[833]: Removed session 6.

So basically it seems like it randomly starts creating new sessions and logging out the old ones for whatever reason.

journalctl -t systemd shows following:

Mai 05 02:59:14 nixos systemd[1]: Stopping User Manager for UID 175...
Mai 05 02:59:14 nixos systemd[9825]: Activating special unit Exit the Session...
Mai 05 02:59:14 nixos systemd[9825]: Stopped target Main User Target.
Mai 05 02:59:14 nixos systemd[9825]: Stopped target Basic System.
Mai 05 02:59:14 nixos systemd[9825]: Stopped target Paths.
Mai 05 02:59:14 nixos systemd[9825]: Stopped target Sockets.
Mai 05 02:59:14 nixos systemd[9825]: Stopped target Timers.
Mai 05 02:59:14 nixos systemd[9825]: Closed Sound System.
Mai 05 02:59:14 nixos systemd[9825]: Stopping D-Bus User Message Bus...
Mai 05 02:59:14 nixos systemd[9825]: Stopped D-Bus User Message Bus.
Mai 05 02:59:14 nixos systemd[9825]: Removed slice User Core Session Slice.
Mai 05 02:59:14 nixos systemd[9825]: Closed D-Bus User Message Bus Socket.
Mai 05 02:59:14 nixos systemd[9825]: Removed slice User Application Slice.
Mai 05 02:59:14 nixos systemd[9825]: Reached target Shutdown.
Mai 05 02:59:14 nixos systemd[9825]: Finished Exit the Session.
Mai 05 02:59:14 nixos systemd[9825]: Reached target Exit the Session.
Mai 05 02:59:14 nixos systemd[1]: user@175.service: Deactivated successfully.
Mai 05 02:59:14 nixos systemd[1]: Stopped User Manager for UID 175.
Mai 05 02:59:14 nixos systemd[1]: Stopping User Runtime Directory /run/user/175...
Mai 05 02:59:14 nixos systemd[1]: run-user-175.mount: Deactivated successfully.
Mai 05 02:59:14 nixos systemd[1]: user-runtime-dir@175.service: Deactivated successfully.
Mai 05 02:59:14 nixos systemd[1]: Stopped User Runtime Directory /run/user/175.
Mai 05 03:01:41 nixos systemd[1]: Starting Time & Date Service...
Mai 05 03:01:41 nixos systemd[1]: Started Time & Date Service.
Mai 05 03:02:11 nixos systemd[1]: systemd-timedated.service: Deactivated successfully.

Also testing xdg-desktop-portal-hyprland doesn’t show anything useful as it seems…

Checking dmesg shows follwing:

[  628.763813] .xdg-desktop-po[1244]: segfault at 110 ip 00007f898fa6a01d sp 00007ffd34d468c8 error 4 in libsdbus-c++.so.1.5.0[7f898fa61000+23000] likely on CPU 2 (core 2, socket 0)

Since Windows actually seems to be working fine on this machine I don’t actually think that the CPU’s broken but that still seems weird.

Random segfaults are probably not unexpected if your desktop crashes and stuff just runs wild.

Just the contents of journalctl --boot would be more helpful than specific topics.

Anything useful in coredumpctl?

IIRC Hyprland had… opinions about how to handle crashes and logging. Check if there is anything in ~.hyprland or something like that.

– journalctl --boot

–coredumpctl

Looks like hyprland is dying with sigabrt. Since the coredumps are still present, you should be able to extract backtrace from them. With the backtrace you may be able to find out the cause online or report it to upstream.