Bug 357140 - Can't terminate KDE session if it's been open for a long time
Summary: Can't terminate KDE session if it's been open for a long time
Status: RESOLVED WORKSFORME
Alias: None
Product: ksmserver
Classification: Unmaintained
Component: general (show other bugs)
Version: 5.4.2
Platform: Kubuntu Linux
: NOR crash
Target Milestone: ---
Assignee: Lubos Lunak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-12-25 08:28 UTC by Fibonacci
Modified: 2019-01-19 04:13 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Fibonacci 2015-12-25 08:28:49 UTC
After a KDE session has been running for a long time (it's not always the same time, but the longer it is, the higher the chance this bug will appear), trying to logout, reboot or shutdown from the menu results in absolutely nothing happening – not even the usual dialog asking me to confirm logging out.

Running qdbus org.kde.ksmserver /KSMServer logout 0 0 0 only prints the following:
Cannot find '.logout' in object /KSMServer at org.kde.ksmserver

The only way to log out at this point is to either shut down or reboot the computer from the command line (i.e. reboot/poweroff commands)

Strangely, both logging out from the menu or running the aforementioned command work fine most of the time right after I've logged in.

Reproducible: Sometimes

Steps to Reproduce:
1. Open a KDE session
2. Leave it running for a long time
3. Try to logout

Actual Results:  
Nothing

Expected Results:  
The KDE session terminates
Comment 1 Artur Puzio 2015-12-25 15:56:08 UTC
What do you mean by long time? Few hours, days or weeks?
Also this bug seams to be similar to bug 283879.
Comment 2 Fibonacci 2015-12-26 01:08:11 UTC
As I said, it's not always the same time, but it's usually six days or so – dropping to a few hours in the worst cases.
Comment 3 Fibonacci 2015-12-26 04:05:47 UTC
Also, I don't think it's the same as bug 283879, since my qdbus command actually does generate some output.
Comment 4 Artur Puzio 2015-12-27 15:35:38 UTC
Could you provide us with some more details about your system like the output of kdeinit5 --version and ksmserver -v?
Please attach also your system log. If your system is running systemd you can use journalctl -t ksmserver to obtain ksmserver logs. Also not filtered log from around the error could be helpful (you can use journalctl --since=DATE).
The output of commands you can put into file by appending >file_name to the end of command.
Comment 5 Fibonacci 2015-12-30 06:10:04 UTC
Before or after the bug appears?
Comment 6 Fibonacci 2016-01-04 18:11:41 UTC
$ kdeinit5 --version
Qt: 5.4.2
KDE: 5.15.0
$ ksmserver -v
Qt: Session management error: networkIdsList argument is NULL
ksmserver 0.4
$ journalctl -t ksmserver
-- No entries --

As for the last command, I just noticed the bug today, but have noticed some oddities for about two days and so I get some 12000 lines of text. I've saved them to a file of course but it's too big. What should I do?
Comment 7 Davide 2016-01-14 19:07:13 UTC
I had a very similar problem since when I updated to Plasma 5 on Debian Testing, on 3 different machines. It generally happens after some hours of work.

$ kdeinit5 --version
Qt: 5.5.1
KDE: 5.16.0

$ ksmserver -v              
Qt: Session management error: networkIdsList argument is NULL
ksmserver 0.4
Comment 8 Davide 2016-01-14 22:51:31 UTC
Just happening now.

$ journalctl -t ksmserver
-- No entries --

$ cat .xsession-errors
Shutdown called with confirm  -1  type  -1  and mode  -1
After modifications confirm is  -1  type is  2  and mode  3

Nothing else.
Comment 9 Davide 2016-01-14 22:53:15 UTC
$ qdbus org.kde.ksmserver /KSMServer logout 0 0 0
Cannot find '.logout' in object /KSMServer at org.kde.ksmserver
Comment 10 Peter Hewett 2016-01-20 07:35:15 UTC
Very similar symptoms here on Kubuntu 15.10: nothing happens when Leave is selected from the menu, and ksmserver goes to 100% cpu.
 $ kdeinit5 --version
Qt: 5.4.2
KDE: 5.15.0
 $ ksmserver -v
Qt: Session management error: networkIdsList argument is NULL
ksmserver 0.4
 $ journalctl -t ksmserver
-- No entries --

The driver manager in system settings offers 3 graphics drivers;
- nvidia 352 (recommended)
- nvidia 352-updates
- x.org nouveau display driver

I have tried with all three drivers (with a reboot between changes) and the freeze-on-shutdown symptoms occur with each of the nvidia drivers, but not (so far) with the x.org driver.

These symptoms appear to be similar to KDE bug 328571.
Comment 11 Fibonacci 2016-01-21 19:42:12 UTC
I'm also using the nvidia-352 drivers. Could it be related?
Comment 12 Fibonacci 2016-02-28 06:44:38 UTC
I've also noticed that, when this happens, the process ksmserver is at 100% CPU usage.
Comment 13 deflexor 2016-04-12 19:23:53 UTC
Affects me also. Not the same behaviour though. "Logout" button works fine. But when I press "Restart" button, the whole interface freezes while mouse cursor i still moving and when you click anywhere - nothing happens. The only thing i could do was pressing Ctrl-Alt-F2 and in 'top' see ksmserver eating 100% cpu.

Some info about my setup:

Laptop with hybrid graphics Intel/Nvidia (nouveau driver)

$ kdeinit5 --version
Qt: 5.6.0
KDE: 5.20.0

$ ksmserver -v
Qt: Session management error: networkIdsList argument is NULL
ksmserver 0.4


$ journalctl -t ksmserver
apr 12 21:44:38 localhost.localdomain ksmserver[1548]: Qt: Session management error: networkIdsList argument is NULL
apr 12 21:44:38 localhost.localdomain ksmserver[1548]: QDBusConnection: name 'org.kde.kglobalaccel' had owner '' but we thought it was ':1.14'
apr 12 21:44:38 localhost.localdomain ksmserver[1548]: kcminit not running? If we are running with mobile profile or in another platform other than X11 this is normal.
apr 12 22:04:36 localhost.localdomain ksmserver[1548]: QProcess: Destroyed while process ("kwin_x11") is still running.

The last line seems have appeared just when I pressed "Reboot" button.

Also similar freeze i get sometimes when right-clicking menu entry.
Comment 14 Andrew Crouthamel 2018-11-01 13:57:31 UTC
Dear Bug Submitter,

This bug has been stagnant for a long time. Could you help us out and re-test if the bug is valid in the latest version? I am setting the status to NEEDSINFO pending your response, please change the Status back to REPORTED when you respond.

Thank you for helping us make KDE software even better for everyone!
Comment 15 Davide 2018-11-03 21:59:14 UTC
It doesn't happens anymore for me, thanks.
Comment 16 Andrew Crouthamel 2018-11-05 02:40:27 UTC
Thanks for the update!
Comment 17 Peter Hewett 2019-01-19 04:13:33 UTC
I haven't observed this behaviour, but now I'm running Kubuntu 18.10.