InfiniteMac OSx86

InfiniteMac OSx86 (http://infinitemac.com/forum.php)
-   10.X (http://infinitemac.com/forumdisplay.php?f=36)
-   -   Various DSDT mods. (http://infinitemac.com/showthread.php?t=1960)

uman 06-03-2009 02:59 PM

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!

THeKiNG 06-03-2009 11:24 PM

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?

uman 06-03-2009 11:56 PM

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.

THeKiNG 06-04-2009 01:08 AM

Quote:

Originally Posted by uman (Post 27478)
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.

WOW
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

kizwan 06-05-2009 02:29 PM

Quote:

Originally Posted by uman (Post 27464)
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!

I will study the document. It will take sometime to understand it. :)

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)
    {
        If (\_SB.AMW0.WLMP)
        {
            Store (Arg0, \_SB.AMW0.WLID)
            Notify (\_SB.AMW0, 0xB0)
        }
        Else
        {
            PHSR (0x1F, Arg0)
        }
    }

kizwan

uman 06-08-2009 11:43 PM

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.

uman 06-08-2009 11:44 PM

Umm. The source of the AMW0 kext. Thanks.

kizwan 06-09-2009 04:29 AM

Quote:

Originally Posted by uman (Post 27687)
Umm. The source of the AMW0 kext. Thanks.

You can download the AMW0.kext & source code here:-
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

uman 06-09-2009 02:06 PM

Quote:

Originally Posted by kizwan (Post 27698)
You can download the AMW0.kext & source code here:-
http://www.superhai.com/xdarwin.html

[forehead slap] I missed that page. Thanks for the link! If the Acer comes back in the next week or so, I'll try getting something going with that.

Quote:

Originally Posted by kizwan (Post 27698)
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?

Yep, for TI-- that's what I have in the Gateway and Acer. It's mainly to get my feet wet in IOKit/kernel drivers. I have some other things I want to do, but wanted a small-ish project to get started with.

Quote:

Originally Posted by kizwan (Post 27698)
You still have problem with GMA950 (artifacts)? Have you try Natit.kext or EFI string?

I'm using the two? kexts that I found in iPC. I didn't really pay much attention to what they do. The artifacts are minor enough that I haven't bothered to track them down. I may try the DSDT approach, since I want to get better at DSDT mods, but it's so time-consuming, as you've no doubt found out!

-u

uman 06-09-2009 04:29 PM

Quote:

Originally Posted by kizwan (Post 27698)
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?

I've put this on hold with yesterday's news that Apple is including SD card slots on the new macbooks. I'd like to see what they have done before proceeding.