Bug 398346

Summary: System Load Viewer is not working at all with X399 motherboard
Product: [Unmaintained] kdeplasma-addons Reporter: wolfyrion <kyriacos>
Component: systemloadviewerAssignee: Plasma Bugs List <plasma-bugs-null>
Status: RESOLVED FIXED    
Severity: normal CC: cspiegel, kde, nate, vik
Priority: NOR    
Version First Reported In: 5.13.5   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: some screens
plasmoidviewer --applet

Description wolfyrion 2018-09-07 04:57:28 UTC
Hi , 

I am using Asrock Fatal1ty X399 Professional Gaming motherboard with an AMD Threadripper 1950X and I dont get any indications of the CPU or memory using system load viewer. (motherboard web site: https://www.asrock.com/mb/AMD/Fatal1ty%20X399%20Professional%20Gaming/index.asp )

However other addons like CPU Load monitor is working fine and also Thermal Monitor addon is displaying the temperatures correctly.
Also Psensor is working fine and is displaying all the values correctly so I guess is something with the System Load Viewer addon.
Comment 1 Kai Uwe Broulik 2018-09-07 06:50:51 UTC
Does it show in ksysguard?
Comment 2 wolfyrion 2018-09-07 07:12:06 UTC
(In reply to Kai Uwe Broulik from comment #1)
> Does it show in ksysguard?

Yeap!
Comment 3 Chris Spiegel 2020-02-20 21:22:42 UTC
I had the same problem, and have found the source.

In ksysguard, in ksysguardd/Linux/cpuinfo.c, there is a buffer meant to hold /proc/cpuinfo.  It has a fixed size of 32 * 1024.

This size is too small for some modern, multi-core systems.  I have a 24-core system, and each entry in /proc/cpuinfo takes up around 1500 bytes.  My entire /proc/cpuinfo is 35982 bytes, meaning it won't fit into the buffer, and as a result, ksysguardd doesn't register monitors like system/cores, which causes the system load viewer to fail.

I don't know the right size for the buffer, but I'd say "significantly larger" is proper.  I can't imagine (for example) 128K being onerous at all, and it'd allow for significantly larger /proc/cpuinfo files.  But that might not even work, given that apparently AMD is coming out with 64-core/128-thread systems...  It should probably just be a megabyte or something, so you never have to worry agin.  Or just allocate dynamically, with a gigantic ceiling.

Anyway, the fix is to increase the size of the buffer one way or another.
Comment 4 viktor 2020-08-07 06:22:28 UTC
Created attachment 130695 [details]
some screens
Comment 5 viktor 2020-08-07 06:23:12 UTC
Hello! I have a similar problem. Processor Threadripper 3970x. plasmashell 5.12.9, Kubuntu 18.04.
The SystemLoadViewer widget shows nothing. But ksysguard after recompilation with the fix "#define CPUINFOBUFSIZE (128 * 1024)" correctly shows the number of cores. When I add the SystemLoadViewer widget to the taskbar, it doesn't show anything. But if you run the widget using "plasmoidviewer --applet /usr/share/plasma/plasmoids/org.kde.plasma.systemloadviewer/" - all information is displayed perfectly. See screenshots.
Using the virtual machine, I found out that the "SystemLoadViewer" widget stops working if the processor has more than 31 cores. In the last stable KDE Neon, there is no such problem. Can I somehow fix a complete KDE update?
Comment 6 viktor 2020-08-07 06:24:04 UTC
Created attachment 130696 [details]
plasmoidviewer --applet
Comment 7 Nate Graham 2020-10-16 02:20:36 UTC
Is this still relevant for the new System Monitor applet?
Comment 8 viktor 2020-10-16 07:48:47 UTC
Good day.
Widget suddenly started working after some of the automatic updates to Kubuntu 18.04. :) I was unable to track this update. Now I have no problems - the widget is working properly. I don’t know how the widget works in other systems. 
Thanks.
Comment 9 Nate Graham 2020-10-16 12:05:11 UTC
Oh good! Thanks for confirming.