[ltp] FIXED (but still need debug help): tpb/nvram bewilderment

Richard Neill linux-thinkpad@linux-thinkpad.org
Tue, 18 Jul 2006 03:08:23 +0100


Daniel Maier wrote:
> On Mon, Jul 17, 2006 at 04:49:00AM +0100, Richard Neill wrote:
> 
>>Aargh! even doing "acpi -V"  messes it up. No need to blame the battery 
>>meter.
>>
>>if you do:
>>  cat /proc/acpi/battery/BAT0/state
>>without first having pressed one of the buttons (volume or Fn-Fx), then
>>it will kill off any further use of ACPI or nvram.
>>
>>It seems that you must do a "hardware write" (press a button) to acpi 
>>before doing a "software read". (of the battery status)
> 
> I have noticed on my T22 that polling /proc/acpi/ makes 1. acpi
> events die and 2. /dev/nvram die. The Fn/volume stuff still workes,
> as its done in hardware.
> 

If you cold-boot, then press Fn-F12, and only then read from proc/acpi, 
does the nvram still work?

Interestingly:

    kernel 2.6.12 -> works
    kernel 2.6.16.20, 2.6.17.1 -> fail.


I've filed this as a kernel bug:
http://bugzilla.kernel.org/show_bug.cgi?id=6847


Lastly, as a workaround, do you know of any tasbar battery meter which 
runs in its own process, and can be invoked from a shell? KDE's one is 
no good, since it starts by default, before I can get to the Fn-F12 key.

Regards,

Richard