Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 71184 - acpi (the app) has the paths all wrong when reading battery info
Summary: acpi (the app) has the paths all wrong when reading battery info
Status: VERIFIED TEST-REQUEST
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: x86 Linux
: High normal (vote)
Assignee: Mobile Herd (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-11-14 10:41 UTC by Anders Eriksson
Modified: 2005-05-01 09:39 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anders Eriksson 2004-11-14 10:41:11 UTC
Having two batteries in my laptop, I found that acpi sometimes faild to show data on both at the same time, and only show a (random) one. Then all of a sudden it decided to not show any data at all.

Decided to do an strace, and found that its tried actions don't really add up to my (2.6.9) layout of /proc/acpi/. It seems way off.

This is using acpi-0.06-r5



bash-2.05b$ strace acpi
execve("/usr/bin/acpi", ["acpi"], [/* 43 vars */]) = 0
brk(0)                                  = 0x804c000
open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or directory)
open("/etc/ld.so.cache", O_RDONLY)      = 3
fstat64(3, {st_mode=S_IFREG|0644, st_size=34379, ...}) = 0
old_mmap(NULL, 34379, PROT_READ, MAP_PRIVATE, 3, 0) = 0xb7fe4000
close(3)                                = 0
open("/lib/libc.so.6", O_RDONLY)        = 3
read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\241T\1"..., 512) = 512
fstat64(3, {st_mode=S_IFREG|0755, st_size=1166172, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fe3000
old_mmap(NULL, 1096612, PROT_READ|PROT_EXEC, MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0xb7ed7000
old_mmap(0xb7fdd000, 16384, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x105000) = 0xb7fdd000
old_mmap(0xb7fe1000, 7076, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0xb7fe1000
close(3)                                = 0
munmap(0xb7fe4000, 34379)               = 0
open("/dev/urandom", O_RDONLY)          = 3
read(3, "~\16\274R", 4)                 = 4
close(3)                                = 0
brk(0)                                  = 0x804c000
brk(0x806d000)                          = 0x806d000
chdir("/proc/acpi")                     = 0
chdir("battery")                        = 0
open("/dev/null", O_RDONLY|O_NONBLOCK|O_DIRECTORY) = -1 ENOTDIR (Not a directory)
open(".", O_RDONLY|O_NONBLOCK|O_LARGEFILE|O_DIRECTORY) = 3
fstat64(3, {st_mode=S_IFDIR|0555, st_size=0, ...}) = 0
fcntl64(3, F_SETFD, FD_CLOEXEC)         = 0
getdents64(3, /* 4 entries */, 1024)    = 96
chdir("BAT1")                           = 0
open("state", O_RDONLY)                 = 5
fstat64(5, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fec000
read(5, "present:                 yes\ncap"..., 1024) = 192
read(5, "", 1024)                       = 0
close(5)                                = 0
munmap(0xb7fec000, 4096)                = 0
open("status", O_RDONLY)                = -1 ENOENT (No such file or directory)
open("info", O_RDONLY)                  = 5
fstat64(5, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fec000
read(5, "present:                 yes\ndes"..., 1024) = 435
read(5, "", 1024)                       = 0
close(5)                                = 0
munmap(0xb7fec000, 4096)                = 0
open("temperature", O_RDONLY)           = -1 ENOENT (No such file or directory)
open("cooling_mode", O_RDONLY)          = -1 ENOENT (No such file or directory)
chdir("..")                             = 0
chdir("BAT0")                           = 0
open("state", O_RDONLY)                 = 5
fstat64(5, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fec000
read(5, "present:                 yes\ncap"..., 1024) = 193
read(5, "", 1024)                       = 0
close(5)                                = 0
munmap(0xb7fec000, 4096)                = 0
open("status", O_RDONLY)                = -1 ENOENT (No such file or directory)
open("info", O_RDONLY)                  = 5
fstat64(5, {st_mode=S_IFREG|0444, st_size=0, ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb7fec000
read(5, "present:                 yes\ndes"..., 1024) = 438
read(5, "", 1024)                       = 0
close(5)                                = 0
munmap(0xb7fec000, 4096)                = 0
open("temperature", O_RDONLY)           = -1 ENOENT (No such file or directory)
open("cooling_mode", O_RDONLY)          = -1 ENOENT (No such file or directory)
chdir("..")                             = 0
getdents64(3, /* 0 entries */, 1024)    = 0
close(3)                                = 0
exit_group(0)                           = ?


Reproducible: Sometimes
Steps to Reproduce:
1.
2.
3.
Comment 1 Henrik Brix Andersen 2004-12-29 06:03:02 UTC
This package is now owned by the mobile herd - it's a base-system package.

There is a newer version out at the project homepage (http://grahame.angrygoats.net/acpi.shtml) but the package seems unmaintained.

How shall we proceed? Take ownership and bump?
Comment 2 Henrik Brix Andersen 2005-04-24 09:35:29 UTC
Reporter, please see if sys-power/acpi-0.9 fixes this issue.
Comment 3 Anders Eriksson 2005-05-01 09:21:44 UTC
I no longer have that laptop in my posession. The one I have right now (ancient Dell L400) with one battery only, runs acpi-0.09 just fine. I suggest you close this one...

/Anders
Comment 4 Stefan Schweizer (RETIRED) gentoo-dev 2005-05-01 09:39:33 UTC
closed.