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
Fix SDDM hanging when shutting down Plasma Wayland session #1515
Conversation
SignalHandler::initialize() must be called otherwise signals won't be processed and helpers can crash when they receive SIGTERM.
If xorg stops, sddm will try to create a new display, however this can create issues at shutdown where systemd tries to kill all processes in the cgroup. This change changes the kill mode of sddm to mixed. With that mode, sddm will be able to terminate the display itself. If sddm fails to do so within reasonable interval, systemd will start killing processes in the cgroup.
If sddm-helper misbehaves at shutdown, e.g. crashes, sddm may try to restart display, which can end up in shutdown getting stuck.
94e2830
to
3485204
Compare
When the computer shuts down, sddm can try to restart Xorg and hang when reading the display from Xorg. This change intends to mitigate that issue by making sddm delaying stopping display if the sddm-helper's exit code is not 0. If the exit code is 0, the user has most likely logged out, and therefore it should be relatively safe to restart display. Otherwise wait a second before attempting to restart display.
3485204
to
1204ef8
Compare
@zzag Here are couple errors found when building from git with PRs 1489, 1494, 1506, 1511
|
I looked into rebasing these before I just built 'develop' to find my issue resolved - I'm not sure that this fix needs to be applied (but may still be valuable). Those errors can easily be fixed by dropping |
If the sddm-helper receives SIGTERM or the session process terminates
with non zero exit code, delaying restarting display.
The main issue with restarting display at shutdown is that sddm can hang
when trying to get display from Xorg. This is the main reason why shutdown
takes so long with plasma wayland session.
fixes #1476