Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pi5 thermal throttling raises clock #518

Closed
cleverca22 opened this issue Jan 12, 2024 · 2 comments
Closed

pi5 thermal throttling raises clock #518

cleverca22 opened this issue Jan 12, 2024 · 2 comments
Labels
bug Something isn't working

Comments

@cleverca22
Copy link

cleverca22 commented Jan 12, 2024

Describe the bug

if you switch cpufreq to manual mode:

echo userspace > /sys/devices/system/cpu/cpufreq/policy0/scaling_governor
echo > /sys/devices/system/cpu/cpufreq/policy0/scaling_setspeed 2000000

the system will then be locked to 2ghz

if you then cause thermal throttling with for example stress-ng --cpu 4 and a lack of heatsink
the system will RAISE! the clock

root@raspberrypi:~# vcgencmd measure_clock arm ; vcgencmd measure_temp
frequency(0)=2000005120
temp=76.8'C
root@raspberrypi:~# vcgencmd measure_clock arm ; vcgencmd measure_temp
frequency(0)=2000006656
temp=77.4'C
root@raspberrypi:~# vcgencmd measure_clock arm ; vcgencmd measure_temp
frequency(0)=2256007936
temp=82.9'C

i suspect the problem, is that the soft-throttling uses a percentage of the max clock, rather then a percentage of what cpufreq requested

further heating, will cause it to throttle more, until it hits 1.5ghz, and temps are under control
but as it backs off, it will over-shoot what cpufreq requested, and bounce around, never settling on the requested clock, until it fully leaves the soft-throttling zone

Device (s)

Raspberry Pi 5

Bootloader configuration.

root@raspberrypi:~# vcgencmd bootloader_config
[all]
BOOT_UART=1
POWER_OFF_ON_HALT=0
BOOT_ORDER=0xf41

System

root@raspberrypi:~# vcgencmd bootloader_version
2024/01/05 15:57:40
version 30cc5f37d65b279e820adb1d9840ad3c1cc98229 (release)
timestamp 1704470260
update-time 1704905906
capabilities 0x0000007f
@timg236 timg236 added the bug Something isn't working label Feb 16, 2024
@timg236
Copy link
Collaborator

timg236 commented Feb 16, 2024

Reproduced. The soft-limit scaling was based arm_freq config.txt rather than the current max freq.

timg236 added a commit to timg236/rpi-eeprom that referenced this issue Feb 16, 2024
…) (default)

* arm_loader: Move non-kernels back to 512KB
  See: raspberrypi/firmware#1868

* Limit throttled frequency to OS requested frequency rather than config.txt frequency.
   See: raspberrypi#518
timg236 added a commit that referenced this issue Feb 16, 2024
…) (default)

* arm_loader: Move non-kernels back to 512KB
  See: raspberrypi/firmware#1868

* Limit throttled frequency to OS requested frequency rather than config.txt frequency.
   See: #518
@timg236
Copy link
Collaborator

timg236 commented May 1, 2024

Closing as fixed

@timg236 timg236 closed this as completed May 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants