! 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 !
Duplicate sensor names
Status:
RESOLVED: FIXED
Product:
Xfce4-sensors-plugin
Component:
General

Comments

Description Maniaxx 2018-05-14 20:45:50 CEST
With one of the recent updates i have duplicate entries in the sensor list and its not possible to keep settings (enabled sensors) persistent over sessions. The entry CPUTIN is duplicated and it always chooses the one that comes first (the wrong one in this case) and i have to re-set it. I think the wrong entry shouldn't have the name CPUTIN at all. Its a 3.3V value. I'm not sure how to blacklist/remove or change the entry. I already ran 'sensors-detect' again but it doesn't change anything.

Screenshot:
http://abload.de/img/xfce4-sensors-plugin-f4szv.png

Any ideas?

Arch Linux
Xfce4-sensors-plugin v1.3.0
Comment 1 Fabian Nowak editbugs 2018-05-18 23:11:27 CEST
Hey,

would you mind wiping out your old configuration? It must be somewhere around $HOME/.config/xfce4/panel/xfce4-sensors-plugin-<xx>.rc. You can of course also make a backup copy.

I am running the 1.3.0 version for a couple of weeks now myself on 64-Bit Debian with Xfce4 panel 4.12.2.

Restarting the panel via "xfce4-panel -r" saves the settings. Do the changed settings really not persist over the restart? Is the file still writeable?

You can try "sensors" while running the panel and plugin, and stop the panel (xfce4-panel -q) and rerun "sensors" on the command line. There should not be any difference and everything should be correct. Similar, the sensors plugin also delivers a stand-alone app based on the same libraries. You can run that via "xfce4-sensors" on a command line.

Please give feedback on whether the access rights were wrong, what sensors and xfce4-sensors delivered and whether the settings could survive panel restarts.
Comment 2 Fabian Nowak editbugs 2018-05-18 23:14:38 CEST
*** Bug 14380 has been marked as a duplicate of this bug. ***
Comment 3 John 2018-05-19 03:10:22 CEST
@Fabian - OK.  Starting on 1.2.6, everything looks normal.

1) rm ~/.config/xfce4/panel/xfce4-sensors-plugin-9.rc
2) xfce4-panel -r
3) Configure to my liking
4) xfce4-panel -q
5) xfce4-sensors ---> my settings are not remembered and ~/.config/xfce4/panel/xfce4-sensors-plugin-9.rc is 644

* Access rights are always 644 through out this process.
% stat xfce4-sensors-plugin-9.rc
  File: xfce4-sensors-plugin-9.rc
  Size: 871       	Blocks: 8          IO Block: 4096   regular file
Device: 10306h/66310d	Inode: 12321625    Links: 1
Access: (0644/-rw-r--r--)  Uid: ( 1000/ facade)   Gid: (  100/   users)
Access: 2018-05-18 21:05:53.633524261 -0400
Modify: 2018-05-18 21:05:53.633524261 -0400
Change: 2018-05-18 21:05:53.633524261 -0400
 Birth: -

* sensors gives the expected output.
* xfce4-sensors from the cli can run but does not remember my settings.
* The settings do not survive panel restarts as well.
Comment 4 Maniaxx 2018-05-20 15:06:35 CEST
The difference between "xfce4-sensors" and "xfce4-panel" is that the former shows correct members (+3.3V) whereas the latter shows it as (CPUTIN) that is a dupe. And yes, it doesn't remember the this setting no matter what.
Comment 5 Fabian Nowak editbugs 2018-05-20 17:04:58 CEST
The xfce4-sensors stand-alone application is just for the purpose of trying the library. It is independent from any panel and settings.

Removing the settings file will only help AFTER shutting down the panel, maybe I was not explicit enough in mentioning that.

So roughly 

  xfce4-panel -q
  rm $HOME/.config...
  xfce4-panel

because the panel overwrites the settings file every once in a while and also before restarting. So maybe the problem still lies in the config file or in the plugin having problems parsing it. I am pretty sure that when looking at the config file, you will see the CPUTIN entry at least once. Only the displayed/changed entries are stored in this file, so this indicates that once the 3.3V entry was changed to CPUTIN.
Comment 6 Maniaxx 2018-05-20 19:51:42 CEST
Doing this shows the +3.3V correct for one session. But once the panel gets restarted its CPUTIN again.
Comment 7 Fabian Nowak editbugs 2018-05-28 20:35:24 CEST
Is it possible you have several config files for the sensors plugin in your .config...xfce4/panel folder?

Please, as above quit the panel, remove all settings files for the sensors plugin, start the plugin then, look at the available sensors and features, do not add any sensors, then restart the panel (e.g., by logging out or typing "xfce4-panel -r"). Is the 3.3V entry really broken again? what config files are created meanwhile?

See, the plugin doesn't care too much for any specific sensor names or types, it just reads out the libsensors4 library and provides all the available sensors, leaving you the option to rename and colorize them.
Comment 8 Maniaxx 2018-05-29 21:25:33 CEST
I just have one config file for sensor plugin. When i delete it and restart the panel its all reset to default as intended. I can enable any members, they get saved properly and will be restored correctly as well. All but this one entry. If i enable it it will be disabled and the 3.3V will be renamed to this one. If i enable both the correct one will be dis-selected.

It goes like this:
Reset, enable CPUTIN, close. Config file looks like this:
[Chip0_Feature15]
Address=15

Restart. Config still ok. Panel shows wrong member. If panel window gets closed, config is corrupt as well.
[Chip0_Feature3]
Address=3

I reverted this change manually in the config but it always falls back.

Next i set chattr +i flag (immutable/unmodifiable). This kept the config ok but the panel nevertheless showed the wrong member.

Its just that member 15 that's running wild.
Comment 9 Maniaxx 2018-07-05 19:24:50 CEST
Are you not able to replicate the error? Arch is a lightweight distribution that can be set up quickly in a VM.
Comment 10 Maniaxx 2018-07-28 21:20:44 CEST
When i start 'sensors' all names/values are ok.
Maybe something is wrong with parsing the names. The affected member is '+3.3V'. The '+' sign looks suspicious and might produce the bug here.
Comment 11 Fabian Nowak editbugs 2018-09-11 22:06:59 CEST
*** Bug 14646 has been marked as a duplicate of this bug. ***
Comment 12 Git Bot editbugs 2018-10-01 20:35:13 CEST
Fabian referenced this bugreport in commit 9f92b0e51642461747363c5c2c483880593b34e2

Added about dialog and removed saving when closing the panel; only when closing the config dialog are the settings saved. Might even fix bug 14398

https://git.xfce.org/panel-plugins/xfce4-sensors-plugin/commit?id=9f92b0e51642461747363c5c2c483880593b34e2
Comment 13 Fabian Nowak editbugs 2018-10-01 21:17:59 CEST
Can you please try the newest code from the Git repository? The linked commit removes the handling of the "save" event. It also caused problems for the mount plugin. Hopefully this will fix your issue. I would like to wait before releasing a new version until I have some feedback :)
Comment 14 Jason Graves 2018-10-02 17:17:09 CEST
I cloned https://git.xfce.org/panel-plugins/xfce4-sensors-plugin, ran ./autogen.sh along with a make && sudo make install.  After a reboot, I didn't notice any difference.  The first cpu sensor was still duplicated.
Comment 15 Fabian Nowak editbugs 2018-10-02 21:37:17 CEST
Thanks a lot for trying out. Did you wipe out all your sensors plugin configuration files before rebooting? My hope is that the current version stores the settings correctly now due to the code changes. However, it does not parse old config files differently.

Btw., my arch setup refuses running lightdm because of X closing automatically. Besides, I won't have your specific sensor. Labelling a sensor
 "+3.3V" doesn't destroy the config on my Xfce.
Comment 16 Jason Graves 2018-10-02 23:33:50 CEST
I did not wipe them out, I was actually unaware of how to do so (or that it needed to be done at all).  If you could provide with the location of the files or a command to do so, I will wipe and try again if you'd like.  My specific issue was with the duplication of the "Core 0" sensor on a 4 core CPU.  My original filed issue was marked as a duplicate falling under this issue.  Just thought that might be worth mentioning so that I don't add to any confusion while trying to help out.
Comment 17 Fabian Nowak editbugs 2018-10-02 23:47:56 CEST
OK, please as written above, because hopefully your issue will as well be fixed with the changed code [you have duplicated Core 0, the other guy had duplicated +3.3V or CPUTIN]: First log out, then delete or move or rename the config files, then start again. Instead of logging out, you can also close the panel:

[in a terminal emulator]
$ xfce4-panel -q # closes the panel, could also log out
$ rm -f ~/.config/xfce4/panel/xfce4-sensors-plugin-* # could also mv ~/.config/xfce4/panel/xfce4-sensors-plugin-*  ~
$ xfce4-panel & # start a fresh instance of the panel and have it detach from your terminal emulator

Now alter your settings as you like, and restart the panel:

$ xfce4-panel -r # should restart the panel and load the saved config of the sensors plugin without duplicate entries
Comment 18 Jason Graves 2018-10-03 01:42:12 CEST
I followed the instructions as listed above.  Removed the configuration files, did a sudo make install and started up X again.  Once the plugin was displayed, I clicked on it and went into properties and everything looked correct.  I then turned the display on for cores 0 - 3 under "coretemp-0", exited the properties dialog and rebooted.  On reboot, I launched X again and the sensors plugin looked as it did with the incorrect duplication of "Core 0" in the properties and displaying the following on the plugin in the panel:

Core 3
Core 1
Core 2
Comment 19 Fabian Nowak editbugs 2018-10-03 21:56:44 CEST
OK, can I please have all your config files? It seems that the number of sensor features is calculated incorrectly. I have coretemp-0 as well and no problems, but only 2 cores. Maniaxx mentioned that after saving + restarting the config is OK, but then when overwritten (automatically, which is removed for now, or after changing the values a second time) it indicates what went wrong. But he didn't send the entire files nor a diff. So with the new code changes, please alter some display or other settings and look at the config file again; ideally you would copy the config files before and after so that we can see the complete difference. Presumably, differences will be at the number of features per "broken" chip.  This would really help a lot.
Comment 20 Jason Graves 2018-10-05 03:03:01 CEST
Sorry about the delay, I was busy last night.  

Here are the config files as you requested.  The first is from after doing a clear of the current configs and then launching into an X session which displays the sensors panel correctly:

[General]
Show_Title=true
Show_Labels=true
Use_Bar_UI=1
Show_Colored_Bars=true
Scale=0
str_fontsize=medium
val_fontsize=2
Font=Sans 11
Lines_Size=3
Cover_All_Panel_Rows=false
Update_Interval=60
Exec_Command=true
Show_Units=true
Small_Spacings=false
Command_Name=xfce4-sensors
Number_Chips=3
Suppress_Hddtemp_Message=false
Suppress_Tooltip=false
Preferred_Width=0
Preferred_Height=0

[Chip0]
Name=acpitz-0
Number=0

[Chip1]
Name=coretemp-0
Number=1

[Chip1_Feature1]
Id=-1
Address=1
Name=Core 0
Color=#00B000
Show=true
Min=0.00
Max=53.00

[Chip1_Feature2]
Id=-1
Address=2
Name=Core 1
Color=#00B000
Show=true
Min=0.00
Max=56.00

[Chip1_Feature3]
Id=-1
Address=3
Name=Core 2
Color=#00B000
Show=true
Min=0.00
Max=53.00

[Chip1_Feature4]
Id=1
Address=4
Name=Core 3
Color=#00B000
Show=true
Min=0.00
Max=52.00

[Chip2]
Name=ACPI
Number=2



This second one is from doing a reboot immediately after verifying that the previous was correct.  This is where the sensors show up with only 3 entries instead of the 4 and duplicates Core 3 as described previously:

[General]
Show_Title=true
Show_Labels=true
Use_Bar_UI=1
Show_Colored_Bars=true
Scale=0
str_fontsize=medium
val_fontsize=2
Font=Sans 11
Lines_Size=3
Cover_All_Panel_Rows=false
Update_Interval=60
Exec_Command=true
Show_Units=true
Small_Spacings=false
Command_Name=xfce4-sensors
Number_Chips=3
Suppress_Hddtemp_Message=false
Suppress_Tooltip=false
Preferred_Width=0
Preferred_Height=0

[Chip0]
Name=acpitz-0
Number=0

[Chip1]
Name=coretemp-0
Number=1

[Chip1_Feature1]
Id=-1
Address=1
Name=Core 0
Color=#00B000
Show=true
Min=0.00
Max=53.00

[Chip1_Feature2]
Id=-1
Address=2
Name=Core 1
Color=#00B000
Show=true
Min=0.00
Max=56.00

[Chip1_Feature3]
Id=-1
Address=3
Name=Core 2
Color=#00B000
Show=true
Min=0.00
Max=53.00

[Chip1_Feature4]
Id=1
Address=4
Name=Core 3
Color=#00B000
Show=true
Min=0.00
Max=52.00

[Chip2]
Name=ACPI
Number=2
Comment 21 Fabian Nowak editbugs 2018-10-06 20:26:03 CEST
Excellent, this is similar to my system, but I don't experience the same issues. Could you please alter something so that the config will be resaved in its broken state? E.g., add another sensors value or toggle the units, the spacing, the display style? The two configs you sent are the same from their content, nothing suspicious in there, perhaps except for the Id=1 at Core 3, this should be -1. If you like to, you can modify your config manually there after closing the panel (or session). Meanwhile I will investigate the program code to find out why 1 is written falsely.
Comment 22 Jason Graves 2018-10-07 00:58:47 CEST
Sure, with this, I've clicked on properties and turned on the duplicate core Core 0 entry:

[General]
Show_Title=true
Show_Labels=true
Use_Bar_UI=1
Show_Colored_Bars=true
Scale=0
str_fontsize=medium
val_fontsize=2
Font=Sans 11
Lines_Size=3
Cover_All_Panel_Rows=false
Update_Interval=60
Exec_Command=true
Show_Units=true
Small_Spacings=false
Command_Name=xfce4-sensors
Number_Chips=3
Suppress_Hddtemp_Message=false
Suppress_Tooltip=false
Preferred_Width=0
Preferred_Height=0

[Chip0]
Name=acpitz-0
Number=0

[Chip1]
Name=coretemp-0
Number=1

[Chip1_Feature1]
Id=-1
Address=1
Name=Core 3
Color=#00B000
Show=true
Min=0.00
Max=52.00

[Chip1_Feature2]
Id=-1
Address=2
Name=Core 1
Color=#00B000
Show=true
Min=0.00
Max=56.00

[Chip1_Feature3]
Id=-1
Address=3
Name=Core 2
Color=#00B000
Show=true
Min=0.00
Max=53.00

[Chip1_Feature4]
Id=1
Address=4
Name=Core 3
Color=#00B000
Show=true
Min=0.00
Max=46.00

[Chip2]
Name=ACPI
Number=2
Comment 23 Git Bot editbugs 2018-10-10 22:06:15 CEST
Fabian referenced this bugreport in commit 93347d57dee7a679f349327a30436dd920ce2d58

Try fixing bug 14398 by no longer using redundant information for accessing sensor features

https://git.xfce.org/panel-plugins/xfce4-sensors-plugin/commit?id=93347d57dee7a679f349327a30436dd920ce2d58
Comment 24 Fabian Nowak editbugs 2018-10-10 22:16:12 CEST
Jason,

your config file helped a lot. Although I can't recognize why the wrong IDs have been stored at all, I removed the code writing and reading it. The original purpose can no longer be detected. Hopefully this removes your issues now. Before doing a full release, I would like waiting for your feedback. This time, it should also be possible keeping your old config files. so did I, and with my 3 features in coretemp-0 I did not encounter any problems with the new code.
Comment 25 Jason Graves 2018-10-13 18:57:11 CEST
I did a git pull, ./autogen, make && sudo make install.  Removed the previous xfce4-sensors-plugin-23.rc file and started xfce.  When the plugin first loaded, it just read "Sensors" with nothing displayed.  I right clicked and selected "Properties" and the list displayed correctly showing:

Core 0
Core 1
Core 2
Core 3

I closed the properties dialog and rebooted.

Upon reboot, the same issue was seen, the panel displayed:

Core 3
Core 1
Core 2

Looking at the properties I saw:

Core 3
Core 1
Core 2
Core 3

Doesn't appear to have fixed the issue, sorry.

Here's what the xfce4-sensors-plugin-23.rc file looked like after the reboot.

[General]
Show_Title=true
Show_Labels=true
Use_Bar_UI=1
Show_Colored_Bars=true
Scale=0
str_fontsize=medium
val_fontsize=2
Font=Sans 11
Lines_Size=3
Cover_All_Panel_Rows=false
Update_Interval=60
Exec_Command=true
Show_Units=true
Small_Spacings=false
Command_Name=xfce4-sensors
Number_Chips=3
Suppress_Hddtemp_Message=false
Suppress_Tooltip=false
Preferred_Width=0
Preferred_Height=0

[Chip0]
Name=acpitz-0
Number=0

[Chip1]
Name=coretemp-0
Number=1

[Chip1_Feature1]
Id=-1
Address=1
Name=Core 0
Color=#00B000
Show=true
Min=0.00
Max=45.00

[Chip1_Feature2]
Id=-1
Address=2
Name=Core 1
Color=#00B000
Show=true
Min=0.00
Max=51.00

[Chip1_Feature3]
Id=-1
Address=3
Name=Core 2
Color=#00B000
Show=true
Min=0.00
Max=48.00

[Chip1_Feature4]
Id=1
Address=4
Name=Core 3
Color=#00B000
Show=true
Min=0.00
Max=44.00

[Chip2]
Name=ACPI
Number=2
Comment 26 Fabian Nowak editbugs 2018-10-13 21:16:20 CEST
Hey, 

glad you posted the config file. The sensors plugin version you are running is not the one from Git because the current version doesn't write any entries with "Id" any more. Is it possible you had a previous installation by your package manager, e.g. APT, on your system? Please remove that one first. 

As explanation, packages from your distribution are normally installed to /usr/lib while ./autogen.sh, or ./configure respectively, will install to /usr/local/lib. The panel looks for versions in the former location first. If it doesn't find any, it might search local versions, but as on my Debian system I need to create the following symlinks:

/usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/libxfce4-sensors-plugin.so -> /usr/local/lib/xfce4/panel/plugins/libxfce4-sensors-plugin.so
/usr/share/xfce4/panel/plugins/xfce4-sensors-plugin.desktop -> /usr/local/share/xfce4/panel/plugins/xfce4-sensors-plugin.desktop
Comment 27 Fabian Nowak editbugs 2018-10-13 21:40:13 CEST
Or you ./configure --prefix=/usr/ , because the default is as mentioned to /usr/local. But I don't quite know about the modern installation path issues such as the x86_64-linux-gnu , whether the xfce4-panel requires this intermediate subpath.
Comment 28 Maniaxx 2018-10-14 00:38:28 CEST
It works here now indeed (1.3.1git-bd79150). But the bars are way to thick/width now (see pic below). Right beside to the left is another plugin with original width. That's how it looks on v1.3.0 as well. I hope the new size is not intended (or at least will be optional).
https://abload.de/img/xfce4-sensorsrwcwt.png
Comment 29 Maniaxx 2018-10-14 01:09:06 CEST
I've used the official Arch PKGBUILD options:

>./configure \
>  --prefix=/usr \
>  --sysconfdir=/etc \
>  --libexecdir=/usr/lib \
>  --localstatedir=/var \
>  --datadir=/usr/share \
>  --datarootdir=/usr/share \
>  --disable-static \
>  --disable-debug \
>  --disable-pathchecks
>make -j4
>sudo make install
And thanks for fixing it. :)
Comment 30 Jason Graves 2018-10-14 01:27:16 CEST
Wow, super rookie mistake on my end.  Sorry about that.  After using the above official Arch PKGBUILD options I can confirm that the settings correctly survived reboot.  Thanks.
Comment 31 Fabian Nowak editbugs 2018-10-14 23:31:42 CEST
Maniaxx, thanks for the hint with the size. Used the same constants for the settings dialog and the bar view because they once fitted each other. Anyway, bug seems to be fixed. Maybe the duplicate writes were the original problem; but the "Id" setting seems to be superfluous meanwhile.
Comment 32 Maniaxx 2018-10-15 20:38:28 CEST
The bars widths are fixed indeed but the spacing is still wrong.
https://abload.de/img/xfce4barsvlel2.png
Comment 33 Fabian Nowak editbugs 2018-10-15 21:38:44 CEST
Note that the sensors plugin doesn't have RX/TX bars displaying data transfers, but rather separate values. I wouldn't want it differently. But I'll have a look ...
Comment 34 Git Bot editbugs 2018-10-15 22:05:47 CEST
Fabian referenced this bugreport in commit 4a4221793ef5ad3be0c480ffb7676a037aafd52c

Narrower spacing in graphical bars mode as suggested as a sidenote in bug 14398

https://git.xfce.org/panel-plugins/xfce4-sensors-plugin/commit?id=4a4221793ef5ad3be0c480ffb7676a037aafd52c
Comment 35 Maniaxx 2018-10-15 23:22:05 CEST
Thanks, much better. Not exactly the same size as before but no one wants to get picky here. :)
https://abload.de/img/xfce4-v131git-2qdinz.png
(v1.3.0 top - v1.3.1git bottom)
Comment 36 John 2018-11-16 10:47:56 CET
@Fabian - Version 1.3.90 fixes the problem for me it seems (https://bugzilla.xfce.org/show_bug.cgi?id=14380).  Thanks!  One thing do notice is the naming of my cores is incorrect.  It seems that "Core 0" is named "Core 3" incorrectly as Jason reported in comment 20 (https://bugzilla.xfce.org/show_bug.cgi?id=14398#c20).

https://i.postimg.cc/XYNfJGmG/screenshot-85.jpg

Here is my ~/.config/xfce4/panel/xfce4-sensors-plugin-9.rc
---
[General]
Show_Title=false
Show_Labels=false
Use_Bar_UI=1
Show_Colored_Bars=true
Scale=0
str_fontsize=medium
val_fontsize=2
Font=Sans 11
Lines_Size=2
Cover_All_Panel_Rows=false
Update_Interval=15
Exec_Command=false
Show_Units=true
Small_Spacings=true
Command_Name=xfce4-sensors
Number_Chips=3
Suppress_Hddtemp_Message=false
Suppress_Tooltip=false
Preferred_Width=1332
Preferred_Height=1319
Tachos_ColorValue=0.80
Tachos_Alpha=0.80

[Chip0]
Name=nct6792-a10
Number=0

[Chip1]
Name=coretemp-0
Number=1

[Chip1_Feature1]
Address=1
Name=Core 3
Color=#00B000
Show=true
Min=0.00
Max=38.00

[Chip1_Feature2]
Address=2
Name=Core 1
Color=#00B000
Show=true
Min=0.00
Max=49.00

[Chip1_Feature3]
Address=3
Name=Core 2
Color=#00B000
Show=true
Min=0.00
Max=48.00

[Chip1_Feature4]
Address=4
Name=Core 3
Color=#00B000
Show=true
Min=0.00
Max=40.00

[Chip2]
Name=ACPI
Number=2
Comment 37 Fabian Nowak editbugs 2018-11-16 18:28:40 CET
This can be seen from the posted config file. So just try renaming the cores. Might be a leftover from the previously experienced problems. Shouldn't happen when removing the plugin entirely and re-adding it again. Please try and report, thx a lot.

Bug #14398

Reported by:
Maniaxx
Reported on: 2018-05-14
Last modified on: 2018-11-16
Duplicates (2):
  • 14380 xfce4-sensors-plugin does not remember settings between sessions
  • 14646 Sensors plugin enumerating incorrectly

People

Assignee:
Fabian Nowak
CC List:
3 users

Version

Version:
unspecified

Attachments

Additional information