[systemd-bugs] [Bug 85518] New: Closing lid with multiple sessions open fails with an polkit authentication session on the inactive session
bugzilla-daemon at freedesktop.org
bugzilla-daemon at freedesktop.org
Mon Oct 27 07:56:06 PDT 2014
https://bugs.freedesktop.org/show_bug.cgi?id=85518
Bug ID: 85518
Summary: Closing lid with multiple sessions open fails with an
polkit authentication session on the inactive session
Product: systemd
Version: unspecified
Hardware: Other
OS: Linux (All)
Status: NEW
Severity: normal
Priority: medium
Component: general
Assignee: systemd-bugs at lists.freedesktop.org
Reporter: odyx at debian.org
QA Contact: systemd-bugs at lists.freedesktop.org
Hi,
here's my use-case: I routinely have two KDE sessions open and want my laptop
lid closure to always suspend the (X220 Thinkpad) laptop. According to
/usr/share/polkit-1/actions/org.freedesktop.login1.policy , this is what
should happen.
Besides, it doesn't: when closing the laptop lid, the two sessions get
locked by KDE and the _inactive_ session gets a (hidden by the locking
screen) PolKit authentication screen. The laptop doesn't suspend (as
the action is inhibited by this authentication screen). When opening the
lid, I can unlock the inactive session and authenticate through the
PolKit authentication window and the laptop suspens _then_.
(The doubly annoying factor is that I use fprintd for this inactive
session, which means that on lid closure, the fingerprint reader powers
up, heats _and_ is inaccessible as below the screen. [It powers up for
the PolKit authentication window]).
Now, I've investigated and added a
/etc/polkit-1/localauthority/50-local.d/force-suspend.pkla file with the
following content:
[Enforce the suspension on lid close]
Identity=unix-user:*
Action=org.freedesktop.login1.suspend-multiple-sessions
ResultInactive=no
(That's a transformation of the corresponding
<allow_inactive>auth_admin_keep</allow_inactive> from
/usr/share/polkit-1/actions/org.freedesktop.login1.policy into
<...>no<...>)
The addition of this file makes the suspension work reliably from any of
the two active sessions, without a prompt on the other (inactive)
session. I suggest changing the value of allow_inactive for
suspend-multiple-sessions to 'no' then.
Is this the consequence of the following output ?
$ systemd-inhibit --list
Who: PowerDevil (UID 1001/diidier, PID 2595/kded4)
What:
handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch
Why: KDE handles power events
Mode: block
Who: PowerDevil (UID 1000/didier, PID 6164/kded4)
What:
handle-power-key:handle-suspend-key:handle-hibernate-key:handle-lid-switch
Why: KDE handles power events
Mode: block
Who: NetworkManager (UID 0/root, PID 912/NetworkManager)
What: sleep
Why: NetworkManager needs to turn off networks
Mode: delay
3 inhibitors listed.
(aka 2 powerdevils launched, and blocking suspend by default ?)
Please ask if you need other details on my setup.
Cheers,
OdyX
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-bugs/attachments/20141027/d8ad61f2/attachment.html>
More information about the systemd-bugs
mailing list