Tell me more ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

How can I make GNOME 3 use pm-suspend-hybrid instead of pm-suspend when closing the lid or using suspend from the menu?

share|improve this question
I'm not sure if there is pm-suspend-hybrid support but you can use this to change the lid close action to hiberate gsettings get org.gnome.settings-daemon.plugins.power lid-close-ac-action "hibernate" and gsettings get org.gnome.settings-daemon.plugins.power lid-close-battery-action "hibernate" you can also use "blank" or "shutdown" as the action – swatso33 May 3 '12 at 2:14

1 Answer

up vote 1 down vote accepted

Be sure it works

First of all you need to be sure pm-suspend-hybrid works on your computer. Type

sudo pm-suspend-hybrid

in console and notice if it works as expected.

Hacking

It is more the hack than a solution. But it works for me.

Execute the following commands in the console:

ls -l /usr/sbin/pm-suspend  # it should be symlink to /usr/lib/pm-utils/bin/pm-action
sudo rm /usr/sbin/pm-suspend  # just remove this link
sudo editor /usr/sbin/pm-suspend  # create new file instead of symlink

Contents of the new pm-suspend script:

#!/bin/bash
pm-suspend-hybrid
# notice that you need to execute "pm-suspend-hybrid"
# just changing symlink is not enough

Than give execution rights to this new script:

sudo chmod +x /usr/sbin/pm-suspend

Enjoy!


Notes

  • If your distribution does not use sudo command you need to be root to execute these commands.
  • It is possible that pm-suspend is located at another path on your system. Just type whereis pm-suspend to find correct path.
  • You may use any text editor of your choice instead of editor if you want or if your distribution does not have this wrapper.
share|improve this answer
1  
Thank you for this detailed answer! I had the same idea a while ago but didn't bother trying it. – Martin Schulze Jun 11 '12 at 1:02

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.