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. |
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. http://www.infinitemac.com/attachmen...1&d=1232342192 |
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) \_SB.PCI0.SBRG.SWAK (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. |
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) { 0x0B, 0x04 }) } 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. |
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. |
USB sleep fix
Device (HPET)
{ Name (_HID, EisaId ("PNP0103")) Name (_CID, EisaId ("PNP0C01")) Name (CRS, ResourceTemplate () { Memory32Fixed (ReadOnly, 0xFED00000, // Address Base 0x00000400, // Address Length _Y03) }) 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. |
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? Regards, Steve. |
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 POWER_AC="00000001" POWER_BAT="00000000" 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. |
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. |
Quote:
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. |
Hi pentiumpc,
Thanks for the information and sharing your beta fn key driver. I'll go and post some information/guide up on ipis about all this. Regards, Steve. |
Thread for applying your fixes :
http://ipis-osx.wikidot.com/forum/t-...dt#post-403326 Thread for your exprimental kext : http://ipis-osx.wikidot.com/forum/t-...er#post-403338 |
Hi pentiumpc,
I'd be intersted in trying to offer my programing skills towards your kext. Would you be willing to share your source for your experimental kext please? Regards, Steve. |
I've made up a skeleton kext that has a basic WorkLoop.
The kext inits, probes, finds and matches the ATKD device nub and then enters my start() I'm having issues adding an IOInterruptEventSource. I've declared it in the start() like so : interruptSrc = IOInterruptEventSource::interruptEventSource( (OSObject*)this, OSMemberFunctionCast( IOInterruptEventAction, this, &com_ipis_driver_AsusFNKeys::interruptOccurred ), (IOService*)provider, (int)0); I have a test in place to report an error if it's not added to the WorkLoop but as soon as I start up the kext I get KP. I've tested that it is the interrupt event source causing the issue by removing the above code reducing the kext to a really bare template/skeleton and this allows the driver to load correctly. If you could point me in the right direction I'd appreciate it. |
Hi! How the things going?
I want to make some more improvements to 1000H DSDT and need assistance. The first question is about PS2 controller(doublepost on http://www.insanelymac.com/forum/ind...&#entry1131277 ): We all using the code Code:
Device (PS2K) http://www.insanelymac.com/forum/upl...1239605847.jpg and another info - log from open bsd booting Code:
ichpcib0 at pci0 dev 31 function 0 "Intel 82801GBM LPC" rev 0x02: PM disabled And the second question concern the Wakeup on clamshell open function. Any1 try to made it? |
Still no answers, very sad.
Meanwhile i'll make my own DSDT based on the fixes above and my own fixes. Now, my system works and sleeps perfect under 10.5.6. But, Fn key fixes still works buggy for me. I'm still looking for more improvements for 1000H DSDT. For instance, i dreaming about clamshell wakeup. Any ideas? |
Hi,
I would like to know where and how can I set the FSB to run these settings: FSB=54 PCIE=176 That's to get a frequency of 1,9Mhz on my 1000h eeepc, and thus to overclock it the same way as I do under XP with eeectl. Thanks a lot. :) |
Someone here?
|
got some stuff from insanely , but i think it would look nice in this collection
fixing sleep mode with the _WAK method information about the _WAK method. Arguments: 0 The value of the sleeping state (1 for S1, 2 for S2, and so on). Result Code (2 DWORD package): Status Bit field of defined conditions that occurred during sleep. 0x00000000 Wake was signaled and was successful 0x00000001 Wake was signaled but failed due to lack of power. 0x00000002 Wake was signaled but failed due to thermal condition. Other Reserved PSS If non-zero, the effective S-state the power supply really entered. This value is used to detect when the targeted S-state was not entered because of too much current being drawn from the power supply. OK, so the _WAK method accepts one argument, which is the number of the sleep state that was requested. It returns its result as a package of 2 DWORDs. The first value is a code that tells whether the wake was successful (0 on success, nonzero on failure) and, if not, why. The second value is also zero on success and on failure returns the value of the sleep state that was actually entered. So basically, it's a success/failure code. The first argument of the package declaration specifies the number of elements in the package, and the second is the package itself. So, the declaration above simply defines a two element package, where each of the elements is zero. This is necessary because the spec requires that the _WAK method return two values. So, what this really boils down to is a dummy return value that satisfies the spec (thus eliminating the warnings), but doesn't really do anything. It just always returns a success condition. Fixing sleep mode. Look for: _WAK CODE Method (_WAK, 1, NotSerialized) { Store (0xFF, DBG1) If (LEqual (Arg0, 0x03)) { Store (0x8F, SCP) } If (LEqual (Arg0, 0x04)) { If (LEqual (OSFL, Zero)) { If (LEqual (OSFX, 0x03)) { Store (0x59, SMIP) } Else { Store (0x58, SMIP) } } If (LEqual (OSFL, One)) { Store (0x56, SMIP) } If (LEqual (OSFL, 0x02)) { Store (0x57, SMIP) } If (LEqual (OSFX, 0x03)) { Store (0x59, SMIP) } } If (LEqual (Arg0, One)) {} If (OSFL) { Notify (\_SB.PWRB, 0x02) } Else { If (LEqual (RTCW, Zero)) { Notify (\_SB.PWRB, 0x02) } } Notify (\_SB.PCI0.USB0, Zero) Notify (\_SB.PCI0.USB1, Zero) Notify (\_SB.PCI0.USB2, Zero) Notify (\_SB.PCI0.USB3, Zero) Notify (\_SB.PCI0.USB4, Zero) Notify (\_SB.PCI0.USB5, Zero) Return(Package(0x02){0x00, 0x00}) <------ Add here. Edit dsdt_fixed.txt before compiling } |
Backlight control
Another nice thing to add in your laptop DSDT: (Under _SB) CODE Device (PNLF) { Name (_HID, EisaId ("APP0002")) Name (_CID, "backlight") Name (_UID, 0x0A) Name (_STA, 0x0B) } Might help you in loading the backlight control |
Hum... none of you guys can reply to my question?
|
Fixing sleep and usb after wake up
I finally fixed sleep on my lappie! The problem was on USB.... The fix is simple, same as for WAK method: If u look on DSDT under all USB entry u will see: QUOTE Method (_PRW, 0, NotSerialized) { Return (GPRW (0xYZ, 0xYZ)) } Now search for Method (GPRW.... and change on the end that: Return (PRWP or whatever u have) to: CODE Return (Package (0x02) { Zero, Zero }) Still i have to use modded kexts for ehci/uhci w/o them my lappie still sleep fine but on wake I lose UHCI devices(BT and fingerprint sensor) About EHCI kext fixed, I really hate those ownership debug message, dunno why most of the dev's like to add that crap debug on kexts, imo is easy to do 2 ver. normal/debug or to add a bolean in plist to enable/disable that feature... L.E. Thanks a lot Slice for the edited versions of the kexts me and my system log are very happy BTW I'm still waiting for some answers about those USB fixes, since your sources are not available dunno what really does your kexts, maybe we can add those fixes on DSDT, or at least we can try... L.L.E Last night I forgot(tired) to tell about: Device (PWRB)...e.g PoWeRButton I noticed that is missing on my DSDT so I add it b/c on MB DSDT there are also other entry on USB devices that point to it. So if you don't have it search for : Device (SLPB) and add it over/under it, should look like this: CODE Scope (_SB) { Device (PWRB) { Name (_HID, EisaId ("PNP0C0C")) } Device (SLPB) { Name (_HID, EisaId ("PNP0C0E")) Method (_PRW, 0, NotSerialized) { Return (Package (0x02) { 0x0B, 0x04 }) } } } Now search for Method (_Lxy....) you will see all USB devices there, then under each UHCI one add Notify (\_SB.PWRB, 0x02), as for EHCI entry I prted entire entry from MB, should look like this: CODE Scope (_GPE) { Method (_L03, 0, Serialized) { Notify (\_SB.PCI0.UHC1, 0x02) Notify (\_SB.PWRB, 0x02) } Method (_L04, 0, Serialized) { Notify (\_SB.PCI0.UHC2, 0x02) Notify (\_SB.PWRB, 0x02) } Method (_L0C, 0, Serialized) { Notify (\_SB.PCI0.UHC3, 0x02) Notify (\_SB.PWRB, 0x02) } Method (_L0E, 0, Serialized) { Notify (\_SB.PCI0.UHC4, 0x02) Notify (\_SB.PWRB, 0x02) } Method (_L05, 0, Serialized) { Notify (\_SB.PCI0.UHC5, 0x02) Notify (\_SB.PWRB, 0x02) } Method (_L0D, 0, Serialized) { If (\_SB.PCI0.EHC1.PMES) { Store (0x01, \_SB.PCI0.EHC1.PMES) Notify (\_SB.PCI0.EHC1, 0x02) Notify (\_SB.PWRB, 0x02) } If (\_SB.PCI0.EHC2.PMES) { Store (0x01, \_SB.PCI0.EHC2.PMES) Notify (\_SB.PCI0.EHC2, 0x02) Notify (\_SB.PWRB, 0x02) } } The entry on EHCI one seems to fix sleep on it so no more need for ehcisleepenabler, at least for me. BTW if you have HDEF on those methods remove it, or it could broke your sleep! Another tip, if you like as example to wake your notebook/desktop using mouse or keyboard, identify what USB port it use(from ioreg) and on DSDT change on that USB entry PWRB to SLPB Enjoy! |
I just got my power button to show logout box when pressed:
CODE Device (PWRB) { Name (_HID, EisaId ("PNP0C0C")) } I just changed _HID to _CID. |
A guide on how to fix audio via dsdt
Audio should not be so complicated, having to use another extension to load information into the system makes no sense when most of you are already using a device-property string for graphics or using a modified DSDT so you may as well save resources. HDAEnabler.kext and/or ALCinject.kext are not required to make audio work properly. What is needed is AlainTox714's AppleHDA.kext and the following 3 peices of information: layout-id codec-id PinConfigurations You can do it through a device-property string or through DSDT (this can yield a better result). I've tried both methods and they yielded working audio, but the DSDT solution seems to be more ACPI compliant. You can make the PinConfigurations data if you have the ConfigData in the /System/Library/Extensions/AppleHDA.kext/Contents/PlugIns/AppleHDAController.kext/Contents/Info.plist file. (you only need the last bite from each segment) <00a71c1f 00a71d40 00a71e21 00a71f02 00b71c40 00b71d90 00b71ea1 00b71f02 00c71c2e 00c71d30 00c71e81 00c71f01 00d71c10 00d71d40 00d71e11 00d71f01 00e71c20 00e71d90 00e71ea1 00e71f01 00f71c12 00f71d10 00f71e11 00f71f01 01071c11 01071d70 01071e11 01071f01 02171c50 02171d21 02171e45 02171f01> Another solution is to search the codec file for lines that contain [Jack], take the hex values and reverse the order, order them by their node number. CODE Codec: SigmaTel STAC9274D Address: 2 Vendor Id: 0x83847621 Subsystem Id: 0x80860419 Revision Id: 0x100201 Default PCM: rates 0x7e0, bits 0x0e, types 0x1 Default Amp-In caps: ofs=0x00, nsteps=0x0e, stepsize=0x05, mute=0 Default Amp-Out caps: ofs=0x7f, nsteps=0x7f, stepsize=0x02, mute=1 Node 0x0a [Pin Complex] wcaps 0x400181: Stereo Pin Default 0x0221401f: [Jack] HP Out at Ext Front Conn = 1/8, Color = Green becomes 1f402101 00a71c1f 00a71d40 00a71e21 00a71f02 Node 0x0b [Pin Complex] wcaps 0x400181: Stereo Pin Default 0x02a19040: [Jack] Mic at Ext Front Conn = 1/8, Color = Pink becomes 4090a102 00b71c40 00b71d90 00b71ea1 00b71f02 Node 0x0c [Pin Complex] wcaps 0x400181: Stereo Pin Default 0x0181302e: [Jack] Line In at Ext Rear Conn = 1/8, Color = Blue becomes 2e308101 00c71c2e 00c71d30 00c71e81 00c71f01 Node 0x0d [Pin Complex] wcaps 0x400181: Stereo Pin Default 0x01114010: [Jack] Speaker at Ext Rear Conn = 1/8, Color = Green becomes 10401101 00d71c10 00d71d40 00d71e11 00d71f01 Node 0x0e [Pin Complex] wcaps 0x400181: Stereo Pin Default 0x01a19020: [Jack] Mic at Ext Rear Conn = 1/8, Color = Pink becomes 2090a101 00e71c20 00e71d90 00e71ea1 00e71f01 Node 0x0f [Pin Complex] wcaps 0x400181: Stereo Pin Default 0x01111012: [Jack] Speaker at Ext Rear Conn = 1/8, Color = Black becomes 12101101 00f71c12 00f71d10 00f71e11 00f71f01 Node 0x10 [Pin Complex] wcaps 0x400181: Stereo Pin Default 0x01117011: [Jack] Speaker at Ext Rear Conn = 1/8, Color = Yellow becomes 11701101 01071c11 01071d70 01071e11 01071f01 Node 0x21 [Pin Complex] wcaps 0x400301: Stereo Digital Pin Default 0x01452150: [Jack] SPDIF Out at Ext Rear Conn = Optical, Color = Grey becomes 50214501 02171c50 02171d21 02171e45 02171f01 Using the PinConfigurations data you can convert it for your device-property string XML file using the following command: CODE echo "1f4021014090a1022e308101104011012090a101121011011 170110150214501" | xxd -r -p | openssl enc -base64 This gave me CODE H0AhAUCQoQIuMIEBEEARASCQoQESEBEBEXARAVAhRQE= for my BadAxe2 (STAC9274D) Find the slot holding the audio hardware CODE gfxutil -f HDEF; # if that fails try AZAL in place of HDEF For the BadAxe2 that gave me CODE DevicePath = PciRoot(0x0)/Pci(0x1b,0x0) I added the following to my XML file and then regenerated my string using gfxutil: (gfxutil -s -v -n -i xml -o hex in.plist out.hex) CODE <key>PciRoot(0x0)/Pci(0x1b,0x0)</key> <dict> <key>PinConfigurations</key> <data> H0AhAUCQoQIuMIEBEEARASCQoQESEBEBEXARAVAhRQE= </data> <key>codec-id</key> <string>0x83847683</string> <key>layout-id</key> <string>0x04000000</string> </dict> What would be nice is a script or program that gives you the PinConfigurations data by dropping the codec on it. In the end I chose to do my BadAxe2 in DSDT only because I'm already doing so much in it that the few extra bytes didn't hurt and saved me loading another kext that isn't really needed. You can achieve this if you meet the following criteria you currently use HDAEnabler.kext or ALCinject.kext you use AppleHDA.kext you have (or can get) the three pieces of required information about your audio hardware and the modified AppleHDA.kext it needs You can do it in a device-property string or in DSDT, the DSDT method is by far better, here's the PinConfigurations details for the BadAxe1 which uses the STAC9221D A2 (what I cam currently working on) so I can finish off my DSDT work and release the DSDT's or at least the relevant sections. BadAxe1: CODE | | +-o HDEF@1B <class IOPCIDevice, registered, matched, active, busy 0, retain 8> | | | | { | | | | "IOPCIResourced" = Yes | | | | "IOInterruptControllers" = ("io-apic-0","IOPCIMessagedInterruptController") | | | | "IOName" = "pci8086,27d8" | | | | "subsystem-id" = <17040000> | | | | "IODeviceMemory" = (({"address"=18446744073225109504,"length"=16384}) ) | | | | "class-code" = <00030400> | | | | "revision-id" = <01000000> | | | | "assigned-addresses" = <10d8008200000000000020e30000000000400000> | | | | "built-in" = <00> | | | | "acpi-device" = "IOACPIPlatformDevice is not serializable" | | | | "name" = "pci8086,27d8" | | | | "acpi-path" = "IOACPIPlane:/_SB/PCI0@0/HDEF@1b0000" | | | | "subsystem-vendor-id" = <86800000> | | | | "reg" = <00d800000000000000000000000000000000000010d800020 000000000000000000000000040 000> | | | | "compatible" = <"pci8086,417","pci8086,27d8","pciclass,040300" > | | | | "PinConfigurations" = <104021021010010120308101104001012190a101116001013 0214501> | | | | "layout-id" = 2 | | | | "IOPCIExpressLinkCapabilities" = 0 | | | | "IOPowerManagement" = {"ChildrenPowerState"=2,"CurrentPowerState"=2} | | | | "IOInterruptSpecifiers" = (<1600000007000000>,<0400000000000100>) | | | | "device-id" = <d8270000> | | | | "vendor-id" = <86800000> | | | | "device_type" = <"STAC9221A2"> | | | | "codec-id" = 2206496387 | | | | "IOPCIExpressLinkStatus" = 0 | | | | } BadAxe2: CODE | | +-o HDEF@1B <class IOPCIDevice, registered, matched, active, busy 0, retain 8> | | | | { | | | | "IOPCIResourced" = Yes | | | | "IOInterruptControllers" = ("io-apic-0","IOPCIMessagedInterruptController") | | | | "IOName" = "pci8086,27d8" | | | | "layout-id" = <04000000> | | | | "subsystem-id" = <19040000> | | | | "IOPCIExpressLinkCapabilities" = 0 | | | | "IODeviceMemory" = (({"address"=18446744073226158080,"length"=16384}) ) | | | | "class-code" = <00030400> | | | | "IOPowerManagement" = {"ChildrenPowerState"=2,"CurrentPowerState"=2} | | | | "revision-id" = <01000000> | | | | "IOInterruptSpecifiers" = (<1600000007000000>,<0200000000000100>) | | | | "assigned-addresses" = <10d8008200000000000030e30000000000400000> | | | | "built-in" = <00> | | | | "acpi-device" = "IOACPIPlatformDevice is not serializable" | | | | "device-id" = <d8270000> | | | | "vendor-id" = <86800000> | | | | "acpi-path" = "IOACPIPlane:/_SB/PCI0@0/HDEF@1b0000" | | | | "subsystem-vendor-id" = <86800000> | | | | "name" = "pci8086,27d8" | | | | "IOPCIExpressLinkStatus" = 0 | | | | "reg" = <00d800000000000000000000000000000000000010d800020 000000000000000000000000040 000> | | | | "compatible" = <"pci8086,419","pci8086,27d8","pciclass,040300" > | | | | "PinConfigurations" = <1f4021014090a1022e308101104011012090a101121011011 170110150214501> | | | | "codec-id" = 2206496289 | | | | } You don't believe audio can work without HDAEnabler.kext or ALCinject.kext, do it as a device-property string or better, do it in DSDT. |
Here's the basic code, I provide two example sections of code, one for the BadAxe1 and the second for the BadAxe2, don't use both sections.
AUDIO IN DSDT: CODE __________________________________________________ ____________ // this goes near the beginning of your DSDT (right after Method (_WAK, 1, Serialized) Method (DTGP, 5, NotSerialized) { If (LEqual (Arg0, Buffer (0x10) { /* 0000 */ 0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44, /* 0008 */ 0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B })) { If (LEqual (Arg1, One)) { If (LEqual (Arg2, Zero)) { Store (Buffer (One) { 0x03 }, Arg4) Return (One) } If (LEqual (Arg2, One)) { Return (One) } } } Store (Buffer (One) { 0x00 }, Arg4) Return (Zero) } __________________________________________________ ____________ // change all occurrences of AZAL to HDEF __________________________________________________ ____________ // example for BadAxe1 (with comments) __________________________________________________ ____________ // this goes at end of Device (HDEF) // BadAxe1 (D975XBXLKR) Method (_DSM, 4, NotSerialized) { Store (Package (0x08) { "codec-id", Buffer (0x04) { 0x83, 0x76, 0x84, 0x83 // the hex codec ID (reverse order) }, "layout-id", Buffer (0x04) { 0x02, 0x00, 0x00, 0x00 // the hex layout ID (reverse order) }, "device_type", Buffer (0x16) // the hex count + 1 for null terminated ascii string { "SigmaTel STAC9221D A2" // the string identifier }, "PinConfigurations", Buffer (0x1C) // the actual hex count { /* the PinConfigurations data as it appears. /* 0000 */ 0x10, 0x40, 0x21, 0x02, 0x10, 0x10, 0x01, 0x01, /* 0008 */ 0x20, 0x30, 0x81, 0x01, 0x10, 0x40, 0x01, 0x01, /* 0010 */ 0x21, 0x90, 0xa1, 0x01, 0x11, 0x60, 0x01, 0x01, /* 0018 */ 0x30, 0x21, 0x45, 0x01 /* one entry seems missing */ } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) } __________________________________________________ ____________ // example for BadAxe2 __________________________________________________ ____________ // this goes at end of Device (HDEF) // BadAxe2 (D975XBX2KR) Method (_DSM, 4, NotSerialized) { Store (Package (0x08) { "codec-id", Buffer (0x04) { 0x21, 0x76, 0x84, 0x83 // the hex codec ID (reverse order) }, "layout-id", Buffer (0x02) { 0x04, 0x00, 0x00, 0x00 // the hex layout ID (reverse order) }, "device_type", Buffer (0x13) { "SigmaTel STAC9274D" }, "PinConfigurations", Buffer (0x20) { /* 0000 */ 0x1f, 0x40, 0x21, 0x02, 0x40, 0x90, 0xa1, 0x02, /* 0008 */ 0x2e, 0x30, 0x81, 0x01, 0x10, 0x40, 0x11, 0x01, /* 0010 */ 0x20, 0x90, 0xa1, 0x01, 0x12, 0x10, 0x11, 0x01, /* 0018 */ 0x11, 0x70, 0x11, 0x01, 0x50, 0x21, 0x45, 0x01 } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) } __________________________________________________ ____________ |
Acer hotkey enabler
Quote:
I need your help. I want to enable a couple of hotkey in OS X. These hot keys require application called "launch manager" in windows & "acer-acpi" in linux to make it operational. It control (on/off) two critical devices; wireless card & bluetooth. Fortunately, wireless card automatically turned on when my laptop boot-up. Unfortunately bluetooth is not turned on making it is not recognized or working in OS X. I hope you can help me porting "acer-acpi" to OS X. I don't have experience in driver or kernel extensions programming but I'm a quick learner. Thank you in advance. :D kizwan |
Acer-acpi
Quote:
Re: acer_acpi. My son has an acer laptop-- IIRC, same as yours-- but its hard drive is dying so I can't test it now. Anyways, the best starting place (as pentiumpc found) is superhai's AMW0.kext. But :( superhai has deleted the source from his main download page. I can't find a copy anywhere, so you'll have to PM him. -u |
Acer acpi
It may be possible to do this in the DSDT. I noticed that on my Gateway, there are a bunch of control registers defined that (I suspect) interface with hotkeys to turn on/off various functions like wireless.
Take a look at the Notify methods and see if you can spot anything that gets notified on resume from sleep. Since bluetooth will be turned off when sleeping, it will need to be turned back on if it was already on. So you miht see some logic to that effect, testing the state of a register. |
kizwan:
You should see an AMW0 device in your DSDT (see this post by Carlos, the writer of the acer_acpi implementation). My guess (without looking at your DSDT) is that the device control function keys may be implemented in DSDT block that checks whether the OS is Windows. Does your DSDT have calls that only do things if the OSI is Windows? Mine does. If so, then it may be *possible* that you can enable the Windows-specific parts, and then call into the AMW0 device defined in the DSDT from a simple kext. Perhaps that is what superhai was doing. |
Hi uman,
Sorry for late reply. I did not get any notification when somebody post a reply. :) You're right. This is what I found in my dsdt.dsl file:- Code:
Device (AMW0) Code:
Scope (_SB) I will look to my DSDT & try to modify it if possible. Thank you for your reply. :) kizwan |
You can ignore the _INI code. That's just setting the OS version so that other methods can test it and do different logic.
All you need to do is ensure that in the Device(ANW0) there isn't any Windows-specific logic going on. That way the device gets fully defined, and will be inserted into the ioreg. Using superhai's kext, you should be able to (a) hard-code the behavior you want, or (b) create a GUI like the Launch Manager for OSX that uses one of several methods for communicating with an in-kernel object (kext). If superhai's AMW0 is based off IOKIT, you can use the device interface (see here: http://gemma.apple.com/documentation...00380-BAJDAJDJ). I can try to help, but since I don't have access to an Acer now, I'm afraid I can't be of much use. If pentiumpc had released source, you could see what s/he had done, since the ASUS "ASUS010" or "ATKD" devices might be similar to Acer's AMW0 in that they are all likely based off of Microsft's WMI interface. The best guideline will be Carlos's work on acer_acpi in the Linux world. Good luck! |
Hi,
I'm an (un)happy user of Asus M50SV notebook. I have same problems with Fn stuff... For me works ootb wifi/BT F2, Sleep F1, brightness F5+F6(ambient light sensor must be disabled in win first), LCD on/off F7, on LCD/VGA switch F8 i got instant reboot and the rest of Fn/Buttons are not workimg. I tried Pentiumpc kext(pkg) but does nothing and IMO is normal since i dont have ASUS010 in my DSDT, instead i have ATK0100 under ATKD device. I modded the kext plist to match mne still no luck. :( I found a great app for win only(sad) ASUS Notebook Keys that allows you to remap Media and Fn keys, so I was able to catch those events for not working Media Buttons and Fn keys, also the SOURCE is available maybe in combination with this ACPID - acpi event daemon (for linux if someone can port it for osx) we can get them working as it should... Multimedia trackpad functions/actions still cant be catched even with this app that make me think is covered only by Synaptys driver, still a weird thing if i set on win trackpad always on multimedia mode(when external mouse is detected) light remain open on trackpad even on OS X but dosent turn off when i take out the external mouse, somehow that driver function set up an ACPI flag... I must investigate this more. Here is the list of captured events: Media player arrows keys, dosen't work: Fn +"": ->: Event: 0x41 - Fast forward <-: Event: 0x40 - Rewind ^ : Event: 0x43 - Stop v : Event: 0x45 - Play/Pause Functions (Fn + F1-F12): Fn +"": F1: Event: works - Can't capture it since it goes to sleep F2: Event: 0x5D works - WiFi/BTt switch F3: Event: 0x50 - Mail App F4: Event: 0x51 - Launch browser F5: Event: 0x2D works - Brightness control down F6: Event: 0x1E works - Brightness control up F7: Event: 0x34 works - LCD on/off F8: Event: 0x61 - LCD/VGA switch(I got instant restart when I use it) F9: Event: 0x68 - Unknown F10: Event: 0x32 - Mute F11: Event: 0x31 - Volume down F12: Event: 0x30 - Volume up Keyboard keys that dosent work (+Fn): Fn +"": T: Event: 0x99 - Modem on/off A: Event: 0x7A - Ambient light sensor C: Event: 0x8A - Unknown V: Event: 0x82 - Screen capture(I guess) Space: Event: 0x5C - Launch Power4Gear Media button key: Button 1: Event: 0x5C - same function as Fn+Space=Launch Power4Gear Button 2: Event: 0x6B - Unknown Button 3: Event: 0x5C - Unknown Button 4: Event: 0x95 - Unknown So any idea on how can I fix the remaining Fn that dosen't work? |
I will take a look at acpid.
Since I don't have and am not familiar with ASUS, I don't have any good advice, other than: 1. Look to Linux-- they're way ahead of the OSX scene. 2. I think you are right. They way to solve this beast is a general solution, like Linux has tried to do, with laptop/desktop-specific code in libraries that use the general solution. All too often this is solved by very laptop/desktop-sepcific code. The Dell Mini guys have completely hacked ApplePS2Keyboard.cpp, fixing bugs that plague other computers, but making it so Dell Mini-specific, it's useless for others. 3. Perhaps if we can get a small group of developers together that have different laptops/desktops, we can do a generic ACPI/WMI device that can be customized by different plugins, and/or user-space GUIs. |
Quote:
Fast reply! :) I just remember, Superhai told me once that ACPID has no use on OSX(smth is missing) so dont bother with it... Trust me I looked on all I found about this lappie and linux, but no help for OS X since they use diff stuff. About ApplePS2 did u tried VoodooPS2? I use it for a long time with no major bugs. I think Superhai's AMW0 is a good start, and yes it must be generic with maybe plugins for each vendor/specific stuff. AFAIK I'm not a developer, I dunno any programming language, i'm just messing with all stuff I can found using logic and deep search :P |
Quote:
Meanwhile I did try to change the AMW0.kext source code according to the Name/Method exist on my dsdt.dsl. Even though after that there are new entry for AMW0 in ioreg, the hotkey buttons still not operational. http://img268.imageshack.us/img268/3...eg9420amw0.jpg AMW0.kext still need a lot of work to be done. Maybe I can learn more from ACPI4ASUS.kext source code. Can you give me any tip on how to locate which Name/Method in dsdt.dsl that handle the operation of the hotkey buttons? I tried to compare my dsdt with MacBook3,1 dsdt but still can't figure it out yet. Am I right if I said that this function tell the wireless device to turn ON at POST? Code:
Method (LAMN, 1, NotSerialized) |
Unfortunately, I'm also learning the DSDT myself. And most manufacturers don't document anything about the devices or their methods. It's mainly error and trial, I'm afraid.
Could you send me the AMW0.kext? I could play around with it after I finish my SD card driver-- assuming my son's Acer gets fixed. |
Umm. The source of the AMW0 kext. Thanks.
|
Quote:
http://www.superhai.com/xdarwin.html So, you're working on driver for SD card reader. That is interesting. :) Is there any chances that Texas Instrument SD card reader supported by your driver? You still have problem with GMA950 (artifacts)? Have you try Natit.kext or EFI string? kizwan |
Quote:
Quote:
Quote:
-u |
Quote:
|
Quote:
Wonder where did PentiumPC go... :( Maybe he can release the source for ACPI4Asus.kext to help us understand what he did and maybe someone can continue his work, if he has no time for that, for the rest of the custom "OEM" stuff that make our life's so PITA. |
Quote:
I still unable to get display working with DSDT yet except for nVidia Go 7300 on Aspire 9420. kizwan |
Quote:
|
So no news here also :/
|
King,
It may be that your DSDT just has functions defined for Windows, especially since Linux guys also had problems. Have you talked to or contacted the people at OSXCORES? They have patched BIOSes for OSX: M50SV AS207ASUS M50V as209 ASUS I'm not sure what fixes they have made, but they do custom work too. See: http://www.osxcores.site50.net/services.htm Perhaps they can help. -u |
uman,
Just got a reply from Superhai. Its look like Superhai will not continue AMW0 project. :( Is there anybody interested continuing his project? :'( Other topic..... Sleep:- I found out that by deleting entry for EHCI devices in Acer Aspire 9420 DSDT, it was able to sleep. Now the EHCI devices detected as external/expansion card. Funny thing is external hard disk, which connected to EHCI port, is not turn off when putting laptop to sleep. Is this also happen with real MacBook? I tried to compare DSDT from MacBook3,1 with mine and I found this:- Acer Aspire 9420:- Code:
Method (_L03, 0, NotSerialized) Code:
Method (_L03, 0, NotSerialized) I also found "extra" method in EHCI function (MacBook3,1):- Code:
Method (_DSM, 4, NotSerialized) Clamshell:- Does real MacBook automatically resume from sleep when lid is open? Or still need to push keyboard button to resume from sleep, just like windows? kizwan |
Quote:
The IOKit doc is pretty good at showing how to make a user-callable module that calls in-kernel routines. So if you know (or have someone who has an Acer and knows C) it shouldn't be hard to hack. My suggestion is to start a mini-group of Acer users, and see if anyone has any dev experience amongst the group. Quote:
Quote:
The power button has multiple functions. Normally if you hit it, it brings up a menu to sleep, shutdown, restart or cancel. But when the Mac is already sleeping (not thru lid sleep), it will wake from sleep. there is also some programmatic control of it in the System preferences. When a Mac has slept through the lid switch, then opening the lid switch resumes the Mac. Quote:
Quote:
I'm sorry I can't be of much use now. I'm hoping next week that I will find the time to backup and do a retail install of 10.5.7. Only then will I try more DSDT hacking, since right now my machine is a mess of hacked kexts! -u |
Multiple video card mods
Has anyone done any work trying to integrate multiple video cards? I've been searching for weeks. Trying to find info regarding DSDT in general is tough.
|
[quote=candykane;26401]Fixing sleep and usb after wake up
I finally fixed sleep on my lappie! Hi candykane, did you already update to 10.5.8 and is your sleep fix stillworking? Apple probably changed something in Powermanagement which is breaking sleep on most installs. Do you use Openhaltrestart.kext or is sleep working without it? Thanks Al |
Quote:
|