It turns out that we have been doing the Wrong Thing for suspend-hybrid
this whole time.  The hooks were never looking for suspend_hybrid, and
so the suspend portion of them would never be invoked.  I have pushed
the quick and easy fix (detailed in the attached diff) upstream.  A more
elegant way of handling things would be welcome.


diff --git a/pm/sleep.d/00clear b/pm/sleep.d/00clear
index 976fc21..6649199 100755
--- a/pm/sleep.d/00clear
+++ b/pm/sleep.d/00clear
@@ -3,7 +3,7 @@
 . "${PM_FUNCTIONS}"
 
 case "$1" in
-       hibernate|suspend)
+       hibernate|suspend*)
                TERM=linux openvt -w -s -f -c 63 -- clear >/dev/null 2>&1
                ;;
        *)
diff --git a/pm/sleep.d/00logging b/pm/sleep.d/00logging
index 7990a50..fd2a9a8 100755
--- a/pm/sleep.d/00logging
+++ b/pm/sleep.d/00logging
@@ -3,7 +3,7 @@
 . "${PM_FUNCTIONS}"
 
 case "$1" in
-        hibernate|suspend)
+        hibernate|suspend*)
                [ -n "$PM_LOGFILE" ] || exit 0
                /bin/uname -a
                lsmod
diff --git a/pm/sleep.d/01grub b/pm/sleep.d/01grub
index 7fa356a..61656a9 100644
--- a/pm/sleep.d/01grub
+++ b/pm/sleep.d/01grub
@@ -23,7 +23,7 @@ default_resume_kernel()
 }
 
 case "$1" in
-       hibernate)
+       hibernate|suspend_hybrid)
                default_resume_kernel
                ;;
        *) exit $NA
diff --git a/pm/sleep.d/05led b/pm/sleep.d/05led
index 84bef1b..c7263fd 100755
--- a/pm/sleep.d/05led
+++ b/pm/sleep.d/05led
@@ -3,7 +3,7 @@
 [ -f /proc/acpi/ibm/led ] || exit $NA
 
 case "$1" in
-       hibernate|suspend)
+       hibernate|suspend*)
                echo "7 blink" >/proc/acpi/ibm/led
                ;;
        thaw|resume) 
diff --git a/pm/sleep.d/10NetworkManager b/pm/sleep.d/10NetworkManager
index 8538d6b..bcb5e5d 100755
--- a/pm/sleep.d/10NetworkManager
+++ b/pm/sleep.d/10NetworkManager
@@ -23,7 +23,7 @@ resume_nm()
 }
 
 case "$1" in
-       hibernate|suspend)
+       hibernate|suspend*)
                suspend_nm
                ;;
        thaw|resume)
diff --git a/pm/sleep.d/20video b/pm/sleep.d/20video
index 05d91ee..668b519 100755
--- a/pm/sleep.d/20video
+++ b/pm/sleep.d/20video
@@ -56,7 +56,7 @@ suspend_video()
 
 
 case "$1" in
-       suspend)
+       suspend*)
                suspend_video
                ;;
        hibernate)
diff --git a/pm/sleep.d/49bluetooth b/pm/sleep.d/49bluetooth
index 5fcb04c..e4977c4 100755
--- a/pm/sleep.d/49bluetooth
+++ b/pm/sleep.d/49bluetooth
@@ -23,7 +23,7 @@ resume_bluetooth()
 }
 
 case "$1" in
-       hibernate|suspend)
+       hibernate|suspend*)
                suspend_bluetooth
                ;;
        thaw|resume)
diff --git a/pm/sleep.d/50modules b/pm/sleep.d/50modules
index 338529b..5d8c5da 100755
--- a/pm/sleep.d/50modules
+++ b/pm/sleep.d/50modules
@@ -17,7 +17,7 @@ resume_modules()
 }
 
 case "$1" in
-       hibernate|suspend)
+       hibernate|suspend*)
                suspend_modules
                ;;
        thaw|resume)
diff --git a/pm/sleep.d/65alsa b/pm/sleep.d/65alsa
index 5fc729e..bfe76be 100755
--- a/pm/sleep.d/65alsa
+++ b/pm/sleep.d/65alsa
@@ -5,7 +5,7 @@
 command_exists alsactl || exit $NA
 
 case "$1" in
-       hibernate|suspend)
+       hibernate|suspend*)
                alsactl store 0 >/dev/null 2>&1
                ;;
        thaw|resume) 
diff --git a/pm/sleep.d/90clock b/pm/sleep.d/90clock
index f69c8c9..b000457 100755
--- a/pm/sleep.d/90clock
+++ b/pm/sleep.d/90clock
@@ -25,7 +25,7 @@ resume_clock()
 }
 
 case "$1" in
-       hibernate|suspend)
+       hibernate|suspend*)
                suspend_clock
                ;;
        thaw|resume)
diff --git a/pm/sleep.d/94cpufreq b/pm/sleep.d/94cpufreq
index 12dfc1f..1006180 100755
--- a/pm/sleep.d/94cpufreq
+++ b/pm/sleep.d/94cpufreq
@@ -28,7 +28,7 @@ thaw_cpufreq()
 }
 
 case "$1" in
-       suspend|hibernate)
+       suspend|hibernate*)
                hibernate_cpufreq
                ;;
        resume|thaw)
diff --git a/pm/sleep.d/99video b/pm/sleep.d/99video
index 2797a06..cdf2bc8 100755
--- a/pm/sleep.d/99video
+++ b/pm/sleep.d/99video
@@ -78,7 +78,7 @@ resume_video()
 
 
 case "$1" in
-       suspend)
+       suspend*)
                save_fbcon
                ;;
        resume)

-- 
Victor Lowther
Ubuntu Certified Professional
_______________________________________________
Pm-utils mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/pm-utils

Reply via email to