Jump to content
soumaxetuirk

GUIDE: How to Fix Brightness hotkeys in DSDT

103 posts in this topic

Recommended Posts

Hi!
I'm trying to enable Brightness hotkeys on my laptop (Lenovo E580 (20KS003AXS)). I've already found out what is the EC queries for them (_Q14, _Q15).
At this moment I cannot properly patch DSDT for this keys. I do not have any "PS2K/PS2M" methods in my DSDT.
Original code looks like:

Code:
            Method (_Q14, 0, NotSerialized)  // _Qxx: EC Query
            {
                If (\_SB.PCI0.LPCB.EC.HKEY.MHKK (0x01, 0x8000))
                {
                    \_SB.PCI0.LPCB.EC.HKEY.MHKQ (0x1010)
                }

                If (\VIGD)
                {
                    Notify (\_SB.PCI0.GFX0.DD1F, 0x86)
                }
            }

I do not understand how to modify it. I've tried replacing method body with:
1) \_SB.PCI0.LPCB.EC.HKEY.MHKQ (0x0406)
2) Notify (\_SB.PCI0.GFX0.DD1F, 0x0406)
, but with no success.

Can someone help me to understand how to complete this?

 

DSDT.dsl

debug_6964.zip

Share this post


Link to post
Share on other sites
Advertisement
On 5/15/2019 at 1:26 PM, dandepeched said:

Hi!
I'm trying to enable Brightness hotkeys on my laptop (Lenovo E580 (20KS003AXS)). I've already found out what is the EC queries for them (_Q14, _Q15).
At this moment I cannot properly patch DSDT for this keys. I do not have any "PS2K/PS2M" methods in my DSDT.
Original code looks like:

Code:

            Method (_Q14, 0, NotSerialized)  // _Qxx: EC Query
            {
                If (\_SB.PCI0.LPCB.EC.HKEY.MHKK (0x01, 0x8000))
                {
                    \_SB.PCI0.LPCB.EC.HKEY.MHKQ (0x1010)
                }

                If (\VIGD)
                {
                    Notify (\_SB.PCI0.GFX0.DD1F, 0x86)
                }
            }

I do not understand how to modify it. I've tried replacing method body with:
1) \_SB.PCI0.LPCB.EC.HKEY.MHKQ (0x0406)
2) Notify (\_SB.PCI0.GFX0.DD1F, 0x0406)
, but with no success.

Can someone help me to understand how to complete this?

 

DSDT.dsl

debug_6964.zip

Try use patches from this repository: https://github.com/olderst/Keyboard-Patches/tree/master/ACPIKeyboard

Share this post


Link to post
Share on other sites
Hey. I managed to make the brightness adjustment work through Fn + F2 / F3 keys using the DSDT patch and ACPIKeyboar.kext (although the brightness keys did not appear in the keyboard settings in the keyboard shortcuts, probably the monitor is somehow wrong, but it’s not important).

into method label _Q10 replace_content


begin

// Brightness Down\n

Notify(\_SB.PCI0.LPCB.PS2M, 0x0205)\n

Notify(\_SB.PCI0.LPCB.PS2M, 0x0285)\n

end;

into method label _Q11 replace_content

begin

// Brightness Up\n

Notify(\_SB.PCI0.LPCB.PS2M, 0x0206)\n

Notify(\_SB.PCI0.LPCB.PS2M, 0x0286)\n

end;[/CODE]

 

There was a desire to patch all F keys with similar patches for DSDT in order to hang on them almost all the functions of the original F keys from a Macbook.
 
I think I can recognize which "_Qxx" methods in DSDT are called when I press the F key, but I don’t know which codes 0x02 ???? means the native functions of the F keys in a Macbook. Can anyone tell me this?
 
Also, the DSDT patches from oldrest for my HP laptop also turned on the brightness adjustment on the F keys. Here are the links:

https://github.com/olderst/Keyboard-Patches

https://osxpc.ru/zavod/notebook/backlight-fn/

 

P.S.
I turned on the Fn key in BIOS and in macOS all the F key functions (brightness, sound, media) work together with FN, but pressing F11 without FN works as if I were making a touchpad gesture to display the desktop.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Similar Content

    • By Trung_Nguyen
      Hi, So I have been working to get the OpenCore bootloader to work on my E6230.
       
      What works:
      - QE/CI
      - Brightness slider
      - Brightness hotkey (Fn+Arrows)
      - USB2
      - Keyboard
      - Trackpad
      - Everything else except below, ig
       
      What does not(YET):
      - Audio (Actually, It detects the correct layout, but it doesn't recognize the speakers. My speakers are tested with the Preboot Diagnostics)
      - USB3.0(p/s: Patching PCI0._INI to get a Darwin system with OSYS=0x07D9 will stall the machine early)
      - Sleep/wake (cant wake up after sleep)
       
      Why I'm trying OpenCore:
      - Boot time is impressive (10s new installation here, compare to about a minute on Clover)
       
      P/s: If you haven't familiar with OpenCore, It loads ACPIs, Kexts in the order specified in the config.plist
      - My BIOS version is A11 (My battery does not hold any charge, AAR, I can't update the firmware).
       
      Please help me with the remaining, thanks
       
      Thanks
       
      EFI 2.zip
       
      Almost forgot: native ACPI
      origin.zip
    • By shinho73
      Can someone help me fix reboot issue? Actually it reboots, but sometimes the hackintosh just hangs with screen off. Here is the Extra folder containing org.chameleon.boot.plist. https://drive.google.com/drive/folders/1MX8-DpQk9kaRUfjPcToxf-ElWh-bN6EY?usp=sharing  and the spec of the PC. https://drive.google.com/drive/folders/1NlcUNK5DBzJFxeFeuyt92eRjQqwO5T32?usp=sharing Can someone look at it? I might be doing something wrong. Any help will be greatly appreciated. Thank you. 

    • By Slice
      I successfully installed macOS 10.11.6 and Windows 7 Pro SP1 in UEFI mode on the laptop.
      I know, there are detailed guides here and on osxlatitude.com but I was not agree with them and carefully check and test every step to tune my Mac.
       
      Hardware
      Intel® Core� i5-3320M CPU @ 2.60GHz, speedstep works with Clover default settings
      Chipset Intel 7 series, no patches needed
      Video: IntelHD4000 or NVS5200M switchable in BIOS, work in both cases
      LAN; Intel 82579LM, works with IntelMausiEthernet.kext v2.2.1
      Audio: IDT 92HD93BXX, works with VoodooHDA 2.9.0.
      SDHC reader O2Micro; works with native AppleSDHC.kext with Clover Arbitrary properties.
      USB3.0 works natively if not disabled in DSDT
      PS2 keyboard and touchpad works with VoodooPS2.
      WiFi: Dell Intel WiFi was replaced by Dell DW1520, Broadcom BCM943224HMS. DeviceID=4353
      LCD Screen 1366x768
      BIOS A12. Initially was A02. Then I flashed A23 and found it is quite bad. The screen is full of artefacts. Flash A12 and all is OK. Not tested other versions.
      For some reason BIOS can switched from Intel to Nvidia by itself so I have to do my solution working independent on this state.
       
      WiFi
      It is not working OOB although it has DeviceID known to Apple. The reason is WhiteList in the driver.
      I set MacModel as MacBookPro10,1 while the WiFi will work on MacBookAir. I make a patch in Clover.
      As well a patch for channels.
      I deleted a kext Brcm4331 because it has the same DeviceID. Let kext Brcm4360 to work alone.
       
      VideoCards
      In Bios we can set Optimus = Enable/Disable
      If Enable then we have two videocards Intel first and Nvidia second. In this case additional SSDT-3.aml will switch off Nvidia.
      If Disable then we have only Nvidia card. It will work if Board-ID taken from iMac13,2.
      But here there is contradiction with WiFi with required Board-ID from MacBookAir.
      So I take MacModel as MacBookPro10,1 which is most close by CPU IvyBridge.
      Set BoardID like iMac13,2 to make Nvidia working.
      Patch BoardID in Brcm4360 to make WiFi working.
      Now I have
      Inject->
      ->Intel=YES
      ->Nvidia=YES
      and SSDT-3.aml in ACPI\patched folder. This SSDT will switch off Nvidia if Intel card ON.
      For Intel graphics there is a patch against 8 apples at start.
      This Nvidia 5200 is Fermi and works in ElCapitan.
       
      Brightness
      No special kexts.
      The brightness controlled by keys F1,F2 and slider in Control Panel in both case Intel or Nvidia. Details here  #72 
       
      DSDT and SSDT
      This is very long story and finally I have working sleep in both cases Intel or Nvidia.
       
      Sensors
      I use my HWSensors3 with FakeSMC 3.5.2.
      I got monitoring:
      CPU temperature
      GPU temperature
      GPU main frequency
      GPU shader frequency
      Battery state % full, time to charged or time to empty.
      Battery voltage dinamically.
      Battery amperage dynamically. I can see it changes on heavy games.
      HDD temperature.

       
      Audio
      I like VoodooHDA and have no problems with it.
      The sound is clear, loud, and switchable between internal speaker and headphone.
      Mic is working.
       
      Bluetooth
      Just tested with BTFirmwareUpdate.kext and it works in 10.11.6. I not needed it so switched off by wireless switch at right side.
      For 10.13.6 there is other kext BRCMInjector.
       
      Keyboard, Touchpad and Touchstick
      Post #14
      I made my fork of the VoodooPS2 driver, take here sources and release version
      https://github.com/SergeySlice/VoodooPS2-for-ALPS
       
      My config, ACPI files and kexts are in attachment.
      05.12.2017
      EFI.7z
       
      EDITED:
      Better DSDT in the post #6.
      Sleep working even when AC inserted.
       
      EDITED 06.12.2018
      Now I have HighSierra and this is my EFI folder. Note, HighSierra is possible only with Intel graphics (Optimus is enabled in BIOS)
       

       
       
      Welcome to discussion!
      EFI-E6430.7z
      BRCMInjector.kext.zip
×