Hi,

I remember having intermittent fan problems on a HP after some suspend/resume
cycles. Browsing acpi-devel, i found the following post from Matthew Garrett:
http://article.gmane.org/gmane.linux.acpi.devel/16643

I'd suggest we also do the following:

Index: scripts/sleep_helper_functions
===================================================================
--- scripts/sleep_helper_functions      (revision 2088)
+++ scripts/sleep_helper_functions      (working copy)
@@ -468,6 +468,7 @@
     echo "---------" >> $LSMOD_LOG
 
     switch_to_X
+    kick_fan
 
     # special case: hotplug should be started before inserting modules
     if D=`awk 'BEGIN {X=1} /^stopped: (boot\.|)hotplug/ {print $2; X=0} END 
{exit X}' ${STATE}.resume`; then
@@ -609,3 +610,22 @@
         echo "switched back to console: '$CONS'" >> $LSMOD_LOG
     fi
 }
+
+#############################################################
+# kick_fan
+# triggers the ACPI fan(s) after resume. Since ACPI drivers
+# have no suspend support, this is sometimes necessary.
+# see http://article.gmane.org/gmane.linux.acpi.devel/16643
+kick_fan() {
+    local FAN DUMMY STATE 
+    for FAN in /proc/acpi/fan/*/state; do
+        [ ! -e $FAN ] && continue
+        read DUMMY STATE < $FAN
+        if [ "$STATE" = "on" ]; then
+            DUMMY=${FAN#/proc/acpi/fan/}
+            echo "reactivating ACPI fan ${DUMMY%/state}" >> $LSMOD_LOG
+            echo -n 3 > $FAN
+            echo -n 0 > $FAN
+        fi
+    done
+}


This should never do any harm (famous last words 8*)
-- 
Stefan Seyfried                  \ "I didn't want to write for pay. I
QA / R&D Team Mobile Devices      \ wanted to be paid for what I write."
SUSE LINUX Products GmbH, Nürnberg \                    -- Leonard Cohen
_______________________________________________
powersave-devel mailing list
[email protected]
http://forge.novell.com/mailman/listinfo/powersave-devel

Reply via email to