-
-
Notifications
You must be signed in to change notification settings - Fork 626
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
${nvidiabar mtrfreq[cur]} is always at 100% #1177
Comments
This issue is stale because it has been open 365 days with no activity. Remove stale label or comment, or this issue will be closed in 30 days. |
Still present in |
This issue is stale because it has been open 365 days with no activity. Remove stale label or comment, or this issue will be closed in 30 days. |
Still present in |
Would you like to open a PR for this? |
I'm not very git savvy, but I'll try & give it a go. Maybe I'll even manage before the next "issue is stale" warning comes around. 🙂 |
Is there still a need to change this? I can do PR with the proposed change if needed ;) |
From my point of view, yes, the problem is still present in the current release. I keep the patch around locally to fix this, that's why I still haven't got around yet to do the PR myself - whenever a new version is released, I just apply the patch and be done with it. Much easier for me than fooling around with PRs (and So yes, if you could do the PR it would be very much appreciated. 👍 🙂 |
Made a suggested change in logic from issue brndnmtthws#1177
I made a commit. It's my first ever commit to the project like that, so I don't know if I did everything correct. |
Made a suggested change in logic from issue #1177
Should (hopefully) be fixed with #2018 |
Issue
An
${nvidiabar mtrfreq[cur]}
is always drawn full, ie. at 100%. This is due to a logic bug in theget_nvidia_barval()
function insrc/nvidia.cc
:My GPU has three different performance levels 0, 1 and 2, with corresponding Graphics Clock & Memory Transfer Rate frequencies of 324 MHz & 648 MHz, 549 MHz & 3600 MHz, and 928 MHz & 5400 MHz, respectively:

In terms of conky variable values, this corresponds to
${nvidia mtrfreqmin} = 648
,${nvidia mtrfreqmax} = 5400
, and${nvidia mtrfreq[cur]}
being either648
,3600
or5400
, depending on what performance mode the GPU is currently in. Now with this in mind, the logic bug immediately becomes obvious:temp1
gets initialized with the current MTR frequency (ie.648
,3600
or5400
), andtemp2
gets initialized with the maximum possible MTR frequency the card is capable of, ie.5400
. Therefore, theif()
clause is always true (except when the card is actually running at 5400 MHz, but thentemp1
andtemp2
are already equal anyway),temp1
gets set to5400
, and the bar value is always5400/5400 = 1.00
or100%
. Changing theif()
clause to(which probably was the original intention anyway, I guess) fixes the problem.
Information
conky-1.12.2
,X.Org-1.18.3
,NVIDIA-Linux-x86-390.147
,NVIDIA-libXNVCtrl-390.138
,gcc-/g++-9.2.0
onSlackware-14.2
(32bit).The text was updated successfully, but these errors were encountered: