! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
last sensor disappearing on next run, if num_sensors is less by one than prio...
Status:
RESOLVED: FIXED
Product:
Xfce4-sensors-plugin
Component:
General

Comments

Description abandoned account 2015-02-18 00:00:33 CET
Created attachment 5959 
patches, trace log  bz2

tl;dr: due to the way sensors_read_config() function is implemented, xfce4-sensors  will hide previously shown sensors if sensors count decreased on the next program run.

If I have 5 sensors (4 from lmsensors and 1 from acpi) and then I reboot, I usually startx faster than tlp can insert the module(thinkpad_acpi) which makes lmsensors see an extra sensor(the fan rpm thinkpad_hwmon) and this means, lmsensors will report 3 sensors, and in effect this makes xfce4-sensors completely ignore the last sensor which in current xfce4-sensors instance is the 4th but in the config is the 5th(and it's the sensor from acpi not from lmsensors).

Result is: the battery charge sensor(last sensor) is dropped from the panel and I have to add it manually via Properties. 
(I had 3 sensors on panel: cpu, mobo, battery charge; rest are show=false; but after this issue, the last one is removed from panel)

This happens because of the way that sensors_read_config function is implemented.

Here's a log showing 2 successive runs, first one has 4 sensors (even though the last run it had 5 (so config has 5 saved) and thus it doesn't show the last sensor on the panel; and the second run (due to xfce-panel -r) has all 5 sensors back again. Between the runs, I had to add the last sensor to panel manually(battery charge sensor), so the second run is showing the last sensor.


in log, read this:
acpi result so far: 5 chips len:4
as:
acpi result so far: 5, chipslen:4


tested on commit c4f7178cdc538a8bca9bfb75dc7e511349642a0f

added 2 other patches
+ the trace one 
(included all in attachment)

compiled with:
./autogen.sh --prefix=/usr \
  --sysconfdir=/etc \
  --libexecdir=/usr/lib \
  --localstatedir=/var \
  --datadir=/usr/share \
  --datarootdir=/usr/share \
  --disable-static \
  --with-pathhddtemp=/usr/sbin/hddtemp \
  --enable-debug

make -j1
Comment 1 Fabian Nowak editbugs 2017-03-28 00:00:53 CEST
Yes; I really need to remove the IDs from the senor chips and rely on the exact names only.
Comment 2 Fabian Nowak editbugs 2017-04-06 23:45:30 CEST
There were also other issues with incorrect API calls that might have caused your issue. You might want to try newest Git version?
Comment 3 pezcurrel 2019-01-11 15:59:05 CET
Same problem here.
Comment 4 Fabian Nowak editbugs 2019-01-12 13:24:15 CET
Which version are you using? There have been a couple of fixes over the last two years that should have fixed these issues. Beware to wipe out your configuration or to re-add the plugin to the panel so that the configuration file will be recreated.
Comment 5 pezcurrel 2019-01-12 18:35:33 CET
I use version 1.3.0-2 on arch linux ( https://www.archlinux.org/packages/extra/x86_64/xfce4-sensors-plugin/ ).
I removed and re-added the plugin, but to no avail.
I have this problem on 2 pcs, both using the "coretemp-0" type of sensors, both with an up-to-date arch setup and xfce4-sensors-plugin 1.3.0-2.
One has an i5 with 4 cores and 4 threads, the other an i7 with 4 cores and 8 threads.
Other types of sensors have no problems.
The problem occurs whenever I close and then reopen xfce4 session.
The problem does not occur on another pc which has an i5 with 2 cores, 4 threads.
Comment 6 pezcurrel 2019-01-12 18:43:31 CET
Here is the configuration before closing xfce4 session...

https://drive.google.com/open?id=1zyQOfT9aH-mx0pXStsxbOvaRGkzVDZVH

...and here it is after I re-open it...

https://drive.google.com/open?id=1SMShDelhVdBK8qeGg4UdXW7tgs7APFi0
Comment 7 Fabian Nowak editbugs 2019-01-13 19:08:11 CET
Version 1.3.0.x had this bug; fixed with 1.3.90 and higher. Can you please try out, check/confirm that the bug has been fixed, and then close this bug (i.e., denote as resolved: fixed)?
Comment 8 pezcurrel 2019-01-13 20:58:48 CET
Yes, 1.3.90 has not this bug :)
Resolved: fixed

Bug #11554

Reported by:
abandoned account
Reported on: 2015-02-18
Last modified on: 2019-01-13

People

Assignee:
Fabian Nowak
CC List:
1 user

Version

Version:
unspecified

Attachments

patches, trace log bz2 (7.96 KB, application/x-bzip)
2015-02-18 00:00 CET , abandoned account
no flags

Additional information