Self splicatory tittle Reproduce: Add the plugin to the panel and the remove the battery (the plugin work good) now reboot whitout the baterry and watch again the plugin you can see the (baterry icon)50%% in place and noone of the setting work more info need??? PD: not know how debug an applet
I can reproduce. xfce4-battery-plugin 1.0.5-1 Linux schlebby 3.6.8-1-MANJARO #1 SMP PREEMPT Wed Nov 28 00:13:38 CET 2012 i686 GNU/Linux I guess it's due to there's no /proc/acpi/battery/ available when there's no battery connected.
Yes but in a Netbook or any battery capable system the battery can be removed and maintain connected to AC Probably the best solution if if tno baterryc onected a 'no battery' message in place of all those 50%% but in my test reconect the baterry on cold (aka login in) not reabilitate the plugin
I dont have a linux system to test that. Can you recompile the plugin with --enable-debug, reinstall it and look in .xsession-errors (or wherever your session logs its debug output) to see what the plugin says about proc/acpi/battery, and what codepaths are used ? Linux also uses sysfs /sys tree first, and only /proc after it. Code is in http://git.xfce.org/panel-plugins/xfce4-battery-plugin/tree/panel-plugin/libacpi.c#n277 for the acpi check and http://git.xfce.org/panel-plugins/xfce4-battery-plugin/tree/panel-plugin/battery.c#n239 for the caller. To my understanding on linux, if check_acpi_sysfs doesnt return 0, then check_acpi checks for /proc/acpi/battery, then if not found returns 2. The code in battery.c then fallbacks to apm_read, instead of properly propagating the failure to the plugin UI.
I have the same issue. By the way, is there any requirement for kernel to make this pluging working?
An I dicover that the percentages are inacurated at same time the 100% is a real 100% but the 1% is a real 0% because my applet report 1% and then run out of battery Is not related to the 50%% but is related to the power managenment and finally systemd have plans for replace acpi(d), I think is best relly on the kernel ans /sys and /proc reports intead of acpi for linux
same issue here - for 3 years at least...
I've fixed my xfce4 Battery plugin (not completely, but my plugin doesnt show the annoying 50%%). The problem is that the deb package which is in the reppos comes with a libbattery.so compiled with a libbattery.c with errors. I don't know C, so i can't fix the problem which makes settings dont affect the plugin when the battery in umplugged, but i fixed the message.. my plugin shows "No Battery" instead "50%%". What i did: Downloaded the source package: xfce4-battery-plugin-1.0.5 edited the file: xfce4-battery-plugin-1.0.5/panel-plugin/battery.c in this file edit line 698: Change "50%%" with "No Battery" Now compile the package, ./configure && make BUT NOT INSTALL then copy the plugin: xfce4-battery-plugin-1.0.5/panel-plugin/.libs/libbattery.so to: /usr/lib/x86_64-linux-gnu/xfce4/panel/plugins/ In my case (Debian Wheezy amd_64) i use this location, to find yours download and extract your xfce4-battery-plugin precompiled package and search for the file libbattery.so, use the same location to copy your Fixed plugin file. It's a middle solution, but i'm using linux since 1 month and i don't have enough knowledge to fix this for all the community but i'm sure that anyone who read that and have the needed knowledge can fix this bug without problems. Thanks For ALL!!! Ingmar
Based on Kigmar soares comment that part fo 50%% is a translation problem easily fixable in transifex (unles that part is not translatable) at this point I think that the built in batery monitor notify in the systreay can by fused (or replace) this applet for now using the systreay icon provided by xfce4-powermanager 1.2.0 can by a drop in (ok, quasi) drop in replacenment I drop this info for future users that want a workaround
*** Bug 9140 has been marked as a duplicate of this bug. ***
Possible (another) duplication bug #11161.
*** Bug 11161 has been marked as a duplicate of this bug. ***
Mass-reassign all bugs from florian@ to goodies-dev@, thanks for the maintenance work! (and sorry for the bugmail spam..)
Created attachment 8128 Initially show/hide widgets according to user config. Patch 1/2
Created attachment 8129 Initially show blank (rather than incorrect) labels. Patch 2/2
(In reply to John Lindgren from comment #14) > Created attachment 8129 > Initially show blank (rather than incorrect) labels. > > Patch 2/2 I agree that the current state sucks, but i'm not sure showing blank values is the right solution. If you've hidden the progressbar, and have no values to display, you don't know where your plugin is, and you dont know if it's running or not. Wouldnt it be better to show '?' as the default label and/or 'no value' in the tooltip ?
(In reply to Landry Breuil from comment #15) > Wouldnt it be better to show '?' as the default label and/or 'no value' in > the tooltip ? I'd suggest dashes '--' rather than question marks (just a cosmetic preference), but it doesn't matter much to me because I have only the progressbar visible. There is currently no tooltip shown until the battery state is successfully read. Setting a default tooltip like "Battery state unknown" wouldn't be a bad idea. For my use case, patch 1/2 is more important since it keeps the labels I want hidden, hidden.
John Lindgren referenced this bugreport in commit 93de5176fe7d159d6060b6839358c3df6abfaa00 Initially show/hide widgets according to user config (bug #9594) https://git.xfce.org/panel-plugins/xfce4-battery-plugin/commit?id=93de5176fe7d159d6060b6839358c3df6abfaa00
I still dont understand what's wrong with your systems, since here on an OpenBSD desktop without battery, i dont have '50%%' on the panel in the default config, and if i check all checkboxes in the config it only shows 'AC' (for - obviously- 'you're on AC'). Something specific to the linux code ? In the meantime i've pushed patch 1/2.
It's nothing "wrong with our systems". The initial label is very clearly set to '50%%' (cf. my patch 2/2 which changes that to a blank string) and if no battery is present, the label is never updated. Look at check_acpi_sysfs() in libacpi.c: if ( batt_count == 0 ) { #ifdef DEBUG printf("DBG:No acpi support for sysfs. Trying procfs...\n"); #endif acpi_sysfs = 0; return 2; } If there is no battery present, the non-zero return value causes detect_battery_info() to return FALSE. Then (apparently by design) update_apm_status() does not update any of the labels due to this line: if(!detect_battery_info(battmon)) return TRUE;
One could easily change check_acpi_sysfs() to return 0 if an AC adapter but no battery is detected. I can submit a patch if that's the desired behavior. However, I still think that the label should never (even initially) be set to a false value such as '50%%'.
I dont know the linux code (nor can test it), but if fixing check_acpi_sysfs works for you that's fine for me :)
434e724 changes that to show -- instead of wrong info - still taking a patch for the default tooltip :)
Thanks. If I submit a patch for the ACPI code, I'll do it under a separate bug. I think the fixes committed so far are enough to close this one.
-- GitLab Migration Automatic Message -- This bug has been migrated to xfce.org's GitLab instance and has been closed from further activity. You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.xfce.org/panel-plugins/xfce4-battery-plugin/-/issues/6. Please create an account or use an existing account on one of our supported OAuth providers. If you want to fork to submit patches and merge requests please continue reading here: https://docs.xfce.org/contribute/dev/git/start#gitlab_forks_and_merge_requests Also feel free to reach out to us on the mailing list https://mail.xfce.org/mailman/listinfo/xfce4-dev