Bug 417038 - Fails to start session after logging out if there is any process of this user
Summary: Fails to start session after logging out if there is any process of this user
Status: RESOLVED FIXED
Alias: None
Product: ksmserver
Classification: Plasma
Component: general (show other bugs)
Version: 5.17.5
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: David Edmundson
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-02-01 21:20 UTC by Pyroman
Modified: 2021-03-14 23:53 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Pyroman 2020-02-01 21:20:45 UTC
SUMMARY

Some time ago I disabled killing user processes on logout as suggested here: https://bugs.kde.org/show_bug.cgi?id=369490
This was working well until 5.17.5 update.

STEPS TO REPRODUCE

1. Disable killing user processes on logout by creating a file /usr/lib/systemd/logind.conf.d/50_kde_neon_allyourprocessarebelongtous.conf:
[Login]
KillUserProcesses=0

Probably rebooting needed to new settings take effect.

2. Log in plasma session.

3. Logout.

4. Try to log in again. Now it fails, shows TTY1 for 2 seconds and returns to SDDM greeter again. I have to login to TTY2, run `pkill -u $USER`. Logouting from TTY is necessary too, otherwise logging in plasma will still fail. But sometimes all this steps didn't help.
Restarting SDDM doesn't help.


SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Neon 18.04
(available in About System)
KDE Plasma Version: 5.17.5
KDE Frameworks Version: 5.66.0
Qt Version: 5.13.2
Comment 1 David Edmundson 2020-02-02 06:46:47 UTC
Can I have a "ps aux" after you've logged out.

Something is dangling, and you've explicitly turned off the part that cleans up.
Comment 2 Pyroman 2020-02-02 18:48:41 UTC
(In reply to David Edmundson from comment #1)
> Can I have a "ps aux" after you've logged out.
> 
> Something is dangling, and you've explicitly turned off the part that cleans
> up.

After logging out: https://pastebin.com/XxwnwfS0
After logging in failure: https://pastebin.com/xKsD9qWM
After kill -u $USER: https://pastebin.com/SdWuPMAB (still cannot log in, have to logout from TTY2)
Comment 3 Pyroman 2020-02-02 18:55:09 UTC
(In reply to Pyroman from comment #2)
> After kill -u $USER

s/kill/pkill/
Comment 4 Bug Janitor Service 2020-02-17 04:33:12 UTC
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!
Comment 5 Pyroman 2020-02-17 06:11:20 UTC
Forgot to change status to reported.
Comment 6 Pyroman 2020-04-05 16:44:04 UTC
Syslog messages: https://pastebin.com/g28kNkCr

Notice message "sddm-greeter[15426]: The X11 connection broke (error 1). Did the X11 server die?"

There are also many QML TypeError messages but they appear even on logging in successfully.
Comment 7 Pyroman 2020-06-13 13:10:33 UTC
This bug looks similar to https://bugs.freedesktop.org/show_bug.cgi?id=94508

As a temporary workaround I've wrote wrapping session which runs `loginctl terminate-session $XDG_SESSION_ID` after `startplasma-x11` exits. https://github.com/rekcuFniarB/LimitDesktopSessionPerUser
Comment 8 Nate Graham 2021-03-11 19:09:08 UTC
This was fixed in Plasma 5.21, thankfully!
Comment 9 Pyroman 2021-03-14 23:53:45 UTC
Confirmed, thanks!