Closed ghost closed 5 years ago
I observe the same issue on all my PCs since updating from 1.11.3 to 1.11.4 . Also running Arch Linux.
I can also confirm that the referenced commit ba33f9a restores the behavior of 1.11.3. ($mem and $memwithbuffers showing different values again, whereas they've been always the same with 1.11.4, no matter what no_buffers was set to) But can't say if it's the correct way to fix this.
Just got bit by similar issue as well.
In my case ${mem}
and ${memeasyfree}
in my conky.text
show correct values (taking conky.no_buffers = true
into account), but evaluating same thing in lua using conky_parse
gives incorrect values (as if conky.no_buffers
was set to false).
Can confirm that @CtrlSequence fix works for me. Not sure where to leave this comment, similar discussion happens in #857 and #859, but fix in #859 is a bit more complicated - my issue is fixed just by moving mem and memeasyfree calculation to linux.cc.
Closed via https://github.com/brndnmtthws/conky/pull/871.
Issue This MAY be a duplicate of #857, but I'm making a separate issue because it might not since this seems configuration-specific.
I noticed that the reporting on memory in Linux was incorrect. Conky is including cached memory in the memory usage numbers (top right "%44 6.99GiB") whereas htop reports the actual number (1.88G).
I did a lot of digging around to figure out what might be the problem, and I think I narrowed it down to commit
c352069b "Add support for nested |exec| expressions"
The issue seems to be that with nested
exec
expressions, and the added support, it causes an odd behavior withrun_all_callbacks()
. For some reason,update_stuff()
incommon.cc
doesn't appear to adjustinfo.mem
in theif (no_buffers.get(*state))
, even withno_buffers = true
explicitly set in.conkyrc
HOWEVER this only seems to happen when
execp
objects are used in.conkyrc
: (EDIT: after further testing it turns out I'm bad at this)execp
andexecpi
When building with a commit before
c352069b
, this doesn't happen, which leads me to believe this has something to do with howevaluate()
is being called, and probably withrun_all_callbacks()
being called withinevaluate()
. My guess is that having a doublerun_all_callbacks()
is causing theinfo.mem*
variables to be overwritten by the callbacks after it is adjusted inupdate_stuff()
.Fix Moving the
if (no_buffers.get(*state))
block fromupdate_stuff()
incommon.cc
toupdate_meminfo()
inlinux.cc
as suggested in the comment seems to do the trick.I'd do the PR myself but I'm not exactly sure how to go about describing how I tested/validated any changes since I don't know if I actually have a grasp on what's going on.
Information Running Arch Linux conky 1.11.4_pre compiled for Linux 5.1.15-arch1-1-ARCH x86_64