InfiniteMac OSx86

InfiniteMac OSx86 (
-   10.X (
-   -   Various DSDT mods. (

pentiumpc 01-19-2009 06:09 AM

Various DSDT mods.
There are many threads on installing OS X with DSDT override, if you do that you can mod it to fix and activate some features.

Things you can do/fix.
1. Activate the PWRB - Power button.
2. fix the blank display on System Wake.
3. Activate Clamshell sleep with Clamshell.kext. (superhai depreciating it)
4. Activate the ASUS Hotkeys.

Unconfirmed fix.
1. USB sleep issue. (works on my 1000H but not on my DS3L.)

that is generally what I found out last weekend, if you have more to share please feel free to chip in.
All these tested working on my systems, you will have to try if you don't have the same specs as me.
You can use this finds as a reference for your own fix.

pentiumpc 01-19-2009 06:18 AM

Activate your Power button.
1 Attachment(s)
change _HID to _CID

Device (PWRB)
Name (_HID, EisaId ("PNP0C0C")) ---> Name (_CID, EisaId ("PNP0C0C"))
Name (_UID, 0xAA)
Name (_STA, 0x0B)

This one I got it off some site, cannot remember where. (credit goes to him/her)
This will activate your power button to bring up the shutdown menu.

pentiumpc 01-19-2009 06:38 AM

Fix blank screen on wake..
On the 1000H, the screen is blank on wake, you will need to press the brightness key to turn it on. Current fix is to use Sleep watcher and Reggie to write direct to turn it on.

By modding the DSDT to set brightness, you can fix this issue.

Method (WAK, 1, NotSerialized) //WAKE up
\_SB.PCI0.SBRG.EC0.EC0W (Arg0)
\_SB.PCI0.NWAK (Arg0)
LPWK (Arg0)
Store(\_SB.ATKD.PBLG(),local0) //---> Get Brightness level from NVS
\_SB.ATKD.PBLS(local0) //---> Set Brightness level.


Add the 2 red lines to reset the brightness on wake.

Your Method name might be different on your system, look for something similar.
you also need to find out which method to get and set brightness.
can be used for some other issue.

pentiumpc 01-19-2009 06:53 AM

Clamshell sleep.
Most portable system don't sleep on closing the LID, I tried to find a DSDT fix for it but cannot find it. (google is my best friend.) so I wrote 1 to fix my own.

If you have a better or alternative method, please let me know. Thanks.

Device (LID0)
Name (_HID, EisaId ("PNP0C0D")) //LID detection
Method (_PRW, 0, NotSerialized)
Return (Package (0x02)
Name (LIDS, One)
Method (_LID, 0, NotSerialized)
Store (^^PCI0.SBRG.EC0.SF13, LIDS) //LID register
XOr (LIDS, One, Local0)
IF (Local0) //if LID is closed
Notify (SLPB, 0x80) //Set system to sleep
Return (LIDS)

LID device should be easy to find, just need to add a line to notify the system to sleep.

On most system, (I think) depends on the OS to set the system to sleep bit OS X don't understand the notification sent by the LID device, so I did it in the hardware instead.

pentiumpc 01-19-2009 07:18 AM

activating the ASUS Hotkey.
if you look at your IOreg tree and you can see "ASUS010" or "ATKD" that mean you have a Asus hotkey device, you FN+Fx buttons will work.

you will have to find out what keys send what ACPI notifications, I made a KEXt to log and analyze the Notification code, then I look at the _GPE scope to find the corresponding interrupt. once all that is mapped out, I added codes to to toggle functions to turn on and off.

now I can turn on and off , Backlight, WIFI, Bluetooth, Card reader, Webcam, adjust brightness etc. Still figuring out some functions, key switching to ext monitor, setting FSB etc.

Sample code..
Method (CAMS, 1, Serialized) //Camera Set
Return (OCMS (Arg0))

Method (CAMR, 0, Serialized) //Camera toggle : added
Store (OCMG (), Local0)
XOr (Local0, One, Local0)
Return (OCMS (Local0))

Method (CAMG, 0, Serialized) //Camera Set
Return (OCMG ())

The code above is very tell tale, it is for switching the Camera on and off.

Method (_Q2A, 0, NotSerialized) //Camera
^^^^ATKD.CAMR() //Toggle Camera
ATKN (0x1D) //notify ATKD

the interrupt handler to service the event.

pentiumpc 01-19-2009 07:28 AM

USB sleep fix
Device (HPET)
Name (_HID, EisaId ("PNP0103"))
Name (_CID, EisaId ("PNP0C01"))
Name (CRS, ResourceTemplate ()
Memory32Fixed (ReadOnly,
0xFED00000, // Address Base
0x00000400, // Address Length
OperationRegion (^LPCR, SystemMemory, 0xFED1F404, 0x04)
Field (LPCR, AnyAcc, NoLock, Preserve)
HPTS, 2,
, 5,
HPTE, 1,
Offset (0x04)

Method (_STA, 0, NotSerialized)
Return (0x0F)

Giving the HPET status a 0x0F seems to fix my USB sleep issue, loosing USB after sleep and no Hot plug on USB ports.

This is not verified, as I did not try to reproduce the problem, not on my piriority list, but my system run 10.5.6 vanilla, with Decrypter, AnV SMBIOS, PS2nub and Controller and openhalt.

No IOUSB fixes. ( it crash my system.)

Update -- this is fixed by DSDT Patcher with -newHPET option. no need Disabler after the patch.

Slither2008 03-03-2009 04:29 AM

Hi pentiumpc,

I've been looking through my Asus EeePC 1000H dsdt.aml and am trying to understand the _SB methods better.

Does this sound right ?

Method - Description

PBL (S/G) = BackLight
CAM (S/G) = Camera
CRD (S/G)= Card Reader
WLD (S/G) = Wireless Lan Set / Get
CFV (S/G) = FSB Speed & Voltage Set / Get
CAM (S/G) = Camera Set / Get
BTH (S/G) = BlueTooth Set / Get
SDSP = Switch/Swap Display
CRD (S/G) = Card Reader Set / Get
HDPS = ???
PBP (S/G) =
M3G (S/G) = Mobile 3G
HWCF = ??
GNVS = Get Volume (I'm sure this is wrong. Probably gets and sets memory references???)
SNVS = Set Volume (I'm sure this is wrong. Probably gets and sets memory references???)

I've managed to get the Camera, Bluetooth to turn of using the spare Fn key (0x1d). I tried to get the wifi working but I noticed the method call is a little more complex than a simple ATKN(value).

It appears to have some logic in it to determine which value to pass 0x11 or 0x10. I can only get it to turn off and then it will not turn on (my logic is missing probably).

I can also confirm that the Asus Test kext you made registers all buttons correctly except the Wifi Off Fn key says something about an unmapped method and then I get messages about either the Bluetooth of Wifi failing to go into powersave state. As soon as I press the Wifi Fn key again the messages stop.

What are your thoughts on this?



Slither2008 03-03-2009 04:36 AM

Here are a copy of the event codes I'm going off.

# Silver buttons
KEY_SILVER1="0000001a" # Blank
KEY_SILVER2="0000001b" # Change resolution
KEY_SILVER3="0000001c" # User 1
KEY_SILVER4="0000001d" # User 2

# Fn+F? combination
KEY_Fn_F1="00000080" # Sleep
KEY_Fn_F2=("00000010" "00000011") # Wifi toggle
KEY_Fn_F5="0000002*" # Brightness down
KEY_Fn_F6="0000002*" # Brightness up
KEY_Fn_F7="00000016" # Backlight off
KEY_Fn_F8=("00000030" "00000031" "00000032") # XRandR
KEY_Fn_F9="00000012" # Task Manager
KEY_Fn_F10="00000013" # Mute
KEY_Fn_F11="00000014" # Volume Down
KEY_Fn_F12="00000015" # Volume Up

# Other ACPI events

If you wanted to try and make custom FN keys out of F3 and F4 I think acpi_listen in linux might be the best bet to get those codes.

I'm still trying to understand why the Volume keys functions aren't as easy to spot in the dsdt.

pentiumpc 03-03-2009 02:24 PM

FN+F1 don't return any code.. notify SLPB 0x80 will put the system to sleep.
FN+F5,FN+F6 will return between 0x20 to 0x2F = 15 steps of brightness.
FN+F8 return the next display code, LCD, EXT VGA or both spanning.
AC power return 0x50
Batt return 0x51

most of these keys needs a driver to drive it.

I am swamped with my day job, thus have to stop development of the driver I am working on.
I have 1 on beta, feel free to try it.

ASUS hotkey enabler.

this package consist of various solution to enable the hotkeys, removes the need for sleepwatcher, sets FN+F1 to deep sleep and lid to doze.
you can customize most of the Keys to run scripts by changing the values in the plist. have been using it for a while on my system, works reasonably well.

Please backup your "DSDT.aml" before you install it.

pentiumpc 03-03-2009 02:35 PM


Originally Posted by Slither2008 (Post 23184)

Method - Description

CFV (S/G) = FSB Speed & Voltage Set / Get

SDSP = Switch/Swap Display
HDPS = ???
PBP (S/G) =
HWCF = ??
GNVS = Get Volume (I'm sure this is wrong. Probably gets and sets memory references???)
SNVS = Set Volume (I'm sure this is wrong. Probably gets and sets memory references???)

CFV = Set FSB only.. nothing to do with Voltage.
HDP/PBP = set LCD, ext monitor or both. can set but need to refresh mac resolution to get to work. very messy.
HWCF unknown.
G/S NVS .. Get or set NVS =Non Volatile SRAM.. (BIOS I think)

BIOS method return the current bios ver.
INIT intialised the ATKD (must excute to get keycode returns)

Hope this helps..

IPIS is logging me out from my internet at home have not time to do it in the office,so can't post there. please help the repost my pkg there if you can.. thanks.