mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-22 13:05:57 +00:00
Ask hybrid laptops for the dedicated GPU and opt out of Windows power throttling
The executable exports NvOptimusEnablement and AmdPowerXpressRequestHighPerformance, which NVIDIA Optimus and AMD switchable graphics read at start to run it on the dedicated GPU; Optimus can otherwise hide its GPU from a program it put on the integrated one. At start the process opts out of EcoQoS (E-cores and low clocks on hybrid Intel CPUs when Windows deems it in the background) and of Windows 11 ignoring its timer resolution while the window is hidden. One "power:" log line says whether Windows accepted it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ae30a61b7b
commit
320a41e0dc
4 files changed
+25
No files matched your search
@@ -481,6 +481,8 @@ uint64_t plat_counter_hz(void) { return 1000000000u; }
|
||||
// inherit it from the thread that creates them.
|
||||
void plat_timer_1ms(void) { prctl(PR_SET_TIMERSLACK, 1000ul, 0, 0, 0); }
|
||||
|
||||
int plat_power_full(void) { return -1; }
|
||||
|
||||
// clock_nanosleep wakes within the timer slack (50 us by default) of its deadline; the last PLAT_SPIN_NS are spent
|
||||
// yielding so the deadline is met closely, as on Windows.
|
||||
#define PLAT_SPIN_NS 100000u
|
||||
|
||||
Reference in new issue
Block a user