LCD-Smartie / LCDSmartie

The New Official LCD Smartie Repository (LCD Smartie Lazarus port)
GNU General Public License v2.0
32 stars 5 forks source link

`$SysCPUUsage` only reports first core usage #3

Closed rdoursenaud closed 1 year ago

rdoursenaud commented 1 year ago

$SysCPUUsage only reports the first core usage on multi-core system instead of the combined system usage as reported by the windows task manager.

stokie-ant commented 1 year ago

What OS are you using? I'm seeing this problem with windows 11 but not 7

rdoursenaud commented 1 year ago

Yes Windows 11, sorry for not mentioning it. 22H2 build 22621.1485 precisely.

stokie-ant commented 1 year ago

I've tried several different methods and it's a no go. Windows 11 is doing something stupid with CPU times. It's actually broken quite a bit of other software task manager Vs HWMonitor Vs Libre Hardware Monitor

Screenshot 2023-04-01 225217

I'll leave this issue open for now in case I do figure something out

stokie-ant commented 1 year ago

Hopefully that'll work for you now

rdoursenaud commented 1 year ago

Thanks you for trying. Unfortunately, on my machine (CPU: AMD Ryzen 5950X) it always reports 0 now.

I also get some screen garbling that wasn't there before that end up crashing my Matrix Orbital GLK19264-7T-1U. Looking at the patch, I believe the later might be correlated to the removed full screen redraws.

Finally, the main window seems to have been redesigned without the Setup and Hide buttons and I find that annoying.

image

rdoursenaud commented 1 year ago

FWIW HWiNFO64 reports data that is in the ballpark of the task manager (Different sampling interval I guess). I don't know which method they use to retrieve these though.

stokie-ant commented 1 year ago

Looks like the new issue was with the English counter names. I've done the coding now just running it overnight to test stability. I've also fixed the size issue covering the buttons. I'll take another look at the screen redraw code. I took it away after deciding it was quicker to stream complete screen updates rather than just update what has changed as modern computers can handle it. Maybe it's too quick

rdoursenaud commented 1 year ago

Thanks. Looking forward to testing it.

stokie-ant commented 1 year ago

New version done. Let me know if it works https://github.com/stokie-ant/lcdsmartie-laz#readme

rdoursenaud commented 1 year ago

Let's start with the positive: No more screen garbling and crash. Setup and Hide buttons visible again \o/

Unfortunately, $SysCPUUsage still reports a solid 0.

stokie-ant commented 1 year ago

Did we get this sorted?

rdoursenaud commented 1 year ago

Yes! The binary you posted in #8 works like a charm.

Thank you.