Hello everybody, my Ubuntu 10.04 can't suspend correctly (suspend = not responding), and I want to disable it.
Originally Posted by
marshalium
I found a way to prevent the system from suspending and/or hibernating. The suspend/hibernate options still show up in the menu but if you click on one of them it just locks the screen.
You just need to edit: /usr/share/polkit-1/actions/org.freedesktop.devicekit.power.policy
And change the
Code:
<allow_active>yes</allow_active>
entries for suspend and/or hibernate to
Code:
<allow_active>no</allow_active>
So it should look something like this:
Code:
<action id="org.freedesktop.devicekit.power.suspend">
<description>Suspend the system</description>
<message>Authentication is required to suspend the system</message>
<defaults>
<allow_inactive>no</allow_inactive>
<allow_active>no</allow_active>
</defaults>
</action>
<action id="org.freedesktop.devicekit.power.hibernate">
<description>Hibernate the system</description>
<message>Authentication is required to hibernate the system</message>
<defaults>
<allow_inactive>no</allow_inactive>
<allow_active>no</allow_active>
</defaults>
</action>
Then you will probably need to restart your machine for the changes to take effect.
Maybe this is a good tip, but I don't have config file org.freedesktop.devicekit.power.suspend to edit?
Code:
congminh1709@ubuntu:/usr/share/polkit-1/actions$ ls
com.hp.hplip.policy
com.ubuntu.devicedriver.policy
com.ubuntu.systemservice.policy
com.ubuntu-tweak.daemon.policy
com.ubuntu.usbcreator.policy
gdm.policy
org.debian.apt.policy
org.debian.aptxapianindex.policy
org.freedesktop.consolekit.policy
org.freedesktop.network-manager-settings.system.policy
org.freedesktop.policykit.policy
org.freedesktop.RealtimeKit1.policy
org.freedesktop.SystemToolsBackends.policy
org.freedesktop.udisks.policy
org.freedesktop.upower.policy
org.freedesktop.upower.qos.policy
org.gnome.clockapplet.mechanism.policy
org.gnome.cpufreqselector.policy
org.gnome.gconf.defaults.policy
screenresolution-mechanism.policy
congminh1709@ubuntu:/usr/share/polkit-1/actions$
So, when i run
Code:
sudo gedit /usr/share/polkit-1/actions/org.freedesktop.devicekit.power.policy
It's just open a blank file
I also tried Ubuntu Tweak, but it doesn't apply the changes for my system, and I can't disable the suspend function.
Any solution for this case? Thanks.
Update: I found this, org.freedesktop.devicekit.power.suspend has changed to org.freedesktop.upower.policy. So my new command is
Code:
sudo gedit /usr/share/polkit-1/actions/org.freedesktop.upower.policy
After editing and relogin, it works well.
Bookmarks