You are not logged in.

#1 2009-03-10 20:00:47

Surgat_
Member
Registered: 2007-08-08
Posts: 317

Trouble when hibernating through HAL

Hello there,

I've set up suspending to disk today on my laptop following the wiki article referred to that and using uswsusp and hibernate-script. All goes fine when I run 'hibernate' from the command line as root: RAM image saved to swap and recovered on bootup, ethernet connection recovered and all mounts that needed remounting work fine. The trouble comes when I try to hibernate from the Exit menu on LXDE. According to [1], the commands on that dialog (shutdown, reboot, hibernate) are run through HAL, so I have followed [2] and created a HAL script so that it runs 'hibernate' when hibernating:

/usr/lib/hal/scripts/hal-system-power-hibernate-own wrote:

#!/bin/sh
## /usr/lib/hal/scripts/hal-system-power-hibernate-own
. hal-functions
hal_check_priv org.freedesktop.hal.power-management.hibernate
## suspend command
# replace this with command you want to use
hibernate
# s2disk

And a HAL rule that runs that script when I hit the Hibernate button on LXDE:

/etc/hal/fdi/policy/09-power-mgmt-policy.fdi wrote:

<?xml version="1.0" encoding="UTF-8"?>
<deviceinfo version="0.2">
   <device>
     <match key="info.udi" string="/org/freedesktop/Hal/devices/computer">
       <merge key="org.freedesktop.Hal.Device.SystemPowerManagement.method_execpaths" type="strlist">hal-system-power-suspend</merge>
       <append key="org.freedesktop.Hal.Device.SystemPowerManagement.method_execpaths" type="strlist">hal-system-power-suspend-hybrid</append>
       <append key="org.freedesktop.Hal.Device.SystemPowerManagement.method_execpaths" type="strlist">hal-system-power-hibernate-own</append>
       <append key="org.freedesktop.Hal.Device.SystemPowerManagement.method_execpaths" type="strlist">hal-system-power-shutdown</append>
       <append key="org.freedesktop.Hal.Device.SystemPowerManagement.method_execpaths" type="strlist">hal-system-power-reboot</append>
       <append key="org.freedesktop.Hal.Device.SystemPowerManagement.method_execpaths" type="strlist">hal-system-power-set-power-save</append>
     </match>
   </device>
</deviceinfo>

The thing is that, although HAL is supposed to run the same command I run from the command line (hibernate), when I run it from the command line everything works out of the box, but if I hit the Hibernate button when I turn the laptop on again it acts as if there was no image on my swap drive and boots as always.

Can anyone see if I have done anything wrong? Thank you all!
Cheers!

[1] http://wiki.archlinux.org/index.php/LXD … _from_LXDE
[2] http://wiki.archlinux.org/index.php/Sus … g_with_HAL

Offline

Board footer

Powered by FluxBB