Contribute
Register

[Guide] Patching LAPTOP DSDT/SSDTs


I need to use apple text edit app..and open config.plist file ~ find device from config.plist and edit to device-id=0x0412 ?


And search from config.plist (use apple app text edit) to /devices/fakeid/intelgfx=Find and changer to 016268086 ?

Sorry you for Ignorance

and thank you very much for sharing !
 
I need to use apple text edit app..and open config.plist file ~ find device from config.plist and edit to device-id=0x0412 ?

The plist linked from the guide already has the correct setting.


And search from config.plist (use apple app text edit) to /devices/fakeid/intelgfx=Find and changer to 016268086 ?

Doesn't make any sense. Your profile says you have Haswell. Why would you use a FakeID for Broadwell.

Always use a plist editor to edit config.plist (which, if you follow the guide, is not necessary anyway). Never use a text editor.
 
I have no errors in dsdt but it has 90 warnings..should I fix all the 90 warnings?
 
I have some questions about the original guide and DSDT patching techniques:

1. Should I use refs.txt all the time while decompiling? If I have decompiled the files w/o refs.txt and got them compiling resolving all the compilation errors by myself? Is it ok or it can cause some problems in the future?

2.
The iasl disassembler will place these External declarations before all the other External declarations. This, also, is a poor choice. Most of the time, you'll need to move them so they follow the other External declarations instead of preceding them.
How can I move these External declarations so they follow other External declarations?

3. I have an error on line: And(Local0, 0x60). Should I fix it just commenting the line or adding one more argument like so: And(Local0, 0x60, Local0) ?

4. Is this a correct fix?
//fix compilation error 1
into_all all code_regex Store\s\(\\_GPE.MMTB\s\(Local3,\s\\_GPE.OSUP\s\(Local3\)\),\sStore\s\(Local2,\sREG6\)\) replaceall_matched begin
Store (\\_GPE.MMTB, Local3)\n
\\_GPE.OSUP (Local3)\n
Store (Local2, REG6)\n
end;

5.
"Fix _WAK Arg0 v2"
"HPET Fix"
"SMBUS Fix"
"IRQ Fix"
"RTC Fix"
"OS Check Fix"
"Fix Mutex with non-zero SyncLevel"
It is better to use these patches by default not worrying that they can cause a problem?

6. Can I apply more than one OS Fix patch?

7.
The USB3 Mutliplex patch can assist in using AppleUSBXHCI.kext instead of GenericUSBXCHI.kext.
How do I know what *USB*.kext am I using? What kext am I supposed to use? Which one is better?

8.
If you have a Haswell CPU/8-series chipset, and AppleLPC.kext is not loading, you should use this patch to inject a compatible ID that will allow it to load:
"Haswell LPC"
Can I use "Haswell LPC" patch together with "USB _PRW(0x6D) and Rename XHC to XHC1"?

Can I use together "USB _PRW(0x6D) and Rename XHC to XHC1", "Haswell LPC" and "7-series/8-series USB"?

9. Can "Removing _DSM methods" cause any problems? It feels weird deleting a lot of code.

The reason I am asking those questions is that I can't get really rock stable El Capitan working on my Lenovo Yoga 2 13". Machine is going to sleep and waking normally, but sometimes two problems appear.

I. If I leave the notebook and it does something due to inactivity (swithing screen off, going to sleep), sometimes it is getting stuck on: black, switched off screen, fans working, no response if I try to wake it up. The only solution is to do hard shutdown by holding power button.

II. Sometimes the touchpad simply disconnects. The interesting thing is that the keyboard is still working. The most interesting thing is - if I connect my external wireless mouse I can move the cursor BUT the clocks aren't working.

I have attached a copy of my Clover folder w/o themes. Thank you.
 

Attachments

  • CLOVER.zip
    5.5 MB · Views: 66
I have some questions about the original guide and DSDT patching techniques:

1. Should I use refs.txt all the time while decompiling? If I have decompiled the files w/o refs.txt and got them compiling resolving all the compilation errors by myself? Is it ok or it can cause some problems in the future?

The use of refs.txt can be useful in reducing the number of errors you need to fix.

2.
How can I move these External declarations so they follow other External declarations?

Select, cut, paste. Just like you'd move a paragraph after another paragraph in a word processor.

3. I have an error on line: And(Local0, 0x60). Should I fix it just commenting the line or adding one more argument like so: And(Local0, 0x60, Local0) ?

I tend to leave this code as the OEM wrote it. In that case, And(Local0,0x60) does nothing. So you can remove the code. If you changed it to And(Local0,0x60,Local0) you would then be doing something with Local0 that the original code didn't do.

Obviously, it is strange that the original programmer wrote a line of code that has no effect. Perhaps they meant to store the result of And into Local0, or perhaps they meant to store it into some other variable. How can we know? What we do know is that the code as written has no effect. And we know that the OEM tested the code to their satisfaction. And that's why I assume the code should be left as is... and in order to get it to compile, you remove the code.

If you found an issue with the code (eg. a demonstrable bug), you might be tempted to investigate and test the alternative.

4. Is this a correct fix?

There is a patch already in the repo for that. In the cases I looked at, MMTB is not defined anywhere, and this code never executes due to the conditions placed on it.

5.
It is better to use these patches by default not worrying that they can cause a problem?

You should read the comments in the patch to better answer your question... Or...to at least come up with better, more specific questions.

6. Can I apply more than one OS Fix patch?

Yes, but it would be rather unusual to do so. You can read the documentation on _OSI to understand more.

7.
How do I know what *USB*.kext am I using? What kext am I supposed to use? Which one is better?

Not sure what you're asking... Please be more specific.

8.
Can I use "Haswell LPC" patch together with "USB _PRW(0x6D) and Rename XHC to XHC1"?


Each patch solves an independent problem. They are not related in any way.

Can I use together "USB _PRW(0x6D) and Rename XHC to XHC1", "Haswell LPC" and "7-series/8-series USB"?

7-series/8-series USB is not needed with the _PRW patch, as the _PRW patch is a superset of it.

9. Can "Removing _DSM methods" cause any problems? It feels weird deleting a lot of code.

OS X will not use any of the _DSM methods as written. We remove them so we can add OS X specific _DSM methods without issue.

The reason I am asking those questions is that I can't get really rock stable El Capitan working on my Lenovo Yoga 2 13". Machine is going to sleep and waking normally, but sometimes two problems appear.

I. If I leave the notebook and it does something due to inactivity (swithing screen off, going to sleep), sometimes it is getting stuck on: black, switched off screen, fans working, no response if I try to wake it up. The only solution is to do hard shutdown by holding power button.

II. Sometimes the touchpad simply disconnects. The interesting thing is that the keyboard is still working. The most interesting thing is - if I connect my external wireless mouse I can move the cursor BUT the clocks aren't working.

I have attached a copy of my Clover folder w/o themes. Thank you.

Download patchmatic: https://bitbucket.org/RehabMan/os-x-maciasl-patchmatic/downloads/RehabMan-patchmatic-2015-0107.zip
Extract the 'patchmatic' binary from the ZIP. Copy it to /usr/bin, such that you have the binary at /usr/bin/patchmatic.

In terminal,
Code:
if [ -d ~/Downloads/RehabMan ]; then rm -R ~/Downloads/RehabMan; fi
mkdir ~/Downloads/RehabMan
cd ~/Downloads/RehabMan
patchmatic -extract

Note: It is easier if you use copy/paste instead of typing the commands manually.

Post contents of Downloads/RehabMan directory (as ZIP).

Also, post ioreg: http://www.tonymacx86.com/audio/58368-guide-how-make-copy-ioreg.html. Please, use the IORegistryExplorer v2.1 attached to the post! DO NOT reply with an ioreg from any other version of IORegistryExplorer.app.

And output from:
Code:
kextstat|grep -y acpiplat
kextstat|grep -y appleintelcpu
kextstat|grep -y applelpc

Also, post EFI/Clover folder as ZIP (press F4 at main Clover screen before collecting). Please eliminate 'themes' directory, especially if you have an overabundance of themes installed.

Also post output of:
Code:
sudo touch /System/Library/Extensions && sudo kextcache -u /

Compress all files as ZIP. Do not use external links. Attach all files using site attachments only.
 
kextstat output
MacBook-Air:RehabMan xleb$ kextstat|grep -y acpiplat 13 2 0xffffff7f82ba0000 0x66000 0x66000 com.apple.driver.AppleACPIPlatform (4.0) 3BE4E926-E063-3BBD-BE05-F6F97358C7A4 <12 11 7 6 5 4 3 1>
MacBook-Air:RehabMan xleb$ kextstat|grep -y appleintelcpu
MacBook-Air:RehabMan xleb$ kextstat|grep -y applelpc
102 0 0xffffff7f825b2000 0x3000 0x3000 com.apple.driver.AppleLPC (3.1) 32BDCF9F-0473-32D4-9DAE-F523EFB2D244 <81 12 5 4 3>

touch /S/L/E
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext Soundflower.kextkext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakePCIID_Intel_HDMI_Audio.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakePCIID_Intel_HD_Graphics.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakePCIID_Broadcom_WiFi.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext FakePCIID.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext CodecCommander.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext BrcmPatchRAM2.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext BrcmFirmwareRepo.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 ACPIBatteryManager.kext
kext-dev-mode allowing invalid signature -67062 0xFFFFFFFFFFFEFA0A for kext ACPIBacklight.kext

at least come up with better, more specific questions
To be more specific - can applying of those patches cause problems described in the post above?

There is a patch already in the repo for that.
What is the name of the patch? I am afraid of using patches that delete code because I am used to think this can cause problems.


7.
How do I know what *USB*.kext am I using? What kext am I supposed to use? Which one is better?


Not sure what you're asking... Please be more specific.
I mean I don't know am I using GenericUSB kext or AppleUSB one, which of these I need to use and which is better.
 

Attachments

  • CLOVER.zip
    5.5 MB · Views: 48
  • MacBook Air.ioreg
    4 MB · Views: 116
  • patchmatic.zip
    28.1 KB · Views: 64
To be more specific - can applying of those patches cause problems described in the post above?

Unlikely.

Your problem is more likely due to one or more of these problems (looking at your files):
- power management is not implemented: http://www.tonymacx86.com/el-capita...01-guide-native-power-management-laptops.html
- HDMI audio not implemented (see FAQ)
- USB probably not implemented correctly (UsbConnector values need tweaking): http://www.tonymacx86.com/el-capitan-laptop-support/173616-guide-10-11-usb-changes-solutions.html
- Android File Transfer known to cause issues (no idea why it is hooking every USB port)
- Soundflower can cause issues (avoid 3rd party software until your system is stable... then you know who to blame)
 
Do I still have to implement power management if I included all of the SSDT's and can see the normal processor frequency scaling in Intel Power Gadget?
HDMI audio not implemented (see FAQ)
Can HDMI audio cause such sleep problems?

Also, are all of the patches applyed to my DSDT/SSDT's normal? No overkill or need to patch more?


And if I create perfect or nearly perfect DSDT/SSDT combo for my machine will the other Lenovo Yoga 2 13" users be able to apply my DSDT/SSDTs?
 
Do I still have to implement power management if I included all of the SSDT's and can see the normal processor frequency scaling in Intel Power Gadget?

Yes.

Can HDMI audio cause such sleep problems?

No idea. Just something I noticed is not implemented.

Also, are all of the patches applyed to my DSDT/SSDT's normal? No overkill or need to patch more?

I didn't see anything unusual. Note that you could use the much simpler solution for backlight control: "Brightness Fix" + IntelBacklight.kext.
 
Back
Top