Skip to content

fix: cpu stuck in performance mode on fresh install#733

Merged
frysee merged 2 commits into
LoveRetro:mainfrom
pvaibhav:bugfix-cpu-speed
May 20, 2026
Merged

fix: cpu stuck in performance mode on fresh install#733
frysee merged 2 commits into
LoveRetro:mainfrom
pvaibhav:bugfix-cpu-speed

Conversation

@pvaibhav
Copy link
Copy Markdown

This fixes a bug where on fresh install i.e. when the CPU speed for minarch has not otherwise been changed, the CPU Speed stays stuck in Performance mode even though the UI shows Auto.

This is because minarch calls setOverclock(1) to upgrade to performance mode, but this overwrites the "overclock" variable. If a subsequent "Config_readoptions()" call does not reset it back to something else, the cpu will silently stay in performance mode while the UI shows the default option of Auto.

The fix is to set Auto cpu mode explicitly when minarch starts. At present this selects schedutil from min to one less than the max frequency. On TG5040 this is 10% slower clock, so startup time of every game will be 10% slower. But this is of the order of 100-200 ms, while the power and thermal savings are massive.

Closes #732

This fixes a bug where on fresh install i.e. when the CPU speed for minarch has not otherwise been changed, the CPU Speed stays stuck in Performance mode even though the UI shows Auto.

This is because minarch calls setOverclock(1) to upgrade to performance mode, but this overwrites the "overclock" variable. If a subsequent "Config_readoptions()" call does not reset it back to something else, the cpu will silently stay in performance mode while the UI shows the default option of Auto.

The fix is to set Auto cpu mode explicitly when minarch starts. At present this selects schedutil from min to one less than the max frequency. On TG5040 this is 10% slower clock, so startup time of every game will be 10% slower. But this is of the order of 100-200 ms, while the power and thermal savings are massive.

Closes LoveRetro#732
Comment thread workspace/all/minarch/minarch.c Outdated
Avoid clobbering the cpu speed by using PWR_setCPUSpeed() directly. Also move the reset of cpu speed to the last possible place before the gfx loop starts.

This fixes the bug without any performance regression, but infact a minor performance gain during load (about 5% faster loading).
@frysee frysee merged commit e9e9113 into LoveRetro:main May 20, 2026
62 checks passed
@pvaibhav
Copy link
Copy Markdown
Author

Thanks!

@pvaibhav pvaibhav deleted the bugfix-cpu-speed branch May 20, 2026 16:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Brick] CPU stuck at 2000 MHz on a fresh install of 6.11.1

2 participants