# [Bug?] ThrottleStop "C-State AC" Setting is Global instead of Profile based



## Stunrise (Oct 26, 2021)

Dear TPU Team,

in the latest Version 9.4.2 Beta of ThrottleStop the Option *C States - AC Off/On* is not working with the profiles, instead it is a global Setting.






*Use Case Example: You have two Profiles:*

Performance Profile disables all C-States for best Latency
Eco Profile enables all C-States for best Efficiency
Right now its neccecary not only to switch the profiles, in addition its needed to open the C-State menu and change the "C States AC" Setting manually. Based on the position its placed in the menu and based on the typical use case scenario this option could be used it seems like a bug to me. 

If you need further information or assistance just tell me what to do and i will send you everything you need.

Best Regards


----------



## unclewebb (Oct 27, 2021)

Stunrise said:


> it seems like a bug


Not a bug. It is only a global function at the moment. Disabling the C states makes a permanent change to whatever Windows power plan you are currently using.

No plans at the moment to make it a per profile feature.

For a low latency performance profile, use Windows High Performance or Ultimate and use ThrottleStop to disable the C States in that profile.

For Eco, use the Windows Balanced profile and use ThrottleStop to make sure the C States are enabled.

Now you can use TS to switch between these two Windows profiles.


----------



## Stunrise (Oct 27, 2021)

Hi @unclewebb 

thank you for your explanation. I didnt knew that the Setting is saved in the power plans and with this explanation i absolutely understand that its kind of a "global" Setting and i can confirm that it works if i change the powerplan as well. Maybe a small mouseover tooltip could help to understand the option, but i have to admit that most of the use cases with "Performance/Eco"-Profiles are using different powerplans from the beginning.

Fun Fact: Before your great Update in Throttlestop with the power plans i scripted a PowerPlan Switcher myself with PowerShell to automatically switch the Power Plan based on the GPU utilization 


```
## To Fill
$NvidiaSMIFolderPath = "C:\Program Files\NVIDIA Corporation\NVSMI"
$GamingPState = "P0"
$MinGPUUsage = 20
$CheckEverySeconds = 10
$GamingPowerPlanID = "a84d5628-4d6a-4152-83ce-877fa5513906"
$NoGamingPowerPlanID = "381b4222-f694-41f0-9685-ff5bb260df2e"

## Power Plans IDs (Use Without #)
# 381b4222-f694-41f0-9685-ff5bb260df2e = Balanced
# 8c5e7fda-e8bf-4a96-9a85-a6e23a8c635c = High performance
# a1841308-3541-4fab-bc81-f71556f20b4a = Power saver
# a84d5628-4d6a-4152-83ce-877fa5513906 = Ultimate Performance

$SMICommand = "& '" + $NvidiaSMIFolderPath + "\nvidia-smi.exe`' --query-gpu=pstate,utilization.gpu --format=csv,noheader,nounits"

while ($true){
    $GPUData = (Invoke-Expression -command $SMICommand).split(",")

    if ($GPUData[0] -eq $GamingPState -and [int]$GPUData[1] -ge $MinGPUUsage){
        if ((powercfg /GetActiveScheme) -notlike ("*" + $GamingPowerPlanID + "*")){       
            powercfg -s $GamingPowerplanID
        }
    }
    else{
        if ((powercfg /GetActiveScheme) -notlike ("*" + $NoGamingPowerPlanID + "*")){
            powercfg -s $NoGamingPowerPlanID
        }
    }
    Start-Sleep -Seconds $CheckEverySeconds
}
```


----------



## unclewebb (Oct 27, 2021)

Stunrise said:


> i scripted a PowerPlan Switcher myself


That is a good looking script.   

ThrottleStop does not constantly check if the Windows power plan has changed so your script has some advantages compared to using ThrottleStop.

The C States On Off function was added to ThrottleStop because I had some extra space in the C States window to fill. The music guys are always complaining about latency but so far no one has told me that they use or need this feature. Any decent desktop board lets you manage the C states in the BIOS.

On non K CPUs, disabling all of the C states prevents the maximum turbo multipliers from being used so a CPU will end up running slower when it is not fully loaded. 

This is only a useful feature for those that need it, fully understand what it does and are clever enough to figure it out.


----------



## mirh (Dec 10, 2022)

unclewebb said:


> The C States On Off function was added to ThrottleStop because I had some extra space in the C States window to fill. The music guys are always complaining about latency but so far no one has told me that they use or need this feature. Any decent desktop board lets you manage the C states in the BIOS.


It's really not something optional or "academic" (or well, my use case has to do with academia, but sure thing the results are very much tangible!).
Given that Windows reportedly broke IDLESTATEMAX some versions ago, this is really the only way to force C1 (other than the insane IDLEDISABLE toggle that's an absolute power and thermal clog with permanent C0). I keep getting some high C7% residency otherwise on my 6500U, even if I set MSR_PKG_CST_CONFIG_CONTROL=00000000`00000000.

And (once I also disable C1E) I can tell you the difference in VBLsync variance inside the eponymous Psychtoolbox test is like a whole order of magnitude better.


----------

