Comment 94 for bug 77370

Revision history for this message
pd (petr-danecek) wrote :

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.)

Here is the script above again made more general which scans all laptops:

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