User Tools

Site Tools


howtos:hp_and_cpu_fan_constantly_on_after_resume
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


howtos:hp_and_cpu_fan_constantly_on_after_resume [02/12/2018 21:34] (current) – created - external edit 127.0.0.1
Line 1: Line 1:
 +Reference from: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/77370
  
 +/etc/pm/sleep.d/cpu-fan:
 +
 +<file>
 +#!/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
 +
 +
 +
 +
 +
 +
 +</file>
 +
 +or
 +
 +/etc/pm/sleep.d/99fancontrol.sh
 +
 +<file>
 +#!/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
 +</file>
 +
 +This will work on Ubuntu 13.04 Raring Ringtail:
 +<code>
 +touch /etc/pm/sleep.d/99fancontrol.sh
 +chmod +x /etc/pm/sleep.d/99fancontrol.sh
 +
 +cat > /etc/pm/sleep.d/99fancontrol.sh
 +</code>
 +<file>
 +#!/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
 +</file>
 +
 +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