- Joined
- Jul 22, 2018
- Messages
- 8,025
- Motherboard
- Supermicro X11SPA-T
- CPU
- Intel Xeon W-3275 28 Core
- Graphics
- 2xAMD RX 580 8GB
- OS X/macOS
- 13.x
- Bootloader
- OpenCore (UEFI)
- Mac
- Mac mini
- MacBook Pro
- Mobile Phone
- Android
- iOS
How to Remap Brightness Hotkeys on Laptops
An EliteMacx86 Exclusive Guide - This guide covers the mapping of Brightness Hotkeys on Laptops
I. Overview
After enabling the backlight which results in adding a slider in SysPrefs->Displays, the brightness hotkeys will not work. This guide will enable the brightness hotkeys on your laptop. By using the hotkeys, you can control the amount of brightness.
Before starting with this guide, make sure you've implemented the Backlight Control on your Laptop
Once you've fixed your backlight control, you can remap your brightness hotkeys.
All the keys on the keyboard have a unique code. The brightness keys can be controlled as Fn+Fx. Some laptops use Arrow Keys too.
II. Available Methods for Mapping
This guide covers remapping the Brightness Hotkeys on Laptops. Both methods are described below. Chose one method. Do not use them together.
III. Preparation
Before you map the brightness hotkeys, you must prepare the system accordingly. To prepare the target system, follow the steps below.
STEP 1: Enable Brightness
The very first step is to enable Brightness to have the Brightness Hotkeys on your Laptop. Follow the guide linked below to enable Brightness on your Laptop.
Method #1: Using BrightnessKeys
Using the BrightnessKeys method, you simply need to add the
STEP 1: Add OS Check Fix Patch
On some laptop models, it might be necessary to add the OS Check Fix patch. This simulates Windows when running under Darwin (macOS/OS X). This can enable various Windows-only functionality in macOS/OS X. To add the OS Check Fix, follow the steps below.
STEP 2: Add Required Kext
The next step is to add the required kexts to enable the brightness hotkeys. BrightnessKeys doesn't work standalone. Lilu is needed to work in conjunction in order to enable the brightness hotkeys. This step shouldn't be required if you have followed the Installation Guide. However, if not, follow the steps below to add the kexts.
1. Download Lilu and BrightnessKeys from the downloads section of this forum.
2. Mount your ESP.
For Clover:
If you're using Clover, copy both the kexts to
For OpenCore:
If you're using OpenCore, copy both the kexts to
Method #2: Using Hotpatch
Method #3: Using DSDT Patch
Using the DSDT patch method, you can change the
STEP 1: Finding Keyboard Driver
First, you need to find what Keyboard driver your laptop uses. To find this, you can use IOReg.
1. Download and open IOReg and type "keyboard" in the search bar. You should see something similar to the screenshot attached below.
In this case, ApplePS2Keyboard attaches to ApplePS2KeyboardDevice, which attaches to ps2controller, all of which attach to KBC0, this is the device name we're looking for.
You'll need to know what exact codes or commands are called when the key is pressed. Usually, media keys generate EC queries. A quick way to know is to use ACPIDebug.kext to instrument all EC query methods, then press the keys while monitoring system.log. When you press the keys, the name of the method will be output, which will allow you to patch that method.
STEP 2: Determining the EC query methods
ACPIDebug.kext: https://github.com/RehabMan/OS-X-ACPI-Debug
Download and install the ACPIDebug.kext to S/L/E
Open MaciASL and add the ACPIDebug in Sources
Open your DSDT and apply "Add DSDT Debug Methods"
Also apply "Instrument EC Queries"
Click on Close
Save the DSDT file to any other location.
Copy the patched DSDT to your EFI/ACPI/Patched
Restart
Press your brightness keys and monitor the system.log.
STEP 3: Patching the DSDT for Hotkeys
Once you get the methods that result in the brightness keys, you can patch your DSDT.
Assuming that _Q11 is brightness down, and _Q12 is up, as per the logs.
1. Open your DSDT using MaciASL
2. Click on the Patch button
3. Click on Apply
4. Click on Close
5. Click on Compile
6. Go to File
7. Select Save as
8. A dialogue box will appear asking for the location and the file extension to save the file.
9. Select ACPI(ACPI Machine Language)
10. Click on Save
STEP 4: Installing the DSDT and SSDT
The next step is to install the DSDT and SSDT. To install the DSDT and SSDT, follow the steps below.
1. Mount your ESP
For Clover:
If you're using Clover, copy all patched DSDT to EFI/Clover/ACPI/patched
For OpenCore:
If you're using OpenCore, copy patched DSDT to EFI/OC/ACPI. You'll also need to add the ACPI entry in ACPI>Add section of your config.plist
Restart your System
After performing all the above steps, restart your system for the applied changes to take effect.
Now you should be able to get your Brightness Hotkeys working.
Problem Reporting
Details:
Credits:
RehabMan
Shinzon
EMlyDinEsH
An EliteMacx86 Exclusive Guide - This guide covers the mapping of Brightness Hotkeys on Laptops
I. Overview
After enabling the backlight which results in adding a slider in SysPrefs->Displays, the brightness hotkeys will not work. This guide will enable the brightness hotkeys on your laptop. By using the hotkeys, you can control the amount of brightness.
Before starting with this guide, make sure you've implemented the Backlight Control on your Laptop
GUIDE - How to Enable Backlight Control on Laptops [Clover/OpenCore]
How to Enable Backlight Control on Laptops [Clover/OpenCore] This guide describes the implementation of backlight control on Laptops and AIO using Clover and OpenCore bootloader. By following this guide, you'll be able to enable backlight control on your Laptop and AIO. In addition, this will...
elitemacx86.com
Once you've fixed your backlight control, you can remap your brightness hotkeys.
All the keys on the keyboard have a unique code. The brightness keys can be controlled as Fn+Fx. Some laptops use Arrow Keys too.
II. Available Methods for Mapping
This guide covers remapping the Brightness Hotkeys on Laptops. Both methods are described below. Chose one method. Do not use them together.
Method | Notes |
---|---|
BrightnessKeys |
|
DSDT Patch |
|
III. Preparation
Before you map the brightness hotkeys, you must prepare the system accordingly. To prepare the target system, follow the steps below.
STEP 1: Enable Brightness
The very first step is to enable Brightness to have the Brightness Hotkeys on your Laptop. Follow the guide linked below to enable Brightness on your Laptop.
GUIDE - How to Enable Backlight Control on Laptops [Clover/OpenCore]
How to Enable Backlight Control on Laptops [Clover/OpenCore] This guide describes the implementation of backlight control on Laptops and AIO using Clover and OpenCore bootloader. By following this guide, you'll be able to enable backlight control on your Laptop and AIO. In addition, this will...
elitemacx86.com
Method #1: Using BrightnessKeys
Using the BrightnessKeys method, you simply need to add the
Brightness.kext
. However, a slight modification might be required on some models.STEP 1: Add OS Check Fix Patch
On some laptop models, it might be necessary to add the OS Check Fix patch. This simulates Windows when running under Darwin (macOS/OS X). This can enable various Windows-only functionality in macOS/OS X. To add the OS Check Fix, follow the steps below.
STEP 2: Add Required Kext
The next step is to add the required kexts to enable the brightness hotkeys. BrightnessKeys doesn't work standalone. Lilu is needed to work in conjunction in order to enable the brightness hotkeys. This step shouldn't be required if you have followed the Installation Guide. However, if not, follow the steps below to add the kexts.
1. Download Lilu and BrightnessKeys from the downloads section of this forum.
2. Mount your ESP.
For Clover:
If you're using Clover, copy both the kexts to
EFI/Clover/Kext/Others
directory.For OpenCore:
If you're using OpenCore, copy both the kexts to
EFI/OC/Kexts
directory. You'll also need to add the kext entries in the Kernel section of your config.plist.NOTES:
|
Method #2: Using Hotpatch
Method #3: Using DSDT Patch
Using the DSDT patch method, you can change the
STEP 1: Finding Keyboard Driver
First, you need to find what Keyboard driver your laptop uses. To find this, you can use IOReg.
1. Download and open IOReg and type "keyboard" in the search bar. You should see something similar to the screenshot attached below.
In this case, ApplePS2Keyboard attaches to ApplePS2KeyboardDevice, which attaches to ps2controller, all of which attach to KBC0, this is the device name we're looking for.
NOTE:
|
You'll need to know what exact codes or commands are called when the key is pressed. Usually, media keys generate EC queries. A quick way to know is to use ACPIDebug.kext to instrument all EC query methods, then press the keys while monitoring system.log. When you press the keys, the name of the method will be output, which will allow you to patch that method.
NOTES:
|
STEP 2: Determining the EC query methods
ACPIDebug.kext: https://github.com/RehabMan/OS-X-ACPI-Debug
Download and install the ACPIDebug.kext to S/L/E
Open MaciASL and add the ACPIDebug in Sources
Open your DSDT and apply "Add DSDT Debug Methods"
Also apply "Instrument EC Queries"
Click on Close
Save the DSDT file to any other location.
Copy the patched DSDT to your EFI/ACPI/Patched
Restart
Press your brightness keys and monitor the system.log.
STEP 3: Patching the DSDT for Hotkeys
Once you get the methods that result in the brightness keys, you can patch your DSDT.
Assuming that _Q11 is brightness down, and _Q12 is up, as per the logs.
1. Open your DSDT using MaciASL
2. Click on the Patch button
Code:
#Edit methods _Q11 and _Q12 to interface with KBC0 (or PS2K in some systems),
into method label _Q11 replace_content
begin
// Brightness Down\n
Notify (KBC0, 0x20)\n
end;
into method label _Q12 replace_content
begin
// Brightness Up\n
Notify (KBC0, 0x10)\n
end;
4. Click on Close
5. Click on Compile
6. Go to File
7. Select Save as
8. A dialogue box will appear asking for the location and the file extension to save the file.
9. Select ACPI(ACPI Machine Language)
10. Click on Save
NOTES:
|
STEP 4: Installing the DSDT and SSDT
The next step is to install the DSDT and SSDT. To install the DSDT and SSDT, follow the steps below.
1. Mount your ESP
For Clover:
If you're using Clover, copy all patched DSDT to EFI/Clover/ACPI/patched
For OpenCore:
If you're using OpenCore, copy patched DSDT to EFI/OC/ACPI. You'll also need to add the ACPI entry in ACPI>Add section of your config.plist
Restart your System
After performing all the above steps, restart your system for the applied changes to take effect.
Now you should be able to get your Brightness Hotkeys working.
Problem Reporting
Details:
- macOS version
- Copy of IOReg
- Kextcache output
- DPCIManager/Status
- About This Mac
- System Information/Graphics/Displays
- System Preferences>Displays
- For Clover, compress EFI/Clover, exclude the themes folder.
- For OpenCore, compress EFI/OC.
- ACPI dump
- Do not include the complete EFI folder.
- Put all files in a folder with your name, compress files as Zip and attach files using site attachments only.
- Do not use any external links.
Credits:
RehabMan
Shinzon
EMlyDinEsH
Last edited: