Contribute
Register

ASUS G73JH keyboard backlighting... WORKING!

Status
Not open for further replies.
How to completely disable trackpad on laptop with ML 10.8.2 install

Cool..

How does ctrl-alt numpad +

and ctrl-alt-numpad - sound ?

Although I don't know if it would interfere with Mac since alt is the option key or whatever it is called.

Feel free to use any keys that you want for testing purposes... I'm getting a lot of output in the console windows from just pressing 1 key, let alone ctrl-alt-numpad keys.. Not sure which ones you need.

In any case I've attached 2 screenshots with the output on the console from pressing those keys. Hope it helps.

And thanks for taking the time to try to get this working :)

View attachment 43802

ctrlaltminus.png and ctrlaltplus.png look the same.
 
How to completely disable trackpad on laptop with ML 10.8.2 install

ctrlaltminus.png and ctrlaltplus.png look the same.

Numpad+ should be 4e, Numpad- 4a (originally known as the Gray+, Gray- keys on IBM PC keyboard).

Unless your keyboard shows something non-standard.
 
How to completely disable trackpad on laptop with ML 10.8.2 install

Yeh that seems correct.

On numpad - press (without any ctrl, shift or whatnot I get):

14 1 2013 10:37:06.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x4a
14 1 2013 10:37:06.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x4e down
14 1 2013 10:37:06.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0xca
14 1 2013 10:37:06.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x4e up

On numpad + press (without any ctrl, shift or whatnot I get):

14 1 2013 10:37:38.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x4e
14 1 2013 10:37:38.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x45 down
14 1 2013 10:37:38.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0xce
14 1 2013 10:37:38.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x45 up

When i press just ctrl-alt (without any other key I get):


14 1 2013 10:36:32.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x38
14 1 2013 10:36:32.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x37 down
14 1 2013 10:36:32.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x1d
14 1 2013 10:36:32.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x3b down
14 1 2013 10:36:32.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0xb8
14 1 2013 10:36:32.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x37 up
14 1 2013 10:36:32.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x9d
14 1 2013 10:36:32.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x3b up

Pressing ctrl-alt-numpadminus:

14 1 2013 10:38:31.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x38
14 1 2013 10:38:31.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x37 down
14 1 2013 10:38:31.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x1d
14 1 2013 10:38:31.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x3b down
14 1 2013 10:38:31.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x4a
14 1 2013 10:38:31.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x80 down
14 1 2013 10:38:31.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0xca
14 1 2013 10:38:31.000 PM kernel[0]: ApplePS2Keyboard: genADB = 0
14 1 2013 10:38:31.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x80 up
14 1 2013 10:38:31.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0xb8
14 1 2013 10:38:31.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x37 up
14 1 2013 10:38:31.000 PM kernel[0]: ApplePS2Keyboard: sending typed ADB code 0x0
14 1 2013 10:38:31.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x9d
14 1 2013 10:38:31.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x3b up

Pressing ctrl-alt-numpadplus:

14 1 2013 10:39:00.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x1d
14 1 2013 10:39:00.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x3b down
14 1 2013 10:39:00.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x38
14 1 2013 10:39:00.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x37 down
14 1 2013 10:39:00.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x4e
14 1 2013 10:39:00.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x80 down
14 1 2013 10:39:00.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0xce
14 1 2013 10:39:00.000 PM kernel[0]: ApplePS2Keyboard: genADB = 0
14 1 2013 10:39:00.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x80 up
14 1 2013 10:39:00.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0xb8
14 1 2013 10:39:00.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x37 up
14 1 2013 10:39:00.000 PM kernel[0]: ApplePS2Keyboard: sending typed ADB code 0x0
14 1 2013 10:39:00.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x9d
14 1 2013 10:39:00.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x3b up
 
How to completely disable trackpad on laptop with ML 10.8.2 install

Yeh that seems correct.

...

Give this kext a try.

Note: I can't test this code because I don't have your machine. No guarantee it doesn't crash & burn. So be prepared to replace it with a working one in case it goes bad. I based the code on the ACPI code I wrote for screen brightness, so it should be ok. Be sure to check Console messages for errors when you press the keys.

You can see my changes by looking at the commits on the github repo: https://github.com/RehabMan/OS-X-Voodoo-PS2-Controller

In 07_KeyBacklight.txt.zip:
- 07_KeyBacklight.txt (DSDT patch that makes backlight methods available from the PS2K device)

----------------------

Also IMPORTANT!: I have integrated this capability in my latest version of my VoodooPS2Controller.kext (keyboard/mouse/trackpad driver). There is currently a beta available here: http://www.tonymacx86.com/mountain-...oller-keyboard-trackpad-clickpad-support.html. As such, I have removed the kext that was here for download and replaced it with only the DSDT patch. Please see the site linked for the kext.

And finally: Read through this entire thread (at this time, it is not a long thread), so you have some idea how all this works. Basically my keyboard driver has the capability to call DSDT methods in the PS2K device if they are available. To make them available, you need these simple DSDT edits provided by 07_KeyBacklight.txt.

----------------------

Install the kext (Kext Wizard), patch your DSDT with 07_KeyBacklight.txt, insure your patched DSDT is present in /Extra/dsdt.aml, then reboot. At that point Ctrl+Alt+NumPad+/NumPad- should work for controlling the backlight.
 

Attachments

  • 07_KeyBacklight.txt.zip
    774 bytes · Views: 1,385
How to completely disable trackpad on laptop with ML 10.8.2 install

Good thing: my laptop didn't crash and burn.. In fact nothing bad happened hehe..

But it didn't work yet. Nothing happens to the backlight. The message in the log does mention the backlight but the counter also remains at zero. However, the assigned keys ctrl-alt-numpadplus/minus do register.

15 1 2013 1:47:57.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x38
15 1 2013 1:47:57.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x37 down
15 1 2013 1:47:57.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x1d
15 1 2013 1:47:57.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x3b down
15 1 2013 1:47:57.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x4e
15 1 2013 1:47:57.000 PM kernel[0]: ps2bl: Current keyboard backlight: 0
15 1 2013 1:47:57.000 PM kernel[0]: ps2bl: setting keyboard backlight 0
15 1 2013 1:47:57.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x80 down
15 1 2013 1:47:57.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0xce
15 1 2013 1:47:57.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x80 up
15 1 2013 1:47:58.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x4e
15 1 2013 1:47:58.000 PM kernel[0]: ps2bl: Current keyboard backlight: 0
15 1 2013 1:47:58.000 PM kernel[0]: ps2bl: setting keyboard backlight 0
15 1 2013 1:47:58.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x80 down
15 1 2013 1:47:58.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0xce
15 1 2013 1:47:58.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x80 up
15 1 2013 1:47:58.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0xb8
15 1 2013 1:47:58.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x37 up
15 1 2013 1:47:58.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x9d
15 1 2013 1:47:58.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x3b up
15 1 2013 1:48:01.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x38
15 1 2013 1:48:01.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x37 down
15 1 2013 1:48:01.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x38
15 1 2013 1:48:01.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x38
 
How to completely disable trackpad on laptop with ML 10.8.2 install

Good thing: my laptop didn't crash and burn.. In fact nothing bad happened hehe..

But it didn't work yet. Nothing happens to the backlight. The message in the log does mention the backlight but the counter also remains at zero. However, the assigned keys ctrl-alt-numpadplus/minus do register.

15 1 2013 1:47:57.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x38
15 1 2013 1:47:57.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x37 down
15 1 2013 1:47:57.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x1d
15 1 2013 1:47:57.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x3b down
15 1 2013 1:47:57.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x4e
15 1 2013 1:47:57.000 PM kernel[0]: ps2bl: Current keyboard backlight: 0
15 1 2013 1:47:57.000 PM kernel[0]: ps2bl: setting keyboard backlight 0
15 1 2013 1:47:57.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x80 down
15 1 2013 1:47:57.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0xce
15 1 2013 1:47:57.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x80 up
15 1 2013 1:47:58.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x4e
15 1 2013 1:47:58.000 PM kernel[0]: ps2bl: Current keyboard backlight: 0
15 1 2013 1:47:58.000 PM kernel[0]: ps2bl: setting keyboard backlight 0
15 1 2013 1:47:58.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x80 down
15 1 2013 1:47:58.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0xce
15 1 2013 1:47:58.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x80 up
15 1 2013 1:47:58.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0xb8
15 1 2013 1:47:58.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x37 up
15 1 2013 1:47:58.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x9d
15 1 2013 1:47:58.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x3b up
15 1 2013 1:48:01.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x38
15 1 2013 1:48:01.000 PM kernel[0]: ApplePS2Keyboard: ADB key code 0x37 down
15 1 2013 1:48:01.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x38
15 1 2013 1:48:01.000 PM kernel[0]: ApplePS2Keyboard: PS/2 scancode 0x38

I see the problem. I grabbed this code from the screen brightness and _BCL returns some extra values in slots 0 and 1, which these methods don't. I forgot to adjust a bit of the code. I've updated the attachment. Give it a try.
 
How to completely disable trackpad on laptop with ML 10.8.2 install

OMG!!!!!!! SUCCESSS!!! :) :-o:headbang::headbang::headbang::headbang::headbang::headbang::headbang:

It works! using the keycombo for + increases it and - decreases it perfectly :)

Holy crap... that is amazing. You have succeeded where many others have failed in the past :)

Think i'll ask a moderator to change the subject on this thread title so maybe others can find this...

Funny thing (at least for me)>. that when i reboot.. the keys still work increasing/decreasing brightness, even when mac os hasn't booted yet lol...
 
How to completely disable trackpad on laptop with ML 10.8.2 install

OMG!!!!!!! SUCCESSS!!! :) :-o:headbang::headbang::headbang::headbang::headbang::headbang::headbang:

It works! using the keycombo for + increases it and - decreases it perfectly :)

Holy crap... that is amazing. You have succeeded where many others have failed in the past :)

Think i'll ask a moderator to change the subject on this thread title so maybe others can find this...

Super. Now I'll have to figure out how to integrate this into the main version. I'll probably just clean up the code a bit, so if the DSDT methods exist, they get used, and if not... no harm done. And add a little bit of documentation.

If you want I can change the title of this thread (I'm a mod). I was thinking of maybe splitting it off. One thread for original question, and second for keyboard backlight. And the keyboard backlight split should probably go into one of the laptop forums... If it is ok with you, I'll do that.

Got a proposal for title of the thread?
 
How to completely disable trackpad on laptop with ML 10.8.2 install

Hey cool, sounds like a plan..

Proposol for a title? Use whatever you think is best. :) But probably maybe something that says... G73JH keyboard backlighting working or something.. As I am not sure if this would just 1:1 work on other laptops.

Btw, can I just use the release version of the kext instead of the debug one to get rid of the log spamming? Not sure if the code is in the release version as well.

Also I would love to see what was changed in the DSDT.aml and look at the code of the kext to see what made it work. I may be an absolutely noob in coding but I definitely want to get more into it.

But all in due time.. I know you need to sort things out.. But looking forward to seeing it.
 
How to completely disable trackpad on laptop with ML 10.8.2 install

Hey cool, sounds like a plan..

Proposol for a title? Use whatever you think is best. :) But probably maybe something that says... G73JH keyboard backlighting working or something.. As I am not sure if this would just 1:1 work on other laptops.

Probably this can be used on a lot of ASUS laptops with keyboard backlights (perhaps w/ modifications to DSDT patch, depending on DSDT code, levels allowed, etc).

Btw, can I just use the release version of the kext instead of the debug one to get rid of the log spamming? Not sure if the code is in the release version as well.

You can use Release. Code is in release version... There is still some log output in Release, but it is specifically for keyboard backlight...

Also I would love to see what was changed in the DSDT.aml and look at the code of the kext to see what made it work. I may be an absolutely noob in coding but I definitely want to get more into it.

DSDT code is just to add some methods into the PS2K (PS/2 keyboard) device. You can see the patches I applied by looking at 07_KeyBacklight.txt (these are DSDT Editor/MaiASL patches). There are three functions in there: KKCL, KKCM, and KKQC. KKCL returns a list of valid backlight levels as a package (your levels are 0 1 2 3). KKCM is used to set the level to one of the values returned by KKCL. And KKQC returns the current level.

I could have called the ASUS methods directly in the ATKD device, but they were a little quirky (no method to get list of valid values, or range; requirement to set bit 7 when calling SLKB; requirement to call GLKB with argument of 2), so this way I remove the quirks and keep the code in the driver itself somewhat generic, so that it could be adapted to a different brand laptop that had ACPI methods to set keyboard backlight levels. The methods in the keyboard device in DSDT serve as a translation layer from the driver to the actual DSDT methods.

Here's what the methods look like (stripped of the patch machinery):
Code:
Method (KKCL, 0, Serialized)
{
    Return (Package() { 0, 1, 2, 3, })
}
Method (KKCM, 1, Serialized)
{
    \_SB.ATKD.SLKB(Or(Arg0, 0x80))
}
Method (KKQC, 0, Serialized)
{
    Return (\_SB.ATKD.GLKB(2))
}

Note: Will probably change these from being Serialized to NotSerialized as I realize now they do not need to be Serialized.

But all in due time.. I know you need to sort things out.. But looking forward to seeing it.

I'll move things around, and this stuff will be in the next official release of my driver...
 
Status
Not open for further replies.
Back
Top