void-packages icon indicating copy to clipboard operation
void-packages copied to clipboard

ksystemstats update breaks GPU sensors in KDE

Open al-tr opened this issue 3 months ago • 8 comments

Is this a new report?

Yes

System Info

Void 6.18.44_1 x86_64 AuthenticAMD notuptodate hold rrrrmmnFFFF

Package(s) Affected

ksystemstats-6.7.4_1

Does a report exist for this bug with the project's home (upstream) and/or another distro?

didn't find any and that's the question where it belongs

After upgrading ksystemstats from 6.6.3_1 to 6.7.4_1, all GPU sensors disappeared from system monitor (KDE plasma)

system: ksystemstats-6.7.4_1 eudev-3.2.14_2 eudev-libudev-3.2.14_2 NVIDIA TU106, proprietary driver PCI class: 0x030000

nvidia-smi shows stuff: temp, wattage, usage, etc. kstatsviewer --list | grep '^gpu' only shows:

gpu GPU

no gpu0 sensors are created (used to be on 6.6.3_1), so system monitor does not see any GPU info + thermal monitor plugin (shows CPU/GPU temps in a bar) does not see GPU temps too

downgrading only ksystemstats to 6.6.3_1 immediately restores GPU util, temps, etc.

digged into what causes it, and it seems like systemd vs eudev difference. I'm not sure this is even correct, but that's my limit of system understanding at this point KDE uses udev_enumerate_add_match_sysattr three times (introduced not so long ago), https://invent.kde.org/plasma/ksystemstats/-/blob/master/plugins/gpu/LinuxBackend.cpp?blame=1#L52-54

eudev seems to just add three values to list https://github.com/eudev-project/eudev/blob/master/src/libudev/libudev-enumerate.c#L398 and uses AND between them which obviously results in an empty list

while systemd seems to use OR https://github.com/systemd/systemd/blob/main/src/libudev/libudev-enumerate.c#L224

so ksystemstats is relying on systemd OR semantics which breaks Void's eudev treats the same calls as AND

not sure what is the correct place for a fix, likely eudev?

Expected behaviour

KDE to see GPU sensors (gpu0...)

kstatsviewer --list | grep '^gpu'
gpu/all/usedVram All GPUs Used Memory
gpu/gpu0/totalVram GPU 1 Total Video Memory
gpu/all All GPUs
gpu/gpu0/usage GPU 1 Usage
gpu/gpu0/memoryFrequency GPU 1 Memory Frequency
gpu/gpu0/temperature GPU 1 Temperature
gpu/gpu0/coreFrequency GPU 1 Frequency
gpu/gpu0/usedVram GPU 1 Video Memory Used
gpu/gpu0/power GPU 1 Power
gpu/gpu0/name GPU 1 Name
gpu/gpu0 GPU 1
gpu/all/usage All GPUs Usage
gpu GPU
gpu/all/totalVram All GPUs Total Memory

Actual behaviour

kstatsviewer --list | grep '^gpu'
gpu GPU

and nothing else

Steps to reproduce

how I "reproduced" the behavior bug (GPU is 0000:26:00.0):

  • udevadm trigger -n -v -s pci -a 'class=0x030000' | grep '0000:26:00.0' sees gpu
  • udevadm trigger -n -v -s pci -a 'class=0x030000' -a 'class=0x030200' -a 'class=0x038000' | grep '0000:26:00.0' does not

al-tr avatar Aug 16 '26 19:08 al-tr

but some say eudev is not maintained anymore and some other non-systemd systems migrated to systemd's implementation https://github.com/eudev-project/eudev/issues/296#issuecomment-3651442802

al-tr avatar Aug 17 '26 07:08 al-tr

does it make sense to investigate moving from eudev to systemd-udev or mdevd or something else?

al-tr avatar Aug 17 '26 16:08 al-tr

so, eudev is long obsolete and unmaintained https://wiki.gentoo.org/wiki/Eudev/en Gentoo themselves created it to separate udev from systemd; then udev became systemd-independent upstream; Gentoo moved to systemd version. now we see cracks starting to show - minor incompatibilities are appearing. today it's just KDE GPU sensors, tomorrow it can be something more serious. something has to be done and the most straightforward answer for the Void is to follow Gentoo footsteps. I understand that it's on the edge of "no systemd" philosophy to use systemd components even though they are systemd free but the alternative is to

  1. fork systemd-udev for the purpose of it not being labeled "systemd"? nonsense, no changes required to run it with runit basically
  2. embrace eudev and maintain it? a lot of development willpower wasted IMO
  3. use some other implementation and hope it doesn't go out of sync with what systemd basically dictates
  4. go to each and every app or lib and fix incompatibilities there with the Void's resources

so, any thoughts anyone?

al-tr avatar Aug 23 '26 10:08 al-tr

@Gottox could you please take a look?

al-tr avatar Aug 23 '26 11:08 al-tr

#62100

classabbyamp avatar Aug 23 '26 14:08 classabbyamp

i also have this problem.

novalkun avatar Aug 23 '26 15:08 novalkun

So it seems it's necessary for void to upgrade to eudev 3.2.15 which supports syncing with systemd-udev till version 262+

Used version 3.2.14_2 only syncs till version 251. ?

DocBretti avatar Nov 02 '26 20:11 DocBretti

Unfortunately, I've built eudev 3.2.15 and the bug still persist. Either eudev didn't fix that or I missed something when building.

EricKotato avatar Nov 12 '26 22:11 EricKotato