![]() Registered Member ![]()
|
I'm on KDE 4.7.2 release 5, on OpenSUSE.
I'm having trouble with suspend when there are two users logged into KDE simultaneously. When I run with just one graphical login, suspending works fine, for either user. When I run two simultaneous graphical logins, when one user tries to suspend, a dialog appears on the other's screen. e.g., When user Toby's desktop is idle for 1 minute, the screen blanks, but the computer does not suspend. Instead, a dialog appears on user B's desktop saying: "Authentication is required to suspendo the system" This is a PolicyKit dialog, the text comes from /usr/share/polkit-1/actions/org.freedesktop.upower.policy which reads as follows: http://pastebin.com/eVPZUNzZ (I know this because I changed it from suspend to suspendo!) However, if Toby then opens a Konsole window and runs sudo /usr/sbin/pm-suspend then the system does suspend! Ergo, the permissions are fine. This makes me think it's a KDE issue? N.b.: I've been setting power settings using KDE's "Power Profiles" control module. I've tried setting them to one, or both of the users. I also adjusted org.freedesktop.upower.policy to "Allow" using KDE's "Actions Policy" control module. |
![]() Administrator ![]()
|
Interesting. These are completely seperate user accounts right? It seems that PolicyKit is contacting the other users PolicyKit authorisation agent instead of your own one.
Can you check the output of "ck-list-sessions" prior to trying to enact a logout - and see if the correct user is listed as active?
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
Difficult to explain so I'll walk through the steps to reproduce.
(I've coloured to help identify when I'm switching between users.) Reboot machine. Log in as Claire on tty7 Disable Claire's power settings. (i.e. "always on") using Power Profiles KDE control module. Log in as Toby on tty8 Set computer to suspend session after 1 minute using Power Profiles KDE control module. Run ck-list-sessions:
That looks OK. Wait 1 minute. System suspends OK. Resume system with power button. Ctrl-Alt-F7 to switch to Claire's KDE session. Run ck-list-sessions:
Wait 1 minute. System does not suspend. Ctrl-Alt-F8 to switch to Toby's session. Dialogue: "Authentication is required to suspend the system" Enter root password System suspends. |
![]() Administrator ![]()
|
Ok, this is expected behaviour - apart from the prompt even appearing on Toby's screen.
This is because KDE default PolKit rules only permit the currently active user to perform actions involving Power Management. At the same time, Power Management is supposed to stop attempting to perform actions when it is not active. However it seems it is still continuing to attempt to perform actions - and being correctly blocked by PolKit. It is setup this way because each user is permitted to set their own Power Management policy according to their preferences - and should not have the Power Management policies of other users interfering in their work and own preferences.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
OK, thanks for the explanation.
I've set power settings for both users to suspend after 1 minute, now, but I still get problematic behaviour: Reboot Log in as Claire on tty7 Log in as Toby on tty8 Wait 1 minute Screen blanks, but system does not suspend. Wiggle mouse Unlock Toby on tty8 No dialogs shown. ctrl-alt-F7 Unlock Claire on tty7 Dialogue: "Authentication is required to suspend the system" [cancel] ctrl-alt-F8 Dialogue: "Authentication is required to suspend the system" [cancel] Wait 1 minute System does not suspend. System remains on indefinitely! |
![]() Administrator ![]()
|
It appears that Polkit stops verifying actions once it has an active request. In this case, it seems that Claire's session gets there first - and blocks up Polkit.
Unfortunately i'm not sure what to do here. It seems that both Polkit and KDE Power Management have bugs which are preventing the desired action from taking place here.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
What about having tty7 set to suspend at 1 minute, and tty8 set to suspend at 2 minutes? Would that avoid the clash?
|
![]() Administrator ![]()
|
The similarity in times is not what causes the clash - it is the other session attempting to perform Power Management actions such as sleeping the system when it is not the active session.
Unfortunately i'm not sure you can do much to avoid this... please file a bug at bugs.kde.org regarding the inactive session status not disabling KDE Power Management.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
I've created a bug at https://bugs.kde.org/show_bug.cgi?id=295381.
If you can think of any information that would be useful to include on that bug report I would appreciate the advice. Thanks for the help! |
![]() Registered Member ![]()
|
As a temporary fix for this, do you think it would help if one user was on KDE and the second user logged in with a different window manager? e.g. IceWM, XFCE, FVWM...
|
![]() Administrator ![]()
|
Yes, this would be an applicable workaround. Alternatively, make sure the "polkit-kde-authentication-agent-1" process is not running on either user. This way only the active user will be permitted to perform a Polkit action - and all other ones will instantly be denied.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
seems to stop suspending working altogether. Is there a better way to stop it running? |
![]() Administrator ![]()
|
Unfortunately I am not aware of a way. You will need to wait for your bug to be fixed - or otherwise ensure that only one of the two polkit-kde-authentication-agent-1 processes is running - that of the active user.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
![]() Registered Member ![]()
|
Do I understand correctly: somehow kill polkit-kde-authentication-agent-1 for one user and start it for the other, each time someone presses ctrl-alt-F7 or ctrl-alt-F8? Not sure how to go about that to be honest!
|
![]() Administrator ![]()
|
That is correct. Unfortunately i'm not sure either... your best bet is really to get the KDE Power Management bug fixed.
KDE Sysadmin
[img]content/bcooksley_sig.png[/img] |
Registered users: Bing [Bot], Evergrowing, Google [Bot], q.ignora, watchstar