Bug 503082

Summary: System monitor request to fix missing GPU sensors
Product: [Applications] plasma-systemmonitor Reporter: quanticcpu2100
Component: generalAssignee: KSysGuard Developers <ksysguard-bugs>
Status: REPORTED ---    
Severity: normal CC: ahiemstra, kdedev, nate, plasma-bugs-null, ville.aakko
Priority: NOR    
Version First Reported In: 6.3.4   
Target Milestone: ---   
Platform: Fedora RPMs   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=481815
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: system monitor screenshot of the bug
systemmonitorrc

Description quanticcpu2100 2025-04-20 21:23:52 UTC
Created attachment 180460 [details]
system monitor screenshot of the bug

There is a bug on system monitor since the plasma 6.2 version where the system monitor request every time to fix the GPU sensor. I think that the root of this problem is sometimes the system monitor show 'ALL GPU' and 'GPU 1' to select or 'ALL GPU' or 'GPU 2' to select, i.e. for discrete graphics cards the system monitor can't define if the GPU is GPU1 or GPU2. When the user choose GPU1 to the sensor in a random time the system monitor request to fix so when the user choose GPU2 the system monitor request the user to fix it again to back to GPU1.

Follow attached screenshot.

Operating System: Fedora Linux 42
KDE Plasma Version: 6.3.4
KDE Frameworks Version: 6.13.0
Qt Version: 6.9.0
Kernel Version: 6.14.2 (64-bit)
Graphics Platform: Wayland
Graphics Processor: AMD Radeon RX 6800 XT
Comment 1 TraceyC 2025-04-21 19:49:41 UTC
The screenshot shows System Monitor - Graphics, which I don't have on my system and is not one of the default monitors
After clicking Fix, the screenshot shows Replace Missing Sensors
Under GPU junction - gpu/gpu1/temp2 repeated a few times, there aer also entries for GPU Temperature, Overview, System Monitor Sensor, Video Memory Usage, all related to gpu/gpu1

Is this page one that you had installed through System Monitor - Settings - Get New Pages?
Also, please confirm that you're clicking Save after fixing the sensors?

I installed one called "Graphics" on a laptop with an AMD GPU, and another with NVIDIA / Intel GPUs (both with git-master Plasma)
On the system with just the AMD GPU, it works as expected
On the one with NVIDIA / Intel GPUs I don't see the banner for Fix Missing Sensors but I see
-  it is pre-configured with "GPU 1"
- There is no data shown so apparently it needs to be configured differently on a hybrid GPU system. If I add a Text-Only Sensor "GPU 2 Name", it shows the NVIDIA GPU

After saving the changes and restarting System Monitor, I see the changes were retained.

Can you attach the configuration file to this report so we can investigate a possible system problem with the GPU naming?
~/.config/systemmonitorrc

Note: This seems possibly related to bug 481815
Comment 2 quanticcpu2100 2025-04-22 00:13:03 UTC
Created attachment 180503 [details]
systemmonitorrc
Comment 3 quanticcpu2100 2025-04-22 00:15:18 UTC
(In reply to TraceyC from comment #1)
> The screenshot shows System Monitor - Graphics, which I don't have on my
> system and is not one of the default monitors
> After clicking Fix, the screenshot shows Replace Missing Sensors
> Under GPU junction - gpu/gpu1/temp2 repeated a few times, there aer also
> entries for GPU Temperature, Overview, System Monitor Sensor, Video Memory
> Usage, all related to gpu/gpu1
> 
> Is this page one that you had installed through System Monitor - Settings -
> Get New Pages?
> Also, please confirm that you're clicking Save after fixing the sensors?
> 
> I installed one called "Graphics" on a laptop with an AMD GPU, and another
> with NVIDIA / Intel GPUs (both with git-master Plasma)
> On the system with just the AMD GPU, it works as expected
> On the one with NVIDIA / Intel GPUs I don't see the banner for Fix Missing
> Sensors but I see
> -  it is pre-configured with "GPU 1"
> - There is no data shown so apparently it needs to be configured differently
> on a hybrid GPU system. If I add a Text-Only Sensor "GPU 2 Name", it shows
> the NVIDIA GPU
> 
> After saving the changes and restarting System Monitor, I see the changes
> were retained.
> 
> Can you attach the configuration file to this report so we can investigate a
> possible system problem with the GPU naming?
> ~/.config/systemmonitorrc
> 
> Note: This seems possibly related to bug 481815

Ever click in save to take effects before exit.
The problem happens in the main page and in custom pages.
The system monitor record the discrete graphics card as GPU1 but in random time this value changes to GPU2 and the system monitor loose the reference for GPU 1 or 2.
Comment 4 TraceyC 2025-04-22 15:44:19 UTC
Thanks for sharing your config file and for the additional information. How strange that it forgets your GPU information after some time.

I loaded System Monitor with your config file, and it's behaving normally so that file is probably not the cause. 
I can't reproduce the problem here on git-master. It still has the details I added yesterday.

I'll let one of the more experienced maintainers take it from here.
Comment 5 Ville Aakko 2025-12-20 12:56:52 UTC
This is probably related to bug 466277. While the bug is about USB sensors, it actually applies to any lm_sensors compatible sensors.

Moreover, I'm not sure how KDE system monitor enumerates GPU sensors. The core of the issue seems that the enumeration is random, even on single-GPU systems. As a result, the system monitor can not find pre-configured sensors between reboots in most situtations.