Bug 461361 - GPU Information for Dedicated NVIDIA GPU not showing on widget or plasma system monitor application.
Summary: GPU Information for Dedicated NVIDIA GPU not showing on widget or plasma syst...
Status: RESOLVED FIXED
Alias: None
Product: plasma-systemmonitor
Classification: Plasma
Component: general (show other bugs)
Version: 5.26.2
Platform: Manjaro Linux
: NOR normal
Target Milestone: ---
Assignee: KSysGuard Developers
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2022-11-03 14:21 UTC by n1ghtf4l1
Modified: 2023-01-09 13:07 UTC (History)
7 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.27


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description n1ghtf4l1 2022-11-03 14:21:13 UTC
SUMMARY
***
NOTE: If you are reporting a crash, please try to attach a backtrace with debug symbols.
See https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***


STEPS TO REPRODUCE
1.  Update System on 3rd November UTC +05:30 using sudo pacman -Syuu command.
2.  Open Plasma Widget to display dedicated GPU Information.

OBSERVED RESULT
Dedicated NVIDIA GPU Usage, Temperature, Frequency, Memory Frequency values are not shown in either plasma widgets or Plasma System Monitor Application. Earlier there were 2 options when adding GPU Monitor widgets i.e All GPUs and GPU 1. After I updated the system using: 
sudo pacman -Syyuu
The options changed to All GPUs and GPU 2, where GPU would stand for showing dedicated NVIDIA GPU information but now it doesn't show any information related to dedicated NVIDIA GPU. 
I have checked NVIDIA X Server is working properly and showing all columns with correct values. 

EXPECTED RESULT
Dedicated NVIDIA GPU Usage, Temperature, Frequency, Memory Frequency values should should be visible in real time in plasma widgets as well as Plasma System Monitor Application. 

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Manjaro Linux x86_64/ Plasma 5.26.2
(available in About System)
Kernel: 6.0.6-1-MANJARO
KDE Plasma Version: 5.26.2
KDE Frameworks Version: 5.99.0
Qt Version: 5.15.6

ADDITIONAL INFORMATION
Comment 1 saik 2022-11-04 15:34:14 UTC
I am having the same issue; System Monitor is unable to display details about my NVIDIA dGPU (reports default stats; 0C, 0%, etc.), but my AMD iGPU reports just fine. (In my laptop, amd is 'GPU 1' and nvidia is 'GPU 2')

nvidia-smi is functioning as intended.
The 'GPU Name' sensor correctly reports my iGPU's name as 'Rembrandt [Radeon 680m', but incorrectly reports my dGPU as 'GPU 2'

Hardware:
    Laptop: ASUS Flow X16
    CPU: AMD Ryzen 7 6800HS with Radeon Graphics (16) @ 3.200GHz
    GPUs: AMD Rembrandt Radeon 680M, NVIDIA RTX 3060 Mobile / Max-Q
Software:
    OS: Arch Linux x86_64
    Kernel: 6.0.6-arch1-1
    DE: Plasma 5.26.2
    WM: Kwin
    Nvidia Driver: 520.56.06

Additional information:
    $ plasma-systemmonitor --version
        plasma-systemmonitor 5.26.2

    As of writing this post, all installed packages are up-to-date.
   
   If any other datapoints are required to pinpoint this issue, let me know, I'd be happy to provide more info.
Comment 2 Nate Graham 2022-11-04 18:27:41 UTC

*** This bug has been marked as a duplicate of bug 461389 ***
Comment 3 n1ghtf4l1 2022-11-05 04:44:07 UTC
(In reply to Nate Graham from comment #2)
> 
> *** This bug has been marked as a duplicate of bug 461389 ***

In bug 461389 gpu name for dedicated nvidia gpu changed from gpu 0 to 1 but in my case as well as @saik's case it changed from gpu 1 to 2. As a result default values are shown i.e 0%, 0 degree C etc. I believe there is some error in the update which mistakenly changed gpu name from 1 to 2 as a result of which system can't find gpu 2 hence displaying default values. If somehow we can change gpu name of our dedicated nvidia gpu from gpu2 to gpu1, i think problem will be solved.

In bug 461389, NVIDIA gpu was set as primary gpu, but in my case intel gpu is set as primary gpu. Even though expected result is same, conditions are different.
Comment 4 Oleksii Zolotarevskyi 2022-12-04 00:23:41 UTC
(In reply to n1ghtf4l1 from comment #3)
> In bug 461389, NVIDIA gpu was set as primary gpu, but in my case intel gpu
> is set as primary gpu. Even though expected result is same, conditions are
> different.
Before I updated the system, I've also set Intel as primary GPU.  I think it has caused the name change of Nvidia GPU.
Comment 5 Oleksii Zolotarevskyi 2022-12-04 00:44:19 UTC
(In reply to n1ghtf4l1 from comment #3)
> In bug 461389 gpu name for dedicated nvidia gpu changed from gpu 0 to 1 but
> in my case as well as @saik's case it changed from gpu 1 to 2.
I think we're talking about the same thing. In the widget settings and in System Monitor, the GPU name has changed from "GPU 1" to "GPU 2" for me as well. But if you look for example in `~/.config/plasma-org.kde.plasma.desktop-appletsrc`, you'll probably find the paths to GPU sensors like `gpu/gpu1/usage`. So for "GPU 2" in the widget settings, the config name is "gpu1".
Comment 6 David Redondo 2023-01-09 13:07:06 UTC
Git commit 00b1f21b0fe8164c4bcda9109e08bf7a69c0ce24 by David Redondo.
Committed on 09/01/2023 at 12:48.
Pushed by davidre into branch 'master'.

plugins/gpu: Use pci address to identify nvidia gpus

The DRM index does not correspond to the nvidia index. Identify
cards by their pci addresses and derive the index from the position
in the query.
Related: bug 463033
FIXED-IN:5.27

M  +1    -1    plugins/gpu/LinuxBackend.cpp
M  +19   -13   plugins/gpu/LinuxNvidiaGpu.cpp
M  +5    -2    plugins/gpu/LinuxNvidiaGpu.h
M  +2    -0    plugins/gpu/NvidiaSmiProcess.cpp
M  +1    -0    plugins/gpu/NvidiaSmiProcess.h
M  +1    -1    plugins/network/NetworkManagerBackend.cpp

https://invent.kde.org/plasma/ksystemstats/commit/00b1f21b0fe8164c4bcda9109e08bf7a69c0ce24