Jump to content
EMlyDinEsH

Fn HotKey and ALS sensor driver for Asus Notebooks

Recommended Posts

Cant seem to get this working on a Asus K55A board. Is it at all that different? Fn+F7 Works though with kext but soon as I change code in DSDT and compile I get errors like mad.

 

Anyone else using this board? Clover....

Share this post


Link to post
Share on other sites

Cant seem to get this working on a Asus K55A board. Is it at all that different? Fn+F7 Works though with kext but soon as I change code in DSDT and compile I get errors like mad.

 

Anyone else using this board? Clover....

 

 

send me your dump based on my thread dsdt/ssdt patching in dsdt section and i'll try to patch myself.

Share this post


Link to post
Share on other sites

EMlyDinEsH, you can do 16 steps of keyborad backlight. I do it by edit DSDT:

Method (_Q0C, 0, NotSerialized)
        {
            If (ATKP)
            {
                ^^^^ATKD.IANE (0xC5)
                Store (RRAM (0x044B), Local0)
                If (LGreaterEqual (Local0, 0x10))
                {
                    Subtract (Local0, 0x10, Local0)
                    If (LGreaterEqual (Local0, Zero))
                    {
                        WRAM (0x044B, Local0)
                    }
                    Else
                    {
                        WRAM (0x044B, Zero)
                    }
                }
                Else
                {
                    WRAM (0x044B, Zero)
                }
            }
        }
        Method (_Q0D, 0, NotSerialized)
        {
            If (ATKP)
            {
                ^^^^ATKD.IANE (0xC4)
                Store (RRAM (0x044B), Local0)
                Add (Local0, 0x10, Local0)
                If (LLessEqual (Local0, 0xFF))
                {
                    WRAM (0x044B, Local0)
                }
                Else
                {
                    WRAM (0x044B, 0xFF)
                }
            }
        }
  • Like 1

Share this post


Link to post
Share on other sites

Thanks to EmlyDinesh's battery work (taken from 68x's DSDT), EmlyDinesh's fix for the brightness keys and this lid fix, I now have no reason to use an older AppleACPIPlatform.kext.

EDIT: @EmlyDinesh, is it possible to turn off the debug logging in 1.4? I'm still using 1.3 as it doesn't print each Fn key I'm pressing in my dmesg.

 

Can you share the battery DSDT?

Edited by darkera13

Share this post


Link to post
Share on other sites

My N55SL thread will contain it, but you're going to have to diff it with my original DSDT to see the changes and then you're going to have to isolate them, like I did with 68x's DSDTs at InsanelyMac. Off the top of my head, the changes you need to look out for when comparing are: certain 16-bit registers have been split into two 8-bit ones, references to these registers are wrapped in a B1B2 function call and the RDWD function was changed. I also needed part 1 of Jingu's changes (look here if you don't want Jingu's percentage manipulation)

to get the battery percentage properly showing - that is, going past 89% percent.

If you ask nicely in the DSDT patching thread (and follow the guidelines set there), EmlyDinesh may apply his register conversions etc. for you when/if he has time.

 

EDIT: I'm using a mix of EmlyDinesh's and 18seven's work now so that I can see the proper battery name (N--SL or something instead of the generic M3n) etc. of the battery in OS X.

Edited by qwerty12

Share this post


Link to post
Share on other sites

 

EMlyDinEsH, you can do 16 steps of keyborad backlight. I do it by edit DSDT:

Method (_Q0C, 0, NotSerialized)
        {
            If (ATKP)
            {
                ^^^^ATKD.IANE (0xC5)
                Store (RRAM (0x044B), Local0)
                If (LGreaterEqual (Local0, 0x10))
                {
                    Subtract (Local0, 0x10, Local0)
                    If (LGreaterEqual (Local0, Zero))
                    {
                        WRAM (0x044B, Local0)
                    }
                    Else
                    {
                        WRAM (0x044B, Zero)
                    }
                }
                Else
                {
                    WRAM (0x044B, Zero)
                }
            }
        }
        Method (_Q0D, 0, NotSerialized)
        {
            If (ATKP)
            {
                ^^^^ATKD.IANE (0xC4)
                Store (RRAM (0x044B), Local0)
                Add (Local0, 0x10, Local0)
                If (LLessEqual (Local0, 0xFF))
                {
                    WRAM (0x044B, Local0)
                }
                Else
                {
                    WRAM (0x044B, 0xFF)
                }
            }
        }

 

Is this working with 16 levels of keyboard backlight? I don't have hardware to experiment, so i did what I can based on the Asus implementation. If you confirm this then I might be able to test with a beta tester.

 

Also if you could be a beta tester then I might be able to add something into my driver based on your findings. So, PM me if you want to be a beta tester.

Share this post


Link to post
Share on other sites

Yes, it work. I have asus n56vz, and some people test it on asus n76vz. Backlight work from 0x00 to 0xFF, that is 256 steps. I made 16 steps because it multiple 256. (16*16). Also i debug another ATK DSDT Methods on my n56vz (work on n76vz):

Fn+F2 = Q0B
Fn+F3 = Q0C
Fn+F4 = Q0D
Fn+F5 = Q0E
Fn+F6 = Q0F
Fn+F7 = Q10
Fn+F8 = Q11
Fn+F9 = Q12
Fn+F10 = Q13
Fn+F11 = Q14
Fn+F12 = Q15
Fn+C = Q72
Fn+Space = Q71
Fn+V = Q74
Media button (asus n56, v76 have button top left from keyboard)  =  QEC
Stop = Q6E
Prev = Q6C
Play/Pause = Q6F
Next = Q6D
Fn+NumpadEnter = Q77
Fn+T = Q73
Plug/Unplug AC = QA0

About beta tester - i agree.

 

I also created modification of your ASUSNBWMI for asus N56/N76. (http://ukrainianiphone.com/forum/index.php?s=&showtopic=24683&view=findpost&p=209003).

Share this post


Link to post
Share on other sites

Hey, i tryed this kext but it didnt work (kext loaded, but not worked), so i checked Console and this is output: kernel[0]: AsusNBFnKeys: Found WMI Device WMI1.

I have Asus N53Jn. I also look to dsdt and i have:

        Device (WMI1)
        {
            Name (_HID, "PNP0c14")
            Name (_UID, "MXM2")
 
Here is my DSDT: dsdt.aml.zip.
 

Share this post


Link to post
Share on other sites

None of the function keys work on my Asus N56VM (other than the useless F8 mirroring option, which makes my screen go wonky due to the onboard Intel HD4000).  

 

I made all the DSDT edits as listed on the main page, and edited the kext itself, but no dice.

 

Attached is my edited DSDT file if you could kindly take a look at it and let me know what I am doing wrong :)

 

This system has the full backlit keyboard with the Elan v4 Touchpad (using the Elan Kext for this) and VoodooHDA for sound.

 

Thanks!

 

EDIT #2:  Updated link with latest DSDT with sleep and proper USB ejection, video card injection (HD4000)

 

EDIT: I managed to get it working using another DSDT for my system that I found here: http://www.osx86.net/view/3212-asus_n56vm_-_n76xx_extra,_extensions_ml.html

 

Not sure why my extracted DSDT didn't work, but no worries; This seems to be working well for my system and is for the same model.  Note that I edited the preferences within the kext to enable the keyboard backlighting, and applied that patch to this DSDT along with the wifi/bt and brightness patches.

 

The only keys now that aren't functioning are the Brightness ones (unfortunatly) and the Mirroring (which is fine by me).

 

Any thoughts or suggestions on how to maybe get the brightness to work (again, I have an Asus N65VM with an Intel HD4000 (actually an NVIDIA 630M Optimus card, but that's another debacle!)

 

Sleep is working as well on my system, but I found that the brightness comes back at full when resuming.  Obviously that has nothing to do with this kext or configuration, but I just felt like sharing.

 

Thanks for such an excellent kext and all your hard work! Much appreciated!

dsdt.ASUS-N56VM-HD4000.zip

Share this post


Link to post
Share on other sites

 

Hey, i tryed this kext but it didnt work (kext loaded, but not worked), so i checked Console and this is output: kernel[0]: AsusNBFnKeys: Found WMI Device WMI1.

I have Asus N53Jn. I also look to dsdt and i have:

        Device (WMI1)
        {
            Name (_HID, "PNP0c14")
            Name (_UID, "MXM2")
 
Here is my DSDT: attachicon.gif dsdt.aml.zip.

 

 

You need some dsdt edits for my kext to work and i've attached the patch files as well in the first post. Your attached dsdt is corrupted so try to send me your dump based on DSDT/SSDT patching thread so I can patch it properly for this and everything else to work.

 

 

None of the function keys work on my Asus N56VM (other than the useless F8 mirroring option, which makes my screen go wonky due to the onboard Intel HD4000).  

 

I made all the DSDT edits as listed on the main page, and edited the kext itself, but no dice.

 

Attached is my edited DSDT file if you could kindly take a look at it and let me know what I am doing wrong  :)

 

This system has the full backlit keyboard with the Elan v4 Touchpad (using the Elan Kext for this) and VoodooHDA for sound.

 

Thanks!

 

EDIT: I managed to get it working using another DSDT for my system that I found here: http://www.osx86.net/view/3212-asus_n56vm_-_n76xx_extra,_extensions_ml.html

 

Not sure why my extracted DSDT didn't work, but no worries; This seems to be working well for my system and is for the same model.  Note that I edited the preferences within the kext to enable the keyboard backlighting, and applied that patch to this DSDT along with the wifi/bt and brightness patches.

 

The only keys now that aren't functioning are the Brightness ones (unfortunatly) and the Mirroring (which is fine by me).

 

Any thoughts or suggestions on how to maybe get the brightness to work (again, I have an Asus N65VM with an Intel HD4000 (actually an NVIDIA 630M Optimus card, but that's another debacle!)

 

Sleep is working as well on my system, but I found that the brightness comes back at full when resuming.  Obviously that has nothing to do with this kext or configuration, but I just felt like sharing.

 

Thanks for such an excellent kext and all your hard work! Much appreciated!

 

 

For Brightness keys to work, you have to patch the dsdt and i've included this patch in the first post. Did you try that?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×