intruder16 Posted March 17, 2015 Share Posted March 17, 2015 Compatible with Sierra! Hey guys, I have created a script to auto-patch DSDT/SSDT's automatically with the given patches. Never use DSDT/SSDT's from another PC. Some details: Rest assured, this script will NOT in any way make any kind of change to your system! You do NOT need to run this script with "sudo"! At first i created this script for my purposes only, that is, patching tables extracted from linux. I use a modded BIOS and due to increased settings it was troublesome to patch tables again and again after changing "major" settings. This script is created for the fact that if you change some BIOS settings you will have to re-extract and re-patch the ACPI tables (a headache for modded BIOS users) so that you will have a patched DSDT specifically for your BIOS settings. What happens is for some settings you change in BIOS (like DVMT pre-alloc etc.) the result is reflected in your ACPI tables. So if you use someone else's DSDT there "may" be unexplained behaviours on your end coz both of your systems having different BIOS settings (not usually but with modded BIOS chances are significantly higher). Since clover can extract tables using "F4" at boot menu all you have to do is re-patch your extracted tables with necessary patches and this script will do that within seconds. So you have your system ready in 2 mins max. Now i am releasing this script to the public. I've changed many things now for public use. How to use it? Very simple! Clone my git repository with the following command: git clone https://github.com/intruder16/Y510p-OS-X.git OR if you do not have a working internet connection, go to https://github.com/intruder16/Y510p-OS-X download the repo as zip (option in down-right corner). Extract the zip. This will create a "Y510p-OS-X" folder with all the patches and autopatcher script (Y510p.sh). In a terminal navigate to the unpacked Y510p git data and execute the following: Make the script executable: chmod +x Y510p.sh Run the script ./Y510p.sh -t "target dir" By default it will patch all SSDT's BUT it will keep the bare minimum (only 3 SSDT's - Custom CPU, iGPU & dGPU) required for a working OS X. There's a new feature/option if you want to keep all SSDT's (OEM CPU related etc.). Add/pass an argument "-k" to the script to use it. Note : You can pass arguments (-t, -u, -k, etc) in any order you like ! For Example : ./Y510p.sh -k -t "target dir" or ./Y510p.sh -t "target_dir" -k or ./Y510p.sh -kt "target_dir" etc. To update to latest version : ./Y510p.sh -u For more options ./Y510p.sh -h The script will guide you through the process. NOTE-1: You must specify (--target/-t ) a target folder (containing extracted DSDT/SSDT's) NOTE-2: I'll highly advice you to check logs in "tmp/" after running the script. Watch the script in action here: http://showterm.io/648b3542686f04a9b03f7#slow Change-log: v1.1 : Initial Release (Stable - No errors) (17 Mar 2015) Internet check - the script will check for internet conn. if its available it will download all up-to-date patches required else it will use patches from "patches/" folder (i'll keep them up-to-date) Multiple runs - if you run the script more than once, you won't have to worry about previous leftovers they won't be overwritten simply copied to new folder inside "tmp/" like "tmp-1", "tmp-2" etc. Added "logging system" Added "patches check" Added choice for both Synaptics & ELAN Touchpad users (needed for brightness keys to work) Added choice for debug methods (DSDT, _WAK/_PTC, Qxx) Intelligent SSDT patching, that is, no matter how you extract acpi tables they will be patched always right. For ex. Every method has unique naming of ssdt's. If extracted from linux then ssdt1,ssd2,etc and ssdt6, ssdt7 & ssdt8 inside dynamic folder. If extracted using clover then ssdt-0, ssdt-1, ssd-2, ssdt3x, ssdt-4x etc. Now the script will look at the contents of SSDT and patch it with required patches. Added brief description at the start of script about what it is going to do. v1.2 (28 Mar 2015) : Cleanup -Removed Bogus SSDT's -Using "OS Check Windows 12" patch now (might help with native usb drivers) Added choice for "LID Sleep" Added choice for "Wake On USB" Added an option to use native CPU PM SSDT, but that's experimental and that's why disabled in script. v1.3 (12 Apr 2015) : Added "MCHC" patch (forgotten) patches updated for offline mode. v1.4 (21 Apr 2015) : Added new option (-k) to keep all SSDT's using only 2 OEM SSDT's (iGPU & dGPU) by default minor improvements/optimizations using "getops" now added new CPU SSDT for 10.10.3 & SMBIOS MacBookPro 11,2 v1.5 (06 Dec 2015) : Added support for El Caiptan 10.11 & above Added support for SmartTouchpad users for both Synaptic & ELAN touchpads minor improvements/optimizations v1.6 (08 Dec 2015) : Fixed USB patches for El Caiptan 10.11 & above Fixed a bug where DSDT won't compile if you did not chose to add "DSDT Debug Methods" but chose "WAK/PTS" or "EC Queries" Raised "tmp-1", "tmp-2" folder limit to "tmp-100" (previously upto "tmp-10") v1.7 (28 Sep 2016) : Fixed for Sierra 10.12.x Using IntelBacklight (faster) instead of ACPIBacklight patches. Use IntelBacklight.kext with it. minor improvements/optimizations Added optional clover hotpatch. IMP: (Only for El Capitan 10.11+ users) Don't forget to install FakePCIID.kext & FakePCIID_XHCIMux.kext (included in FakePCID zip) from here. NEW: A new clover hotpatch method is also added here. Credits: RehabMan : https://github.com/RehabMan/Laptop-DSDT-Patch Pike R Alpha : https://github.com/Piker-Alpha/ssdtPRGen.sh (For CPUSpeedStep SSDT patch) the-darkvoid : https://github.com/robvanoostenrijk/XPS9530-OSX (For the idea) For more info visit : https://github.com/intruder16/Y510p-OS-X If you would like to modify this script for your own purposes feel free to modify it, but if sharing publicly give credits! Any feedback and suggestions are appreciated. Enjoy. 1 Link to comment Share on other sites More sharing options...
ahmed_ais Posted March 28, 2015 Share Posted March 28, 2015 This is an awesome work. I have an idea if you have the time and will to implement it. Currently this work is dedicated for Y510P only but why not expand it? Something like: Preparing a list of patches (those available in your repository) The user picks from them all the relevant to his PC The selection is saved to an XML file (can be edited away from your program) in a special location to the program The program patch the ACPI files according to the selection from the XML file Next time if the program found the XML in place, it asks the user to directly patch using that XML file The program offers an ability to add/remove/rearrange patches and update the XML accordingly Since some patches needs to be edited for certain hardware, the program can offer this functionality: Save a copy from the repository patch in the XML file The user edit the patch inside the XML file according to his hardware The program check some flags while using the XML in patching so it knows the most up-to-date version to use (online or XML) If online version is updated (for whatever reason), the user is notified to fetch the new patch and edit it to match his hardware if XML version is still up-to-date then the program use it right away A GUI as a front end to the script? would be awesome for newbies ! I think this would be a hit, thought it would need much work from you to put it in the perfect shape ... 2 Link to comment Share on other sites More sharing options...
intruder16 Posted March 28, 2015 Author Share Posted March 28, 2015 That is a nice idea. I remember a program like that, made in '11 i think but never updated. It would take a long time. But i'm really sorry i really don't have that much time. The only problem i think it should never be implemented is that it defeats the whole purpose of learning. Creating an ideal patcher is something very tiresome. Someone always will have some problem with it. Its like this old adage : "Give a man a fish and he can eat for a day, teach a man how to fish and he'll eat for a lifetime." Also it is very straightforward to patch using patchmatic (if you already have your patches). You won't believe the first version of this script (for my own use) was something like this : #!/bin/sh cd working_dir patchmatic DSDT.dsl some_patch1.txt DSDT.dsl patchmatic DSDT.dsl some_patch2.txt DSDT.dsl patchmatic DSDT.dsl some_patch3.txt DSDT.dsl patchmatic DSDT.dsl some_patch4.txt DSDT.dsl exit Then i saw someone made a script for auto-post-config of OS X (including DSDT, clover config etc) and i changed my script to what it is today. But i very much appreciate your suggestion and it would be great if someone could do that. Thanks. Link to comment Share on other sites More sharing options...
ahmed_ais Posted March 29, 2015 Share Posted March 29, 2015 That is a nice idea. I remember a program like that, made in '11 i think but never updated. It would take a long time. But i'm really sorry i really don't have that much time. I agree, I'm not sure anybody would have that much time! The only problem i think it should never be implemented is that it defeats the whole purpose of learning. Creating an ideal patcher is something very tiresome. Someone always will have some problem with it. Its like this old adage : "Give a man a fish and he can eat for a day, teach a man how to fish and he'll eat for a lifetime." That's true which is why I did not include a downloads section in my guide for long time. People should learn to Google for the right tools and do their stuff by their own hand to learn. However, I have found that most people don't have the will to learn as much as having the thing working. They would agree to try by themselves but they rarely read and almost always ask and its always the same mistakes and questions which makes the more experienced ones wants to get rid all this by providing pre-made solutions! 1 Link to comment Share on other sites More sharing options...
intruder16 Posted April 11, 2015 Author Share Posted April 11, 2015 DSDT Auto-Patcher for Y510p Updated. Changelog: v1.3 (12 Apr 2015) : Added "MCHC" patch (forgotten) patches updated for offline mode. Link to comment Share on other sites More sharing options...
intruder16 Posted April 21, 2015 Author Share Posted April 21, 2015 DSDT Auto-Patcher for Y510p Updated. Changelog: v1.4 (21 Apr 2015) : Added new option (-k) to keep all SSDT's using only 2 OEM SSDT's (iGPU & dGPU) by default minor improvements/optimizations using "getops" now added new CPU SSDT for 10.10.3 & SMBIOS MacBookPro 11,2 A new argument (-k) has been added. Use it if you want to keep all the SSDT's. ./Y510p.sh -k -t "target_dir" or ./Y510p.sh -t "target_dir" -k or ./Y510p.sh -kt "target_dir" etc. 1 Link to comment Share on other sites More sharing options...
chris1111 Posted April 21, 2015 Share Posted April 21, 2015 Great Job Congrats ! Thank you ! 1 Link to comment Share on other sites More sharing options...
ahmed_ais Posted May 18, 2015 Share Posted May 18, 2015 I just tried this method for the first time. Yep, great work but unfortunately it didn't help me!!It's not a problem with your work but something is wrong with the BIOS (v3.08), the disassembled native tables do not compile without errors. Do you know anything about this?? Edit: Never mind, it was a weird problem with MaciASL. I used Rehabman's version and all is fine now. Link to comment Share on other sites More sharing options...
intruder16 Posted May 22, 2015 Author Share Posted May 22, 2015 Sorry for being away for so long. I was very busy. Glad you got it working. I really don't remember, but i think i did try it with new BIOS (v3.08) and it worked alright. If you find any issues feel free to give a feedback here. Link to comment Share on other sites More sharing options...
ahmed_ais Posted May 22, 2015 Share Posted May 22, 2015 Welcome back. Nope, nothing to report and everything is in order. Good job! Link to comment Share on other sites More sharing options...
TarvoMaesepp Posted June 10, 2015 Share Posted June 10, 2015 Hello, I have extracted my tables using CLOVER f4 method and I have already patched those files using your git repo method. Now I copied these into patched folder but I don't see any difference. I tried ahmed_ais config.plist file but if I use this .plist file I can't access to OS X. It restarts after apple logo. What should I do? Link to comment Share on other sites More sharing options...
ahmed_ais Posted June 10, 2015 Share Posted June 10, 2015 Hello, I have extracted my tables using CLOVER f4 method and I have already patched those files using your git repo method. Now I copied these into patched folder but I don't see any difference. I tried ahmed_ais config.plist file but if I use this .plist file I can't access to OS X. It restarts after apple logo. What should I do? Hi. Please state what's the problem you are having clearly. You say you did not see any difference, to what? Patching the tables is necessary and the method here works brilliantly. Also having properly configured config.plist is necessary and the one I uploaded on the other topic is working fine AFAIK. I am not sure why your hack reboots as you say but try to: Boot in verbose mode so you can see any logs that could help. (post a screenshot if possible) Boot without dropping any tables (from Clover interface) so if it does booted then you may have a problem with one or more of your tables. Boot using the USB installer so it would boot without patched tables and without my config.plist Post your EFI folder here so one could investigate Link to comment Share on other sites More sharing options...
TarvoMaesepp Posted June 10, 2015 Share Posted June 10, 2015 Hi. Please state what's the problem you are having clearly. You say you did not see any difference, to what? Patching the tables is necessary and the method here works brilliantly. Also having properly configured config.plist is necessary and the one I uploaded on the other topic is working fine AFAIK. I am not sure why your hack reboots as you say but try to: Boot in verbose mode so you can see any logs that could help. (post a screenshot if possible) Boot without dropping any tables (from Clover interface) so if it does booted then you may have a problem with one or more of your tables. Boot using the USB installer so it would boot without patched tables and without my config.plist Post your EFI folder here so one could investigate Hello, by I don't see difference I meant I don't fixed any problems. If I use original config.plist then it will boot to the OS X but it won't detect my dsdt files and with your config.plist it won't boot into OS X. So I don't know what to do. This is my CLOVER folder: https://mega.co.nz/#!7NUSRJIb!eY_iQjjOI6ofeG-C0ekjB3FMX_FtssvTO3tT1u9IwHY In this Folder I have standard CLOVER config.plist This is verbose mode using your config.plist http://www.upload.ee/image/4772071/IMG_0026.JPG I hope someone can help me out. Link to comment Share on other sites More sharing options...
ahmed_ais Posted June 10, 2015 Share Posted June 10, 2015 Hello, by I don't see difference I meant I don't fixed any problems. If I use original config.plist then it will boot to the OS X but it won't detect my dsdt files and with your config.plist it won't boot into OS X. So I don't know what to do. This is my CLOVER folder: https://mega.co.nz/#!7NUSRJIb!eY_iQjjOI6ofeG-C0ekjB3FMX_FtssvTO3tT1u9IwHY In this Folder I have standard CLOVER config.plist This is verbose mode using your config.plist http://www.upload.ee/image/4772071/IMG_0026.JPG I hope someone can help me out. Still you did not define what are these problems you are trying to fix unless you mean that the problem is OS X does not load your patched ACPI tables. Am I correct? I toke a quick look at your Clover folder and found things I am not used to: Some drivers are missing (EmuVariableUefi-64.efi and PartitionDxe-64.efi) and one weird driver is there (HPFanReset.efi) I cannot find any need for the kext: RealtekRTL8111.kext. I will also assume that you installed the remaining necessary kexts in /S/L/E. Many files are absent from the folder: tools Some folders are missing: drivers32UEFI, OEM, doc While Clover may not complain about the missing items as some of them are actually not needed for x64 system, I believe this installation is corrupt. I advice you to backup this Clover folder, remove it from EFI, and install a recent version of Clover following the steps in the guide. Regarding config.plist, the one included with your Clover folder has many things to be removed as it is too generic. One advice about config.plist: only include the options you need. Finally about my config.plist (after seeing the picture you uploaded), I think you used it as is without modification right? If so, edit it to include a valid SMBIOS as I do not include one inside a public config.plist (for serial number concerns) and also do not copy it from your other config.plist. Try to use Clover Configurator to generate the SMBIOS then look at the code inside the file to learn more about the structure of this tag. A general advice: follow the guide literally and you should be totally fine. If you still have problems, post back in the guide as your problems seems not related to this one and may confuse other people of thinking there are problems with the Auto-Patcher. Link to comment Share on other sites More sharing options...
TarvoMaesepp Posted June 10, 2015 Share Posted June 10, 2015 Ooh, it is so difficult to express myself because english is not my native language. I now try to explain everything from 0 to where I am. What I have done: 1. Installed OS X Yosemite following these guides 2. After install I dropped my tables using Clover f4 method. 3. After table dropping I patched my files using "Intruder 16" repo. 4. Copied all files like said. Problem: If I use the those original CLOVER files, I can boot to OS X but I have problems like picture is flicering etc. If I use your config.plist I can't boot into OS X anymore. Now answers for your questions. I havent installed any drivers only one kext to get network. One more problem is that I don't understand this Clover Configurator. It is very hard to follow because I don't see the code behind it. In tonymacx86 forum one guy said, I am not allowed to edit config.plist in text editor because it will corrupt my config.plist file. My questions. How can I modify your config.plist with clover configurator if I can't boot with it? How can i "say" to clover configurator that I use these DSDT and SSDT files? Maybe you have a little time to add me on Skype; tarvomaesepp and help me using team viewer. Best wishes! Link to comment Share on other sites More sharing options...
ahmed_ais Posted June 10, 2015 Share Posted June 10, 2015 Ooh, it is so difficult to express myself because english is not my native language.... No worries. Try your best to describe the problem, and I will try my best to understand. After all, English is not my native language too. ... I now try to explain everything from 0 to where I am. What I have done: 1. Installed OS X Yosemite following these guides 2. After install I dropped my tables using Clover f4 method. 3. After table dropping I patched my files using "Intruder 16" repo. 4. Copied all files like said. Not bad. I would say you have succeeded to install OS X on your machine. But remains to fix it so you have a better experience. By the way, please confirm you have Y510p! Problem: If I use the those original CLOVER files, I can boot to OS X but I have problems like picture is flicering etc. This is not related to the original Clover files. This is because graphics have to be fixed as described in detail within the guide. If I use your config.plist I can't boot into OS X anymore. I already said it is un-complete file as it lacks SMBIOS section which is mandatory. But it is still preferred over the default one as it only contains what we need for Y510p and proven to work. By the way, even when you complete my config.plist you will still have bad graphics because they have to be fixed away from Clover as I said above. Now answers for your questions. I havent installed any drivers only one kext to get network. Regarding kexts, we need a handful number of them to fix our setup. There is one for ethernet (LAN), two for graphics, one for brightness, one for battery, one for keyboard & touchpad, one or two for audio, and you might also need one for WiFi. Links for all this and description of what they do and other important details are covered thoroughly in the guide. One more problem is that I don't understand this Clover Configurator. It is very hard to follow because I don't see the code behind it. In tonymacx86 forum one guy said, I am not allowed to edit config.plist in text editor because it will corrupt my config.plist file. My questions. How can I modify your config.plist with clover configurator if I can't boot with it? How can i "say" to clover configurator that I use these DSDT and SSDT files? Clover configurator is just a front-end / GUI to edit config.plist. It is useful for newbies to get a picture of what's going on though it have some hiccups and all advanced users end up editing the code directly within config.plist. It is correct that normal text editors can destroy a .plist file and render it unusable. However, there are other special editors that can edit .plist files efficiently like Xcode and PlistEditPro. To edit the config.plist I supplied, boot with the USB installer and use PlistEditPro from within OS X to edit the file then save it in the correct location. And to tell Clover to use your tables, you have to tell it not to use default/native tables (OEM). This is done by checking "Drop OEM" in ACPI section and of course your tables must be in the proper location. One more thing, make sure the structure in EFI partition is correct. This means, EFI partition > EFI folder > Clover folder > (ACPI, Kexts, .... ) folders. Kindly invest half an hour to read the guide because all your questions are answered there and you will find more to learn about. It is not appropriate to keep writing the same things while they are already in the guide with details. Me and others spent a lot of time to gather all the required information for the pleasure of Y510p users so why don't you read and benefit? And again, try to post in the right topic to get the best response and keep other topics clean and organized. Follow the guide and post back there if you still have issue (I am not going to reply about this here anymore). Link to comment Share on other sites More sharing options...
intruder16 Posted June 11, 2015 Author Share Posted June 11, 2015 ...1. Installed OS X Yosemite following these guides https://www.youtube.com/watch?v=xb0qraapHtE.... Do you have Y50 or Y510p? Keep in mind, this thread is for Y510p only. If you have Y510p refer the guide here. If you have Y50-70 refer the guide here. Read it thoroughly, follow it, you'll have OSX running in your laptop in no time. Link to comment Share on other sites More sharing options...
TarvoMaesepp Posted June 11, 2015 Share Posted June 11, 2015 I now start all over. I have already created my USB with 2 partitions, one is YOSEMITE and the second partition is CLOVER. May I ask you for your EFI folder since the most hardest thing to understand is the CLOVER. Thank you for your time guys and I promise not to waste your time anymore. Cheers Link to comment Share on other sites More sharing options...
intruder16 Posted June 11, 2015 Author Share Posted June 11, 2015 I now start all over. I have already created my USB with 2 partitions, one is YOSEMITE and the second partition is CLOVER..... Which laptop do you have? ....Thank you for your time guys and I promise not to waste your time anymore. No need. Keep your questions coming. Happy to help. Link to comment Share on other sites More sharing options...
TarvoMaesepp Posted June 13, 2015 Share Posted June 13, 2015 Hello, I am back here because I don't think this is about me If I patch my files I have error in patch.log Error "patchmatic: unable to open input file 'tmp/DSDT/Decompiled/SSDT-1.dsl'" What is this and how to be able to open this file? I tried patched files, pretty much everything works perfectly but I don't have sound and no battery management. Link to comment Share on other sites More sharing options...
intruder16 Posted June 13, 2015 Author Share Posted June 13, 2015 Did you extract DSDT/SSDT's? If you did, point the script to that folder using "-t" argument. Refer OP for more details. See "Watch the script in action" part. Link to comment Share on other sites More sharing options...
TarvoMaesepp Posted June 13, 2015 Share Posted June 13, 2015 Yeah, I know, I extracted my DSDT/SSDT's from clover with f4 method, I think it is right way to do this? Or it is not? Link to comment Share on other sites More sharing options...
intruder16 Posted June 13, 2015 Author Share Posted June 13, 2015 Yeah, I know, I extracted my DSDT/SSDT's from clover with f4 method, I think it is right way to do this? Or it is not? Correct. Now use the commands in OP (or those i gave you in PM before. They worked, right?). If it didn't work, post screenshots of extracted DSDT location and script location. Link to comment Share on other sites More sharing options...
TarvoMaesepp Posted June 13, 2015 Share Posted June 13, 2015 Yes, your commands work like a charm. But look at this. This is terminal, everything went successfully and patch.log error: http://www.upload.ee/files/4776748/IMG_0033.jpg.html and this is (extracted tables(I copied them from clover to desktop)): http://www.upload.ee/files/4776752/IMG_0034.jpg.html Link to comment Share on other sites More sharing options...
intruder16 Posted June 13, 2015 Author Share Posted June 13, 2015 Yes, your commands work like a charm. But look at this. This is terminal, everything went successfully and patch.log error: http://www.upload.ee/files/4776748/IMG_0033.jpg.html and this is (extracted tables(I copied them from clover to desktop)): http://www.upload.ee/files/4776752/IMG_0034.jpg.html Upload "clover/origin" and the "tmp-3" folder. Which BIOS version are you using? EDIT: No need. You are missing one SSDT (one with dedicate GPU - Nvidia info). There should be a total of 8 SSDTS (including dynamic ones). Re-extract tables in clover. Link to comment Share on other sites More sharing options...
Recommended Posts