Registered Member
|
I have switched from one user to another several times. The first user stays logged in, I login to the other, logout, then go back to the first user. After doing that several times over several days this is what I get:
Why are there so many "unused" sessions"? How can I get rid of them appearing on there? How can I stop this from happening? I somehow feel like I'm not switching users properly even though I'm pretty sure I'm clicking on the right options. Any suggestions would be appreciated. |
Registered Member
|
Usually when you log out it should clean up the session and bring you back to the previous session (now locked). The lock screen will probably still list the new session that had been created as I don't think there's anything which notifies each session as other sessions are started or stopped. When you log in and then lock the session again it should refresh with the current list of available sessions. If those sessions still show up, you could try switching to them and see what happens.
Each of these sessions can usually be accessed using Ctrl+Alt+Fn shortcuts. Usually the first graphical session is set up at Ctrl+Alt+F8 and subsequent graphical sessions are available under F9+, with text sessions filling in F1-F7, though different (newer?) systems may configure this differently (my ubuntu 18.04 system has the initial login screen at F1, first graphical session at F2 and text sessions at F3+). Another option you can try is pressing those keyboard combos to switch between the different sessions and figure out what shows up in each.
airdrik, proud to be a member of KDE forums since 2008-Dec.
|
Registered Member
|
I know that this essentially how kde treats terminals tty and that you can change them using ctrl+alt+fn. But kde is not closing the sessions once I logout it seems so I don't know if I did anything wrong (even though switching users seems straightforward enough). Given that kde isn't getting rid of those sessions or removing them from ssdm, is there a way to get rid of them other than restarting the OS?
|
Registered Member
|
If the session is still running then there must be some process associated with that session which didn't get closed out when you logged out. Check for any stray "kdeinit5" processes; there should be one per active session. (you can use Ctrl+Esc to bring up the process list)
airdrik, proud to be a member of KDE forums since 2008-Dec.
|
Registered Member
|
Is that process supposed to be left running even if I log out of the session? |
Registered Member
|
Bug filed: https://bugs.kde.org/show_bug.cgi?id=407305
|
Registered Member
|
nope, when you log in that session is directly tied to that process (at a higher level, logging in launches a particular process, the exit of which process is what constitutes/finalizes logging out. For KDE Plasma sessions, that process is kdeinit5).
You might also look at the tree view of the processes to see what specific things are still attached to those sessions that's keeping them from ending.
airdrik, proud to be a member of KDE forums since 2008-Dec.
|
Registered Member
|
My finding has been that there is indeed a process running for these sessions which is why they are "Unused" and that process is SDDM! Like if you failed to authenticate and then made a new sessions, and did so again and again... As strong and powerful KDE is as a DE, it's weakest part right now is the extremely buggy sessions manager and lock screen.
I have tested a fix for this issue and posted a solution here -> viewtopic.php?f=305&t=151924&p=425108#p425108 Hopefully it works for you as well. |
Registered Member
|
I didn't fail to authenticate though. Thanks for suggesting a fix, I'm not sure I'll be able to test this out soon but I'll bookmark it. The KDE session manager is incredibly unstable. Not to mention that sometimes it locks if there's an intense IO operation going on in one of the sessions... Not sure how it's fallen through the cracks like that. |
Registered Member
|
I found this quite annoying running Kubuntu for the main desktop for my family. so, I wrote this bash script (which must be run with root privileges):
using loginctl list-sessions, I can grep for the ID of each session, and then show the State property of each. If the State property is equal to "closing", then it is one of the "unused" sessions that shows up in the login switcher. killing this session seems to remove the "unused" session, and doesn't seem to affect anything else. This script can be run at user logout, or as a cron job for the root user I know this is a hack, but it seems to work for me until the devs figure out how to actually solve the issue. |
Registered users: Baidu [Spider], Bing [Bot], Google [Bot], Yahoo [Bot]