Closed z1atk0 closed 2 months ago
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 conky-1.18.1
.
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 conky-1.19.8
.
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. :slightly_smiling_face:
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 git
in general, as I said :innocent:).
So yes, if you could do the PR it would be very much appreciated. :+1: :slightly_smiling_face:
Would you like to open a PR for this?
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. I didn't change a doc, because imo there is nothing to change. I also didn't test it, because tbh, I have no idea how should I do this, but as @z1atk0 said, he made this change by himself locally, so I guess, he tested this.
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).