Comment 22 for bug 1094722

Revision history for this message
filip (bandit-s-fw) wrote : Re: Raring: regression: fan keeps spinning at full speed after suspend

Found that this works even better, now the fan acts as before suspend:

Create the file ”/etc/pm/sleep.d/99fancontrol.sh”, insert the code below and chmod 755 it.

Script:

#!/bin/sh
#
#

case "$1" in
 hibernate|suspend)
  # Stopping is not required.
  ;;
 thaw|resume)
# In background.
    echo -n 0 > /sys/devices/virtual/thermal/cooling_device0/cur_state;
    sleep 2
    echo -n 0 > /sys/devices/virtual/thermal/cooling_device1/cur_state;
    sleep 2
    echo -n 0 > /sys/devices/virtual/thermal/cooling_device2/cur_state;

  ;;
 *) exit $NA
  ;;
esac