Tweaking laptop performance to keep fan quiet (AMD Ryzen 5 CPU)
At times I wish to keep my system extra-cool so that the fan doesn't need to spin. For instance when using the laptop from my bed at night.
If I'm not using anything and have just a couple of Chromium windows open, top shows several processes using up to 10%CPU each and my 8 cores are around 90% to 95% idle each. Somehow that's enough to make the fan turn on and off every few minutes. Otherwise the fan almost never turns on when Chromium is closed or minimized.
I'm using TLP (with just a few minor changes to the default config). My laptop has an AMD Ryzen 5 3500U CPU.
I tried to play a bit with the conf of TLP, but had no success... I didn't want to tweak everything to the minimum, because most of the time I prefer to have decent performance without caring whether the fan is spinning.
I'm wondering:
- How come when the load is low (Chromium open on a static page: cores around 90% idle) the CPU heats up a lot more than if the load is very-low (Chromium closed: cores around 95+% idle)?
There should be no need to increase the CPU frequency in either case... Or am I missing something? - What's the best (or most simple) way to switch between a "quiet mode" and a "normal mode"? (without having to attach/remove the power cable, heh!)
Can that be done with TLP or should I use a different tool for this? - What should I tweak to keep the fan quiet? Only the CPU frequency scaling governor/algorithm or something else as well?
That'sCPU_HWPandENERGY_PERF_POLICYonly, with TLP terminology. Right?
About this post
- Posted
- Archived
- Score
- 2 · 100% up
- Kind
- Text
- ID
- dum0em
9 comments
https://wiki.archlinux.org/index.php/Fan_speed_control
You probs want to start with nbfc if youre a notebook/lappy
Edit: Youre essentially not posting data, when the fan kicks up at those low perf stats what is the actual device temperature?
My first guess is unconfigured fan speeds so its either full on, half(if you're lucky) or off.
If the device is actually baking itself at low useage you may have made yourself a TLP problem and should investigate, if it's not baking itself it means there are bad or no controls regarding the fan itself. You might be able to manage this via the OS-independant BIOS aswell FYI
The fan is functioning properly: it turns on when the temperature rises. I don't want to change the fan's behavior.
What I want to change, is rising temperatures. I believe that's affect by the frequency of my CPU cores.
If I monitor the CPU frequency (
grep MHz /proc/cpuinfo) while keeping at my system load (top), I see that a very-low load keeps the frequency low, while the frequencies sometimes grow with a low load.
Here an example...
Very low load: chromium closed
top
grep MHz /proc/cpuinfo
lm-sensors
The temperature stays around 40 to 44°C and the fan stays at 0 RPM.
Low load: chromium open
top
grep MHz /proc/cpuinfo
A couple cores are around 1.8GHz in this snapshot. At times I see them higher (sometimes they hit 3GHz, even), at times lower, but still way higher than in the very low load case.
lm-sensors
The temperature grows to about 55°C, then the fan starts spinning at 3300 RPM and the temp slowly decreases to 40°C. Repeat.
How can I tell my system to be more conservative in stepping up the CPU frequency, when I want it to be quiet?
This sounds like the full-off full-on case i mentioned above.The fan should be doing a slow spin up instead of spiking to burst cool the device then cutting.The noise difference between 800-1600rpm and 3.3k rpm is significant.Have you checked if the tool i mentioned before, nbfc, to see if it has profiles for your device?If it doesn't what device do you have?If you are attempting to downclock via TPM this isn't a concept i am accross, you can proceed with it if you want but it doesn't address the flip fan on full flip fan off config issue.Effectively I am suggesting you run the fan at 20-30% instead of 100% and ramp it up to 100% if the temperature continues to increase, if you're uncomfortable with this thats fine too :)Edit: I missed the last line with the question about CPU limiting
You can use the cpufrequtils tool to modify the governer used by the kernel to scale cpu up and down, this permits frequency capping and locking so you could lock it at say 1.3ghz for each core to prevent the spikes to 3ghz or set a cap at 1.8ghz etc
If your use case is literally just chrome consider using cpulimit to limit chrome to say 5% of the CPU max which would also affect how the kernel upscales the CPU frequency.
if your goal is to run an i5/7 chip fanless and keep it cool you may simply want to switch cpu cores off. You can do this by passing maxcpus=number as a kernel flag at boot time.
If that works for you then you could create a second boot menu entry with that flag and simply restart into it for your reduced performance mode.
FYI expecting an uncooled temp of 40C when doing anything other than idling with a non-reduced powerhouse CPU is honestly a bit unrealistic. Additionally turning chrome on is not actually an activity i would consider "light".
I would consider using Kate, Geany, Vim/whatever to read and write text or using a lightweight browser like Midori to be "light"
Chrome/Chromium/Firefox are quite heavy idlers aswell when you look at them tbh.
If you use youtube, check if your device supports the video format for hardware acceleration.
In my laptop, i watch most of the videos from youtube on `mpv` since it supports more formats than standard web player, thus using much less cpu and keeping low temps. I also convert 4k or 60fps formats to 1080p30fps for better hardware support.
Chromium is causing my CPU to heat up even if youtube is not open, and Chromium is just displaying a page with no animation and no JavaScript doing anything intensive (as far as I'm aware of).
Dont know if relates to your issue, but for good performance you should make as much of the Graphics Features in chrome://gpu hardware accelerated as possible.
https://wiki.archlinux.org/index.php/PHC
https://wiki.manjaro.org/index.php?title=Undervolt_intel_CPU