Summary: | libkworkspace: logind instantly kills all user sessions on shutdown | ||
---|---|---|---|
Product: | [Unmaintained] ksmserver | Reporter: | Max Harmathy <harmathy> |
Component: | general | Assignee: | Lubos Lunak <l.lunak> |
Status: | RESOLVED WORKSFORME | ||
Severity: | major | CC: | harmathy, j, kde, m.weghorn, nate, rdieter |
Priority: | NOR | ||
Version: | 5.11.95 | ||
Target Milestone: | --- | ||
Platform: | Other | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Max Harmathy
2018-01-18 09:03:52 UTC
So the issue sit hat KSMServer in its destructor calls KDisplayManager shutdown which will kill the session instantly. I was just digging forever to find where that would be, I thought requestShutdown would already just call logind. How about using shutdown scripts? Does it work when you place a script in /etc/xdg/plasma-workspace/shutdown (In reply to Kai Uwe Broulik from comment #1) > So the issue sit hat KSMServer in its destructor calls KDisplayManager > shutdown which will kill the session instantly. I was just digging forever > to find where that would be, I thought requestShutdown would already just > call logind. This happens in the class SystemdSession in https://cgit.kde.org/plasma-workspace.git/tree/libkworkspace/kdisplaymanager.cpp > How about using shutdown scripts? Does it work when you place a script in > /etc/xdg/plasma-workspace/shutdown Yes, scripts in /etc/xdg/plasma-workspace/shutdown get always executed. But they are executed by the KSMServer itself (although the documentation in plasma-desktop states they would be executed by startkde) and therefore before the DBus message to logind. See KSMServer::runShutdownScripts in https://cgit.kde.org/plasma-workspace.git/tree/ksmserver/server.cpp So, what prevents you from using shutdown scripts instead? There's not much going on in startkde after ksmserver has quit.
I agree this is a bug but requires significant re-engineering of the startup and session handling code that is decades old and probably becomes obsolete with Wayland anyway.
> although the documentation in plasma-desktop states they would be executed by startkde
Where can I find this documentation?
(In reply to Kai Uwe Broulik from comment #3) > So, what prevents you from using shutdown scripts instead? There's not much > going on in startkde after ksmserver has quit. Then the code following ksmserver in startkde should probably be moved to a shutdown script itself. As for our specific use case: We will find a solution (probably not upstream suitable), that won't require too much refactoring on our side. But that should not be an issue for this ticket. > I agree this is a bug but requires significant re-engineering of the startup > and session handling code that is decades old and probably becomes obsolete > with Wayland anyway. Well with wayland there is "startplasmacompositor" which starts "kwin" which starts "startplasma" which is more or less a copy of "startkde". Thus basically there is the same problem for now. Or are there plans to replace ksmserver? > > although the documentation in plasma-desktop states they would be executed by startkde > > Where can I find this documentation? I guess I got confused by the comment of Autostart::load in https://cgit.kde.org/plasma-desktop.git/tree/kcms/autostart/autostart.cpp That is probably just a copy and paste slip. The autostart documentation correctly only states that "$HOME/.config/plasma-workspace/env" is executed by "startkde". https://cgit.kde.org/plasma-desktop.git/tree/doc/kcontrol/autostart/index.docbook Thank you for reporting this issue in KDE software. As it has been a while since this issue was reported, can we please ask you to see if you can reproduce the issue with a recent software version? If you can reproduce the issue, please change the status to "REPORTED" when replying. Thank you! Dear Bug Submitter, This bug has been in NEEDSINFO status with no change for at least 15 days. Please provide the requested information as soon as possible and set the bug status as REPORTED. Due to regular bug tracker maintenance, if the bug is still in NEEDSINFO status with no change in 30 days the bug will be closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging If you have already provided the requested information, please mark the bug as REPORTED so that the KDE team knows that the bug is ready to be confirmed. Thank you for helping us make KDE software even better for everyone! This bug has been in NEEDSINFO status with no change for at least 30 days. The bug is now closed as RESOLVED > WORKSFORME due to lack of needed information. For more information about our bug triaging procedures please read the wiki located here: https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging Thank you for helping us make KDE software even better for everyone! |