Question about DSDT hack
Hi,
as reported a few weeks ago on this list, when my nc6000 resumes from sleep I don't get events for battery or AC adapter insertion/removal. This means that if I suspend on AC power and resume on battery I don't know how much the laptop is going to live unless I reload the battery and ac modules.
I have traced this to the _WAK function in my DSDT, which, among other things, does the following:
Quoted 9 lines
Store (\_SB.C044.C057.C0E7.C127 (), Local2)
\_SB.C044.C057.C0E7.C0EC (0x03, 0xFF)
Store (\_SB.C044.C057.C0E7.C0ED (), Local1)
Store (\_SB.C044.C057.C0E7.C127 (), Local3)
XOr (Local2, Local3, Local3)
If (Local3)
{
Notify (\_SB.C134, 0x80)
}C134 is the AC adapter, C136 and C137 are the battery slots. As can be seen from the above code, ACPI does nothing at all about the batteries and only notifies the AC adapter event if some complicated condition occurs. Hacking blindly, I changed the last few lines to the following:
Quoted 4 lines
XOr (Local2, Local3, Local3)
Notify (\_SB.C134, 0x80)
Notify (\_SB.C136, 0x80)
Notify (\_SB.C137, 0x80)which unconditionally notifies battery and AC adapter events. It seems to work OK, but I haven't the faintest idea what the original code is trying to do or even what the new code does (for example, what does the 0x80 do?). Is there someone who can explain it to me?
Further debug info: my DSDT is attached, and this is what I see in /proc/acpi:
Quoted 10 lines
flyingsaucer:/proc/acpi# ls ac_adapter/ battery/ button/ embedded_controller/ fan/ power_resource/ ac_adapter/: C134battery/:
C136 C137button/:
lid power sleep
Quoted 8 lines
embedded_controller/:
C0E7fan/:
C20F C210 C211 C212power_resource/:
C0E6 C13D C16D C184 C18B C195 C20B C20C C20D C20E
Any pointers appreciated. :)
Thanks,
Lorenzo
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click