Contribute
Register

[Guide] Patching DSDT/SSDT for LAPTOP backlight control

The AutoMerge feature is present in the official sourceforge Clover (my changes were accepted entirely).
I may even propose that AutoMerge=true be made default (it is a much more reasonable default behavior than the old Clover behavior, and is backward compatible except for a few edge cases).
My Clover has a few other fixes (some menu fixes, and "boot without caches" option) that have not made it to official Clover.

You should probably link the onejay09 thread.

@RehabMan - Sorry for the remedial question, I reviewed my DSDT and realized that I don't fully understand your recommended PCI0.AGP.VID->GFX0 renaming. Could you please tell me specifically what I am renaming? Am I renaming PCI0.AGP.VID to PCI0.AGP.GFX0? Also, should I rename AGP to PEG?

I'm confused, because after reviewing other GFX0/IGPU rename patches, I don't see any that are renaming to GFX0 (they seem to rename from PCI0.PEG.VID to PCI0.PEG.IGPU. Thanks for your patience with me.

Thank you.
 
Last edited:
@RehabMan - Sorry for the remedial question, I reviewed my DSDT and realized that I don't fully understand your recommended PCI0.AGP.VID->GFX0 renaming. Could you please tell me specifically what I am renaming? Am I renaming PCI0.AGP.VID to PCI0.AGP.GFX0? Also, should I rename AGP to PEG?

I believe it is only the leaf node that matters. Just just the VID part to GFX0.

I'm confused, because after reviewing other GFX0/IGPU rename patches, I don't see any that are renaming to GFX0 (they seem to rename from PCI0.PEG.VID to PCI0.PEG.IGPU. Thanks for your patience with me.

Make sure you understand the ACPI hotpatch guide...
You will need to understand it in order to create patches that target exactly what you want to rename (and only that).
 
I believe it is only the leaf node that matters. Just just the VID part to GFX0.



Make sure you understand the ACPI hotpatch guide...
You will need to understand it in order to create patches that target exactly what you want to rename (and only that).

@RehabMan - I implemented your suggestions as listed below. I haven't yet figured out the AppleGraphicsPowerManagement, so my system doesn't behave any differently (everything still works as before). The only minor difference I noticed is that in my preboot.log (in the attached files), the CPU max/min frequencies are not initially detected correctly where they were before; however, HardwareMonitor shows that speedstep is working properly, so I assume this is corrected. Could this be the result of removing the SSDTs and enabling AutoMerge? I also see the AutoMerge passes in the preboot.log.

EDIT: I restored SSDT-1 through SSDT-4 in the patched folder (keeping AutoMerge=True) and the CPU max/min frequencies are correct in the preboot.log.

My changes are as follows (note that I'm still using static patching - I'll learn hot patching later):
  • Reverted DSDT & SSDT change of PCI0.IGPU back to PCI0.VID
  • Changed PCI0.AGP.VID to PCI0.AGP.GFX0 in DSDT & SSDT
  • Removed SSDT-1 through SSDT-4 from patched folder, enabled AutoMerge and disabled Drop OEM (SSDT)
Next step is to figure out how to optimize graphics power management.

Thank you again for your help.
 

Attachments

  • Problem Report.zip
    1.3 MB · Views: 105
Last edited:
@RehabMan - I implemented your suggestions as listed below. I haven't yet figured out the AppleGraphicsPowerManagement, so my system doesn't behave any differently (everything still works as before). The only minor difference I noticed is that in my preboot.log (in the attached files), the CPU max/min frequencies are not initially detected correctly where they were before; however, HardwareMonitor shows that speedstep is working properly, so I assume this is corrected. Could this be the result of removing the SSDTs and enabling AutoMerge? I also see the AutoMerge passes in the preboot.log.

EDIT: I restored SSDT-1 through SSDT-4 in the patched folder (keeping AutoMerge=True) and the CPU max/min frequencies are correct in the preboot.log.

My changes are as follows (note that I'm still using static patching - I'll learn hot patching later):
  • Reverted DSDT & SSDT change of PCI0.IGPU back to PCI0.VID
  • Changed PCI0.AGP.VID to PCI0.AGP.GFX0 in DSDT & SSDT
  • Removed SSDT-1 through SSDT-4 from patched folder, enabled AutoMerge and disabled Drop OEM (SSDT)
Next step is to figure out how to optimize graphics power management.

Thank you again for your help.

I don't see any entries in config.plist/ACPI/DSDT/Patches, so no idea how you expect to accomplish renames without it. Without using hotpatch, you need static patch and you need to do the renames in all SSDTs that require those renames. It is an on/off kind of thing... either you're doing all renames via hotpatch, or you're doing all with static patch. There is no in between.

To do renames with ACPI hotpatch, use ACPI/DSDT/Patches and make sure your patches work on all SSDTs and DSDT.
 
Assuming Fn+Down and Fn+Up are your brightness keys in Windows, it is possible... and the procedures are covered in post #1.
You should read post #1.

And you should fix your profile such that it contains laptop hardware details as per FAQ:
http://www.tonymacx86.com/el-capita...faq-read-first-laptop-frequent-questions.html

I tried it. but I have an problem. I patched dsdt with debug patch (RMD0000) and apply instrument EC Queries. But when I press brightness up or down, it seem no thing in system.log, I try to use console to track my log, it showing "EC _Q8B enter, EC _Q8B exit" repeatedly. when I press brightness key, it not show any _Q method. so can u teach me how to fix it? I'm really new in hackitosh

here is my report before patch acpi dsdt
 

Attachments

  • CLOVER.zip
    10.9 MB · Views: 121
  • ioreg.zip
    636 KB · Views: 115
  • patchmatic.zip
    110.2 KB · Views: 110
here is my rp after patch dsdt. I apply EC method.
I pressed F14 and F15 repeatedly at 6:09 and fn+up,down,left,right at 6:10 (fn+left,right is volume down and up) and use terminal: log show --predicate "processID == 0" --start 2018-04-22 --debug >> ~/Documents/kenel.log
(kennel.log)
 

Attachments

  • CLOVER.zip
    10.9 MB · Views: 107
  • patchmaticaf.zip
    110.6 KB · Views: 111
  • Ioregaf.zip
    628.9 KB · Views: 101
  • kenel.log.zip
    203.7 KB · Views: 99
Last edited:
I don't see any entries in config.plist/ACPI/DSDT/Patches, so no idea how you expect to accomplish renames without it. Without using hotpatch, you need static patch and you need to do the renames in all SSDTs that require those renames. It is an on/off kind of thing... either you're doing all renames via hotpatch, or you're doing all with static patch. There is no in between.

To do renames with ACPI hotpatch, use ACPI/DSDT/Patches and make sure your patches work on all SSDTs and DSDT.

@RehabMan - I'm still using static patching and thought I renamed everything statically in the DSDT and SSDT-0. I removed SSDT-1 through SSDT-4 (which, as you pointed out, did not have any renames) from my patched folder and enabled AutoMerge.
 
@RehabMan - I'm still using static patching and thought I renamed everything statically in the DSDT and SSDT-0. I removed SSDT-1 through SSDT-4 (which, as you pointed out, did not have any renames) from my patched folder and enabled AutoMerge.

No question in your reply (not sure you intend to ask one).
No problem reporting files either.
 
No question in your reply (not sure you intend to ask one).
No problem reporting files either.

@RehabMan - no question. I was responding to your statement

I don't see any entries in config.plist/ACPI/DSDT/Patches, so no idea how you expect to accomplish renames without it

to explain that I was still using static renaming.

Thank you very much for your help. My Lenovo Thinkpad T61 is running virtually perfectly with Sierra. I will learn hot patching (so far, I have done all renames with static patches) when I install my new Wi-Fi card.
 
Back
Top