Re: [gpm] Configuring what happens when "hibernate" should be done



Matthew Garrett schrieb:
On Wed, Jul 05, 2006 at 11:28:33AM -0400, Peter Jones wrote:
On Wed, 2006-07-05 at 07:11 +0200, Alexander Skwar wrote:
> Paul Johnson wrote:
> > I asked the same thing a while ago.  I think the menu items point at
> > /usr/sbin/pm-hibernate (for hibernate) or /usr/sbin/pm-suspend (for
> > suspend)
> > Ubuntu doesn't have such files.

... then it needs to.

No it doesn't.


This seems to be true - a distribution doesn't *HAVE* to have
those files. Just as Andrew wrote, the scripts referenced by

hal-get-property --udi /org/freedesktop/Hal/devices/computer \
    --key org.freedesktop.Hal.Device.SystemPowerManagement.method_execpaths

get executed. Just as it is on FC5, on Ubuntu there's a
/usr/share/hal/scripts/hal-system-power-hibernate. And in that file,
there's "#Other distros just need to have *any* tools installed",
see <http://askwar.pastebin.ca/79817>, line 31ff.

Now I'd need a way to configure the order in which those scripts
get executed or configure *directly*, which script gets run.
Reason: I want /usr/sbin/hibernate, NOT pmi. But I cannot
remove /usr/sbin/pmi, as it belongs to a package on which g-p-m
and gnome-session depend. Sure, I could rm the file. But... Naaa.... :)

I now did some more debugging or looked closer (call it what you
like) and saw, that eventually "/usr/sbin/pmi action hibernate force"
would get executed (<http://askwar.pastebin.ca/79831>). And to make
the system hibernate, pmi executes /etc/acpi/hibernate.sh, which you
can find on <http://askwar.pastebin.ca/79832>. And *THIS* is finally
the script, which will make the system hibernate - *phew*, what a
chain of scripts....

But to make the system hibernate, hibernate.sh will do:

echo -n $HIBERNATE_MODE >/sys/power/disk
echo -n "disk" >/sys/power/state

As I said, that's not what I want. I'd want, that /usr/sbin/hibernate
get's run. And IMO the easiest and most straight forward way would
be, if g-p-m could be told what script to execute. Maybe using gconf?

But as it is right now, there's no way to configure the system, is there?
I mean, the only way would be to edit one of the scripts; /etc/acpi/hibernate.sh,
I'd suppose, as that's in /etc.

Or is there any other way?

Thanks,
Alexander



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]