It is currently November 30th, 2022, 3:39 am

[Bug] Skins show lower than actual CPU Usage in Windows 11 22H2

Report bugs with the Rainmeter application and suggest features.
User avatar
Beeta
Posts: 5
Joined: September 21st, 2022, 10:07 pm

[Bug] Skins show lower than actual CPU Usage in Windows 11 22H2

Post by Beeta »

Hi! Installed Windows 11 22H2 update today and my skins no longer show proper CPU Usage, it shows a much lower CPU usage. Tested a few other skins as well, they all show like 1/3 of the actual cpu usage under heavy load (100%) and about 1/10 of the CPU usage under lower load (10-12%).

Was thinking it might have something to do with the new task manager in 22H2? I've attached a few screenshots. I currently use Rainformer AIDA64 skin.
Screenshot 2022-09-22 001130.png
Screenshot 2022-09-22 001048.png
If you need any more information, please let me know.
You do not have the required permissions to view the files attached to this post.
Rainformer Rainmeter CPU-RAM Skin fix for Windows 11 22H2
https://forum.rainmeter.net/viewtopic.php?t=27473&start=120#p210566
User avatar
SilverAzide
Rainmeter Sage
Posts: 2174
Joined: March 23rd, 2015, 5:26 pm

Re: [Bug] Skins show lower than actual CPU Usage in Windows 11 22H2

Post by SilverAzide »

Beeta wrote: September 21st, 2022, 10:14 pm Hi! Installed Windows 11 22H2 update today and my skins no longer show proper CPU Usage, it shows a much lower CPU usage. Tested a few other skins as well, they all show like 1/3 of the actual cpu usage under heavy load (100%) and about 1/10 of the CPU usage under lower load (10-12%).

Was thinking it might have something to do with the new task manager in 22H2? I've attached a few screenshots. I currently use Rainformer AIDA64 skin.

Screenshot 2022-09-22 001130.png

Screenshot 2022-09-22 001048.png

If you need any more information, please let me know.
If you don't mind, please try the CPU Meter skin here: Gadgets. This skin will (should?) properly show the CPU usage and should match what you see in Task Manager. If it works, let me know.
Gadgets Wiki GitHub More Gadgets...
User avatar
Beeta
Posts: 5
Joined: September 21st, 2022, 10:07 pm

Re: [Bug] Skins show lower than actual CPU Usage in Windows 11 22H2

Post by Beeta »

SilverAzide wrote: September 21st, 2022, 10:59 pm If you don't mind, please try the CPU Meter skin here: Gadgets. This skin will (should?) properly show the CPU usage and should match what you see in Task Manager. If it works, let me know.
The Gadgets CPU-meter seems to be accurate on Windows 11 22H2 as below screenshots when I compare it to Rainformer and Task Manager.

However the top CPU rainmeter from Gadgets seems to show the exact same symptoms as Rainformer under 22H2, it only shows a few process for a few seconds, then more processes the next second and the other second just two process for example. And the CPU usage in the top CPU rainmeter on both Gadgets and Rainformer show the incorrect CPU usage for processes. See screenshots below.

How come Gadgets cpu usage works but not Rainformers? Worked perfectly on Windows 11 21H2.
Screenshot 2022-09-22 075807.png
Screenshot 2022-09-22 075836.png
Screenshot 2022-09-22 080704.png
You do not have the required permissions to view the files attached to this post.
Rainformer Rainmeter CPU-RAM Skin fix for Windows 11 22H2
https://forum.rainmeter.net/viewtopic.php?t=27473&start=120#p210566
User avatar
Beeta
Posts: 5
Joined: September 21st, 2022, 10:07 pm

Re: [Bug] Skins show lower than actual CPU Usage in Windows 11 22H2

Post by Beeta »

I tried to uninstall Rainmeter completely with all preferences and deleted the Rainmeter folder in Documents. Did a clean install of latest Rainmeter build. Bug is still present in the default skins under a clean install:
Screenshot 2022-09-22 143840.png
You do not have the required permissions to view the files attached to this post.
Rainformer Rainmeter CPU-RAM Skin fix for Windows 11 22H2
https://forum.rainmeter.net/viewtopic.php?t=27473&start=120#p210566
User avatar
SilverAzide
Rainmeter Sage
Posts: 2174
Joined: March 23rd, 2015, 5:26 pm

Re: [Bug] Skins show lower than actual CPU Usage in Windows 11 22H2

Post by SilverAzide »

Beeta wrote: September 22nd, 2022, 6:14 am The Gadgets CPU-meter seems to be accurate on Windows 11 22H2 as below screenshots when I compare it to Rainformer and Task Manager.

However the top CPU rainmeter from Gadgets seems to show the exact same symptoms as Rainformer under 22H2, it only shows a few process for a few seconds, then more processes the next second and the other second just two process for example. And the CPU usage in the top CPU rainmeter on both Gadgets and Rainformer show the incorrect CPU usage for processes. See screenshots below.

How come Gadgets cpu usage works but not Rainformers? Worked perfectly on Windows 11 21H2.
I can't say for sure why you see a difference between Win11 21H2 and Win11 22H2. It may have something to do with Microsoft tweaking the way the thread scheduler works for the newer hybrid CPUs (p-cores vs. e-cores). What I can say is that all this usage info is coming from Windows itself, so Rainmeter is only telling you what Windows says. (The Top CPU Meter does bounce around a lot because Rainmeter does not report processes that use less than 0.1% CPU. That is why things appear and disappear; unfortunately, there's nothing I can do about that, it is a Rainmeter issue.)

With all that said, I do need point out that the CPU utilization you see in Windows Task manager has not matched Rainmeter since approximately Windows 8. (This does not mean your observations about Win11 22H2 aren't correct, they may be true too.) If you want the long version, here it is:

Starting with Windows 8, a change was made to the way that Task Manager and Performance Monitor report CPU utilization. This change affects the way that CPU utilization is computed. Microsoft created new performance counters, Processor Information > % Processor Utility and Processor Information > % Privileged Utility that attempt to better report the work a CPU is doing; starting with Windows 8, Task Manager now uses these counters. The old performance counters, Processor > % Processor Time and Processor > % Privileged Time still exist, and were used by Task Manager in Windows 7 and earlier.

Important points to keep in mind:
  • Rainmeter's CPU measure and the UsageMonitor plugin with the CPU alias both use the Windows 7-style Processor > % Processor Time counter.
  • Task Manager's CPU Performance tab will truncate (or clamp) CPU utilization values to 100%. (Windows Resource Monitor will show values over 100%.)
Here's the gnarly bit:
The difference between the two counter types concerns how they measure the actual work that the processor performs. The old time-based performance counters measure the percentage of time that the processor is busy, whereas the new utility performance counters measure how much work the processor actually performs. The utility performance counters take into account the processor performance state and Turbo Boost-based enhancements to measure and normalize the work that's being done by the CPU.

This change was intended to provide a more accurate representation of how much work the system is handling, and the utility counters do just that. A processor that's running 50% of the time and clocked down to 50% frequency performs only half the work of a processor that's running 100% of the time at 100% frequency. Before this change, under the time-based performance counters (used in Windows 7 Task Manager), those two processors clocked differently. Both appear to be doing the same amount of work: 100% of their capacity. With the redesigned Task Manager, the first processor is shown to be running at 50% capacity, whereas the second processor is shown to be running at 100% capacity. And Turbo Boost drives the processor above 100% of its nominal speed, and allows the processor to exceed 100% capacity.

What this means to you:
Any Rainmeter skin that uses CPU measures, or UsageMonitor measures that use the CPU alias, will not report CPU performance accurately (or at least, not the same way Task Manager or Resource Monitor does). This is why the Gadgets CPU Meter matches Windows 11's Task Manager, it uses the new utility performance counters. If you want to see the difference, open the CPU Meter Settings skin (click the wrench icon in the upper right corner) and check the option "Use Legacy Mode". This will flip the skin around to use the old Win7 time-based counters, and you'll see it now acts like your other CPU skins.

An easy way to tell what any skin is using without digging into the code is to max out your CPU and look to see if the performance exceeds 100%. The old time-based counters never exceed 100%, but the utility-based counter will reflect >100% when the CPU is running in turbo/boost mode.
Gadgets Wiki GitHub More Gadgets...
User avatar
SilverAzide
Rainmeter Sage
Posts: 2174
Joined: March 23rd, 2015, 5:26 pm

Re: [Bug] Skins show lower than actual CPU Usage in Windows 11 22H2

Post by SilverAzide »

Beeta wrote: September 22nd, 2022, 12:43 pm I tried to uninstall Rainmeter completely with all preferences and deleted the Rainmeter folder in Documents. Did a clean install of latest Rainmeter build. Bug is still present in the default skins under a clean install:
As I mentioned above, this really isn't a Rainmeter issue, so re-installing will have no effect. This is a Windows issue. And you are not imagining it. It does seem MS made a change in 22H2:

https://www.reddit.com/r/Windows11/comments/twa1o2/incorrect_cpu_usage_in_thirdparty_monitoring/

My guess is that MS changed their time-based performance counters; whether this is a bug or not is a question for them to answer... The MSI Afterburner folks say this is a bug here.
Gadgets Wiki GitHub More Gadgets...
User avatar
Thinkr8
Posts: 47
Joined: November 14th, 2020, 2:36 pm
Location: Washington DC

Re: [Bug] Skins show lower than actual CPU Usage in Windows 11 22H2

Post by Thinkr8 »

I was in the process of building a new suite when I noticed the Windows 11 22H2 Feature Update was offered to me to update. So I did. I updated 5 days ago and that's when I noticed "... the time-based performance counters ..." didn't match my skin. And I'm just now getting around to reading what has caused this issue across the Internet and have found that there's no fix. So my question is; When will we see a fix for this? Since my 22H2 upgrade, there's been 2 cumulative (KB5017328 & KB5017389) and 2 previews .net framework 3.5 & 4.8.1 updates (KB5017497 & KB5017271). None of these updates fixed the problem. It sure would be nice to have a solution so I can finish my suite.

So my question is; When will we see a fix for this?

Rainmeter 4.5.16.3687 (64-bit)
Language: English (1033)
Build time: 2022-09-20 16:53:41
Windows 8 Pro 22H2 (build 9200.608) 64-bit - English (1033) - I made this change in Properties/ Compatibility in an attempt to fix it.
(I wonder if I was to change it to Win 7 would it help?)
Path: C:\Program Files\Rainmeter\
SkinPath: C:\Users\ME\OneDrive\Documents\Rainmeter\Skins\
SettingsPath: C:\Users\ME\AppData\Roaming\Rainmeter\
IniFile: C:\Users\ME\AppData\Roaming\Rainmeter\Rainmeter.ini
Someone said, "Your thinking too much, so I thought more."
User avatar
SilverAzide
Rainmeter Sage
Posts: 2174
Joined: March 23rd, 2015, 5:26 pm

Re: [Bug] Skins show lower than actual CPU Usage in Windows 11 22H2

Post by SilverAzide »

Thinkr8 wrote: October 5th, 2022, 11:32 am So my question is; When will we see a fix for this?
Why are you asking that here? This is entirely a Windows 11 problem, so you need to be asking Microsoft.

But this doesn't need to stop you from building any skin. Use the "utility performance counters" and the numbers will be correct, and you will have the bonus of your skin matching Task Manager, which switched to using the utility counters years ago.
Gadgets Wiki GitHub More Gadgets...
User avatar
Thinkr8
Posts: 47
Joined: November 14th, 2020, 2:36 pm
Location: Washington DC

Re: [Bug] Skins show lower than actual CPU Usage in Windows 11 22H2

Post by Thinkr8 »

SilverAzide wrote: October 5th, 2022, 12:54 pm Why are you asking that here?
I honestly thought the Rainmeter Devs could adjust the program so it best matches what MS did.
And out of all of the 19 1/2 years, I've been using Rainmeter I've never seen this much of a change. Even through all the years of updating and upgrading Windows. Thank you for your advice and I've decided "it looks like we're gonna have to deal with this mismatch for an undetermined amount of time." I'm just not sure if my acute autistic behavior can cope. :) TY
Someone said, "Your thinking too much, so I thought more."
User avatar
SilverAzide
Rainmeter Sage
Posts: 2174
Joined: March 23rd, 2015, 5:26 pm

Re: [Bug] Skins show lower than actual CPU Usage in Windows 11 22H2

Post by SilverAzide »

Thinkr8 wrote: October 5th, 2022, 10:45 pm I honestly thought the Rainmeter Devs could adjust the program so it best matches what MS did.
And out of all of the 19 1/2 years, I've been using Rainmeter I've never seen this much of a change. Even through all the years of updating and upgrading Windows. Thank you for your advice and I've decided "it looks like we're gonna have to deal with this mismatch for an undetermined amount of time." I'm just not sure if my acute autistic behavior can cope. :) TY
Well, it isn't too difficult to change your measures from using time-based counters to using the utility counters. Annoying, yes; difficult, no... :)

I am assuming you want to use the built-in CPU measure, or perhaps the UsageMonitor measure with the CPU alias (both return the same results). Here is a simple example from the docs on using the CPU measure: https://docs.rainmeter.net/manual/measures/cpu/

Here is the same example rewritten to use UsageMonitor with the utility performance counters:

Code: Select all

[Rainmeter]
Update=1000
BackgroundMode=2
SolidColor=0,0,0,255

[MeasureAverageCPU]
Measure=Plugin
Plugin=UsageMonitor
Category="Processor Information"
Counter="% Processor Utility"
Name="0,_Total"
MinValue=0
MaxValue=100

[MeasureCPU1]
Measure=Plugin
Plugin=UsageMonitor
Category="Processor Information"
Counter="% Processor Utility"
Name="0,0"
MinValue=0
MaxValue=100

[MeterText]
Meter=String
X=5
Y=5
W=100
H=35
FontColor=255,255,255,255
Text="Average: [MeasureAverageCPU:1]%#CRLF#Core 1: [MeasureCPU1:1]%"
DynamicVariables=1
The equivalent to the CPU measure's Processor=N option (where N is the core number) is the Name="0,N" option. That's all it takes to use the new utility performance counters. The "MinValue=0, MaxValue=100" lines are not needed for this example, but you would need them if you were using these measures in a Bar meter or something similar.

Important note that you can ignore for all but the most complex machines/CPUs: The first value in the Name="0,N" option is the processor group or NUMA node. Unless you are running a CPU with more than 64 cores or a multi-processor machine or a machine that can run in NUMA mode, that first number will always be zero. Another important note is that the "% Processor Utility" counter does not exist in Windows 7, so this only works with Win 8 and later.

There's nothing the Rainmeter devs can do about this Windows 11 issue. They can't just multiply the numbers they are getting by some magical value and "fix" things back to the way they were; they'd have to redo the way the measures work in the same way the MSI Afterburner guys did. This is really something Microsoft needs to fix on their side.
Last edited by SilverAzide on October 6th, 2022, 1:41 pm, edited 1 time in total.
Reason: Corrected code snippet.
Gadgets Wiki GitHub More Gadgets...