FS#17995 - [pm-utils] Resume hooks don't work when pm-suspend
Attached to Project:
Arch Linux
Opened by Mihail (pevzi) - Monday, 25 January 2010, 05:42 GMT
Last edited by Thayer Williams (thayer) - Wednesday, 14 April 2010, 23:19 GMT
Opened by Mihail (pevzi) - Monday, 25 January 2010, 05:42 GMT
Last edited by Thayer Williams (thayer) - Wednesday, 14 April 2010, 23:19 GMT
|
Details
Hooks in /etc/pm/sleep.d/ work only for pm-hibernate, but
when resuming from RAM suspending these hooks seem not to
launch.
For example, this script launches only when «thawing» but not when resuming: $ cat /etc/pm/sleep.d/50-hdparm_pm #!/bin/sh if [ -n "$1" ] && ([ "$1" = "resume" ] || [ "$1" = "thaw" ]); then hdparm -B 254 /dev/sda > /dev/null fi Version of pm-utils is 1.2.6.1-3, kernel 2.6.32.5-1. |
This task depends upon
Closed by Thayer Williams (thayer)
Wednesday, 14 April 2010, 23:19 GMT
Reason for closing: Not a bug
Wednesday, 14 April 2010, 23:19 GMT
Reason for closing: Not a bug
#!/bin/bash
case $1 in
hibernate)
#echo "Hibernating..."
;;
suspend)
#echo "Suspending..."
;;
thaw)
# reset power management settings for SATA drive
hdparm -B 254 /dev/sda > /dev/null
#echo "Waking from hiberation..."
;;
resume)
# reset power management settings for SATA drive
hdparm -B 254 /dev/sda > /dev/null
#echo "Waking from standby..."
;;
*) echo "Undefined event..."
;;
esac
...
resume)
touch /home/pevzi/test_file
;;
...
But it seems that after resuming this script doesn't run at all.