Jump to content

Fn HotKey and ALS sensor driver for Asus Notebooks


EMlyDinEsH

Recommended Posts

I'm using this kext, v2.6 on my Asus UX305, everything works very well.

 

One question, is there anyway to swap Fn+F1, F2, etc with F1, F2, etc? So we can directly use those function keys without having to hold the Fn key

 

Sent from my Redmi Note 3 using Tapatalk

 

hi, can you upload your DSDT file.

I'm trying to set keyboard lights for FN+F3/4 without success on UX430UA

 

Thx

Link to comment
Share on other sites

I;m getting ACPI error for FN+F3/4 keyboard lights

 

default    20:06:22.148557 +0200    kernel    ACPIDebug: "EC _QD3 enter"
default    20:06:22.148780 +0200    kernel    ACPIDebug: "EC _QD3 exit"
default    20:06:22.481433 +0200    kernel    ACPIDebug: "EC _Q0C enter"
default    20:06:22.481644 +0200    kernel    ACPIDebug: "EC _Q0C exit"
default    20:06:22.481902 +0200    kernel    ACPI Exception: AE_AML_BUFFER_LIMIT,
default    20:06:22.481926 +0200    kernel    Index (0x00000000B) is beyond end of object (length 0x4)
default    20:06:22.481932 +0200    kernel     (20160930/exoparg2-531)
default    20:06:22.481935 +0200    kernel     (20160930/exoparg2-531)
default    20:06:22.481943 +0200    kernel    [SKBL] @0006D #0088:
default    20:06:22.481946 +0200    kernel    [SKBL] @0006D #0088:
default    20:06:22.481951 +0200    kernel    P
default    20:06:22.481952 +0200    kernel    P
default    20:06:22.481955 +0200    kernel    W
default    20:06:22.481956 +0200    kernel    W
default    20:06:22.481958 +0200    kernel    K
default    20:06:22.481959 +0200    kernel    K
default    20:06:22.481961 +0200    kernel    B
default    20:06:22.481962 +0200    kernel    B
default    20:06:22.481966 +0200    kernel     [
default    20:06:22.481967 +0200    kernel     [
default    20:06:22.481970 +0200    kernel    Local0
default    20:06:22.481972 +0200    kernel    Local0
default    20:06:22.481974 +0200    kernel    ]
default    20:06:22.481976 +0200    kernel    ]
default    20:06:22.481978 +0200    kernel    
default    20:06:22.481980 +0200    kernel    
default    20:06:22.481984 +0200    kernel    
Initialized Local Variables for method [SKBL]:
default    20:06:22.481986 +0200    kernel    
Initialized Local Variables for method [SKBL]:
default    20:06:22.481991 +0200    kernel        Local0:
default    20:06:22.481993 +0200    kernel        Local0:
default    20:06:22.481998 +0200    kernel    ffffff801e709000
default    20:06:22.482000 +0200    kernel    ffffff801e709000
default    20:06:22.482003 +0200    kernel    <Obj>
default    20:06:22.482004 +0200    kernel    <Obj>
default    20:06:22.482008 +0200    kernel     Integer
default    20:06:22.482009 +0200    kernel     Integer
default    20:06:22.482011 +0200    kernel     000000000000000B
default    20:06:22.482014 +0200    kernel     000000000000000B
default    20:06:22.482016 +0200    kernel    
default    20:06:22.482018 +0200    kernel    
default    20:06:22.482020 +0200    kernel    
default    20:06:22.482021 +0200    kernel    
default    20:06:22.482027 +0200    kernel    Initialized Arguments for Method [SKBL]:  (0 arguments defined for method invocation)
default    20:06:22.482030 +0200    kernel    Initialized Arguments for Method [SKBL]:  (0 arguments defined for method invocation)
default    20:06:22.482037 +0200    kernel        Arg0:
default    20:06:22.482038 +0200    kernel        Arg0:
default    20:06:22.482043 +0200    kernel    ffffff801ea950f0
default    20:06:22.482044 +0200    kernel    ffffff801ea950f0
default    20:06:22.482047 +0200    kernel    <Obj>
default    20:06:22.482048 +0200    kernel    <Obj>
default    20:06:22.482051 +0200    kernel     Integer
default    20:06:22.482053 +0200    kernel     Integer
default    20:06:22.482056 +0200    kernel     000000000000000B
default    20:06:22.482058 +0200    kernel     000000000000000B
default    20:06:22.482060 +0200    kernel    
default    20:06:22.482061 +0200    kernel    
default    20:06:22.482064 +0200    kernel    
default    20:06:22.482065 +0200    kernel    
default    20:06:22.482073 +0200    kernel    ACPI Error:
default    20:06:22.482107 +0200    kernel    ACPI Error:
default    20:06:22.482111 +0200    kernel    Method parse/execution failed
default    20:06:22.482113 +0200    kernel    Method parse/execution failed
default    20:06:22.482117 +0200    kernel    [\_SB.ATKD.SKBL] (Node ffffff801c8b2060)
default    20:06:22.482120 +0200    kernel    [\_SB.ATKD.SKBL] (Node ffffff801c8b2060)
default    20:06:22.482123 +0200    kernel    , AE_AML_BUFFER_LIMIT
default    20:06:22.482125 +0200    kernel    , AE_AML_BUFFER_LIMIT
default    20:06:22.482128 +0200    kernel     (20160930/psparse-632)
default    20:06:22.482129 +0200    kernel     (20160930/psparse-632)
default    20:06:22.688511 +0200    kernel    ACPIDebug: "EC _QD4 enter"
default    20:06:22.688722 +0200    kernel    ACPIDebug: "EC _QD4 exit"

DSDT.aml.zip

Link to comment
Share on other sites

ok, now it's working fine on Asus UX430UA

EMlyDinEsH modified patch for 4 levels ;)

# Patch by EMlyDinEsH (www.osxlatitude.com)
 
#
# Enables 4 keyboard backlight levels control to work using my kexts AsusNBFnKeys and Smart Touchpad
# This patch meant for Kabylake notebooks and may work for others.
#
 
# Insert backlight auto off control sync field for Smart Touchpad and Asus Fn Keys driver
into device label ATKD code_regex Name\s\(BOFF,\sZero\) remove_matched;
into device label ATKD insert begin Name (BOFF, Zero) end;
 
# Insert method SKBL for setting keyboard backlight level
into method label SKBL parent_label ATKD remove_entry;
into Device label ATKD insert begin
Method (SKBL, 1, NotSerialized)\n
            {\n
                If (Or (LEqual (Arg0, 0xED), LEqual (Arg0, 0xFD)))\n
                {\n
                    If (And (LEqual (Arg0, 0xED), LEqual (BOFF, 0xEA)))\n
                    {\n
                        Store (Zero, Local0)\n
                        Store (Arg0, BOFF)\n
                    }\n
                    Else\n
                    {\n
                        If (And (LEqual (Arg0, 0xFD), LEqual (BOFF, 0xFA)))\n
                        {\n
                            Store (Zero, Local0)\n
                            Store (Arg0, BOFF)\n
                        }\n
                        Else\n
                        {\n
                            Return (BOFF)\n
                        }\n
                    }\n
                }\n
                Else\n
                {\n
                    If (Or (LEqual (Arg0, 0xEA), LEqual (Arg0, 0xFA)))\n
                    {\n
                        Store (Arg0, BOFF)\n
                    }\n
                    Else\n
                    {\n
Store (And (Arg0, 0x7F), KBLV)\n
                    }\n
                }\n
Store (0x0900, Local0)\n
          Add (Local0, 0xF0, Local0)\n
          \_SB.PCI0.LPCB.EC0.WRAM (Local0, KBLV)\n
         Store (DerefOf (Index (PWKB, KBLV)), Local0)\n
            \_SB.PCI0.LPCB.EC0.ST9E (0x1F, 0xFF, Local0)\n
                Return (Local0)\n
            }\n
end;
 
# Remove existing 16 backlight levels list if exist
into device label ATKD code_regex Name\s\(KBPW,\sBuffer\s\(0x10\)\s*\n\s*\{\s*\/\*\s0000\s\*\/\s*0x00,\s0x11,\s0x22,\s0x33,\s0x44,\s0x55,\s0x66,\s0x77,\s*\/\*\s0008\s\*\/\s*\s0x88,\s0x99,\s0xAA,\s0xBB,\s0xCC,\s0xDD,\s0xEE,\s0xFF\s*\}\) remove_matched;
# Remove existing 4 backlight levels list if exist
into device label ATKD code_regex Name\s\(PWKB,\sBuffer\s\(0x04\)\s*\n\s*\{\s*0x00,\s0x55,\s0xAA,\s0xFF\s*\}\) remove_matched;
 
# Insert 4 backlight levels
into Device label ATKD insert begin
Name (PWKB, Buffer (0x04)\n
            {\n
               0x00, 0x55, 0xAA, 0xFF\n
            })\n
end;
 
 
# Insert method GKBL for reading keyboard backlight level
into method label GKBL parent_label ATKD remove_entry;
into Device label ATKD insert begin
Method (GKBL, 1, NotSerialized)\n
            {\n
               If (LEqual (Arg0, 0xFF))\n
                {\n
                    Return (BOFF)\n
                }\n
 
                Return (KBLV)\n
            }\n
end;
 
  • Like 1
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...