Skip to content

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:

  1. 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?
  2. 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?
  3. What should I tweak to keep the fan quiet? Only the CPU frequency scaling governor/algorithm or something else as well?
    That's CPU_HWP andENERGY_PERF_POLICY only, with TLP terminology. Right?
2 points9 comments
Open on Reddit
About this post
Posted
Archived
Score
2 · 100% up
Kind
Text
ID
dum0em

Author

15
posts
23
comments
1
media
View profile

9 comments

Am i missing something

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

1 points

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

top - 14:59:18 up 10:04,  5 users,  load average: 0.65, 0.76, 0.71
Tasks: 249 total,   1 running, 248 sleeping,   0 stopped,   0 zombie
%Cpu0  :  0.0 us,  0.7 sy,  0.0 ni, 99.3 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu1  :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu2  :  0.3 us,  0.7 sy,  0.0 ni, 99.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu3  :  0.7 us,  0.0 sy,  0.0 ni, 99.3 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu4  :  0.3 us,  0.3 sy,  0.0 ni, 99.0 id,  0.3 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu5  :  0.3 us,  0.3 sy,  0.0 ni, 99.3 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu6  :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu7  :  0.0 us,  0.0 sy,  0.0 ni,100.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :  13947.2 total,  10118.5 free,   1608.1 used,   2220.6 buff/cache
MiB Swap:      0.0 total,      0.0 free,      0.0 used.  12001.3 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                         
   1312 peoro     20   0 4535560 323424 148656 S   1.7   2.3   2:40.28 plasmashell                                                                                                     
   1516 peoro     20   0    4044   2284   2036 S   0.7   0.0   0:32.58 ksysguardd                                                                                                      
   1700 peoro     20   0 1331560 115868  92576 S   0.7   0.8   0:09.19 yakuake                                                                                                         
    849 root      20   0 2808572 112556  72920 S   0.3   0.8   5:59.62 Xorg                                                                                                            
   1304 peoro     20   0 3902328 152812 111320 S   0.3   1.1   4:40.41 kwin_x11                                                                                                        
   1377 peoro     20   0  293904  39316  34568 S   0.3   0.3   0:01.96 akonadi_control                                                                                                 
   4312 peoro     20   0  164640  19564  17628 S   0.3   0.1   0:07.31 kio_http_cache_                                                                                                 
   6734 root      20   0   23236  11016   9476 S   0.3   0.1   0:02.65 openvpn                                                                                                         
      1 root      20   0  122052  10428   7900 S   0.0   0.1   0:01.26 systemd                                                                                                         
      2 root      20   0       0      0      0 S   0.0   0.0   0:00.02 kthreadd                                                                                                       

grep MHz /proc/cpuinfo

cpu MHz         : 1280.932
cpu MHz         : 1381.609
cpu MHz         : 1370.823
cpu MHz         : 1283.113
cpu MHz         : 1314.305
cpu MHz         : 1250.449
cpu MHz         : 1328.415
cpu MHz         : 1287.656

lm-sensors

The temperature stays around 40 to 44°C and the fan stays at 0 RPM.

Low load: chromium open

top

top - 15:00:31 up 10:05,  5 users,  load average: 1.51, 1.02, 0.81
Tasks: 282 total,   2 running, 280 sleeping,   0 stopped,   0 zombie
%Cpu0  :  2.3 us,  1.7 sy,  0.0 ni, 95.6 id,  0.0 wa,  0.0 hi,  0.3 si,  0.0 st
%Cpu1  :  2.0 us,  1.7 sy,  0.0 ni, 96.3 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu2  :  3.5 us,  2.9 sy,  0.0 ni, 93.3 id,  0.3 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu3  :  0.3 us,  0.7 sy,  0.0 ni, 99.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu4  :  3.0 us,  2.3 sy,  0.0 ni, 94.7 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu5  :  1.3 us,  1.6 sy,  0.0 ni, 97.0 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu6  :  2.9 us,  3.2 sy,  0.0 ni, 93.8 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
%Cpu7  :  3.5 us,  1.6 sy,  0.0 ni, 94.9 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :  13947.2 total,   8648.8 free,   2897.2 used,   2401.2 buff/cache
MiB Swap:      0.0 total,      0.0 free,      0.0 used.  10551.7 avail Mem 

    PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND                                                                                                         
  17829 peoro     20   0 1181208 371152 105520 R  15.6   2.6   0:20.22 chromium                                                                                                        
  17703 peoro     20   0  970772 314660 146196 S   3.3   2.2   0:34.83 chromium                                                                                                        
  17727 peoro     20   0  666740 201100 151716 S   2.3   1.4   0:06.47 chromium                                                                                                        
   1312 peoro     20   0 4535560 323892 148660 S   1.0   2.3   2:41.77 plasmashell                                                                                                     
   1516 peoro     20   0    4044   2284   2036 S   0.7   0.0   0:32.84 ksysguardd                                                                                                      
    849 root      20   0 2808740 112572  72936 S   0.3   0.8   6:02.81 Xorg                                                                                                            
   1700 peoro     20   0 1331736 115956  92576 S   0.3   0.8   0:09.72 yakuake                                                                                                         
  17132 root      20   0       0      0      0 I   0.3   0.0   0:00.25 kworker/u32:0-phy0                                                                                              
  18077 peoro     20   0  713336 120516  79380 S   0.3   0.8   0:00.96 chromium                                                                                                        
  18137 peoro     20   0  847444 196780  93204 S   0.3   1.4   0:11.21 chromium                                                                                                        

grep MHz /proc/cpuinfo

cpu MHz         : 1682.131
cpu MHz         : 1879.847
cpu MHz         : 1229.278
cpu MHz         : 1267.040
cpu MHz         : 1330.766
cpu MHz         : 1272.105
cpu MHz         : 1219.534
cpu MHz         : 1235.597

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?

1 points

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.

2 points

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.

1 points

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

1 points

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.

1 points

Keyboard shortcuts

Move and act

jork
Next / previous post or comment
Enteroro
Open the post
f
Open the media viewer
s
Save
h
Hide (the toast has Undo)
Tab
Right after an action: the toast's Undo
x
Collapse the comment
v
Next layout: cards, compact, grid

Go to

/
Search
gthenh
Home
gthena
All
gthens
Subreddits
gthenl
Library
?
This list
Esc
Close a menu or this list

In the viewer

←or→
Previous / next file
↑or↓
Previous / next post
korj
Previous / next post
Space
Play / pause
m
Mute
z
Zoom
s
Save
o
Open the post (on its own page: back to it)
Esc
Close

Keys do nothing while you type in a box.