Battery information not found

Reported by timttmy on 2012-06-16
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
vattery
Undecided
Unassigned

Bug Description

Trying to use vattery on an Asus X5DC running Arch Linux.
Vattery starts and runs but vattery reports "No batteries where found"
I believe this is because the battery information is stored in '/sys/class/power_supply/BAT0' and vattery is looking for '/proc/acpi/battery' .

[marshall@jynx ~]$ vattery
Error opening directory '/proc/acpi/battery': No such file or directoryusing data type: None

This Bug was also reported on the AUR vattery page [1], but I don't think the user ever submitted a bug report.

[1] http://aur.archlinux.org/packages.php?ID=34390

--TIMTTMY

jezra (jezra) wrote :

Very odd. Vattery checks /sys/class/power_supply/BAT* before checking in /proc

Can you try pulling and running the trunk code and see if there is any more relevant information?

timttmy (marshall-cleave) wrote :
Download full text (6.8 KiB)

hmmm....
I can't seem to build vattery using the usual ./configure && make routine.

[marshall@jynx vattery-bzr]$ bzr co lp:vattery vattery -r 78
You have not informed bzr of your Launchpad ID, and you must do this to
write to Launchpad or access private data. See "bzr help launchpad-login".
[marshall@jynx vattery-bzr]$ cd vattery/
[marshall@jynx vattery]$ ls
total 524K
4.0K po/
4.0K src/
4.0K vapi/
4.0K AUTHORS
 36K COPYING
4.0K ChangeLog
 16K INSTALL
4.0K Makefile.am
 28K Makefile.in
   0 NEWS
4.0K README
 72K aclocal.m4
4.0K autogen.sh*
4.0K config.h.in
240K configure*
4.0K configure.ac
 24K depcomp*
 36K gpl.txt
 16K install-sh*
 12K missing*
4.0K mkinstalldirs*
[marshall@jynx vattery]$ ./configure
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for style of include used by make... GNU
checking dependency style of gcc... gcc3
checking for gcc option to accept ISO C99... -std=gnu99
checking for gcc -std=gnu99 option to accept ISO Standard C... (cached) -std=gnu99
checking whether NLS is requested... yes
checking for intltool >= 0.35... 0.50.2 found
checking for intltool-update... /usr/bin/intltool-update
checking for intltool-merge... /usr/bin/intltool-merge
checking for intltool-extract... /usr/bin/intltool-extract
checking for xgettext... /usr/bin/xgettext
checking for msgmerge... /usr/bin/msgmerge
checking for msgfmt... /usr/bin/msgfmt
checking for gmsgfmt... /usr/bin/msgfmt
checking for perl... /usr/bin/perl
checking for perl >= 5.8.1... 5.16.0
checking for XML::Parser... ok
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for VATTERY... yes
checking how to run the C preprocessor... gcc -std=gnu99 -E
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking locale.h usability... yes
checking locale.h presence... yes
checking for locale.h... yes
checking for LC_MESSAGES... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
ch...

Read more...

jezra (jezra) wrote :

Alright, the code should now compile.

timttmy (marshall-cleave) wrote :

./configure && make still fails to build. I am getting
............
/bin/sh: --vapidir=../vapi: No such file or directory
make[3]: *** [vattery_vala.stamp] Error 127
............

building vattery with ./build in the src folder and vattery builds nicely, and it looks like it's looking in /sys/class/power_supply.

[marshall@jynx src]$ ./vattery
No battery info found in /sys/class/power_supply
Error opening directory '/proc/acpi/battery': No such file or directoryNo battery info found in /proc/acpi/battery
using data type: None
Error opening directory '/proc/acpi/battery': No such file or directoryNo battery info found in /proc/acpi/battery
Error opening directory '/proc/acpi/battery': No such file or directoryNo battery info found in /proc/acpi/battery
Error opening directory '/proc/acpi/battery': No such file or directoryNo battery info found in /proc/acpi/battery
Error opening directory '/proc/acpi/battery': No such file or directoryNo battery info found in /proc/acpi/battery
Error opening directory '/proc/acpi/battery': No such file or directoryNo battery info found in /proc/acpi/battery
Error opening directory '/proc/acpi/battery': No such file or directoryNo battery info found in /proc/acpi/battery
Error opening directory '/proc/acpi/battery': No such file or directoryNo battery info found in /proc/acpi/battery
Error opening directory '/proc/acpi/battery': No such file or directoryNo battery info found in /proc/acpi/battery
Error opening directory '/proc/acpi/battery': No such file or directoryNo battery info found in /proc/acpi/battery
Error opening directory '/proc/acpi/battery': No such file or directoryNo battery info found in /proc/acpi/battery
Error opening directory '/proc/acpi/battery': No such file or directoryNo battery info found in /proc/acpi/battery
Error opening directory '/proc/acpi/battery': No such file or directoryNo battery info found in /proc/acpi/battery
Error opening directory '/proc/acpi/battery': No such file or directoryNo battery info found in /proc/acpi/battery
Error opening directory '/proc/acpi/battery': No such file or directoryNo battery info found in /proc/acpi/battery
Error opening directory '/proc/acpi/battery': No such file or directoryNo battery info found in /proc/acpi/battery
^C

I do have battery info in /sys/class/power_supply (I was starting to wonder myself)

[marshall@jynx power_supply]$ pwd
/sys/class/power_supply
[marshall@jynx power_supply]$ \ls
AC0 BAT0
[marshall@jynx power_supply]$ cd BAT0
[marshall@jynx BAT0]$ \ls
alarm cycle_count device energy_full energy_full_design energy_now manufacturer model_name power power_now present serial_number status subsystem technology type uevent voltage_min_design voltage_now

jezra (jezra) on 2012-06-17
Changed in vattery:
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers