Hi,
New to the OSX world, I was trying to understand how make my lid wake working on MSI U120.
Firstly :
In Order to activate lid sleep (clamshell closed), instead of adding the "ugly" line in LID0 device to notify SLPB, I've found that by adding the PLNF section, the sleep was working fine (without any external kext).
The Qxx Method (Q84) is called from EC when closing the clamsheel in order to notify LID0 Device that register LIDS changes. So, I think the sleep is managed by OSPM (Apple ACPI Driver)
For wake it's another question...
Investigation
I have digg on some other DSDT, some of them have more EC Register : ex: LWAK, or LSTE or other related to LID event
I've compared with a macbook DSDT, and I found that the lid device is declared under Scope SB near PNLF whereas it is declared under EC on my DSDT, I don't know if it is relevant.
(I've a collegue with a real macbook pro (6.2) with dual boot linux / osx. Lid event on up is catched under both OS)
I see somewhere else on the internet that some people on other machine, make wake working by enable the power on their firewire bus (by adding a Notify PWRB, 0x02 under GPE LXX Events), but no luck in my case
I've added to my LID0 device the _PWR and _PSW Method but no luck... The only way to wake up the machine is the PowerButton.
When defining the EC, you definied an OperationRegister Field with some registers, for example LIDS, POWS... on my MSI, and LSTE,LWAK... on the macbook.
Are theses registry in a special order ? I mean, are they wired to a specific part of the EC ? I mean, if I don't have any LWAK on it, can I add it ? or it need a EC firmware implementatoin in order to work ?
I've looked into modules and EC Firmware (64k part of the bios img) and I found theses informations :
In EC Firmware :
Code:
| KB3925 EC Debugger Ver 0.10 |
<01>IDATA (0x0000 - 0x00FF) <02>ECRamBuffer (0xF400 - 0xF4FF)
<03>GPIO (0xFC00 - 0xFC7F) <04>KBC (0xFC80 - 0xFC8F)
<05>ESB (0xFC90 - 0xFC9F) <06>IKB (0xFCA0 - 0xFCAF)
<07>PWM (0xFE00 - 0xFE1F) <08>FAN (0xFE20 - 0xFE4F)
<09>GPT (0xFE50 - 0xFE6F) <10>SDI (0xFE70 - 0xFE7F)
<11>WDT (0xFE80 - 0xFE8F) <12>LPC (0xFE90 - 0xFE9F)
<13>XBI (0xFEA0 - 0xFEBF) <14>CIR (0xFEC0 - 0xFECF)
<15>XIO (0xFED0 - 0xFEDF) <16>PS2 (0xFEE0 - 0xFEFF)
<17>EC (0xFF00 - 0xFF1F) <18>GPWU (0xFF20 - 0xFE7F)
<19>SMBus (0xFF80 - 0xFFFF) <20>Matrix (0xFD00 - 0xFDFF)
<A>Read Function <01 - 20> <Enter>
<B>Read Command <rxxxx> <Enter> (r:Read,xxxx:Address)
<C>Write Command <wxxxxdd> <Enter> (w:Write,xxxx:Address,dd:Data)
<D>Dump Command <dxx> <Enter> (d:Dump 256 bytes,xx:High Address)
and more specific :
Code:
LidChgEvent1
LID open
LID close
LidChgEvent2
LidPinTmr=1
With the datasheet of ENE3920 We got for
Code:
OperationRegion (EC, EmbeddedControl, Zero, 0x0100)
Field (EC, ByteAcc, NoLock, Preserve)
{
...
Offset (0x30),
POWS, 1,
LIDS, 1, //LID STS number : 0x30.1
...
The corresponding GPIO :
So we can see that the LIDS STS register is declared as GPIO 00~59 Event Enable and Asynchronous Wake Up Enable or maybe I am wrong...
So why it's not triggered when opening clamshell ?
Second thing, the Qxx Methodin EC (ex: MSI is Q84 for lid, Q20 on macbook), I did'nt find any information about the naming Qxx. It's too fuzy in the ACPI Spec. So how can we find that Q84 is Lid, QBD is FNF12..... I thought it was in the EC datasheet but I can't figure out where.
Here are the summ-up'ed questions :
1° Is the location of LID0 device relevant (under \_SB or under EC)
2° Are the EC Register tied to the EC firmware or hardware ? (Why I can't find LWAK on mine, could it be added by hand)
3° When defining Qxx method under EC, what the xx refer to ? (I known for Lxx,Exx,Cxx when using GPE but I don't find under EC as it can'nt use GPE events)
So I need someone to digg on this case, and share knowledge (I'm' pretty confortable with ACPI Spec Right Now - thanks to Preview on OSX with bookmark and Higlight)
Thanks a lot for any information you can share with me