Show gpu names in plasma-systemmonitor instead of numbers (gpu 2) for better usability

Background On my new computer the internal and dedicated gpu are most of the time powerful enough to not being able to distinguish which one is in use (e.g. minecraft runs on the internal gpu perfectly fine until enabling shaders).

In addition the gpu numbers seem to sometimes change, so just setting DRI_PRIME=1 didn't work, I had to use the pci id.

Adding insult to injury plasma-systemmonitor only shows "gpu 2" or "gpu 3" which wasn't helpful at all for me to determine which gpu was used. (weirdly enough it showed "gpu 2" and "gpu 3" on a brand new system (where is "gpu 1"? - but thats another topic..)

Solution To circumvent all those problems I added gpu naming to libksysguard (for application/process view in plasma-systemmonitor) and ksystemstats (for sensor readings). I moved the gpu naming into libksysguard and reusing it here in ksystemstats.

Sadly the logic differs from the logic in KInfoCenter as there it is not using udev to determine the gpu names, but this sounded wrong for these usecases.

It's my first time contributing something bigger so please be kind 😄

How it looks As this mergerequest only applies to sensors here screenshots of those: gpu_naming_overview gpu_naming_timeline

Corresponding PR in libksysguard libksysguard!464 (merged)

Edited by Bernhard Friedreich

Merge request reports

Loading