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

Richard Neill linux-thinkpad@linux-thinkpad.org
Mon, 17 Jul 2006 04:49:00 +0100


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)

!!

Richard



Richard Neill wrote:
> This is a *really* odd problem.
> I found the workaround quite by accident:
> 
> Discovery #1)
>   Cold-Boot -> KDE   = fail
>   But Cold Boot -> ICEWM -> Logout -> KDE = OK
> 
> Leading....e.v.e.n.t.u.a.l.l.y...to the discovery that
> it is the KDE Battery meter which is to blame!
> 
> This is the klaptop batt meter - without any of the ACPI extras (power 
> profiles, cpu throttling etc) enabled.
> 
> In the broken state, `cat /dev/nvram` does not change in response to any
> of the button presses. Furthermore, echo -n "on" > /proc/acpi/ibm/light
> also fails. A cold boot is required to re-initialise it.
> 
> The important test case is this:
> 
> a)Cold boot (kernel 2.6.17); Start KDE; Start KDE batt monitor
>     => nvram is unusable, writes to /proc/acpi/ibm fail
> 
> b)Cold boot; start kde; ACPI read; ACPI write;
> THEN start KDE batt monitor
>     => all OK.
> 
> 
> By ACPI Read; ACPI write, I use "Press the Fn-f12 button, in response to 
> which acpid flashes the thinklight". The physical button press is required!
> 
> Any ideas why this might be?
> 
> Also, is there another battery meter which isn't the KDE one, but which 
> will go in the systray?  Or how to start KDE's batt monitor from a 
> shell-script rather than kcontrol?
> 
> Thanks for your help,
> 
> Richard
> 
> 
> 
> Richard Neill wrote:
> 
>> Dear All,
>>
>> This seems rather odd. Somehow, tpb (on an X20) has stopped working.
>> (I've already tried rebooting) - although it worked fine a few days 
>> ago. Yes, I have been reconfiguring quite a bit, but nothing as 
>> dramatic as a new kernel. I wonder whether anyone has any suggestions.
>>
>>   Observations:
>>
>> 1)/dev/nvram is still there, with correct permissions (same as on a 
>> working A22p)
>>
>> 2)tpb is totally dead, although things like Fn-PgUp for the thinklight 
>> still work fine.
>>
>> 3)Volume up/down don't work any more for volume level - although they 
>> do work  for unmute. Volume mute works fine. In either case, there is 
>> a 1 second delay.
>>
>> 4) watch --differences=cumulative -n 0 xxd /dev/nvram
>> does not show anything (on the X20, although it does on the A22p).
>>
>> Has anyone seen this before?  I'm sure it's my fault for breaking it - 
>> but I can't see what I did.
>>
>> Thanks,
>>
>> Richard
>>
>>
>>
> 

-- 
rn214@hermes.cam.ac.uk  **  http://www.richardneill.org
Richard Neill, Trinity College, Cambridge, CB21TQ, U.K.