When I suspend Ubuntu I can't get out of the suspend screen. Yes, I know there are ways to fix this but that would take forever to fix. Is there a way to disable the ability to suspend?
When I suspend Ubuntu I can't get out of the suspend screen. Yes, I know there are ways to fix this but that would take forever to fix. Is there a way to disable the ability to suspend?
To a point you could control this in policykit, in /usr/share/polkit-1/actions/org.freedesktop.upower.policy
and or /usr/share/polkit-1/actions/org.freedesktop.login1.policy
The relevant entries would be org.freedesktop.upower.suspend
& org.freedesktop.login1.suspend
respectively
In that case editing the line <allow_active>yes</allow_active>
to <allow_active>no</allow_active>
would work.
It's probable that in 13.10 policykit is no longer used for this so those edits would have no effect. In that case you could figure out how hibernate has been disabled & do the same for suspend or cause power management to inhibit suspend altogether.
The latter could be done as such -
sudo nano /etc/pm/sleep.d/00_cancel-suspend
copy & paste this in -
#!/bin/sh
# prevents suspend
. "$PM_FUNCTIONS"
case "${1}" in
suspend)
inhibit
;;
resume)
exit 0
;;
esac
Then on keyboard go
ctrl+o
enter
ctrl+x
to save & exit nano
Finish with -
sudo chmod 0755 /etc/pm/sleep.d/00_cancel-suspend