FW13 AMD 7840u thermal throttle at much lower temperature

  • Which Linux distro are you using? debian
  • Which release version? trixie/testing
  • Which kernel are you using? 6.10/6.11/6.12
  • Which BIOS version are you using? 03.05
  • Which Framework Laptop 13 model are you using? AMD Ryzen™ 7040 Series 7840U

normally FW13 will reduce cpu freq to maintain CPU 95C or so, but some times, running some program heavy load, eg. ffmpeg, imagick, … sometimes frequency will stuck rather low, like 1.4G, and temperature <60C, fan speed medium.

sensors:, filtered kept only temperature and voltage/current

in0:           5.00 V  (min =  +5.00 V, max =  +5.00 V)
curr1:         0.00 A  (max =  +1.50 A)
fan1:            5228 RPM
local_f75303@4d:  +54.9°C
cpu_f75303@4d:    +48.9°C
ddr_f75303@4d:    +49.9°C
cpu@4c:           +61.9°C
in0:          20.00 V  (min =  +5.00 V, max = +20.00 V)
curr1:         4.25 A  (max =  +4.25 A)
Composite:    +48.9°C  (low  = -273.1°C, high = +89.8°C)
                       (crit = +94.8°C)
Sensor 1:     +48.9°C  (low  = -273.1°C, high = +65261.8°C)
Sensor 2:     +42.9°C  (low  = -273.1°C, high = +65261.8°C)
Adapter: ACPI interface
temp1:        +54.8°C
temp2:        +48.8°C
temp3:        +49.8°C
temp4:        +61.8°C
in0:           5.00 V  (min =  +5.00 V, max =  +5.00 V)
curr1:         0.00 A  (max =  +1.50 A)
in0:          20.00 V  (min =  +5.00 V, max =  +5.00 V)
curr1:         3.00 A  (max =  +3.00 A)
temp1:        +56.0°C
Tctl:         +62.8°C
edge:         +58.0°C
Adapter: ACPI interface
in0:          15.63 V
curr1:         0.00 A

cpu frequencies: all 16 cpu MHz : 1533

How do you conclude it is thermal throttling? Couldn’t it be that the bottleneck is not the CPU but something else like disk or a process that doesn’t scale to all threads?

you shouldn’t even be hitting 95 C in the first place. I have the 7640u and I don’t know how much extra heat 2 more cores is but it can’t be more than a 20 degree delta from my 60f max temps…
check if your thermal paste is squishing out

OP’s 95C is normal given the default fan curves and recommended power management.

i use default fan curves…

It is thermal throttling, I tried to force cool down the laptop to somewhere < 50C, suddenly the frequency boosted to 3.xGHz and temperature going up to ~90C

there might be some other threshold or trigger condition. I tried boosting the fan to 100% 7000rpm using ectool, and messed with other warning thresholds, the temperature is still regulated to ~60C, with slightly higher frequency.

Yeah, the default fan curve is really really flat, not even reaching 5000rpm when thermal throttling kicks in. I always use ectool to lower the fan_max temperature to around 75C. And a turboed 7840U in full load generates lots of heat, easily saturates the tiny heatsink.

Which power management are you using? TLP or power-profiles-daemon?

hmm, none of above. I use a small script to read temperature and manipulate
/sys/devices/system/cpu/cpu*/cpufreq/scaling_max_freq,
to keep cpu below 80C. but when the thermal throttle happens, scaling_max_freq are set to maxim 5132MHz.

kernel command line has

amd_pstate=guided

There is this tool, which I find works well (or does so once I added a custom profile).

uhhh
wow… on my 7640u the fan curve is pretty aggressive, with temps never exceeding 80c

I think that I am observing something very similar, although I’m not quite sure what sort of limit I’m hitting (power, thermal, what else?) since I haven’t yet tried experimenting with external cooling methods. My system has a 7840u and is running NixOS 24.11. It was plugged in with the original Framework 60W power supply while conducting the tests below.

I have noticed when parallelizing a program of mine (solution to Advent of Code 2024 Day #6, bruteforce edition :grinning:) that splitting the workload concurrently on all 16 threads only resulted in a 2x speedup. I have checked and running the single-threaded version results in the usual boost above 4.1 GHz, but running the multi-threaded version only gets to around 1.2 GHz.

Finding this quite strange, I have kept investigating and done several experiments using different workloads.

Splitting the workload of my own initial program also coincides with this behavior, when I limit the number of threads to 9, I am able to get the full boost.

I am curious to know if these findings can be replicated by others, as well as potential steps that can be taken to get the maximal performance in all cases.

1 Like

In general using amd_pstate=guided is off the beating path where changing your frequency and the hardware tries to keep it. This generally does a better job than amd_pstate=passive, but why not use active mode and set the EPP? The hardware knows more about thermal capacity, utilization and other factors that the OS doesn’t so it generally does better than guided does.

1 Like

Something else really important I want to mention - there is a problem with the scheduler behavior right now.

There is a patch series in flight right now that helps it:

[PATCH 0/8] x86, sched: Dynamic ITMT core ranking support and some yak shaving

yeah :stuck_out_tongue_closed_eyes:, I definitely want to try some other pstate modes, but the AMD documentation is totally crap, only method might be Monte Carlo.

I am using a 140W DC PD adapter. FW13 can use 20V 4.5A, with some ectool configuration, I set it to 4.9A, when battery is charging it can draw more than 60W, up to 4.2A or so. 60W PD also limited to 2.7A, thus 54W.

And even worse, when I use gnu parallel with imagick to encode avif, some images running only 1 thread, so the system is running only 4 threads at painfully slow 1.5GHz

Wait what? You can use ectool to increase the input power?

yes, but I guess within PD reported capabilities.

% ${ectool} chargestate show
...
chg_input_current = 4900mA
...

code:

% ${ectool} chargestate param 2 4900

variable ectool is sudo and path of ectool