Jump to content

GUIDE: How to Fix Brightness hotkeys in DSDT

fix brightness hotkeys laptop dsdt

  • Please log in to reply
96 replies to this topic

#81
mnfesq

mnfesq

    Emenef, Esquire

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,184 posts
  • Gender:Male
  • Location:Southern California

Don't use PS2 codes that correspond to actual brightness up/down ADB. Use PS2 codes that correspond to ADB for F14/F15.

 

I think I did that here:

 

http://www.insanelym...dsdt/?p=2317067

 

In any event, it works.



#82
RehabMan

RehabMan

    InsanelyMacaholic

  • Developers
  • 3,181 posts
  • Gender:Male
  • Location:Bellingham, WA
  • Interests:skiing, software, classic cars

I think I did that here:
 
http://www.insanelym...dsdt/?p=2317067
 
In any event, it works.


Yes, note PS2->ADB mapping in ApplePS2ToADBMap.h:
    0x6b,   // 65  F14
    0x71,   // 66  F15


#83
mnfesq

mnfesq

    Emenef, Esquire

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,184 posts
  • Gender:Male
  • Location:Southern California

Yes, note PS2->ADB mapping in ApplePS2ToADBMap.h:

    0x6b,   // 65  F14
    0x71,   // 66  F15

 

So I guess my only contribution, if any, was mapping these to my F2/F3 keys by way of a DSDT patch.



#84
RehabMan

RehabMan

    InsanelyMacaholic

  • Developers
  • 3,181 posts
  • Gender:Male
  • Location:Bellingham, WA
  • Interests:skiing, software, classic cars

So I guess my only contribution, if any, was mapping these to my F2/F3 keys by way of a DSDT patch.


DSDT patch maps your brightness keys (presumably Fn+F2/Fn+F3). F2/F3 use standard scan codes that map to standard ADB codes.

Note: Some BIOS/EC will reverse the function of Fn+F1-F12 with F1-F12. But it PS2/ACPI-wise, you're still pressing Fn+F2/Fn+F3...

#85
mnfesq

mnfesq

    Emenef, Esquire

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,184 posts
  • Gender:Male
  • Location:Southern California

DSDT patch maps your brightness keys (presumably Fn+F2/Fn+F3). F2/F3 use standard scan codes that map to standard ADB codes.

Note: Some BIOS/EC will reverse the function of Fn+F1-F12 with F1-F12. But it PS2/ACPI-wise, you're still pressing Fn+F2/Fn+F3...

 

That's correct.  HP has a feature in BIOS to allow switching that is enabled by default.  It allows you to use the function keys without pressing the Fn key.

 

BTW, on a somewhat related matter, I don't know if you are aware of this but, if I press F5, which is the on/off switch for keyboard backlighting, and hold it down while pressing the arrow up/down keys, it will change the brightness of the keyboard backlighting.  



#86
RehabMan

RehabMan

    InsanelyMacaholic

  • Developers
  • 3,181 posts
  • Gender:Male
  • Location:Bellingham, WA
  • Interests:skiing, software, classic cars

BTW, on a somewhat related matter, I don't know if you are aware of this but, if I press F5, which is the on/off switch for keyboard backlighting, and hold it down while pressing the arrow up/down keys, it will change the brightness of the keyboard backlighting.


I don't have any HP laptops with a keyboard backlight, so this matters very little to me...
But it seems like a reasonable key assignment.

#87
SavageAUS

SavageAUS

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,216 posts
  • Gender:Male

So i patched my DSDT for ec queries etc and have found that my brightness up is _Q0F and brightness down is _QOE but when i apply those changes to 

into method label _Q1D replace_content
begin
// Brightness Down\n
Notify(\_SB.PCI0.LPCB.PS2M, 0x0205)\n
Notify(\_SB.PCI0.LPCB.PS2M, 0x0285)\n
end;
into method label _Q1C replace_content
begin
// Brightness Up\n
Notify(\_SB.PCI0.LPCB.PS2M, 0x0206)\n
Notify(\_SB.PCI0.LPCB.PS2M, 0x0286)\n
end;

like this

into method label _Q0E replace_content
begin
// Brightness Down\n
Notify(\_SB.PCI0.LPCB.PS2M, 0x0205)\n
Notify(\_SB.PCI0.LPCB.PS2M, 0x0285)\n
end;
into method label _Q0F replace_content
begin
// Brightness Up\n
Notify(\_SB.PCI0.LPCB.PS2M, 0x0206)\n
Notify(\_SB.PCI0.LPCB.PS2M, 0x0286)\n
end;

brightness down doesnt do anything except bring up the brightness splash and brightness up does the same but also flashes the sound mute as well. So no brightness control.

Brightness slider works etc as i was using asusnbfnkeys but want to steer away from that.

Brightness up is f6 and down is f5

 

Volume control works with fn+f11 + f12 f10 for mute.

 

What have i missed for brightness control via fn + f5 & f6?

 

DSDT attached

Attached Files



#88
RehabMan

RehabMan

    InsanelyMacaholic

  • Developers
  • 3,181 posts
  • Gender:Male
  • Location:Bellingham, WA
  • Interests:skiing, software, classic cars

brightness down doesnt do anything except bring up the brightness splash and brightness up does the same but also flashes the sound mute as well. So no brightness control.


Sounds like 10.12.1.
You should generate keys for F14/F15 instead of brightness key codes.

#89
SavageAUS

SavageAUS

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,216 posts
  • Gender:Male

Sounds like 10.12.1.
You should generate keys for F14/F15 instead of brightness key codes.

Yes it is.

How do i go about doing that? 



#90
RehabMan

RehabMan

    InsanelyMacaholic

  • Developers
  • 3,181 posts
  • Gender:Male
  • Location:Bellingham, WA
  • Interests:skiing, software, classic cars

Yes it is.
How do i go about doing that?


I wrote about it in my backlight guide on another website. You can use google to find it.

#91
SavageAUS

SavageAUS

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,216 posts
  • Gender:Male

Thanks @RehabMan i ended up using

into method label _Q0E replace_content
begin
// Brightness Down\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0365) //F14\n
end;
into method label _Q0F replace_content
begin
// Brightness Up\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0366) //F15\n
end;

And all is well.



#92
RehabMan

RehabMan

    InsanelyMacaholic

  • Developers
  • 3,181 posts
  • Gender:Male
  • Location:Bellingham, WA
  • Interests:skiing, software, classic cars

Thanks @RehabMan i ended up using

into method label _Q0E replace_content
begin
// Brightness Down\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0365) //F14\n
end;
into method label _Q0F replace_content
begin
// Brightness Up\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0366) //F15\n
end;
And all is well.


Yes... as per my guide :-)

#93
SavageAUS

SavageAUS

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,216 posts
  • Gender:Male
Can anyone confirm brightness keys broken as of beta 6?

Sent from my SM-G930F using Tapatalk

#94
RehabMan

RehabMan

    InsanelyMacaholic

  • Developers
  • 3,181 posts
  • Gender:Male
  • Location:Bellingham, WA
  • Interests:skiing, software, classic cars

Can anyone confirm brightness keys broken as of beta 6?


Working just fine here (with brightness keys generating F14/F15).

#95
SavageAUS

SavageAUS

    InsanelyMac Legend

  • Members
  • PipPipPipPipPipPipPipPip
  • 1,216 posts
  • Gender:Male
Yeah it's all good I sorted it out.

Sent from my SM-G930F using Tapatalk

#96
swtmax

swtmax

    InsanelyMac Protégé

  • Members
  • Pip
  • 3 posts

work well, Acer E5-575G i3-6100U Il Capitan _Q8E and _Q8F.  Thx



#97
gulios

gulios

    InsanelyMac Protégé

  • Members
  • Pip
  • 28 posts

Hi,

 

I'm trying to fix ASUS UX430UA keyboard backlighting.

 

- brightness works on FN+F5/6(16 levels)
- keyboard backlight does not working

backlight
FN+F3 down -> ACPIDebug: "EC _Q0C enter" and "exit"
FN+F4 up -> ACPIDebug: "EC _Q0D enter" and "exit"

brightness
FN+F5 down -> ACPIDebug: "EC _Q0E enter" and "exit"
FN+F6 up -> ACPIDebug: "EC _Q0F enter" and "exit"

FN press:
default 14:03:37.805566 +0200 kernel ACPIDebug: "EC _QD3 enter"
default 14:03:37.805780 +0200 kernel ACPIDebug: "EC _QD3 exit"
default 14:03:37.944475 +0200 kernel ACPIDebug: "EC _QD4 enter"
default 14:03:37.944693 +0200 kernel ACPIDebug: "EC _QD4 exit"

 

any ideas how to fix keyboard backlight ?

 

 

from console:

default    22:58:47.421968 +0200    kernel    AsusNBFnKeys: Failed to set Keyboard backlight to level 0xe.
default    22:58:48.122215 +0200    kernel    AsusNBFnKeys: Failed to set Keyboard backlight to level 0xf.
default    22:58:48.448304 +0200    kernel    AsusNBFnKeys: Failed to set Keyboard backlight to level 0xe.
default    22:58:48.759530 +0200    kernel    AsusNBFnKeys: Failed to set Keyboard backlight to level 0xf.
default    22:58:49.079320 +0200    kernel    AsusNBFnKeys: Failed to set Keyboard backlight to level 0xe.

Thank you

 

 

EDIT:

 

keyboard backlights works fine now with patch from EMlyDinEsH

 

# 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;

Attached Files







Also tagged with one or more of these keywords: fix, brightness, hotkeys, laptop, dsdt

  Topic Stats Last Post Info

2 user(s) are reading this topic

0 members, 2 guests, 0 anonymous users

© 2017 InsanelyMac  |   News  |   Forum  |   Downloads  |   OSx86 Wiki  |   Designed by Ed Gain  |   Logo by irfan  |   Privacy Policy