Support multiple GPUs

Summary: Make detecting GPUs more flexible by searching for all devices of class "VGA Controller", instead of only using devices based on "drm" subsystem.

Use case: I'm using 2 GPUs in my system. First card is an Intel Arc 310 that drives the actual wayland desktop as usual. The second card is a Nvidia RTX4090 that is used exclusively for CUDA workloads. The nvidia card has no displays connected and is not used by wayland. Without this patch the nvidia card is not existing/visible for ksystemstats. As far as I understand the reason is that the card is not recognized as a drm subsystem when it is not in use by wayland. This is bad, as there is no way to monitor power draw, memory usage, temps. etc through plasma-systemmonitor.

This patch changes the udev filtering to check every device of PCI Class 0x3000, which indicates VGA Controller according to the PCI spec.

Thank you :)

Merge request reports

Loading