PDA

View Full Version : CPU fan is running 100% full-speed after Standby Mode



kung foo man
11th October 2016, 12:12
Hey all,

I just wanted to share this. I had the problem - waking my PC up from standby mode - that the CPU fan is obnoxious loud, but I happened to realize it went normal after a high CPU load (compiling a big source tree via make -j 4 e.g.).

So I guess the "CPU Fan State" is somehow lost after stand by and it will first reset after a state change (warmer = recalibrate). To force this, there is a nice tool called stress:

Install it: apt-get install stress

Help: stress --help



`stress' imposes certain types of compute stress on your system

Usage: stress [OPTION [ARG]] ...
-?, --help show this help statement
--version show version statement
-v, --verbose be verbose
-q, --quiet be quiet
-n, --dry-run show what would have been done
-t, --timeout N timeout after N seconds
--backoff N wait factor of N microseconds before work starts
-c, --cpu N spawn N workers spinning on sqrt()
-i, --io N spawn N workers spinning on sync()
-m, --vm N spawn N workers spinning on malloc()/free()
--vm-bytes B malloc B bytes per vm worker (default is 256MB)
--vm-stride B touch a byte every B bytes (default is 4096)
--vm-hang N sleep N secs before free (default none, 0 is inf)
--vm-keep redirty memory instead of freeing and reallocating
-d, --hdd N spawn N workers spinning on write()/unlink()
--hdd-bytes B write B bytes per hdd worker (default is 1GB)

Example: stress --cpu 8 --io 4 --vm 2 --vm-bytes 128M --timeout 10s

Note: Numbers may be suffixed with s,m,h,d,y (time) or B,K,M,G (size).



And finally run it only with high CPU load: stress --cpu 4

In htop I see 4 processes running at 100%, after a few seconds the CPU Fan is recalibrating and near impossible to hear, thanks to Arctic Cooler. :D


Hardware info:



Mainboard: FM2A68M-HD+
CPU: AMD A8-7600 Radeon R7


hardinfo report: https://killtube.org/downloads/kungfooman/hardinfo.html

I wonder if Linux is the problem or my hardware tho. I kinda tend to Linux problem, because I never experienced it via Windows. I installed all kinds of CPU fan sensor tools, but nothing even recognizes a fan.

voron00
11th October 2016, 14:09
Sensor drivers are usually in linux kernel. Have you tried upgrading to latest?

Mitch
11th October 2016, 17:42
I wonder if Linux is the problem or my hardware tho. I kinda tend to Linux problem, because I never experienced it via Windows. I installed all kinds of CPU fan sensor tools, but nothing even recognizes a fan.

Have you tried lm sensors?

https://packages.debian.org/jessie/lm-sensors

sudo sensors-detect
sensors
https://wiki.archlinux.org/index.php/lm_sensors

kung foo man
12th October 2016, 02:11
Sensor drivers are usually in linux kernel. Have you tried upgrading to latest?

Lord, I don't want this to escalate :D https://xkcd.com/456/



https://packages.debian.org/jessie/lm-sensors

sudo sensors-detect



Nice, didn't check sensors-detect before, so I added the module to /etc/modules now and restarted, so now the other tools actually detect my fan. But pwmconfig cannot even disable pwm2 (which is my CPU fan). I reseached a bit and I can handle it manually very easily:




user-desktop hwmon0 # cd /sys/devices/platform/nct6775.656/hwmon/hwmon0
user-desktop hwmon0 # echo pwm2_enable
pwm2_enable
user-desktop hwmon0 # cat pwm2_enable
0
user-desktop hwmon0 # echo "1" > pwm2_enable
user-desktop hwmon0 # cat pwm2_enable
0
user-desktop hwmon0 # echo "255" > pwm2
user-desktop hwmon0 # echo "1" > pwm2_enable
user-desktop hwmon0 # echo "255" > pwm2
user-desktop hwmon0 # echo "1" > pwm2_enable
user-desktop hwmon0 # cat pwm2_enable
0
user-desktop hwmon0 # echo "0" > pwm2
user-desktop hwmon0 # echo "10" > pwm2
user-desktop hwmon0 # echo "0" > pwm2
user-desktop hwmon0 # cat pwm2_enable
1


Probably would be easiest to write a little php script which reads the temp and fixes the RPM (0-255), running in background as root. But cba atm, it's so typically Linux, most basic shit just doesn't work lol

This was also quite interesting: https://wiki.archlinux.org/index.php/fan_speed_control