Contribute
Register

[Guide] Patching DSDT/SSDT for LAPTOP backlight control

Joined
Nov 23, 2011
Messages
250
Motherboard
H67MA-USB3-B3, Lenovo G580 (20157)
CPU
i5-2400, i5-3230M
Graphics
HD7870, Intel HD4000
Mac
Classic Mac
Mobile Phone
Ok, I got all tables from Linux.
View attachment tables.zip
When I added .aml, placed them all in one folder and tried to disassemble them with iasl, I got:
Code:
[FONT=arial]Loading Acpi table from file   APIC.aml - Length 00000140 (00008C)
[/FONT][FONT=Menlo][SIZE=2][FONT=arial]Loading Acpi table from file   UEFI.aml - Length 00000566 (000236)[/FONT][/SIZE][/FONT]
[FONT=Menlo][SIZE=2][FONT=arial]Pass 1 parse of [UEFI][/FONT][/SIZE][/FONT]
[FONT=Menlo][SIZE=2][FONT=arial]ACPI Warning: Invalid character(s) in name (0xA10ABF02), repaired: [****] (20141107/utstring-708)[/FONT][/SIZE][/FONT]
[FONT=Menlo][SIZE=2][FONT=arial]ACPI Warning: Invalid character(s) in name (0xA10ABF02), repaired: [****] (20141107/utstring-708)[/FONT][/SIZE][/FONT]
[FONT=Menlo][SIZE=2][FONT=arial]ACPI Warning: Invalid character(s) in name (0xA10ABF02), repaired: [****] (20141107/utstring-708)[/FONT][/SIZE][/FONT]
[FONT=Menlo][SIZE=2][FONT=arial]Could not parse external ACPI tables, AE_AML_NO_OPERAND[/FONT][/SIZE][/FONT]

-theandy
 

RehabMan

Moderator
Joined
May 2, 2012
Messages
183,519
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Ok, I got all tables from Linux.
View attachment 121648
When I added .aml, placed them all in one folder and tried to disassemble them with iasl, I got:
Code:
[FONT=arial]Loading Acpi table from file   APIC.aml - Length 00000140 (00008C)
[/FONT][FONT=Menlo][SIZE=2][FONT=arial]Loading Acpi table from file   UEFI.aml - Length 00000566 (000236)[/FONT][/SIZE][/FONT]
[FONT=Menlo][SIZE=2][FONT=arial]Pass 1 parse of [UEFI][/FONT][/SIZE][/FONT]
[FONT=Menlo][SIZE=2][FONT=arial]ACPI Warning: Invalid character(s) in name (0xA10ABF02), repaired: [****] (20141107/utstring-708)[/FONT][/SIZE][/FONT]
[FONT=Menlo][SIZE=2][FONT=arial]ACPI Warning: Invalid character(s) in name (0xA10ABF02), repaired: [****] (20141107/utstring-708)[/FONT][/SIZE][/FONT]
[FONT=Menlo][SIZE=2][FONT=arial]ACPI Warning: Invalid character(s) in name (0xA10ABF02), repaired: [****] (20141107/utstring-708)[/FONT][/SIZE][/FONT]
[FONT=Menlo][SIZE=2][FONT=arial]Could not parse external ACPI tables, AE_AML_NO_OPERAND[/FONT][/SIZE][/FONT]

-theandy

Read the guide carefully. You should not attempt to disassemble files other than DSDT/SSDT. The guide is *very* clear on this point.

FYI: Your GFX0 device is defined in SSDT4.
 
Joined
Nov 23, 2011
Messages
250
Motherboard
H67MA-USB3-B3, Lenovo G580 (20157)
CPU
i5-2400, i5-3230M
Graphics
HD7870, Intel HD4000
Mac
Classic Mac
Mobile Phone
Thank you very very much :headbang:
I'm currently reading the DSDT/SSDT patching Guide, really interesting.
It's probably a lot of work you put in all this. Nice to have a forum member like you.
I really appreciate this :thumbup:

Keep on the good work!

greets
-theandy
 
Joined
Dec 25, 2011
Messages
65
Motherboard
HP Envy 4-1043CL Ultrabook (Clover)
CPU
Ivy Bridge, i5 3317U / HM77
Graphics
HD 4000, 1366 x 768
Mac
Classic Mac
Mobile Phone
Overview

Assuming _Q10 is brightness down, and _Q11 is up.
Code:
into method label _Q10 replace_content
begin
// Brightness Down\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0205)\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0285)\n
end;
into method label _Q11 replace_content
begin
// Brightness Up\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0206)\n
    Notify(\_SB.PCI0.LPCB.PS2K, 0x0286)\n
end;

/QUOTE]

Hello, so I've got to the point where I can see from the console that down button is "EC _Q11" and then up button is "EC _Q12" for the brightness control. But I've tried to find where I should patch them in dsdt as well as ssdt files but I have no idea how to patch methods... Can you tell me how and where I should put those patches into?

Thanks in advance
 

RehabMan

Moderator
Joined
May 2, 2012
Messages
183,519
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
...
Hello, so I've got to the point where I can see from the console that down button is "EC _Q11" and then up button is "EC _Q12" for the brightness control. But I've tried to find where I should patch them in dsdt as well as ssdt files but I have no idea how to patch methods... Can you tell me how and where I should put those patches into?
...

The patches are for MaciASL.

Read here: http://www.tonymacx86.com/yosemite-laptop-support/152573-guide-patching-laptop-dsdt-ssdts.html
 
Joined
Dec 25, 2011
Messages
65
Motherboard
HP Envy 4-1043CL Ultrabook (Clover)
CPU
Ivy Bridge, i5 3317U / HM77
Graphics
HD 4000, 1366 x 768
Mac
Classic Mac
Mobile Phone
Joined
Aug 7, 2014
Messages
7
Mac
Classic Mac
Mobile Phone
Maybe this has been wrote in the topic but I found a very simple workaround to make the brightness keys work ( provided you already patched the DSDT to make the brightness slider appears in sys prefs / displays )

go into systems prefs, keyboard, shortcuts then display ( or screen ) , then reassign the god damn shortcuts to dim or augment the screen light.
You can reassign to F1 or F2 for example , and tada , it will work exactly like "FN + Fx" keys , it's even better to me cause you dont have to use 2 keys at the same time.

Ok it will eats 2 keys from the FX range of the keyboard, but who cares ?
 

RehabMan

Moderator
Joined
May 2, 2012
Messages
183,519
Motherboard
Intel DH67BL
CPU
i7-2600K
Graphics
HD 3000
Mac
  1. MacBook Air
Mobile Phone
  1. iOS
Maybe this has been wrote in the topic but I found a very simple workaround to make the brightness keys work ( provided you already patched the DSDT to make the brightness slider appears in sys prefs / displays )

go into systems prefs, keyboard, shortcuts then display ( or screen ) , then reassign the god damn shortcuts to dim or augment the screen light.
You can reassign to F1 or F2 for example , and tada , it will work exactly like "FN + Fx" keys , it's even better to me cause you dont have to use 2 keys at the same time.

Ok it will eats 2 keys from the FX range of the keyboard, but who cares ?

Or you can do it as described in the guide in post #1. Which makes the same keys work as they do on Windows and does not take away the capability to press any of the Fxx keys.

It is not that difficult...

Please note: The options to map function keys to brightness up/down in SysPrefs->Keyboard->Shortcuts(Display) do not exist for all SMBIOS configurations.
 
Joined
Sep 30, 2014
Messages
102
Motherboard
Asus k550jk-xo003h (MoBo x550jk) + Clover
CPU
i7-4710HQ - HM86
Graphics
nVidia GTX 850m (disabled) + Intel HD 4600 - 1366x768
Mac
Classic Mac
Mobile Phone
  1. Android
Hi everyone I'm trying to do this by patching the SSDT-5.aml, but I can't compile it for some errors, can anyone help me to fix it? Thank you!

View attachment SSDT-5.aml
 
Top