You are not logged in.

#1 2006-06-28 18:56:29

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Craptastic ACPI

I know codemac at least has come across this.  Has anyone else experienced repeated ACPI hangs, for the proc filesystem?

Periodically, if I try

cat /proc/acpi/battery/BAT0/*

it will hang and just... never return.

I have no idea what causes this, but my case is not isolated.  Any pointers/tips or even alternate ways to grab acpi information would be great.

Offline

#2 2006-06-29 02:56:00

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Craptastic ACPI

pacman -S acpi acpid

make sure acpid runs before hal in rc.conf.
then just use 'acpi' at the cli for details

iphitus@anna:~$ acpi
     Battery 1: discharging, 70%, rate information unavailable.

has other parameters for other acpi proc values too.

as for why it's happening, I have no idea. I saw someone else with a procfs hang in another thread,so it may be a procfs thing rather than just acpi.

try doing it again, and if it does it again, hit dmesg and see if the kernel farts anything useful.

James

Offline

#3 2006-06-29 02:59:16

codemac
Member
From: Cliche Tech Place
Registered: 2005-05-13
Posts: 794
Website

Re: Craptastic ACPI

Any ideas on how to debug it?  I'd love to do more investigative work on it, but I really don't know what to do about it.

Offline

#4 2006-06-29 04:04:19

_Gandalf_
Member
Registered: 2006-01-12
Posts: 735

Re: Craptastic ACPI

I don't have any problems with ACPI I had some but as iphitus mentioned, starting acp before hal was the solution, anyway I'm using wmii now and if acpi have hanged at any time i would have noticed it smile

Offline

#5 2006-06-29 04:21:13

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Craptastic ACPI

codemac wrote:

Any ideas on how to debug it?  I'd love to do more investigative work on it, but I really don't know what to do about it.

See if the kernel burps, post a dmesg after it happens. Without that, its difficult to know.

I'll poke around on LKML and see if I can find anything. If it's a more spread problem it's bound to be reported already/soon.

edit: Does this happen after a suspend/resume cycle?
Does the process take 100% cpu?
What kernel? beyond, vanilla or both?
What mobo/chipset you guys using?

Gandalf, this is occurring when reading the values directly from proc. My instructions on ACPI were a workaround for phrak until we work out whats goin on.

Offline

#6 2006-06-29 04:35:23

_Gandalf_
Member
Registered: 2006-01-12
Posts: 735

Re: Craptastic ACPI

@iphitus I know, i don't use acpi, but  directly from proc

(0)[wael@nasreddine ~]$ cat /proc/acpi/battery/BAT0/info 
present:                 yes
design capacity:         6000 mAh
last full capacity:      3168 mAh
battery technology:      rechargeable
design voltage:          14800 mV
design capacity warning: 250 mAh
design capacity low:     150 mAh
capacity granularity 1:  10 mAh
capacity granularity 2:  25 mAh
model number:            JM-6
serial number:           0138912637
battery type:            LION
OEM info:                Hewlett-Packard
(0)[wael@nasreddine ~]$ cat /proc/acpi/battery/BAT0/state 
present:                 yes
capacity state:          ok
charging state:          discharging
present rate:            0 mA
remaining capacity:      3136 mAh
present voltage:         12471 mV

it never hanged... I have HP Pavilion dv1000 serires

Offline

#7 2006-06-29 04:39:50

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Craptastic ACPI

because it works for you and it works for me, doesnt mean that it works for everyone. let me debug phrak and codemac's problem.

Offline

#8 2006-06-29 14:35:46

sh__
Member
Registered: 2005-07-19
Posts: 271

Re: Craptastic ACPI

Suggestion: don't read the battery status too often. Apparently it causes problems with some BIOSes.

The same can happen with temperature sensors. Conky for example has a hardcoded minimum interval for reading the /proc/acpi/* entries (for the battery it is around 30 seconds).

Offline

#9 2006-06-29 14:43:50

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: Craptastic ACPI

sh__ wrote:

Suggestion: don't read the battery status too often. Apparently it causes problems with some BIOSes.

The same can happen with temperature sensors. Conky for example has a hardcoded minimum interval for reading the /proc/acpi/* entries (for the battery it is around 30 seconds).

problem didnt occur before now, occurs now. fault in kernel, not bios, unless everyone has flashed buggy bios' in at the same time, or the kernel has been changed to be less tolerant in some form of these buggy bios.

another question to those with the problem, can you access /proc/acpi/info and /proc/cpuinfo ?

James

Offline

#10 2006-06-29 15:47:25

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Craptastic ACPI

Ok, I'm too lazy to 'quote' everything.

a) acpid: Is not needed.  It allows the kernel to react to power events, which I'm not doing.
b) acpi: small app, about 500LOC.  It just reads the values from /proc/acpi.  It hangs as well.

This is a filesystem bug first and foremost.  The /proc/acpi filesystem is an in kernel VFS.  When you "read" a file, it calls something internally.  It just so happens that this functionality blocks and never returns.  I will investigate if I have time.

I did, however, notice a few things in dmesg, but my laptop is now in the shop.

@iphitus - cpuinfo is fine, No idea about /proc/acpi/info.  I know for a fact battery and themal info take a crap.
Somewhere someone mentioned reading /proc/acpi/power_something/* instead of /proc/acpi/battery/*, but that's a work-around, not a fix.

Offline

#11 2006-06-29 15:52:49

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: Craptastic ACPI

sh__ wrote:

Suggestion: don't read the battery status too often. Apparently it causes problems with some BIOSes.

The same can happen with temperature sensors. Conky for example has a hardcoded minimum interval for reading the /proc/acpi/* entries (for the battery it is around 30 seconds).

Interesting.  I run these things at 10 second intervals, both battery and thermal info.  When I get my laptop back, I will switch to 30 second intervals and see what happens.

Offline

Board footer

Powered by FluxBB