Floris497 / mac-pixel-clock-patch-V2

994 stars 221 forks source link

mac-pixel-clock-patch-V2

Based on my fork of the repository and the original project which is hosted on google code

CoreDisplay 10.14.2 now supported by the patch (EXPERIMENTAL, see Issue 280) and Nvidia WEB drivers (Maxwell & Pascal) (GTX 1080, GTX 1070, GTX 1060)

Do not unpatch after updating!!! When updating the backup is not removed. unpatching will result in the old backup to be made active this means you will loose your current CoreDisplay driver and you won't have a backup.

For 10.12 and later please use the CoreDisplay patched instead of IOKit. Pixel clock has been moved.

If this patch helped you, and you are happy with the result you could consider making a little donation to my PayPal account on (email found here: http://minimind.nl/paypal.html)

What does this patch resolve?

WARNING!! Copy Paste might be broken after patch.. [FIX BELOW]

To resolve issues with copy paste run:

sudo update_dyld_shared_cache

in the terminal.. from patch v4 and later this is already ran after patching but it might need to be run AGAIN after reboot.. some testing needed.

A few things to keep in mind

This patch needs MD5's to identify IOKit and Nvidia driver files, if your version is not yet added to the script you can run "XXXX-patcher.command md5" and post them in a new issue, this way i can add them.

If you have a new version of IOKit or Nvidia driver that is not yet supported you can run the command and choose the patch version yourself. for Nvidia there are now 2 versions, so most likely you need v2 for IOKit there are 6 versions so for new IOKit's you most likely need v6. use the command like XXXX-patcher.command patch v6 Most of the time this will work, but use this function carefully.

What patch do I need?

The table might not be fully correct, and not all Macs are supported by this patch.

OS X <= 10.11 macOS >= 10.12
Intel HD Graphics IOKit Patcher CoreDisplay Patcher
Nvidia Desktop Graphics IOKit Patcher CoreDisplay Patcher
Nvidia Mobile Graphics IOKit Patcher & Nvidia Patcher CoreDisplay Patcher & Nvidia Patcher
AMD Graphics N/A N/A

How to use

Everywhere where you see ~/Downloads/XXXX-patcher.command you can add

  1. before you start make sure SIP is disabled. (Info about SIP)

  2. Download the patch(es) you need to your downloads folder: (IOKit, CoreDisplay, Nvidia)

  3. open the Terminal (found at /Applications/Utilities/Terminal.app)

  4. run chmod +x ~/Downloads/XXXX-patcher.command (this makes the patch executable)

  5. run the script ~/Downloads/XXXX-patcher.command

  6. follow the instructions and fill you password when asked for

  7. (if you need more than 1 patch, go back to step 3 here and continue with the next patch there)

  8. reboot your machine

Next steps are not necessary for everyone:

  1. get switchresx and install it.
  2. add the custom resolution you need.
  3. save it and reboot your machine.

extra functions: ~/Downloads/XXXX-patcher.command md5|status|patch (v1-vX)|unpatch|help for instance used like: ~/Downloads/IOKit-patcher.command patch v7 or ~/Downloads/Nvidia-patcher.command unpatch

If you wan't to request new functions for this script feel free to open an issue with the request.

Some information on SIP

First make sure SIP (System Integrity Protection) is turned off for this to work. You can disable/enable this only when you boot into the recovery partition. If you booted into the recovery partition and open the terminal you use csrutil disable to disable, csrutil enable to enable and csrutil status to check the status of SIP you can also check the status on your normal system. the changes to SIP are only visible in the terminal after a reboot, so it will still notify you that SIP is on when you disable it and run csrutil status right after it.

SIP can safely be enabled after the patch of the IOKit, if you also want to use an Nvidia/AMD driver that has been patched you need to keep SIP disabled. this is because SIP will not allow you to run drivers which have a broken or no codesignature. by patching the driver we obviously break the codesignature. kexts are not signable by anyone but apple and trusted parties. so SIP needs to be off for them to load. IOKit is not a kernel extension and therefore must be codesigned to run, this is done with the wildcard certificate, unique to everyone. even with SIP disabled the IOKit will not run without this new codesignature. the script takes care of the codesigning of the IOKit.