Bug 433364 - [systemd startup] Can't unlock session with loginctl
Summary: [systemd startup] Can't unlock session with loginctl
Status: RESOLVED FIXED
Alias: None
Product: ksmserver
Classification: Plasma
Component: general (show other bugs)
Version: 5.21.0
Platform: Arch Linux Linux
: VHI normal
Target Milestone: ---
Assignee: David Edmundson
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2021-02-21 06:55 UTC by Eve Kaczmarek
Modified: 2021-06-21 22:24 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.22


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Eve Kaczmarek 2021-02-21 06:55:58 UTC
SUMMARY


STEPS TO REPRODUCE
1. lock the screen (Meta+L)
2. switch to tty (Ctrl+Alt+F2), login and type "loginctl unlock-sessions"
3. switch back to graphics

OBSERVED RESULT

Session must be unlocked

EXPECTED RESULT

Screenlocker still there

SOFTWARE/OS VERSIONS
Operating System: Arch Linux
KDE Plasma Version: 5.21.0
KDE Frameworks Version: 5.79.0
Qt Version: 5.15.2
Kernel Version: 5.10.8-112-tkg-upds
OS Type: 64-bit
Graphics Platform: X11
Processors: 12 × Intel® Core™ i7-8700 CPU @ 3.20GHz
Memory: 15.6 GiB of RAM
Graphics Processor: GeForce GTX 1080/PCIe/SSE2

ADDITIONAL INFORMATION

As workaround, I tried to rollback the plasma-workspace package from 5.21.0-1 to 5.20.5-2 and it worked.
Comment 1 Nate Graham 2021-02-22 21:46:10 UTC
Are you using the optional systemd startup feature?
Comment 2 Eve Kaczmarek 2021-02-23 08:42:44 UTC
(In reply to Nate Graham from comment #1)
> Are you using the optional systemd startup feature?

Yes.
Comment 3 Nate Graham 2021-02-23 14:13:55 UTC
Thanks, I thought so. I can confirm this. Raising priority since this effectively locks you out of your session entirely when you hit Bug 433054.
Comment 4 David Edmundson 2021-02-25 12:25:38 UTC
                                                         QStringLiteral("GetSessionByPID"));


well there's our problem
Comment 5 Bug Janitor Service 2021-05-08 23:00:59 UTC
A possibly relevant merge request was started @ https://invent.kde.org/plasma/kscreenlocker/-/merge_requests/35
Comment 6 David Edmundson 2021-05-10 10:09:09 UTC
Git commit a59f0d75f36fcfccf6ef3a256afbab5143353f7b by David Edmundson.
Committed on 08/05/2021 at 22:59.
Pushed by davidedmundson into branch 'master'.

Port from GetSessionByPid

GetSessionByPid is broken especially when the calling process is in a
different cgroup to the session object.

Rather than using the magic "/auto" object path, calling GetSession with
the argument "auto" seems to work on even distros with old bases and is
the smallest code change.

M  +2    -2    logind.cpp

https://invent.kde.org/plasma/kscreenlocker/commit/a59f0d75f36fcfccf6ef3a256afbab5143353f7b