It took longer than expected as I ran into dependency hell. Got it sorted and everything compiled OK, but… I am not certain the session script worked as there does not appear to be a new session… just the same ones as before (Plasma Wayland, Kodi, Plasma x11). What would the new session be named?
The new session would be named “Plasma Development (Wayland)” or something like that, so the script didn’t work.
What we need to be able to do is identify where the code fails with multiple GPUs, for instance, does it only read a single line from the output, or does
m_index on the second GPU object not match the value in the data, or something else…
The clue is that static data from the initial query is fine.
Proper debugging can be a pain, so what I would do is use
qDebug() << "value" in places of interest.
Sorry, have not had a chance to even turn on my computer until now, today, but my schedule is free the next couple of days. First thing I need to do is find out why the session did not install. I am going to disable aparmor and see if that is the culprit, then peruse the system logs and shell script to see if there is anything obviously broken. I was hoping to work on it this evening, but I have been going non-stop since 5:30 this morning and I am wiped. So, I am going to make a late dinner, play a game, then go to bed.
I should note that I built this on my regular workstation. I was concerned that the dev distro would not result in the exact same system, and thought it might lead to erroneous results. It seems important to discover if this is a bug, or something wrong with my setup.
However, I am prepared to set up a neon dev drive if you think it is wiser to do so.
Turns out the script did work, it just botched the naming (or SDDM parsed them wrong). I have actually succeeded in launching my compiled session successfully. I am going to rebuilt ksystemstats per your directions and see what happens.
No change to the sensor data with the changes compiled in. Your widget still shows only GPU1 temps. I have been reading the source code trying to understand the procedures.
I also think it behooves me to install either the dev distro, or some other up-to-date distro like manjaro to try to determine if this is specific to Neon, or my current software setup, or is in fact a bug.
So, that will be my next step. I gotta say though, I am rather pleased I succeeded compiling and installing the session. Very cool. Its been 20 years since I did any coding or debugging (I was working on a moo/mud game engine), so I am rusty as hell, but its been fun poking in some source again.
edit 1 - I am currently now in my Kubuntu 23.04 install on an external ssd, and I can affirm that your desktop widget works fine with kde.5.27.3, kernel 18.104.22.168 and Nvidia Driver 525.
edit 2 - All is fine with a fully updated Kubuntu 23.04 - 5.27.4, 6.2.27, nv525. Going to install the backports now.
edit 3 - Broken with the update to 5.27.7
So, reporting for multiple GPUs did work before 5.27.7?
Yes. They have worked fine for years. It broke briefly with Nvidia Driver 525 last year, then was fixed in Plasma 5.27.3, and is now broken again.
I have download the source for ksystemstats for 5.27.6 and am running a diff to see what changes were made, and if that is indeed the culprit.
edit - significant changes to NvidiaSmiProcess.cpp in 5.27.7 where you can see it trying to test for the indices. This test is not present in the source for 5.27.6.
I tried compiling ksystemstats from 5.27.6 source code using no src, no deps, which compiled fine, but made no difference. Probably a stupid idea, but I figured it was worth a shot.
Nah, not stupid. It might have made a difference - did you relogin in to the session, or kill ksystemstats so it’d relaunch from your newly compiled version? You can test if you are using your compiled version by changing the temperature to always report a specific value.
I’m not sure what the issue is but I intend to keep looking - it’s tricky though because I can’t test anything myself.
I usually re-login or do a full reboot. I am trying to develop a habit of building in my normal session, and testing in the compiled session, and not build while in the compiled session.
Curious… if I replace NvidiaSmiProcess.cpp with the one from 5.27.6, it does nothing. If I edit the existing 5.27.7 version and change the bottom difference to match 5.27.6 (which results in effectively the same version as 5.27.6), it breaks both gpu 1 and gpu 2, which now both read zero.
This makes no sense. I am not fully understanding how its building/cleaning. Is there some sort of make clean command? Seems to me it is not always building the changes.
Anyway, I am happy to test any ideas you have.
Could you confirm that the changes to NvidiaSmiProcess: Fix missing data for GPU 2+ (!64) · Merge requests · Plasma / KSystemStats · GitLab fix it? Looks like this was just a >= error.
It did indeed. Working normally again. Outstanding. Thank you.