You are not logged in.

#1 2011-07-23 10:33:07

adax
Member
Registered: 2006-10-28
Posts: 31

how to do pm-suspend-hybrid instead of suspend

Hello.

I am running xfce4 and I would like to set up my laptop to run suspend-hybrid instead of just suspending.
I want it to do this when i shut the lid or press the sleep button etc. but there doesn't seem to be an option available in the menus to do this.
Would it be possible to do this easily or am I going to have to hack around in the pm scripts to try to force it to do what I want it to do?

Thanks for any help,
a.

Offline

#2 2011-07-26 12:32:44

Dumbledore
Member
From: Mumbai, India
Registered: 2011-04-27
Posts: 56

Re: how to do pm-suspend-hybrid instead of suspend

It's a hack (untested on my system). But I do not think that this is harmful (standard disclaimers still apply). The pm-* scripts are all symbolic links to 'pm-action' that undertakes the required steps based on the name of the script calling it.

So one of the things you can do is to link pm-suspend to pm-suspend-hybrid. That way everytime pm-suspend is called, the call is relayed to pm-suspend-hybrid in stead that shall call pm-action. I think that should do it.

The disadvantage is that you'll have to do this everytime the pm package gets upgraded as it'll restore the links.

Assuming you need help (sorry for that) with symbolic links, you need to do this:

On a terminal, do this:

which pm-suspend

Say this is /usr/sbin/pm-suspend (as on my machine), you do:

sudo mv /usr/sbin/pm-suspend /usr/sbin/pm-suspend.bkup
sudo unlink /usr/sbin/pm-suspend
sudo ln -s /usr/bin/pm-suspend-hybrid /usr/bin/pm-suspend

And give it a try. If it does not work, go back to regular things thus:

sudo unlink /usr/sbin/pm-suspend
sudo mv /usr/sbin/pm-suspend.bkup /usr/sbin/pm-suspend

Let us know how it goes.

Last edited by Dumbledore (2011-07-26 12:34:29)


GNU/Linux: Keep your options "open".

Offline

Board footer

Powered by FluxBB