Bug 436770

Summary: GPU sensors do not work with intel iGPU
Product: [Plasma] plasmashell Reporter: Patrick Silva <bugseforuns>
Component: System MonitorAssignee: Plasma Bugs List <plasma-bugs>
Status: RESOLVED FIXED    
Severity: normal CC: ahiemstra, kde.podagric, kde, kde, nate, notmart, postix
Priority: NOR    
Version: master   
Target Milestone: 1.0   
Platform: Neon   
OS: Linux   
Latest Commit: Version Fixed In: 5.22
Attachments: screenshot

Description Patrick Silva 2021-05-08 13:11:59 UTC
Created attachment 138239 [details]
screenshot

SUMMARY
GPU sensors do not work with intel hd 4000 iGPU of my laptop.

STEPS TO REPRODUCE
1. add System Monitor Sensor widget to desktop
2. open widget settings and click on "Sensors details" section
3. click on "Text-only sensors" row
4. click on GPU > All GPUs and add all available sensors
5. close widget settings by clicking on "OK" button

OBSERVED RESULT
as we can see in the attached screenshot, GPU sensors do not work

EXPECTED RESULT
GPU sensors should work with iGPUs

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.21.80
KDE Frameworks Version: 5.82.0
Qt Version: 5.15.2
Graphics Platform: Wayland
Comment 1 David Redondo 2021-05-10 11:56:06 UTC
Yeah there's currently no way to get this info (without root)
Comment 2 Arjen Hiemstra 2021-05-10 15:06:57 UTC
There is no standard API for GPU monitoring and the intel driver also does not expose anything. intel-gpu-top or whatever the thing was called uses performance counters for this, which require root and are actually not really meant to be used for this. In comparison, amdgpu exposes a number of sysfs files which expose information about the GPU which can be read without needing root.

It would be great if there was some standard way of getting this information, unfortunately I don't see it happening any time soon.
Comment 3 Nate Graham 2021-05-10 23:19:54 UTC
Can we hide these sensors when they don't have valid data?
Comment 4 David Edmundson 2021-05-23 23:01:28 UTC
>Can we hide these sensors when they don't have valid data? 

We should.

Can I see `kstatsviewer --list`
Comment 5 Nate Graham 2021-05-23 23:07:42 UTC
cpu/cpu2/system Core 3 System Usage
os/kernel/prettyName Kernel Name and Version
cpu/cpu7/temperature Core 8 Current Temperature
lmsensors/thinkpad-isa-0000/fan1 Fan 1
cpu/cpu3/usage Core 4 Total Usage
lmsensors/iwlwifi_1-virtual-0 iwlwifi_1-virtual-0
gpu/all/usage All GPUs Usage
cpu/cpu1/wait Core 2 Wait Usage
gpu/all/usedVram All GPUs Used Memory
cpu/cpu6/system Core 7 System Usage
os/system System
cpu/cpu7 Core 8
lmsensors/ucsi_source_psy_USBC000:002-isa-0000/curr1 curr1
lmsensors/thinkpad-isa-0000/temp3 Temperature 3
power/2442/chargePercentage Lithium Polymer Battery Charge Percentage
os/system/version Operating System Version
network/wlp0s20f3/upload Network Node Upload Rate
cpu/cpu5/system Core 6 System Usage
memory/physical/bufferPercent Buffer Memory Percentage
network/wlp0s20f3 Network Node
network/all/totalUpload Total Uploaded
disk/all/freePercent Percentage Free
os/kernel/name Kernel Name
lmsensors/ucsi_source_psy_USBC000:002-isa-0000 ucsi_source_psy_USBC000:002-isa-0000
cpu/cpu4/usage Core 5 Total Usage
os Operating System
disk/ccc4d6c8-d3ef-4f62-ab01-adc8ee6f9ffa/free OS Free Space
disk/ccc4d6c8-d3ef-4f62-ab01-adc8ee6f9ffa/freePercent OS Percentage Free
os/kernel Kernel
os/system/url Operating System URL
disk/all All Disks
cpu/cpu0/wait Core 1 Wait Usage
network/wlp0s20f3/signal Network Node Signal Strength
cpu/cpu7/user Core 8 User Usage
network/all/download Download Rate
disk Disks
cpu/cpu2/wait Core 3 Wait Usage
gpu GPU
memory/physical/applicationPercent Application Memory Percentage
memory/physical/free Free Physical Memory
lmsensors/iwlwifi_1-virtual-0/temp1 Temperature 1
memory/swap/free Free Swap Memory
memory/physical/buffer Buffer Memory
network/all/upload Upload Rate
cpu/cpu2 Core 3
network/all All Network Devices
cpu/cpu0/usage Core 1 Total Usage
cpu/cpu2/temperature Core 3 Current Temperature
disk/ccc4d6c8-d3ef-4f62-ab01-adc8ee6f9ffa/usedPercent OS Percentage Used
cpu/cpu5 Core 6
cpu/cpu6 Core 7
cpu/cpu6/wait Core 7 Wait Usage
lmsensors/BAT0-acpi-0/in0 Voltage 0
memory/physical/freePercent Free Physical Memory Percentage
lmsensors/BAT0-acpi-0 BAT0-acpi-0
memory/physical/total Total Physical Memory
cpu/cpu0 Core 1
memory/physical/application Application Memory
cpu/cpu5/usage Core 6 Total Usage
power/2442 Lithium Polymer Battery
lmsensors/thinkpad-isa-0000/temp2 Temperature 2
lmsensors/thinkpad-isa-0000/temp1 Temperature 1
cpu/cpu2/name Name
lmsensors/ucsi_source_psy_USBC000:001-isa-0000/curr1 curr1
cpu/cpu6/temperature Core 7 Current Temperature
os/system/name Operating System Name
lmsensors/thinkpad-isa-0000/temp6 Temperature 6
memory/swap/total Total Swap Memory
memory/swap/used Used Swap Memory
disk/7b8e9cd8-79c9-44a8-8d32-b3989d5a50b0/freePercent Home Percentage Free
cpu/all/wait Wait Usage
power/2442/design Lithium Polymer Battery Design Capacity
disk/ccc4d6c8-d3ef-4f62-ab01-adc8ee6f9ffa/name Name
cpu/cpu3/temperature Core 4 Current Temperature
cpu/all/usage Total Usage
lmsensors/thinkpad-isa-0000/temp4 Temperature 4
lmsensors/ucsi_source_psy_USBC000:002-isa-0000/in0 Voltage 0
os/kernel/version Kernel Version
cpu/cpu2/frequency Core 3 Current Frequency
memory Memory
network/wlp0s20f3/totalDownload Network Node Total Downloaded
gpu/all/totalVram All GPUs Total Memory
cpu/cpu6/user Core 7 User Usage
network/wlp0s20f3/ipv6address Network Node IPv6 Address
disk/7b8e9cd8-79c9-44a8-8d32-b3989d5a50b0/name Name
memory/physical/cache Cache Memory
cpu/cpu6/name Name
network/all/totalDownload Total Downloaded
disk/all/read Read Rate
cpu/cpu6/usage Core 7 Total Usage
cpu CPUs
cpu/cpu5/temperature Core 6 Current Temperature
cpu/cpu4/name Name
cpu/cpu5/name Name
cpu/all All
cpu/cpu5/user Core 6 User Usage
lmsensors/acpitz-acpi-0/temp1 Temperature 1
os/system/uptime Uptime
memory/physical Physical Memory
lmsensors/thinkpad-isa-0000/temp7 Temperature 7
cpu/cpu5/wait Core 6 Wait Usage
lmsensors/ucsi_source_psy_USBC000:001-isa-0000/in0 Voltage 0
cpu/all/name Name
os/plasma KDE Plasma
cpu/all/system System Usage
cpu/cpu7/frequency Core 8 Current Frequency
power/2442/health Lithium Polymer Battery Health
cpu/cpu7/usage Core 8 Total Usage
cpu/cpu4 Core 5
cpu/cpu1/usage Core 2 Total Usage
disk/ccc4d6c8-d3ef-4f62-ab01-adc8ee6f9ffa OS
cpu/cpu1/user Core 2 User Usage
cpu/all/coreCount Number of Cores
cpu/cpu1/system Core 2 System Usage
disk/all/usedPercent Percentage Used
os/system/hostname Hostname
disk/7b8e9cd8-79c9-44a8-8d32-b3989d5a50b0/total Home Total Space
lmsensors Hardware Sensors
disk/7b8e9cd8-79c9-44a8-8d32-b3989d5a50b0/write Home Write Rate
disk/7b8e9cd8-79c9-44a8-8d32-b3989d5a50b0/free Home Free Space
memory/swap/usedPercent Used Swap Memory Percentage
disk/ccc4d6c8-d3ef-4f62-ab01-adc8ee6f9ffa/read OS Read Rate
memory/physical/cachePercent Cache Memory Percentage
cpu/cpu1 Core 2
memory/physical/used Used Physical Memory
memory/swap/freePercent Free Swap Memory Percentage
disk/7b8e9cd8-79c9-44a8-8d32-b3989d5a50b0 Home
disk/7b8e9cd8-79c9-44a8-8d32-b3989d5a50b0/usedPercent Home Percentage Used
cpu/cpu3/system Core 4 System Usage
disk/ccc4d6c8-d3ef-4f62-ab01-adc8ee6f9ffa/used OS Used Space
cpu/cpu5/frequency Core 6 Current Frequency
network/wlp0s20f3/totalUpload Network Node Total Uploaded
disk/7b8e9cd8-79c9-44a8-8d32-b3989d5a50b0/used Home Used Space
cpu/cpu0/frequency Core 1 Current Frequency
cpu/cpu6/frequency Core 7 Current Frequency
cpu/all/cpuCount Number of CPUs
cpu/cpu0/temperature Core 1 Current Temperature
network Network Devices
cpu/cpu7/name Name
disk/7b8e9cd8-79c9-44a8-8d32-b3989d5a50b0/read Home Read Rate
cpu/all/user User Usage
cpu/cpu3/name Name
network/wlp0s20f3/download Network Node Download Rate
cpu/cpu3 Core 4
os/system/prettyName Operating System Name and Version
cpu/cpu4/temperature Core 5 Current Temperature
cpu/cpu4/wait Core 5 Wait Usage
disk/ccc4d6c8-d3ef-4f62-ab01-adc8ee6f9ffa/total OS Total Space
cpu/cpu3/frequency Core 4 Current Frequency
cpu/cpu0/system Core 1 System Usage
os/system/logo Operating System Logo
os/plasma/qtVersion Qt Version
network/wlp0s20f3/network Network Node Network Name
lmsensors/nvme-pci-0300 nvme-pci-0300
lmsensors/thinkpad-isa-0000 thinkpad-isa-0000
power/2442/capacity Lithium Polymer Battery Current Capacity
lmsensors/nvme-pci-0300/temp1 Composite
cpu/cpu3/user Core 4 User Usage
memory/swap Swap Memory
disk/ccc4d6c8-d3ef-4f62-ab01-adc8ee6f9ffa/write OS Write Rate
network/wlp0s20f3/ipv4address Network Node IPv4 Address
cpu/cpu7/wait Core 8 Wait Usage
cpu/cpu4/frequency Core 5 Current Frequency
lmsensors/pch_cannonlake-virtual-0 pch_cannonlake-virtual-0
lmsensors/pch_cannonlake-virtual-0/temp1 Temperature 1
power Power
cpu/cpu2/usage Core 3 Total Usage
cpu/cpu3/wait Core 4 Wait Usage
cpu/cpu1/frequency Core 2 Current Frequency
cpu/cpu0/name Name
cpu/cpu2/user Core 3 User Usage
cpu/cpu7/system Core 8 System Usage
lmsensors/ucsi_source_psy_USBC000:001-isa-0000 ucsi_source_psy_USBC000:001-isa-0000
os/plasma/plasmaVersion KDE Plasma Version
lmsensors/acpitz-acpi-0 acpitz-acpi-0
power/2442/name Name
lmsensors/thinkpad-isa-0000/temp5 Temperature 5
disk/all/used Used Space
cpu/cpu0/user Core 1 User Usage
power/2442/charge Lithium Polymer Battery Charge
cpu/cpu4/user Core 5 User Usage
os/plasma/kfVersion KDE Frameworks Version
disk/all/total Total Space
power/2442/chargeRate Lithium Polymer Battery Charging Rate
lmsensors/thinkpad-isa-0000/temp8 Temperature 8
cpu/cpu4/system Core 5 System Usage
memory/physical/usedPercent Used Physical Memory Percentage
cpu/cpu1/name Name
cpu/cpu1/temperature Core 2 Current Temperature
gpu/all All GPUs
disk/all/write Write Rate
disk/all/free Free Space
Comment 6 Arjen Hiemstra 2021-06-03 10:13:35 UTC
Git commit 0639a7f9b959e0ce74f798acee801928de4369d9 by Arjen Hiemstra.
Committed on 03/06/2021 at 10:13.
Pushed by ahiemstra into branch 'master'.

Only add "All GPUs" sensors when there is at least one GPU with statistics

Otherwise we have an empty "GPU" entry that does nothing when there are
no supported GPUs.

M  +2    -0    plugins/gpu/GpuBackend.h
M  +4    -2    plugins/gpu/GpuPlugin.cpp
M  +5    -0    plugins/gpu/LinuxBackend.cpp
M  +2    -0    plugins/gpu/LinuxBackend.h

https://invent.kde.org/plasma/ksystemstats/commit/0639a7f9b959e0ce74f798acee801928de4369d9
Comment 7 Arjen Hiemstra 2021-06-03 10:19:32 UTC
Git commit 338fb07c87be44fa456b8347de1ba6c9e5ae9964 by Arjen Hiemstra.
Committed on 03/06/2021 at 10:19.
Pushed by ahiemstra into branch 'cherry-pick-0639a7f9'.

Only add "All GPUs" sensors when there is at least one GPU with statistics

Otherwise we have an empty "GPU" entry that does nothing when there are
no supported GPUs.


(cherry picked from commit 0639a7f9b959e0ce74f798acee801928de4369d9)

M  +2    -0    plugins/gpu/GpuBackend.h
M  +4    -2    plugins/gpu/GpuPlugin.cpp
M  +5    -0    plugins/gpu/LinuxBackend.cpp
M  +2    -0    plugins/gpu/LinuxBackend.h

https://invent.kde.org/plasma/ksystemstats/commit/338fb07c87be44fa456b8347de1ba6c9e5ae9964
Comment 8 Arjen Hiemstra 2021-06-03 10:19:57 UTC
Git commit 4fe27de1298e99acde0f73558b0898e60d44b256 by Arjen Hiemstra.
Committed on 03/06/2021 at 10:19.
Pushed by ahiemstra into branch 'Plasma/5.22'.

Only add "All GPUs" sensors when there is at least one GPU with statistics

Otherwise we have an empty "GPU" entry that does nothing when there are
no supported GPUs.


(cherry picked from commit 0639a7f9b959e0ce74f798acee801928de4369d9)

M  +2    -0    plugins/gpu/GpuBackend.h
M  +4    -2    plugins/gpu/GpuPlugin.cpp
M  +5    -0    plugins/gpu/LinuxBackend.cpp
M  +2    -0    plugins/gpu/LinuxBackend.h

https://invent.kde.org/plasma/ksystemstats/commit/4fe27de1298e99acde0f73558b0898e60d44b256