Gnome Shell crashes randomly

I have gnome with wayland in NixOs on the Thinkpad X1 Extreme Gen 2. I see gnome shell randomly crashing and log me out. This has been happening across multiple versions but I can’t reproduce it reliably. The same happened recently, and I got the journalctl logs out

Jan 16 13:02:56 nixos .gnome-shell-wr[48907]: Failed to blit shared framebuffer: EGL failed to allocate resources for the requested operation.
Jan 16 13:02:56 nixos kernel: show_signal_msg: 162 callbacks suppressed
Jan 16 13:02:57 nixos kernel: .gnome-shell-wr[48907]: segfault at fffffffffffffff8 ip 00007f704cece167 sp 00007ffc52112278 error 5 in libmutter-8.so.0.0.0[7f704cdc1000+131000]
Jan 16 13:02:57 nixos kernel: Code: 00 00 00 0f b6 c0 5b 5d 41 5c 41 5d 41 5e 41 5f c3 e8 7d 85 ef ff 66 66 2e 0f 1f 84 00 00 00 00 00 66 90 48 63 05 c1 0d 0c 00 <8b> 44 38 08 c3 0f 1f 40 00 48 8b 07 ff a0 88 00 00 00 0f 1f 80 00
Jan 16 13:02:57 nixos systemd[1]: Started Process Core Dump (PID 217000/UID 0).
Jan 16 13:02:57 nixos systemd-coredump[217001]: Process 48907 (.gnome-shell-wr) of user 1000 dumped core.
Jan 16 13:02:57 nixos systemd[1]: systemd-coredump@1-217000-0.service: Succeeded.
Jan 16 13:02:57 nixos .gnome-calendar[106490]: Error reading events from display: Broken pipe
Jan 16 13:02:57 nixos .gsd-media-keys[49146]: Error reading events from display: Broken pipe
Jan 16 13:02:57 nixos .gsd-wacom-wrap[49170]: Error reading events from display: Broken pipe
Jan 16 13:02:57 nixos .gsd-color-wrap[49142]: Error reading events from display: Broken pipe
Jan 16 13:02:57 nixos .xdg-desktop-po[49584]: Error reading events from display: Broken pipe
Jan 16 13:02:57 nixos .gsd-keyboard-w[49145]: Error reading events from display: Broken pipe
Jan 16 13:02:57 nixos .gsd-power-wrap[49147]: Error reading events from display: Broken pipe
Jan 16 13:02:57 nixos .seahorse-wrapp[106496]: Error reading events from display: Broken pipe
Jan 16 13:02:57 nixos .evolution-alar[49190]: Error reading events from display: Broken pipe
Jan 16 13:02:57 nixos .spotify-wrappe[202909]: Error reading events from display: Broken pipe
Jan 16 13:02:57 nixos systemd[15368]: org.gnome.Shell@wayland.service: Main process exited, code=dumped, status=11/SEGV

Any ideas? on whats happening and how to fix this? Happy to provide any further information

when I search for your first log line

then I find hits with nvidia, so maybe some nvidia driver or setting problem?

did you update the bios?

there is also someone with the same laptop, with errors like you experience

https://forums.lenovo.com/t5/Linux-Discussion/Linux-X1-extreme-HDMI-display-not-working/td-p/4280722

maybe also interesting, just to see if it crashes too, did you try kde plasma?

1 Like

in my case, I solved it installing the nvidia drivers for my graphics card:

https://github.com/kamadorueda/machine/commit/fd16d7e2f35d3c93cad31168085d6f9069065dbf

if you don’t configure it explicitly you’ll end up using nouveau drivers, which may or may not be compatible enough with your hardware

1 Like

The eventual crash might be a red herring. GNOME shell tends to crash on exit after failure, see debian/patches: Avoid full meta context finalization (not sure if that has made it to upstream yet).

1 Like

Updated my config to also include

services.xserver.videoDrivers = [ "nvidia" ];

Will see how it goes, and update here. Thanks for all the help! :slight_smile:

I wrote a small tutorial on how to achieve this:

I confirm that with nouveau my screen crashes frequently but with nvidia it does not

here are a few release notes on the nvidia drivers page:

so you may want to use the latest possible as well