# Gnome power manager custom suspend script

## potuz

Hello list. I can S3 suspend my laptop with s2ram without much trouble but gnome power manager (gpm) fails to suspend with a message "your computer failed to sleep". I've been looking for a place to put a custom script to tell gpm to use s2ram. The  GnomePowerManager FAQ lists /prefix/share/hal/scripts/system/hal-system-power-* . In my system all the hal power scripts are located in 

```
$ locate hal-system-power        

/usr/libexec/scripts/hal-system-power-set-power-save

/usr/libexec/scripts/hal-system-power-shutdown

/usr/libexec/scripts/hal-system-power-suspend

/usr/libexec/scripts/linux/hal-system-power-shutdown-linux

/usr/libexec/scripts/linux/hal-system-power-reboot-linux

/usr/libexec/scripts/linux/hal-system-power-suspend-hybrid-linux

/usr/libexec/scripts/linux/hal-system-power-hibernate-linux

/usr/libexec/scripts/linux/hal-system-power-suspend-linux

/usr/libexec/scripts/linux/hal-system-power-set-power-save-linux

/usr/libexec/scripts/hal-system-power-reboot

/usr/libexec/scripts/hal-system-power-suspend-hybrid

/usr/libexec/scripts/hal-system-power-hibernate

/usr/libexec/hal-system-power-pmu

/usr/libexec/hal-system-power-pm-is-supported
```

but edititing all the hal-system-power-suspend* to include s2ram doesn't work (I guess these files are ignored by gpm). Googling around I couldn't find more information on the subject except advice to install pm-utils and such. This should be a simple issue of putting a line in the the right place. 

Something that might be useful:

```
$ lshal | grep quirk

  power_management.quirk.dpms_on = true  (bool)

  power_management.quirk.dpms_suspend = true  (bool)

  power_management.quirk.vbe_post = true  (bool)

  power_management.quirk.vbemode_restore = true  (bool)

  power_management.quirk.vbestate_restore = true  (bool)

  power_management.quirk.vga_mode_3 = true  (bool)
```

Any help will be appreciated, I've looked for a while now.

Thanks,

R.

Edit: I should've probably mentioned that I built hal without USE="laptop" which would've included pm-utils. I guess I'll give this a few hours more or I'll end up installing pm-utils anyway (I think they use s2ram anyway).

----------

