It is currently July 23rd, 2024, 4:54 am

Illustro | CPU usage incorrect (getting worse!?)

Get help with creating, editing & fixing problems with skins
User avatar
martin-london
Posts: 6
Joined: May 18th, 2023, 10:22 am

Illustro | CPU usage incorrect (getting worse!?)

Post by martin-london »

Summary: Any known issues with Illustro skin around CPU usage? (and if so, any fixes?)


Additional information / description of issue...
Hi Rainmeters...
β€’ I've been using Rainmeter and slightly tweaked Illustro skin for the past couple of years and it has been great
β€’ However 2-3 months ago I started to notice the CPU usage was a bit out (about 5% lower than Task Manager)
β€’ In the last month month it started to get 5-10% out
β€’ For the last 2 days it's been crazy, and has been reporting usage 20-30% lower than what's in Task Manager... I will hear my fans kick-in (and the system is clearly doing something), Illustro skin (System.ini) shows 1-2% usage but I open task manager and the CPU is churning around at 20.. 30%! 😟

Help greatly appreciated!
Like I say I have been using Rainmeter for years and really like it, but the CPU usage is getting to the point now where if I can't fix it I am going to have to use another tool instead... If anyone can please let me know why this is happening / how to fix it, that would be great!

-- Martin
User avatar
SilverAzide
Rainmeter Sage
Posts: 2689
Joined: March 23rd, 2015, 5:26 pm

Re: Illustro | CPU usage incorrect (getting worse!?)

Post by SilverAzide »

martin-london wrote: ↑May 18th, 2023, 10:44 am Summary: Any known issues with Illustro skin around CPU usage? (and if so, any fixes?)

Additional information / description of issue...
Hi Rainmeters...
β€’ I've been using Rainmeter and slightly tweaked Illustro skin for the past couple of years and it has been great
β€’ However 2-3 months ago I started to notice the CPU usage was a bit out (about 5% lower than Task Manager)
β€’ In the last month month it started to get 5-10% out
β€’ For the last 2 days it's been crazy, and has been reporting usage 20-30% lower than what's in Task Manager... I will hear my fans kick-in (and the system is clearly doing something), Illustro skin (System.ini) shows 1-2% usage but I open task manager and the CPU is churning around at 20.. 30%! 😟

Help greatly appreciated!
Like I say I have been using Rainmeter for years and really like it, but the CPU usage is getting to the point now where if I can't fix it I am going to have to use another tool instead... If anyone can please let me know why this is happening / how to fix it, that would be great!

-- Martin
This is an old issue that does not have anything to do with the Illustro skin or Rainmeter. There are numerous posts on this topic:

New computer on intel 13th gen W11 (CPU Usage is wrong)
[Bug] Skins show lower than actual CPU Usage in Windows 11 22H2
CPU usage of processes
measureCPU incorrect
https://www.reddit.com/r/Windows11/comments/twa1o2/incorrect_cpu_usage_in_thirdparty_monitoring/
etc...

TLDR;
This is known behavior on systems running Windows 11 22H2 and later; it was OK in earlier versions of Windows 11. Task Manager has not displayed data the same as Rainmeter since Windows 8, but it was not noticeable until Win11 22H2 when Microsoft made a huge change to the way they report CPU usage. This is not a Rainmeter thing; if you search around you'll see similar issues with HWiNFO, MSI Afterburner, etc., basically anything that relied on Windows time-based performance counters.

There is a way to change the Illustro CPU skin to match Task Manager. All you need to do is change the CPU measure to a UsageMonitor measure, as described in this post.

I believe the 7.46 version of HWiNFO has added their own fix for this issue to display CPU usage similar to the way it was done in Windows 7. So you could use HWiNFO as an alternative source of data if you prefer.
β€’ Gadgets β€’ Wiki β€’ GitHub β€’ More Gadgets... β€’
User avatar
balala
Rainmeter Sage
Posts: 16418
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Illustro | CPU usage incorrect (getting worse!?)

Post by balala »

martin-london wrote: ↑May 18th, 2023, 10:44 am Summary: Any known issues with Illustro skin around CPU usage? (and if so, any fixes?)
Taking into account SilverAzide's reply, question is which Windows version are you using? If it's Windows 11 22H2, the above reply explains everything. If it's any previous version, there is something else. But I assume it's Windows 11 22H2 indeed.
So, what is the version of your Windows?
User avatar
martin-london
Posts: 6
Joined: May 18th, 2023, 10:22 am

Re: Illustro | CPU usage incorrect (getting worse!?)

Post by martin-london »

Hi @SilverAzide and @balala -- thanks for the quick replies!

RE @Balala: Yes I'm on W11 22H2
Yes, I am in Windows 11 22H2 (reluctantly)... I was perfectly happy on Windows 10 but was essentially forced to upgrade a while ago. Sigh, if this is a Windows 11-specific bug then will just add to my list of things that are notably worse in Windows 11 than they are in 10 :thumbdown:

RE @SilverAzide: Thanks will look into those links / how to fix it
Thanks for the links and confirmation of the issue. I did a bit of searching and read at least the measureCPU incorrect one before posting (think that's where I got the idea it was related to Illustro / the settings.ini file, but this and the 1-2 other posts I read all seemed to talk about gen 12 and 13 CPUs so I thought there issue was separate and related to something like a glitch in the latest CPU architecture - whereas I'm sadly only rocking a i7-9750 (9th gen) CPU so thought it was a different thing... But like I say good to get to get it confirmed so thanks for clarifying that it is all one and the same issue! πŸ‘πŸΌ (ah, Microsoft you manage to break CPU reporting over 5 generations of CPUs! :thumbup:

PS - Have used HWinfo to check specs before, but not actually to monitor live performance... I wanted to check though, following your recommendation - I THINK that my HWinfo is about 3% out too, right? (if I'm reading it correctly and comparing the 7% in TaskMan vs. 3.8% in HWinfo?)
Image

Cool, anyway I will look into changing the CPU measure thanks (I'm not a Rainmeter pro by any means but should be fine, I did try tweaking the CPU measure myself initially but didn't quite get it right so if there's a guide that has all the info that's great! Thanks again guys!

__________________________________________________________________________

βœ… ISSUE RESOLVED -- SEE THIS POST

.
User avatar
balala
Rainmeter Sage
Posts: 16418
Joined: October 11th, 2010, 6:27 pm
Location: Gheorgheni, Romania

Re: Illustro | CPU usage incorrect (getting worse!?)

Post by balala »

martin-london wrote: ↑May 18th, 2023, 3:02 pm RE @Balala: Yes I'm on W11 22H2
Yes, I am in Windows 11 22H2 (reluctantly)... I was perfectly happy on Windows 10 but was essentially forced to upgrade a while ago. Sigh, if this is a Windows 11-specific bug then will just add to my list of things that are notably worse in Windows 11 than they are in 10 :thumbdown:
Yep, this explains everything...
User avatar
SilverAzide
Rainmeter Sage
Posts: 2689
Joined: March 23rd, 2015, 5:26 pm

Re: Illustro | CPU usage incorrect (getting worse!?)

Post by SilverAzide »

martin-london wrote: ↑May 18th, 2023, 3:02 pm PS - Have used HWinfo to check specs before, but not actually to monitor live performance... I wanted to check though, following your recommendation - I THINK that my HWinfo is about 3% out too, right? (if I'm reading it correctly and comparing the 7% in TaskMan vs. 3.8% in HWinfo?)
Image
Those HWiNFO "residency" sensors are not the correct sensors. You should be looking at either "core usage" or "core utility" sensors (the names will vary), but there will be one sensor per logical core (or "thread"), with an average value across all. The "core utility" sensors will match Task Manager.

Screenshot 2023-05-18 170228.png
You do not have the required permissions to view the files attached to this post.
β€’ Gadgets β€’ Wiki β€’ GitHub β€’ More Gadgets... β€’
User avatar
martin-london
Posts: 6
Joined: May 18th, 2023, 10:22 am

Re: Illustro | CPU usage incorrect (getting worse!?)

Post by martin-london »

UPDATE: @SilverAzide -- I applied the changes discussed in your comment on this post and my usage is showing correctly again, thanks!

As I was reading through through and applying the code I decided to extend it and tweak it a little (see below)...
Image

Also, it's great that you seem to be the pseudo-champion on this / are helping people out like myself that are getting a bit stumped by this odd behaviour.

It also made me realise that your Rainmeter skills FAR exceed my own, so wondered IF you had a minute or two and didn't mind checking over my skin file and letting me know:
  • Any errors, or deprecated functions etc
  • To get the temp values (at least back when I wrote it) you needed to run CoreTemp in the background to poll the temperature info for you... I don't mind doing that (it is a pretty small util) but if nowadays this can be natively (or some other better way)
  • If it's OK to create separate measures like I've done (back in the day this was the way to calculate the avg. temp I believe bit am not sure if there are better/simpler methods nowadays (also, thinking about your message...
    SilverAzide wrote: ↑May 18th, 2023, 9:03 pm1 sensor per core/threat
    ... My CPU has 6 cores and 12 threads -- currently I've defined 6x measures for Temp and 6x for usage, but am guessing in hindsight that maybe isn't right (and should be 12 for each?)
    ... equally, if it just excessive to define 24x measure to get avg temp. and usage - feel free to say if it's not a great idea and I shouldn't go down this road
  • Any other tweaks/improvements you would make (I wrote this a few years ago and my Rainmeter skills are "beginner" at best so realise the script can probably be improved somewhat

Code: Select all

; Lines starting ; (semicolons) are commented out.
; That is, they do not affect the code and are here for demonstration purposes only.
; ----------------------------------

[Rainmeter]
; This section contains general settings that can be used to change how Rainmeter behaves.
Update=1000
Background=#@#Background.png
; #@# is equal to Rainmeter\Skins\illustro\@Resources
BackgroundMode=3
BackgroundMargins=0,34,0,14

[Metadata]
; Contains basic information of the skin.
Name=System
Author=poiru
Information=Displays basic system stats.
License=Creative Commons BY-NC-SA 3.0
Version=1.0.0

[Variables]
; Variables declared here can be used later on between two # characters (e.g. #MyVariable#).
;@Include=#@#Variables.inc
fontName=Trebuchet MS
textSize=8
colorBar=235,170,0,255
colorText=255,255,255,205
AccentColor=66,133,244
Yellow=251,188,5
Red=234,67,53
Green=52,168,83
Blue=#AccentColor#
ReverseTheme=Light
SecondaryTextColor=144,144,144

; ----------------------------------
; MEASURES return some kind of value
; ----------------------------------

[MeasureAverageCPU]
Measure=Plugin
Plugin=UsageMonitor
Category="Processor Information"
Counter="% Processor Utility"
Name="0,_Total"
MinValue=0
MaxValue=100
IfCondition=MeasureAverageCPU <= 33
IfTrueAction=[!SetOption meterBarCPU BarColor #Green#][!Redraw]
IfCondition2=(MeasureAverageCPU > 34) && (MeasureAverageCPU < 66)
IfTrueAction2=[!SetOption meterBarCPU BarColor #Yellow#][!Redraw]
IfCondition3=MeasureAverageCPU >= 67
IfTrueAction3=[!SetOption meterBarCPU BarColor #Red#][!Redraw]

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

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

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

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

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

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

[measureRAM]
; Returns the amount of RAM used in bytes.
; UpdateDivider controls how often RAM measure is refreshed, in seconds
Measure=PhysicalMemory
UpdateDivider=20

[MeasureTempC0]
Measure=Plugin
Plugin=CoreTemp
CoreTempType=Temperature
CoreTempIndex=0

[MeasureTempC1]
Measure=Plugin
Plugin=CoreTemp
CoreTempType=Temperature
CoreTempIndex=1

[MeasureTempC2]
Measure=Plugin
Plugin=CoreTemp
CoreTempType=Temperature
CoreTempIndex=2

[MeasureTempC3]
Measure=Plugin
Plugin=CoreTemp
CoreTempType=Temperature
CoreTempIndex=3

[MeasureTempC4]
Measure=Plugin
Plugin=CoreTemp
CoreTempType=Temperature
CoreTempIndex=4

[MeasureTempC5]
Measure=Plugin
Plugin=CoreTemp
CoreTempType=Temperature
CoreTempIndex=5

[MeasureAverageTemp]
Measure=Calc
Formula=Max(Max(Max(Max(Max([MeasureTempC0],[MeasureTempC1]),[MeasureTempC2]),[MeasureTempC3]),[MeasureTempC4]),[MeasureTempC5])
DynamicVariables=1
MinValue=30
MaxValue=100
IfCondition=MeasureAverageTemp <= 60
IfTrueAction=[!SetOption meterBarTEMP BarColor #Green#][!Redraw]
IfCondition2=(MeasureAverageTemp > 60) && (MeasureAverageTemp < 80)
IfTrueAction2=[!SetOption meterBarTEMP BarColor #Yellow#][!Redraw]
IfCondition3=MeasureAverageTemp >= 80
IfTrueAction3=[!SetOption meterBarTEMP BarColor #Red#][!Redraw]

; ----------------------------------
; STYLES are used to "centralize" options
; ----------------------------------

[styleTitle]
StringAlign=Center
StringCase=Upper
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,50
FontColor=#colorText#
FontFace=#fontName#
FontSize=10
AntiAlias=1
ClipString=1

[styleLeftText]
StringAlign=Left
; Meters using styleLeftText will be left-aligned.
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleRightText]
StringAlign=Right
StringCase=None
StringStyle=Bold
StringEffect=Shadow
FontEffectColor=0,0,0,20
FontColor=#colorText#
FontFace=#fontName#
FontSize=#textSize#
AntiAlias=1
ClipString=1

[styleBar]
BarColor=#colorBar#
BarOrientation=HORIZONTAL
SolidColor=255,255,255,15

; ----------------------------------
; METERS display images, text, bars, etc.
; ----------------------------------

[meterTitle]
Meter=String
MeterStyle=styleTitle
; Using MeterStyle=styleTitle will basically "copy" the
; contents of the [styleTitle] section here during runtime.
X=100
Y=12
W=190
H=18
Text=SYSTEM
LeftMouseUpAction=["taskmgr.exe"]
ToolTipText=Open Task Manager
; Left-clicking this meter will launch taskmgr.exe (the Task Manager).
; Hovering over this meter will display a tooltip with the text above.


[meterLabelTEMP]
Meter=String
MeterStyle=styleLeftText
X=10
Y=40
W=190
H=14
Text=CPU Temp

[meterValueTEMP]
Meter=String
MeasureName=MeasureAverageTemp
MeterStyle=styleRightText
X=200
Y=0r
W=190
H=14
Text="%1Β°C"

[meterBarTEMP]
Meter=Bar
MeterStyle=styleBar
MeasureName=MeasureAverageTemp
X=10
Y=52
W=190
H=1

[meterLabelCPU]
Meter=String
MeterStyle=styleLeftText
X=10
Y=60
W=190
H=14
Text=CPU Load

[meterValueCPU]
Meter=String
MeterStyle=styleRightText
MeasureName=measureCPU
X=200
Y=0r
W=190
H=14
Text=[MeasureAverageCPU:0]%
ToolTipText=Core 1:  [MeasureCPU1:0]%#CRLF#Core 2:  [MeasureCPU2:0]%#CRLF#Core 3:  [MeasureCPU3:0]%#CRLF#Core 4:  [MeasureCPU4:0]%#CRLF#Core 5:  [MeasureCPU5:0]%#CRLF#Core 6:  [MeasureCPU6:0]%
DynamicVariables=1

[meterBarCPU]
Meter=Bar
MeterStyle=styleBar
MeasureName=MeasureAverageCPU
X=10
Y=72
W=190
H=1

[meterLabelRAM]
Meter=String
MeterStyle=styleLeftText
X=10
Y=80
W=190
H=14
Text=RAM

[meterValueRAM]
Meter=String
MeterStyle=styleRightText
MeasureName=measureRAM
X=200
Y=0r
W=190
H=14
Text=%1%
Percentual=1
; Percentual=1 needs to be added her because measureRAM returns the amount
; of RAM used in bytes. Using Percentual=1 will convert that into a percentual value.

[meterBarRAM]
Meter=Bar
MeterStyle=styleBar
MeasureName=measureRAM
X=10
Y=92
W=190
H=1
Last edited by martin-london on May 19th, 2023, 10:32 am, edited 1 time in total.
User avatar
martin-london
Posts: 6
Joined: May 18th, 2023, 10:22 am

Re: Illustro | CPU usage incorrect (getting worse!?)

Post by martin-london »

PS -- Oooooh, just did some random clicking around and came across Alien on your GitHub... WOOOW!


OK, so I don't feel too bad for my little poxy, slightly- tweaked version of Illustro that I made, but OK yours definitely wins, lol!
... It has scrolling performance graphs and everything -- that's so far above my level it's hilarious! :D
User avatar
SilverAzide
Rainmeter Sage
Posts: 2689
Joined: March 23rd, 2015, 5:26 pm

Re: Illustro | CPU usage incorrect (getting worse!?)

Post by SilverAzide »

martin-london wrote: ↑May 19th, 2023, 3:17 am
  • Any errors, or deprecated functions etc
  • To get the temp values (at least back when I wrote it) you needed to run CoreTemp in the background to poll the temperature info for you... I don't mind doing that (it is a pretty small util) but if nowadays this can be natively (or some other better way)
  • If it's OK to create separate measures like I've done (back in the day this was the way to calculate the avg. temp I believe bit am not sure if there are better/simpler methods nowadays (also, thinking about your message...
    ... My CPU has 6 cores and 12 threads -- currently I've defined 6x measures for Temp and 6x for usage, but am guessing in hindsight that maybe isn't right (and should be 12 for each?)
    ... equally, if it just excessive to define 24x measure to get avg temp. and usage - feel free to say if it's not a great idea and I shouldn't go down this road
  • Any other tweaks/improvements you would make (I wrote this a few years ago and my Rainmeter skills are "beginner" at best so realise the script can probably be improved somewhat
Glad to hear you got it all working! It looks good! :thumbup:

CoreTemp is a nice lightweight utility to grab temps with, and the latest version now properly handles hybrid CPUs. HWiNFO is the usual go-to if you want to monitor more than temps, like GPUs, fans, hard drive temps, etc., but it's harder to configure and obviously a bit heavier on resource usage.

To calculate the average temp across all the cores you'll need to have a CoreTemp measure for each physical core, as you've done (i.e., 6 measures). There is a built-in setting for getting the max temp of all cores, but not one for the average. So as you have already speculated, this is where things get difficult if you are building something that works for everyone. You'll need to figure out how many physical cores there are, which is no longer just the number of logical cores (or "threads") divided by two. With Intel's hybrid CPUs, "P-cores" are hyperthreaded and "E-cores" are single-threaded, and they come in lots of combinations.

You'll need 12 measures for your CPU usage, one for each logical core. Windows does not report usage on a per-physical core basis, it only sees logical cores. Your skin's CPU tooltip is showing only half your CPU usage, so you'll need to add more measures for the remaining cores.

As you might imagine, this can get quite involved if you want your skin to run on a 64-core/128-thread AMD Threadripper, where you need hundreds of measures to get all the info. You can easily configure the measures to disable themselves if you have fewer cores than measures, so not all measures will need to be running.
β€’ Gadgets β€’ Wiki β€’ GitHub β€’ More Gadgets... β€’
User avatar
martin-london
Posts: 6
Joined: May 18th, 2023, 10:22 am

Re: Illustro | CPU usage incorrect (getting worse!?)

Post by martin-london »

SilverAzide wrote: ↑May 19th, 2023, 12:12 pm Glad to hear you got it all working! It looks good! :thumbup:... CoreTemp is a nice lightweight utility to grab temps with, and the latest version now properly handles hybrid CPUs. HWiNFO is the usual go-to if you want to monitor more than temps, like GPUs, fans, hard drive temps, etc., but it's harder to configure and obviously a bit heavier on resource usage.
Thanks!... Yeah that was my thinking too generally TBH -- HWinfo is a great tool (especially for exploring the specs of a new system, or troubleshooting) and it detects/monitors more information about my system than I ever imagined... but it does take several seconds to load, where as CoreTemp takes <1 sec.
SilverAzide wrote: ↑May 19th, 2023, 12:12 pm To calculate the average temp across all the cores you'll need to have a CoreTemp measure for each physical core, as you've done (i.e., 6 measures)... You'll need 12 measures for your CPU usage, one for each logical core.
Ah, yeah I think you may be right! :Whistle
Screenshot 2023-05-29 010518 -- Rainmeter over 100%.png
SilverAzide wrote: ↑May 19th, 2023, 12:12 pm This can get quite involved if you want your skin to run on a 64-core/128-thread AMD Threadripper, where you need hundreds of measures to get all the info. You can easily configure the measures to disable themselves if you have fewer cores than measures, so not all measures will need to be running.
OMG, threadrippers!... Yeah, that is insane! :?

Seriously, though, your last comment has just blown my mind slightly -- as in, for me - the fix was to copy and paste about 5 lines of code 12x, it's a bit annoying but not too bad!... But then if you're talking about people with threadrippers and other extreme core-count CPUs, and [Microsoft are] expecting them to write literally hundreds to thousand+ lines of code to fix their reporting, how does this make sense?.... Am not saying you're wrong, but I just can't help but think "surely this can NOT be thee right answer!?"
:uhuh:

I know this is a little off-topic, but I was thinking through the stack / layers involved in reporting temp, usage and things, and came up with the below model...
Sensor_layers.jpg
I know it isn't perfect and some of the layers may be missing/wrong, but using this as a discussion point. Is is really the case that...
β€’ Microsoft made a change in say "layer 3"
β€’ This change then broke reporting for everyone else "down the chain"
β€’ They didn't fix it
β€’ The "fix" is for everyone else (i.e. end users) to individually fix their scripts / apps / monitoring tools!?
β€’ That just seems messed up!

I appreciate that I have probably mis-understood something about the change, or what is going on "under the hood" -- and that's fine, am happy to be corrected and learn more about what has changed/broken, why, and the way(s) to fix it. But please can someone explain this to me?
You do not have the required permissions to view the files attached to this post.