ASUS G73JH keyboard backlighting... WORKING!

Discussion in 'Mountain Lion Laptop Support' started by RehabMan, Jan 10, 2013.

  1. RehabMan

    RehabMan Moderator

    Joined:
    May 3, 2012
    Messages:
    120,233
    Mobo:
    Intel DH67BL
    CPU:
    Core i7-2600K
    Graphics:
    Intel HD 3000
    Mac:
    MacBook Air
    Mobile Phone:
    iOS
    Jan 10, 2013 #1
    RehabMan

    RehabMan Moderator

    Joined:
    May 3, 2012
    Messages:
    120,233
    Mobo:
    Intel DH67BL
    CPU:
    Core i7-2600K
    Graphics:
    Intel HD 3000
    Mac:
    MacBook Air
    Mobile Phone:
    iOS
    FYI.. This thread split from this original: http://www.tonymacx86.com/general-h...isable-trackpad-laptop-ml-10-8-2-install.html

    You would have to find some information on how the keyboard backlight is manipulated. If the backlight works on Linux, then there is hope of finding the source code and the details of how it works.

    Direct link to working solution: http://www.tonymacx86.com/mountain-...yboard-backlighting-working-3.html#post532117
     
  2. sublightnova

    sublightnova

    Joined:
    Jan 4, 2013
    Messages:
    49
    Mobo:
    Gigabyte Z77X-UD5
    CPU:
    i7-3770K
    Graphics:
    eVGA GTX 670 FTW
    Jan 10, 2013 #2
    sublightnova

    sublightnova

    Joined:
    Jan 4, 2013
    Messages:
    49
    Mobo:
    Gigabyte Z77X-UD5
    CPU:
    i7-3770K
    Graphics:
    eVGA GTX 670 FTW
    How to completely disable trackpad on laptop with ML 10.8.2 install/Enable G73 Keyboard backlights

    Yep yesterday I booted up my ubuntu live USB stick (with the current latest version) and noticed in fact the keyboard is fully lit. I will dive into that soon as it is incredibly annoying being used to see what key you are pressing as oposed to hitting the wrong keys all the time.
     
  3. sublightnova

    sublightnova

    Joined:
    Jan 4, 2013
    Messages:
    49
    Mobo:
    Gigabyte Z77X-UD5
    CPU:
    i7-3770K
    Graphics:
    eVGA GTX 670 FTW
    Jan 10, 2013 #3
    sublightnova

    sublightnova

    Joined:
    Jan 4, 2013
    Messages:
    49
    Mobo:
    Gigabyte Z77X-UD5
    CPU:
    i7-3770K
    Graphics:
    eVGA GTX 670 FTW
  4. RehabMan

    RehabMan Moderator

    Joined:
    May 3, 2012
    Messages:
    120,233
    Mobo:
    Intel DH67BL
    CPU:
    Core i7-2600K
    Graphics:
    Intel HD 3000
    Mac:
    MacBook Air
    Mobile Phone:
    iOS
    Jan 10, 2013 #4
    RehabMan

    RehabMan Moderator

    Joined:
    May 3, 2012
    Messages:
    120,233
    Mobo:
    Intel DH67BL
    CPU:
    Core i7-2600K
    Graphics:
    Intel HD 3000
    Mac:
    MacBook Air
    Mobile Phone:
    iOS
    How to completely disable trackpad on laptop with ML 10.8.2 install

    These scripts just write to a device which controls the backlight. But that at least means that device driver code to manipulate the light exists. You can see it in the light_.sh:

    Code (Text):

    echo $1 > /sys/class/leds/asus::kbd_backlight/brightness
     
    So, find the source to /sys/class/leds/asus::kbd_backlight/brightness. I did a little bit of searching and it looks like your backlight might be controlled by DSDT methods: SLKB and GLKB. Do you see those methods in your DSDT? If so, it would not be difficult to write some code to call them. Do you have C++ coding experience?
     
  5. sublightnova

    sublightnova

    Joined:
    Jan 4, 2013
    Messages:
    49
    Mobo:
    Gigabyte Z77X-UD5
    CPU:
    i7-3770K
    Graphics:
    eVGA GTX 670 FTW
    Jan 10, 2013 #5
    sublightnova

    sublightnova

    Joined:
    Jan 4, 2013
    Messages:
    49
    Mobo:
    Gigabyte Z77X-UD5
    CPU:
    i7-3770K
    Graphics:
    eVGA GTX 670 FTW
    How to completely disable trackpad on laptop with ML 10.8.2 install

    Unfortunately my C++ coding experience is very limited. Too limited I'm afraid to attempt this myself.

    http://ubuntuforums.org/archive/index.php/t-1689936.html

    2n part of that page seems to contain links to even the code to control it... I will dig further tho.. Keyboard backlights are something that isn't working for anyone outthere it seems.. At least for the G73 series or even other series too. So far I've seen no reports anywhere from someone who got it working. But not sure how much of an attempt was made to try it.

    These are entries in my DSDT:

    Method (SLKB, 1, NotSerialized)
    {
    Store (And (Arg0, 0x7F), KBLV)
    If (And (Arg0, 0x80))
    {
    Store (DerefOf (Index (PWKB, KBLV)), Local0)
    }
    Else
    {
    Store (Zero, Local0)
    }
    ^^PCI0.SBRG.EC0.WRAM (0x044B, Local0)
    }


    Method (GLKB, 1, NotSerialized)
    {
    If (LEqual (Arg0, One))
    {
    Store (^^PCI0.SBRG.EC0.RRAM (0x0449), Local0)
    And (Local0, 0x02, Local0)
    If (Local0)
    {
    Return (One)
    }
    Else
    {
    Return (Zero)
    }
    }
    Else
    {
    If (LEqual (Arg0, 0x02))
    {
    Return (KBLV)
    }
    Else
    {
    If (LEqual (Arg0, 0x03))
    {
    Return (0x80)
    }
    }
    }
    Return (Ones)
    }

    I may have missed a quote here or there tho...
     
  6. RehabMan

    RehabMan Moderator

    Joined:
    May 3, 2012
    Messages:
    120,233
    Mobo:
    Intel DH67BL
    CPU:
    Core i7-2600K
    Graphics:
    Intel HD 3000
    Mac:
    MacBook Air
    Mobile Phone:
    iOS
    Jan 10, 2013 #6
    RehabMan

    RehabMan Moderator

    Joined:
    May 3, 2012
    Messages:
    120,233
    Mobo:
    Intel DH67BL
    CPU:
    Core i7-2600K
    Graphics:
    Intel HD 3000
    Mac:
    MacBook Air
    Mobile Phone:
    iOS
    How to completely disable trackpad on laptop with ML 10.8.2 install

    This link seems to be the patch to handle the kbd light for Linux: https://patchwork.kernel.org/patch/44491/

    It would probably not be that difficult to add some code to the keyboard driver to call the DSDT methods, using the code referenced in the link as a guide, then wire that up to a couple of dedicated keys for up/down. Does your keyboard have keys for this?

    BTW, the DSDT methods might need a bit of tweaking depending on the width of the EC fields it is accessing: WRAM, RRAM.
     
  7. sublightnova

    sublightnova

    Joined:
    Jan 4, 2013
    Messages:
    49
    Mobo:
    Gigabyte Z77X-UD5
    CPU:
    i7-3770K
    Graphics:
    eVGA GTX 670 FTW
    Jan 10, 2013 #7
    sublightnova

    sublightnova

    Joined:
    Jan 4, 2013
    Messages:
    49
    Mobo:
    Gigabyte Z77X-UD5
    CPU:
    i7-3770K
    Graphics:
    eVGA GTX 670 FTW
    How to completely disable trackpad on laptop with ML 10.8.2 install

    Yep my keyboard has standard Fn keys for increasing and decreasing backlight brightness (Fn-F3 for down and Fn-F4 for up).

    I see there is reference to a U50VG laptop. Not sure how that would translate to the G73JH but as you say, DSDT could be the way. Just wish my C++ schoolbook knowledge wasn't so very very rusty.
     
  8. sublightnova

    sublightnova

    Joined:
    Jan 4, 2013
    Messages:
    49
    Mobo:
    Gigabyte Z77X-UD5
    CPU:
    i7-3770K
    Graphics:
    eVGA GTX 670 FTW
    Jan 10, 2013 #8
    sublightnova

    sublightnova

    Joined:
    Jan 4, 2013
    Messages:
    49
    Mobo:
    Gigabyte Z77X-UD5
    CPU:
    i7-3770K
    Graphics:
    eVGA GTX 670 FTW
  9. RehabMan

    RehabMan Moderator

    Joined:
    May 3, 2012
    Messages:
    120,233
    Mobo:
    Intel DH67BL
    CPU:
    Core i7-2600K
    Graphics:
    Intel HD 3000
    Mac:
    MacBook Air
    Mobile Phone:
    iOS
    Jan 11, 2013 #9
    RehabMan

    RehabMan Moderator

    Joined:
    May 3, 2012
    Messages:
    120,233
    Mobo:
    Intel DH67BL
    CPU:
    Core i7-2600K
    Graphics:
    Intel HD 3000
    Mac:
    MacBook Air
    Mobile Phone:
    iOS
    How to completely disable trackpad on laptop with ML 10.8.2 install

    Yup. I'm pretty sure the ACPI methods can be used to query/set brightness. The patch post I found shows how to invoke the ACPI functions. GLKB is invoked with Arg0=2, return value is current setting), and SLKB is invoked with Arg0=new setting. Makes sense from looking at the DSDT code too. The only thing to verify would be the proper range of values (look at those scripts, and look at that PWKB table as the param sent to SLKB is being used as an index into that table) and to be sure the DSDT code references any EC fields as 8-bit (would need to look at that WRAM method, or just try it and see what happens).

    If you look at my code for the keyboard driver, you will see some references to ACPI_BRIGHTNESS. This is where I attempted to call ACPI methods in the Probook DSDT to manipulate the screen brightness. It didn't work because the methods were doing some strange stuff, perhaps calling into BIOS methods, or WMI methods or something. But you can see the basics of calling ACPI methods.
     
  10. sublightnova

    sublightnova

    Joined:
    Jan 4, 2013
    Messages:
    49
    Mobo:
    Gigabyte Z77X-UD5
    CPU:
    i7-3770K
    Graphics:
    eVGA GTX 670 FTW
    Jan 11, 2013 #10
    sublightnova

    sublightnova

    Joined:
    Jan 4, 2013
    Messages:
    49
    Mobo:
    Gigabyte Z77X-UD5
    CPU:
    i7-3770K
    Graphics:
    eVGA GTX 670 FTW
    How to completely disable trackpad on laptop with ML 10.8.2 install

    Yeah hopefully someone will see this thread/post and will attempt to get this working as I don't see myself making it work but I will surely dig as much as I can to get to the bottom of this. :)
     

Share This Page