Gnome crashes whenever monitors are (un)blanked
Affected version
ArchLinux, gnome-shell
version 1:40.0+78+g954131c1c-1
, gdm
version 40.0-1
, kernel version 5.12.3.arch1-1
Affected versions: This used to happen also before Gnome 40, but perhaps once a week. Now it happens all the time, on ~90% of screen (un)blanking events. There are negligibly few cases when monitors unblank and the session survives.
According to log timestamps, it looks like most sessions do not die immediately on screen blanking, but survive the screen blanking and die when the screen is unblanked (e.g. after a mouse input).
This happens on Wayland. (I haven’t tried it with XOrg and don’t use XOrg, because XOrg won’t work properly on my monitors (4 DP cables, two 5k MST dual DP monitors) without hax11
and has lots of other problems on top of that.)
Bug summary
Gnome crashes whenever the monitors are (un)blanked. This can be triggered (a) automatically, due to the screen blanking timeout, or (b) after you lock the screen manually.
A workaround is to keep your monitors on 100% of the time and never let them blank…
(A side note: This is probably not triggered by screen locking; disabling automatic screen locking and leaving blanking on will still trigger the problem. Conversely, locking the screen while moving the mouse (to prevent blanking) works fine, shows a lock screen and one can unlock back into the (still surviving) session.)
(Another side note: There are (unrelated) cases where Gnome crashes due to screen locking events, caused by an extension. But this is not the case; I’ve disabled the extension. One would think that DEs with extensions are designed to prevent a single extension from shooting down the whole session, but — nope.)
Steps to reproduce
- Start a Gnome Wayland session from GDM on two HP Z27q 5k MST monitors (4 DisplayPorts altogether, recognized as two 5120×2880 monitors by Gnome).
- The GPU is an AMD Radeon Pro W5700, but the GPU type might not matter all that much.
- Wait for the screen blanking timeout or just lock the screen and wait for the monitors to blank. After one (mostly) or multiple (rarely) screen (un)blanking events, your entire session will crash.
What happened
The Gnome session crashes. Sometimes you get a black screen with a blinking cursor. Alt+F1 gets you back to GDM. Sometimes you get directly back to GDM.
All programs in the Gnome session are gone, all unsaved work lost.
What did you expect to happen
I would expect Gnome to not crash due to screen (un)blanking.
Relevant logs, screenshots, screencasts etc.
I wasn’t sure how to gather relevant logs, so I started with something like journalctl -u 'session-*' -u 'user@1984.service' -o with-unit -b
.
crash.txt, from session start through locking / blanking and a crash during unblaking a few hours later.
Log messages that caught my attention:
Tue 2021-05-11 02:53:45 CEST <hostname> systemd-coredump@26-2265190-0.service[2265191]: Process 2199425 (gnome-shell) of user 1984 dumped core.
Tue 2021-05-11 02:53:45 CEST <hostname> user@1984.service/init.scope[1533655]: org.gnome.Shell@wayland.service: Main process exited, code=dumped, status=11/SEGV
Tue 2021-05-11 02:53:45 CEST <hostname> user@1984.service/init.scope[1533655]: org.gnome.Shell@wayland.service: Failed with result 'core-dump'.