Contribute
Register

[Guide] Patching DSDT/SSDT for LAPTOP backlight control

RehabMan

Moderator
Joined
May 3, 2012
Messages
186,728
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
I didn't do any debugging, but I set a Custom PS2 Map entry, which is e02b=0. It seems to have fixed the problem. Thanks for the guide.

By default e02b is already mapped to nothing (0x80) (PS2->ADB), which would generate a "bonk" audio sound when pressed.

If your brightness keys generate both a PS2 e02b and ACPI EC queries, it is a good idea to make the PS2 code do nothing, because you don't want to hear the 'bonk'. Note that PS2 code 0 is also mapped to ADB 0x80, but there might be a special case in the code... further debugging might explain the difference.
 
Joined
Sep 8, 2016
Messages
9
Motherboard
Dell Latitude 3440
CPU
Intel 4210U
Graphics
HD 4600 & nVidia GeForce 740m
Hey Rehab,

I own a Dell 3440, 4210U, nVidia 740m. I installed El Capitan(10.11) with a lot of effort and the help of these forum I almost got everything working on my Rig. Special thanks to your Dell patch for keyboards which which I was able to handle glitch of infinite loop when using the backlight control.

Although I have a similar problem to this and I think you might be able to help with this. It's about the instant wake issue, After a little wile digging I came to know that the PowerButton on my laptop is inside an infinite loop.

I strongly suspect that this is the issue with the instant wake and I want to correct it. Any leads/hints you might give me.
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
186,728
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Hey Rehab,

I own a Dell 3440, 4210U, nVidia 740m. I installed El Capitan(10.11) with a lot of effort and the help of these forum I almost got everything working on my Rig. Special thanks to your Dell patch for keyboards which which I was able to handle glitch of infinite loop when using the backlight control.

Although I have a similar problem to this and I think you might be able to help with this. It's about the instant wake issue, After a little wile digging I came to know that the PowerButton on my laptop is inside an infinite loop.

I strongly suspect that this is the issue with the instant wake and I want to correct it. Any leads/hints you might give me.

Off-topic.

ACPI patching for instant wake is covered in the ACPI patching guide: http://www.tonymacx86.com/threads/guide-patching-laptop-dsdt-ssdts.152573/
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
186,728
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Joined
Mar 22, 2016
Messages
30
Motherboard
Laptop make & model # > See Rules!
CPU
I5-3217U
Graphics
HD 4000, NVIDIA GT720M
Mac
  1. MacBook Pro
Classic Mac
  1. Portable
Mobile Phone
  1. Android
hi @RehabMan , i use Dell latitude E6520, brightness key is only _Q11 but so how to patch to enable in dsdt ?
 
Joined
Mar 22, 2016
Messages
30
Motherboard
Laptop make & model # > See Rules!
CPU
I5-3217U
Graphics
HD 4000, NVIDIA GT720M
Mac
  1. MacBook Pro
Classic Mac
  1. Portable
Mobile Phone
  1. Android
Read post #1.
It is possible for both keys (up/down) to generate a call to the same EC query method. This is the case with the Haswell HP Envy, for example. By examining the code it is possible to determine how to disambiguate. As it turns out a variable in the EC is set to indicate the function to be performed when the _Q13 method is invoked. The patch for this case is as follows:
Code (Text):

into method label _Q13 replace_content
begin
Store(HKNO, Local0)\n
If (LEqual(Local0,7))\n
{\n
// Brightness Down\n
Notify(\_SB.PCI0.LPCB.PS2K, 0x0405)\n
}\n
If (LEqual(Local0,8))\n
{\n
// Brightness Up\n
Notify(\_SB.PCI0.LPCB.PS2K, 0x0406)\n
}\n
If (LEqual(Local0,4))\n
{\n
// Mirror toggle\n
Notify(\_SB.PCI0.LPCB.PS2K, 0x046e)\n
}\n
end;
here, but it not working
 

RehabMan

Moderator
Joined
May 3, 2012
Messages
186,728
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
It is possible for both keys (up/down) to generate a call to the same EC query method. This is the case with the Haswell HP Envy, for example. By examining the code it is possible to determine how to disambiguate. As it turns out a variable in the EC is set to indicate the function to be performed when the _Q13 method is invoked. The patch for this case is as follows:

here, but it not working

Read post #1, "Problem Reporting".
 
Joined
Mar 22, 2016
Messages
30
Motherboard
Laptop make & model # > See Rules!
CPU
I5-3217U
Graphics
HD 4000, NVIDIA GT720M
Mac
  1. MacBook Pro
Classic Mac
  1. Portable
Mobile Phone
  1. Android
Read post #1, "Problem Reporting".
Daniel:~ daniel$ kextstat|grep -y acpiplat

13 2 0xffffff7f8289b000 0x65000 0x65000 com.apple.driver.AppleACPIPlatform (3.1) <12 11 7 6 5 4 3 1>

Daniel:~ daniel$ kextstat|grep -y appleintelcpu

28 0 0xffffff7f824a9000 0x2b000 0x2b000 com.apple.driver.AppleIntelCPUPowerManagement (218.0.0) <7 6 5 4 3 1>

36 0 0xffffff7f824a4000 0x3000 0x3000 com.apple.driver.AppleIntelCPUPowerManagementClient (218.0.0) <7 6 5 4 3 1>

Daniel:~ daniel$ kextstat|grep -y applelpc

88 0 0xffffff7f82346000 0x3000 0x3000 com.apple.driver.AppleLPC (1.7.3) <87 12 5 4 3>

Daniel:~ daniel$ sudo touch /System/Library/Extensions && sudo kextcache -u /

Password:

kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Trackpad.kext

kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Mouse.kext

kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Keyboard.kext

kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext VoodooPS2Controller.kext

kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext RIMBBUSB.kext

kext-dev-mode allowing invalid signature -67061 0xFFFFFFFFFFFEFA0B for kext AirPortBrcm4360.kext

kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext IntelMausiEthernet.kext

kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext IntelBacklight.kext

kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC_LPCSensors.kext

kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC_GPUSensors.kext

kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC_CPUSensors.kext

kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC_ACPISensors.kext

kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakeSMC.kext

kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakePCIID_BCM94352Z_as_BCM94360CS2.kext

kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakePCIID.kext

kext file:///System/Library/Extensions/DisableTurboBoostBattery.kext/ is in hash exception list, allowing to load

kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext CustomPeripheral.kext

kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext CodecCommander.kext

kext-dev-mode allowing invalid signature -67030 0xFFFFFFFFFFFEFA2A for kext AppleHDAHardwareConfigDriver.kext

kext-dev-mode allowing invalid signature -67061 0xFFFFFFFFFFFEFA0B for kext AppleHDA.kext

kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext AHCIPortInjector.kext

kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ACPIBatteryManager.kext
 

Attachments

  • EFI.zip
    408.6 KB · Views: 57
  • Daniel.ioreg
    3.9 MB · Views: 92
Top