High fan speed after return from suspend (on Ubuntu)

5,592

Solution 1

In my case, a workaround for now is to issue this command after suspend (as root):

echo 0 > /proc/acpi/fan/FAN5/state

This command switches on a device – sets its power state to D0. Apparently, it can also be used to "reset" a fan that is already on. After that operation, the fan runs at normal speed (30 °C). How did I know which fan to touch? I looked for a fan with "on" status:

grep on /proc/acpi/fan/*/state

It seems that a fairly similar issue has already been added to the Kernel Bug Tracker.

Solution 2

I have Ubuntu 12.04 LTS and HP 8510w laptop. As for some reason I don't have /proc/acpi/fan directory on my computer I did the same trick on /sys/devices/virtual/thermal/cooling_deviceX

I have created following script:

#!/bin/sh


case "$1" in
        resume|thaw)
                for i in $(seq 0 10) ; 
                do 
                        echo "0" > /sys/devices/virtual/thermal/cooling_device${i}/cur_state
                done
;;
esac

and put it in /etc/pm/sleep.d directory. This way every time my laptop goes from suspend to running state all fans are being stopped. I've tested that after this action when the CPU load goes up and things are getting warm fans start properly so there is no risk of overheating. They also slow down when load goes down so everything seems to be fine.

I've looked through different answers and bug reports on the web and it seems that root cause of this problem is related to the fact that thermal management subsystem assumes that fans don't change state after suspend (so they are basically 'off' as they were before suspend), while in reality waking of the computer causes fans to turn on at full speed (at least on some models).

Share:
5,592

Related videos on Youtube

Bolo
Author by

Bolo

Updated on September 17, 2022

Comments

  • Bolo
    Bolo over 1 year

    I've got a HP ProBook 5310m laptop with Ubuntu 10.04 (32 bit). When I return from suspend, the fan speed is usually very high: FDTZ sensor reports "90 °C". Yes, the units are wrong, since FDTZ does not report temperature, but fan speed – that's probably just a small bug in reporting. Interestingly, when I plug or unplug the power cable for a moment, the fan speed returns back to normal.

    My questions:

    1. Where can I report this problem? Is it about ACPI support in the kernel? What is the address of the relevant bug tracker?
    2. As a workaround for now, how can I programmatically trigger a behavior equivalent to (un)plugging the power cable. More generally, how can I force ACPI to recalculate fan speed? Ideally, I'm looking for something like echo foo > /proc/bar.

    Thanks in advance!

  • jarno
    jarno over 8 years
    I have this issue in Xubuntu 15.10 using the same hardware. There are 14 cooling devices under /sys/devices/virtual/thermal/ though devices 11-13 are 0 after resume, so there is no use to zero them, but only devices 0-10 (like you do). I am not sure, if you have to zero all of them, though. However, the problem is that the script in /etc/pm/sleep.d will not be run on resume in this later release of Ubuntu. I suppose the same problem is in Ubuntu 15.04, see here.
  • jarno
    jarno over 8 years
    It worked for me to put the zeroing code in another script under /lib/systemd/system-sleep, see here for model.
  • jarno
    jarno over 8 years
    Are you sure you don't zero too many devices? After boot there are couple of devices in state "1" even if fan is not running.