Skip to contentSkip to conversation

Problem with reading /proc/acpi/battery/BAT1/info

DISCUSSION Hanno B�ck 2 participants 2 messages Nov 18, 2002 1 message not in the archive ACPI

lore
Share & tools
lore
#0 lore raw

There seems to be a problem that on some laptops, reading /proc/acpi/battery/BAT1/info
takes very long and freezes the system in that time.

This is a problem with the gnome battery applet (battstat). See bug:
http://bugzilla.gnome.org/show_bug.cgi?id=88553

Quoted 4 lines

Reading /proc/acpi/battery/BAT1/info freezes my laptop (Dell Inspiron 8k, BIOS A19) for some milliseconds every time battstat-applet-2 updates its view, so I patched acpi-linux.c that it would only read this file once.

As people reported to me, this also happens with the latest ACPI-Patch.
Is this an issue that can be fixed on the kernel-side? This would help us a lot, because all workarounds we have would introduce new problems.

cu,

Hanno Boeck

-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing your web site with SSL, click here to get a FREE TRIAL of a Thawte Server Certificate: http://www.gothawte.com/rd524.html

#2 lore raw
In reply to a message not in the archive
Quoted 7 lines · Hanno Böck

There seems to be a problem that on some laptops, reading /proc/acpi/battery/BAT1/info
takes very long and freezes the system in that time.

This is a problem with the gnome battery applet (battstat). See bug:
http://bugzilla.gnome.org/show_bug.cgi?id=88553

Quoted 8 lines
Quoted 4 lines

Reading /proc/acpi/battery/BAT1/info freezes my laptop (Dell Inspiron 8k, BIOS A19) for some milliseconds every time battstat-applet-2 updates its view, so I patched acpi-linux.c that it would only read this file once.

As people reported to me, this also happens with the latest ACPI-Patch.
Is this an issue that can be fixed on the kernel-side? This would help us a lot, because all workarounds we have would introduce new problems.

Anyway, polling /proc/acpi/battery/*/info is IMHO a bad idea. You should read those files at init time, then reload only when you receive notifications of batteries changes.

Well. It is 'simple' to state that, but probably harder to implement. There is actually two daemons (acpid and ospmd, depending if you choose 'stable' wrt 'devel').
With ospmd, you should then use the library provided in order to receive the notification needed in order to reload the info files, or best use the provided library in order to get all the needed information for the batteries.

Signature · 9 lines
Ducrot Bruno
http://www.poupinou.org        Page profaissionelle
http://toto.tu-me-saoules.com  Haume page


-------------------------------------------------------
This sf.net email is sponsored by: To learn the basics of securing 
your web site with SSL, click here to get a FREE TRIAL of a Thawte 
Server Certificate: http://www.gothawte.com/rd524.html