can't read battery state

Bug #569195 reported by renbag
70
This bug affects 14 people
Affects Status Importance Assigned to Milestone
Conky
Unknown
Unknown
conky (Ubuntu)
Fix Released
Undecided
Unassigned

Bug Description

Binary package hint: conky

After upgrading from conky-all_1.8.0-1 to conky-all_1.8.0-1ubuntu1 the 'battery_bar' object always returns an empty value.
The 'battery' and 'battery_time' objects, instead, return the correct values.

Running conky 1.8.0-1 from the command line:

renzo@brahms:~$ conky
Conky: desktop window (20000a9) is subwindow of root window (110)
Conky: window type - normal
Conky: drawing to created window (0x1800001)
Conky: drawing to double buffer
...

Running conky 1.8.0-1ubuntu1 on the same system:

renzo@brahms:~$ conky
Conky: desktop window (20000a9) is subwindow of root window (110)
Conky: window type - normal
Conky: drawing to created window (0x1800001)
Conky: drawing to double buffer
Conky: can't open /sys/class/power_supply/8/uevent: No such file or directory
Conky: can't open /proc/acpi/battery/8/state: No such file or directory
Conky: can't open /proc/acpi/battery/8/state: No such file or directory
...

The system is a laptop with up to date lucid packages (2.6.32-21-generic x86_64).

Related branches

Revision history for this message
renbag (renbag) wrote :
Revision history for this message
JonathanHard (jonathanhard) wrote :

same problem here with ThinkPad R400
Conky: can't open /sys/class/power_supply/8,60/uevent: No such file or directory
Conky: can't open /proc/acpi/battery/8,60/state: No such file or directory

Revision history for this message
renbag (renbag) wrote :

Well, it seems that the problem is that the 'battery_bar' object takes the (height),(width) argument in a wrong way.
Changing:
${battery_bar 8}
to:
${battery_bar}
is a temporary solution.

Revision history for this message
Guillaume Mazoyer (respawneral) wrote :

I have this bug too. I also can confirm Renzo's workaround. But, sadly, the bar looks a bit flat after that.

renbag (renbag)
Changed in conky (Ubuntu):
status: New → Confirmed
Revision history for this message
Steffen Banhardt (steffenbanhardt) wrote :

I can confirm this bug. There is another workaroud that works perfect for me:

Instead of using

${battery_bar 8,150}

I set the variable

default_bar_size 150 8

(yes it is the other way: "height,width" for battery_bar and "height width" for default_bar_size [also a blank instead of a comma]) and can just use $battery_bar

Revision history for this message
Steffen Banhardt (steffenbanhardt) wrote :

reported upstream at sf.net

Changed in conky (Ubuntu):
assignee: nobody → Cesare Tirabassi (norsetto)
status: Confirmed → In Progress
Revision history for this message
Cesare Tirabassi (norsetto) wrote :

I uploaded a package with a fix for this to my ppa (https://launchpad.net/~norsetto/+archive/ppa/+packages).
Please test and give any feedback here.

Changed in conky (Ubuntu):
status: In Progress → Incomplete
assignee: Cesare Tirabassi (norsetto) → nobody
Revision history for this message
Steffen Banhardt (steffenbanhardt) wrote :

Package from ppa works for me

uname -a
Linux Radagast 2.6.32-22-generic #33-Ubuntu SMP Wed Apr 28 13:27:30 UTC 2010 i686 GNU/Linux
conky --version
Conky 1.8.0 compiled Thu May 13 15:01:31 UTC 2010 for Linux 2.6.24-27-xen (i686)

Thanks a lot!

Revision history for this message
renbag (renbag) wrote :

I confirm that the package conky-all_1.8.0-1ubuntu2~ppa1 restores the correct behaviour of battery_bar.

Changed in conky (Ubuntu):
status: Incomplete → Fix Committed
Revision history for this message
Andrew (andrew-rw-robinson) wrote :

Okay, the fix has been committed, but launchpad seems to be missing the functionality to mention the most important part, what version the fix is found in and when that will appear in the repos. Any ideas for this bug?

Revision history for this message
Rahul Jain (rahulthewall3000) wrote :

I am using Kubuntu 10.10 and I am running into the same problem.
Conky Version: 1.8.0-1ubuntu1

Any idea when will the committed fix be made available to the general users?

Revision history for this message
Ethan Shalev (shalev-ethan) wrote :

This bug is still present in the latest version - 1.8.0-1ubuntu1 (conky-all).
Can we expect the fix to be included upstream?

Revision history for this message
Mike Basinger (mike.basinger) wrote :

Still present in Ubuntu 11.04.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package conky - 1.8.1-2

---------------
conky (1.8.1-2) unstable; urgency=low

  * Add build dependency on libxnvctrl-dev | nvidia-settings to keep Conky
    in sync with Ubuntu.
  * Add debian/patches/fix-curl-ftbfs.patch to fix FTBFS with curl 7.21.7.
    (Closes: #636367)
  * Add debian/patches/fix-kfreebsd-ftbfs.patch to fix FTBFS on kfreebsd.

conky (1.8.1-1) unstable; urgency=low

  * Adopt package. (Closes: #632655)
  * Acknowledge NMU patch for #612033, which fixes a known vulnerability in
    Conky. Thanks to Luca Falavigna! (LP: #607309)
  * New upstream release. (Closes: #604921)
    - Fix bug in $if_existing. (Closes: #612904)
    - Fix various memory leaks. (Closes: #628527)
    - Fix battery_bar not parsing arguments correctly. (LP: #569195)
  * Fix ncurses being enabled for all binary packages (upstream default).
  * Rename "70b6f35a.patch" to "fix-race-condition.patch", and add a full
    DEP-3 formatted header.
  * Add debian/patches/fix-acpitemp.patch to let $acpitemp use /sys instead
    of /proc. (Closes: #609745, #628519; LP: #810667)
  * Change section of source package from "contrib/utils" to "utils".
    (Closes: #579102)
    - Change section of binary package conky-all to "contrib/utils".
    - Remove build-dependency on nvidia-settings; add build-dependency on
      libxnvctrl-dev instead to conky-all, due to the move of the
      NVCtrl/NVCtrl.h header file to libxnvctrl-dev.
    - Update debian/NEWS and debian/README.source to reflect the changes to
      Conky packaging in Debian.
  * Change dependency of transitional conky package to
    "conky-all | conky-std".
  * debian/copyright: Remove reference to deprecated BSD license file
    (/usr/share/common-licenses/BSD).
  * Change Vcs-* entries in debian/control to point to collab-maint.
  * Update Standards version from 3.8.4 to 3.9.2, no changes required.
  * Update debhelper compatiblity level from 5 to 8.

conky (1.8.0-1.1) unstable; urgency=medium

  * Non-maintainer upload.
  * debian/patches/70b6f35a.patch:
    - Cherrypick a patch from upstream to avoid rewriting an arbitrary
      user file (Closes: #612033).
 -- <email address hidden> (Tarun K. Mall) Wed, 10 Aug 2011 11:43:59 +0000

Changed in conky (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
eixmg (ei-xmg) wrote :

Conky: can't open /proc/acpi/battery/BAT1/state: No such file or directory

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Bug attachments

Remote bug watches

Bug watches keep track of this bug in other bug trackers.