Disabling suspend and hibernate via polkit in 14.04 does not work.

Bug #1300460 reported by Daniel Drucker
110
This bug affects 21 people
Affects Status Importance Assigned to Milestone
policykit (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

How to disable suspend and hibernate via polkit in Ubuntu 14.04 ?

The pkla file /etc/polkit-1/localauthority/90-mandatory.d/disable-suspend.pkla doesn't work :
Below its contents :

[Disable suspend by default]
Identity=unix-user:*
Action=org.freedesktop.upower.suspend
ResultActive=no

[Disable hibernate by default]
Identity=unix-user:*
Action=org.freedesktop.upower.hibernate
ResultActive=no

Thanks !

Tags: bot-comment
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. It seems that your bug report is not filed about a specific source package though, rather it is just filed against Ubuntu in general. It is important that bug reports be filed about source packages so that people interested in the package can find the bugs about it. You can find some hints about determining what package your bug might be about at https://wiki.ubuntu.com/Bugs/FindRightPackage. You might also ask for help in the #ubuntu-bugs irc channel on Freenode.

To change the source package that this bug is filed about visit https://bugs.launchpad.net/ubuntu/+bug/1300460/+editstatus and add the package name in the text box next to the word Package.

[This is an automated message. I apologize if it reached you inappropriately; please just reply to this message indicating so.]

tags: added: bot-comment
affects: ubuntu → policykit (Ubuntu)
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in policykit (Ubuntu):
status: New → Confirmed
Revision history for this message
William Van Hevelingen (blkperl) wrote :

They changed the suspend and hibernate rules to be under login1.

Try the following:

# cat /etc/polkit-1/localauthority/90-mandatory.d/disable-suspend.pkla
[Disable suspend by default]
Identity=unix-user:*
Action=org.freedesktop.login1.suspend
ResultActive=no

[Disable suspend for all sessions]
Identity=unix-user:*
Action=org.freedesktop.login1.suspend-multiple-sessions
ResultActive=no

Revision history for this message
Daniel Drucker (dmd-c) wrote :

That works, blkperl.

Revision history for this message
v-max (v-max) wrote :

For me this didn't work. However, I'm using xubuntu so maybe here is the problem.

When I boot xbuntu with the laptop display closed suspend is not activated so this behaivor is as expected.
When I open the display, do something and close it again the laptop is going into suspend mode what is not what I want.

I tried the solution with polkit and login1 without success. Renaming the /usr/lib/pm-utils/bin/pm-action to .bak (so pm should be disabled completly) didn't work too.
Of course I first tried the default method to disable suspend with the ubuntu preferences...

Anyone has an idea?

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.