[Goodies-dev] [Bug 14930] New: [patch] Doesn't update when battery is removed or inserted
bugzilla-daemon at xfce.org
bugzilla-daemon at xfce.org
Sat Dec 1 07:31:42 CET 2018
https://bugzilla.xfce.org/show_bug.cgi?id=14930
Bug ID: 14930
Summary: [patch] Doesn't update when battery is removed or
inserted
Classification: Panel Plugins
Product: Xfce4-battery-plugin
Version: git
Hardware: PC (x86_64)
OS: Linux
Status: NEW
Severity: normal
Priority: Medium
Component: General
Assignee: goodies-dev at xfce.org
Reporter: john at jlindgren.net
Target Milestone: ---
Created attachment 8144
--> https://bugzilla.xfce.org/attachment.cgi?id=8144&action=edit
Patch 1/7
The plugin doesn't update when a battery is removed or inserted due to a couple
of problems in the code:
- It refuses to read any ACPI information at all until a battery is present
(Linux only)
- Once a battery is inserted, it never re-enumerates batteries to see if it
was removed
Additionally, there is a lot of legacy code in the plugin that ought to be
removed:
- APM was deprecated in favor of ACPI two decades ago (for comparison, XP was
the last Windows version to support it)
- The /proc/acpi tree is no longer available on modern (3.x or 4.x) Linux
kernels, ACPI information is under /sys now
I will attach a series of patches that:
- Removes the legacy code (APM support for Linux + FreeBSD, and /proc/acpi
support for Linux)
- Fixes the Linux ACPI code to initialize properly when no battery is present
- Re-detects whether a battery is present at the existing 30-second update
interval
The full patch series can also be seen in my GitHub fork:
https://github.com/jlindgren90/xfce4-battery-plugin/commits/master
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the Goodies-dev
mailing list