Programmatically disable on Windows10 C3, C4, C5, C6 states of CPU
Jiří Mikeska
1
Reputation point
Good day.
I want to programmatically disable on Windows10 C3, C4, C5, C6 states of CPU. I tried this code:
const GUID processor_idle_state_maximum = {0x9943e905, 0x9a30, 0x4ec1, 0x9b, 0x99, 0x44, 0xdd, 0x3b, 0x76, 0xf7, 0xa2};
GUID *scheme;
const DWORD DISABLED = 1;
DWORD error;
error = PowerGetActiveScheme(NULL, &scheme);
error = PowerWriteACValueIndex(NULL, scheme, &GUID_PROCESSOR_SETTINGS_SUBGROUP, &processor_idle_state_maximum, DISABLED);
error = PowerWriteDCValueIndex(NULL, scheme, &GUID_PROCESSOR_SETTINGS_SUBGROUP, &processor_idle_state_maximum, DISABLED);
error = PowerSetActiveScheme(NULL, scheme);
But this does nothing (I checked it in PerfMon.exe). As value DISABLED I tried all possible values from 1 to 20.
And how to disable C2, C3, C4, C5, C6 states of CPU?