User Tools

Site Tools


howtos:hp_and_cpu_fan_constantly_on_after_resume

Reference from: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/77370

/etc/pm/sleep.d/cpu-fan:

#!/bin/sh

case $1 in
     suspend|suspend_hybrid|hibernate)
        ;;
     resume|thaw)
        # No need to do anything here, kernel unsuspends USB devices
        echo -n "1" > /sys/devices/virtual/thermal/cooling_device11/cur_state
        sleep 10
        echo -n "0" > /sys/devices/virtual/thermal/cooling_device11/cur_state
        ;;
esac





or

/etc/pm/sleep.d/99fancontrol.sh

#!/bin/sh
#
# https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.17/+bug/77370
# file /etc/pm/sleep.d/99fancontrol.sh

case "$1" in
 hibernate|suspend)
  # Stopping is not required.
  ;;
 thaw|resume)
  echo -n "1" > /sys/devices/virtual/thermal/cooling_device11/cur_state
  ;;
 *) exit $NA
  ;;
esac

This will work on Ubuntu 13.04 Raring Ringtail:

touch /etc/pm/sleep.d/99fancontrol.sh
chmod +x /etc/pm/sleep.d/99fancontrol.sh

cat > /etc/pm/sleep.d/99fancontrol.sh
#!/bin/sh
#
# https://bugs.launchpad.net/ubuntu/+source/linux-source-2.6.17/+bug/77370
# file /etc/pm/sleep.d/99fancontrol.sh

case "$1" in
    hibernate|suspend)
    # Stopping is not required.
    ;;

    thaw|resume)
    # In background.
    ls /sys/devices/virtual/thermal/cooling_device*/cur_state | while read A; do echo 1 > $A; echo 0 > $A; done
    ;;

    *) exit $NA
    ;;
esac

Note from the bug:

“pd (petr-danecek) wrote on 2013-04-06: #94 I can also confirm that the above solves the problem. Apparently the kernel does not know what state are the fans in. This can be solved by turning them on and off for a brief period of time. Note that this does not turn the fans off permanently, the cooling is not affected and the fans continue to work normally. (Well, at least on my laptop.) ”

howtos/hp_and_cpu_fan_constantly_on_after_resume.txt · Last modified: 02/12/2018 21:34 by 127.0.0.1