mac-pixel-clock-patch-V2 icon indicating copy to clipboard operation
mac-pixel-clock-patch-V2 copied to clipboard

Patch for High Sierra?

Open solvar0719 opened this issue 7 years ago • 96 comments

I could be doing it wrong but the core display patch does not seem to be working for High Sierra. Will there be any update/fix for this?

solvar0719 avatar Aug 20 '17 15:08 solvar0719

Could you try and force the latest version? (CoreDisplay.command patch v2)

Floris497 avatar Aug 20 '17 15:08 Floris497

That doesn't seem to work. The brightness change is noticeable but then I'm just stuck before the Apple logo splash screen appears.

solvar0719 avatar Aug 21 '17 13:08 solvar0719

Hm, so you are not able to boot into Mac OS anymore?

Floris497 avatar Aug 21 '17 13:08 Floris497

Doesn't seem I can. I also deleted 0x12345678 from clover like I did with 10.12.

solvar0719 avatar Aug 21 '17 14:08 solvar0719

Just a side note, the patch returns something with a similar idea that something is the same (can't remember what that something was). I can't remember the exact wording of it but I hope you understand why I mean.

solvar0719 avatar Aug 21 '17 14:08 solvar0719

Hm, so did it tell you the patch was probably successful or that the new file is still the same so that the patch didn't work. I will quickly test it..

Floris497 avatar Aug 21 '17 14:08 Floris497

Seems like I got the latter one.

solvar0719 avatar Aug 21 '17 14:08 solvar0719

Yep the patch has changed I can see.. I need to calculate a new one.. (also my mistake the last version is v3 not v2 but that does not change the difference that I need to make a v4) give me some time and I'll return with an update :)

Floris497 avatar Aug 21 '17 14:08 Floris497

Actually I forced it with v3 right after I opened the issue before I saw your reply and no surprise that didn't work either... Anyhow, looking forward to your update!

solvar0719 avatar Aug 21 '17 14:08 solvar0719

That was noticeable more difficult than previous times big changes in CoreDisplay and they removed almost all the naming in the executible.. (I thought I would not be able to find it..) I added a v4 to the script you can use it manually. please use with care.. because I have no idea if it will work as intended :)

Floris497 avatar Aug 21 '17 15:08 Floris497

I patched it with v4 and got "The code is still the same.. Patch did seem to run, but was probbably from the wrong version" again. I'm posting the md5 here just in case.

otool CoreDisplay: 961f97847f5234ea98cf97acb545be54 otool CoreDisplay.bak: 961f97847f5234ea98cf97acb545be54 CoreDisplay: 14f13ac79120596e4f0ac1a43fe8d4b1 CoreDisplay.bak: b869a07a5efef0a1feff93c58fa476e6

solvar0719 avatar Aug 22 '17 00:08 solvar0719

Uhg.. let me have a look when I get to my PC.. first some breakfast :)

Floris497 avatar Aug 22 '17 04:08 Floris497

I wonder if there is any tutorial/manual explaining the rationale of the perl script? I was just reading the instructions to patch later versions of Core Display from the original mac-pixel-clock-patch repo and tried it myself and that didn't work.

solvar0719 avatar Aug 22 '17 13:08 solvar0719

Yes, exactly the IOKit thing is exactly the same.. but since now the code has changed a lot.. (maybe they are porting to Swift.. this removes most of the naming that was still available.. making it quite difficult to find the part of assembly that needs to be changed..) I will quickly test what I did wrong and come back to you.. sorry I kinda forgot to look at it..

Floris497 avatar Aug 22 '17 14:08 Floris497

Also it seems I'm not on the latest version of 10.13.. I'm on beta 5 so I will update to 7 now

Floris497 avatar Aug 22 '17 14:08 Floris497

Oh my bad.. I didn't fully enable v4 patch... and it looks like that the new patch does not work on beta 7.. let the search start again..

Floris497 avatar Aug 22 '17 20:08 Floris497

It should now be working for 10.13 Beta 7

Floris497 avatar Aug 22 '17 20:08 Floris497

The code did seem to run. I diff'ed the two disassembled files and could see the changes. But after I cleared the field under ig-platform-id I was still stuck at the black screen.

solvar0719 avatar Aug 23 '17 00:08 solvar0719

Wait but it does work without the patch?

Floris497 avatar Aug 23 '17 06:08 Floris497

Btw, tell me what hardware you are running exactly and your platform id

Floris497 avatar Aug 23 '17 06:08 Floris497

Oops I was going to say I cleared the field under IntelGFX, not the ig-platform-id. I'm running Intel 6829hq with HD530 graphics. The platform-id I was using is 0x191b0000, but now I'm gonna give 0x19120000 a shot (which is what I use for 10.12) I will update as soon as I finish the test.

solvar0719 avatar Aug 23 '17 06:08 solvar0719

Hm. I see, I have never played around with the ig-platform-id on my hack.. what time zone are you in?

Floris497 avatar Aug 23 '17 06:08 Floris497

So after I changed the platform id to 0x19120000 the black screen full of white characters was cleared and I was stuck at a fully black screen (with a slightly lighter hue) instead.

Does it work without the patch?

It doesn't seem so... I'm either stuck at a black screen with white characters, or the scenario described above (due to different platform ids), or a white block on the top-left corner of the black screen after it's cleared.

I'm in China Standard.

solvar0719 avatar Aug 23 '17 06:08 solvar0719

So it looks like your problem isn't my patch :) this is good then :) have other people attempted 10.13 with the same build? (And what do you see when you remote in to your computer when it's black screened?)

Floris497 avatar Aug 23 '17 07:08 Floris497

That seems to be the case. The patch is doing what it's supposed to do (redirecting the code to 0x1255a). I don't think many have tried installing high sierra on 4K laptops yet. Will try remoting later. This has been a lot harder than I expected.

solvar0719 avatar Aug 23 '17 07:08 solvar0719

MacOS 10.13 Beta (17A360a) . Public Beta 8 (not DB) So. What "patch v#" I can to try ?

grigorovich avatar Sep 06 '17 01:09 grigorovich

@grigorovich Turns out the patch for HS is the same for Sierra. Try apply this manually in your terminal:

sudo perl -i.bak -pe 's|\xB8\x01\x00\x00\x00\xF6\xC1\x01\x0F\x85|\x33\xC0\x90\x90\x90\x90\x90\x90\x90\xE9|sg' /System/Library/Frameworks/CoreDisplay.framework/Versions/Current/CoreDisplay
sudo codesign -f -s - /System/Library/Frameworks/CoreDisplay.framework/Versions/Current/CoreDisplay

Beware, this patch breaks copy and paste and does not go well with iTunes.

solvar0719 avatar Sep 06 '17 01:09 solvar0719

@scottsanett Patch works well. But what happened with "copy/paste" ?

grigorovich avatar Sep 06 '17 01:09 grigorovich

Not sure if it is only me but i can't copy/paste after the patch is applied. iTunes also crashes whenever I open it.

solvar0719 avatar Sep 06 '17 02:09 solvar0719

@scottsanett Right. Me too. I tried vanila coredisplay.framework (and rebuilt cache) and copy/past works... So it could be help for somebody

grigorovich avatar Sep 06 '17 09:09 grigorovich

@grigorovich but then the patch is gone isn't it?

solvar0719 avatar Sep 06 '17 09:09 solvar0719

Well, there is a patch v4 that should work with the Beta's

Floris497 avatar Sep 06 '17 09:09 Floris497

@scottsanett older patched can always be accessed by patch.command patch vX for example: CoreDisplay-patcher.command patch v3

Floris497 avatar Sep 06 '17 09:09 Floris497

@scottsanett 2560x1080 display works in 1920x1080 right now. CoreDisplay not patched and i will wait for release bcoz "copy/paste" much more important for me than resolution

@Floris497 patch v3 works but "copy/paste" around all macos system stop work. I think @scottsanett caught that "feature" of new security method of "kernel/kext cache" specially for 10.13 ... Its just my opinion

grigorovich avatar Sep 06 '17 11:09 grigorovich

@grigorovich Have you had any problem with iTunes with a patched CoreDisplay?

solvar0719 avatar Sep 06 '17 11:09 solvar0719

@scottsanett yes. But it crashed not always... Like randomly 50/50 and i just try to play only aac.. I have not patched coredisplay and all works stable right now (except resolution of second display)

grigorovich avatar Sep 06 '17 11:09 grigorovich

@grigorovich iTunes crashes pretty much all the time here... But I do think the crashes and the patch are at least somewhat related.

solvar0719 avatar Sep 06 '17 11:09 solvar0719

In "Copy/Paste" problem i saw that in log: process: pboard *** Terminating app due to uncaught exception 'NSInvalidArgumentException', reason: '*** initialization method -initWithFormat:locale:arguments: cannot be sent to an abstract object of class NSString: Create a concrete instance!' *** First throw call stack: ( 0 CoreFoundation 0x00007fff4cc170fb __exceptionPreprocess + 171 1 libobjc.A.dylib 0x00007fff734c5c76 objc_exception_throw + 48 2 CoreFoundation 0x00007fff4cca8bfd +[NSException raise:format:] + 205 3 Foundation 0x0000000106605608 -[NSString initWithFormat:locale:arguments:] + 14 4 Foundation 0x00000001064181ad +[NSString stringWithFormat:] + 169 5 Foundation 0x0000000106433827 -[NSArray(NSArray) encodeWithCoder:] + 816 6 Foundation 0x00007fff4ec0493e -[NSXPCEncoder _encodeObject:] + 578 7 UserActivity 0x00007fff701d349d -[UASharedPasteboard<…>

and then plenty apps (WiFiAgent, Finder, AppleShell,Safari... 20+) reports about pboard like : Connection to 'pboard' server had an error: <error: 0x7fffad7b6c40> { count = 1, transaction: 0, voucher = 0x0, contents = "XPCErrorDescription" => <string: 0x7fffad7b6fb0> { length = 22, contents = "Connection interrupted" } }

So i think its common problem outside of 'pixel clock patch' ...

grigorovich avatar Sep 06 '17 12:09 grigorovich

@grigorovich But pboard doesn't crash without the patch, no?

solvar0719 avatar Sep 07 '17 02:09 solvar0719

@scottsanett doesn't. i think its kernel/security issue bcoz pboard works fine on macbook with macos PB8 w/o patched coredisplay.

grigorovich avatar Sep 07 '17 10:09 grigorovich

@grigorovich I replaced the patch with CoreDisplayFixup.kext and Lilu.kext (and unpatched CoreDisplay). Copy and paste now works. iTunes still crashes though.

solvar0719 avatar Sep 18 '17 04:09 solvar0719

@Floris497 CoreDisplay for High Sierra GM should have accidentally found it's way to your email.

gothickitty93 avatar Sep 22 '17 17:09 gothickitty93

I'll start testing tomorrow.. I just finished another project :)

Floris497 avatar Sep 22 '17 17:09 Floris497

I finally got patchv4 to run and it said that it was applied successfully. However, macOS didn't boot... So I rebuilt the CoreDisplay Framework Manually on another Mac (Replaced new with .bak). It started to boot again.

I decided to try and patch it one last time before I confirmed it as an issue. Patched it with v4 again, rebooted in verbose. It leaves me hanging on: IOConsoleUsers: getIOScreenLockState_3, hs 0, bs 0, now 0, sm 0x0

Before upgrading to 10.13 tonight, I had the patch working on 10.12.6. Of course, updating broke it so I repatched it with patch v4. So am I doing something wrong? I think this might just be a compatibility issue, but just want to make sure.

macOS 10.13 (Build 17A365) Intel HD 4400 ig-platform id = 0x0d220003 IntelGFX = 0x04128086

TheTrollCaptain avatar Sep 26 '17 06:09 TheTrollCaptain

Ehm.. Patch 4 isn't ready.. it's at least breaking copy paste.. some fix might be in the issues but I had no time figuring it out already

Floris497 avatar Sep 26 '17 07:09 Floris497

Tried v4 and it broke the core display. It didn’t create a backup. Anybody want to send me CoreDisplay from fresh High Sierra

cbjerg avatar Sep 26 '17 08:09 cbjerg

There is a backup in the same location replace it with mv file.bak file

Floris497 avatar Sep 26 '17 08:09 Floris497

There was no Bak file created. I am looking for it now in the CoreDisplay.framework/Versions/A/ location

cbjerg avatar Sep 26 '17 08:09 cbjerg

Hm.. let me check.. (you can just reinstall macOS, probably fastest way to fix it)

Floris497 avatar Sep 26 '17 08:09 Floris497

There was a bak file. Just not visible to "ls -la" I ran the command and got back in. Thank you. Waiting for patch to be updated then

cbjerg avatar Sep 26 '17 08:09 cbjerg

Ahh okay. Thanks man

TheTrollCaptain avatar Sep 26 '17 15:09 TheTrollCaptain

Crap.. Well my copy/paste is broken... Will the future patch sort it out or do I have to reinstall the entire OS

TheTrollCaptain avatar Sep 27 '17 03:09 TheTrollCaptain

Hm, you can run the unpatch command.. for me myself it seems to break everything.. doesn't recognize my internal screen anymore. I was looking around a little bit how to fix it.. but I have little time..

Floris497 avatar Sep 27 '17 06:09 Floris497

I'll try that. Thanks for your help

TheTrollCaptain avatar Sep 27 '17 16:09 TheTrollCaptain

I just unpatched it but it still is broken... High Sierra breaks everything :(

TheTrollCaptain avatar Sep 27 '17 20:09 TheTrollCaptain

Unfortunately I have had the same happen to me in the beta.. no clue why :/

Floris497 avatar Sep 27 '17 20:09 Floris497

It may just be a bug or something... I really don’t feel like backing up and reinstalling so I’ll just see if it gets fixed in the future

TheTrollCaptain avatar Sep 27 '17 20:09 TheTrollCaptain

Hm.. i had to reinstall to get it working again.. if you ask me no backup is really needed.. just run the installer again :) (don't blame me if you did need a backup in the end :p)

Floris497 avatar Sep 27 '17 20:09 Floris497

@scottsanett for fix resolutions and solve copy/paste at same time i apply patch: toleda/intel_graphics Before apply just choose your connector configuration. For me is patch with '_c' letter.

and set 2 type of resolutions 2560x1080 in SwitchResX (50Hz, 60Hz)

Now second display with 2560x1080 works fine and copy/paste works as well. MacOS 10.13.1 dev.

Please report if it helps

grigorovich avatar Sep 28 '17 14:09 grigorovich

@grigorovich Sweet! I'll try this when I get home for lunch. What are your specs?

TheTrollCaptain avatar Sep 28 '17 14:09 TheTrollCaptain

Hello. Have iMac 4K end 2015 and get 60hz with external 4K TV not. Is this at all feasible?

erbrango avatar Oct 10 '17 21:10 erbrango

@erbrango Wait so you want 60Hz on the 4K TV with the patch? What is the TV running at without the patch? (eg 1080p @ 30Hz)

TheTrollCaptain avatar Oct 18 '17 16:10 TheTrollCaptain

Mit Capitan geht 60hz ohne nichts und ab Sierra / High Sierra geht überhaupt nicht

erbrango avatar Oct 21 '17 12:10 erbrango

I tried the pixelclockpatch and the lilo+corevideo kext posted here but I cant push above 330Mhz, Is the perl script above confirmed working to push past the 330mhz limit?

shad00m avatar Oct 24 '17 21:10 shad00m

Any luck on a new official version of CoreDisplay-patcher? I am currently using 10.13.1. I am extremely new to any coding and really only use terminal for this program and getting full use of my ultra wide monitor.

jb107502 avatar Dec 04 '17 02:12 jb107502

@shad00m Since display refresh rate is measured in Hz and the highest refresh rate on the market is 144Hz, it is quite impossible to get 300MHz (1000000Hz = 1 MHz)... ;)

TylerD89 avatar Dec 04 '17 16:12 TylerD89

@jb107502 Nope. The Copy + Paste issue still exists... CoreDisplayPatcher + Lilu is currently the only way to get full resolution + refresh support

TylerD89 avatar Dec 04 '17 16:12 TylerD89

Or I guess you could try SwitchX but it does require more tampering

TylerD89 avatar Dec 04 '17 19:12 TylerD89

@TylerD89 I have SwitchX. It being meh led me to Floris.

jb107502 avatar Dec 05 '17 08:12 jb107502

@jb107502 Yeah I’ve heard it’s terrible

TylerD89 avatar Dec 05 '17 16:12 TylerD89

I also need the patch for 10.13.1

Appreciate to get notified when it's ready without breaking anything :)

TahaSolutions avatar Dec 10 '17 22:12 TahaSolutions

Hi,

For those of you that went the lilu+coredisplay way and don't have copy/paste functionality, try executing 'sudo update_dyld_shared_cache'. I regained the functionality after executing it.

Cheers.

daniel-hdez-lopez avatar Dec 12 '17 09:12 daniel-hdez-lopez

Would that work with the patch as well?? I'll try when home

Floris497 avatar Dec 12 '17 10:12 Floris497

I don't know. I installed lilu+coredisplay kexts because this patch doesn't work for me at the moment.

daniel-hdez-lopez avatar Dec 12 '17 11:12 daniel-hdez-lopez

Interesting, how the hell did you come up with that lol

TylerD89 avatar Dec 12 '17 16:12 TylerD89

Pure luck. Playing with the dlyd cache is something you try when something's off with your mac as infinite wheel spinning on some applications among other faults.... so i tried the same that worked for me before. This happens on original macs too... it's annoying.

daniel-hdez-lopez avatar Dec 13 '17 07:12 daniel-hdez-lopez

Yeah I don’t even know what the DLYD cache is so props dude

TylerD89 avatar Dec 13 '17 17:12 TylerD89

@daniel-hdez-lopez seems to work nicely.. it was mentioned before somewhere in issues but I forgot about it. anyway I made a whole new patch, because the old one was really broken.. expect a new patch soon (only need a bit of testing)

Floris497 avatar Dec 26 '17 16:12 Floris497

Now THIS is my favorite thing I got for Xmas. I am a photographer and not having the Ultrawide use of my monitor was killing me. Thanks so much everyone and @Floris497!

jb107502 avatar Dec 27 '17 23:12 jb107502

Enjoy! Merry belated Christmas! And a happy new year!

Floris497 avatar Dec 27 '17 23:12 Floris497

Is this fix final now?

Any step by step guide to install this patch?

Br Shahrouz

On Dec 28, 2017, at 12:37 AM, Floris Fredrikze [email protected] wrote:

Enjoy! Merry belated Christmas! And a happy new year!

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Floris497/mac-pixel-clock-patch-V2/issues/211#issuecomment-354196224, or mute the thread https://github.com/notifications/unsubscribe-auth/ATrwZGZO8bKRRY6ZyxcAEu_NXt3Bw3DQks5tEtS7gaJpZM4O8ptm.

TahaSolutions avatar Dec 28 '17 16:12 TahaSolutions

It is.. no step by step.. there is some info in readme should ne sufficient

Floris497 avatar Dec 28 '17 16:12 Floris497

Thanks a lot.

Just managed to install the patch.

Wish you and all the guys here a very successful year in 2018.

Regards Shahrouz Raeisi

On Dec 28, 2017, at 5:27 PM, Floris Fredrikze [email protected] wrote:

It is.. no step by step.. there is some info in readme should ne sufficient

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/Floris497/mac-pixel-clock-patch-V2/issues/211#issuecomment-354315253, or mute the thread https://github.com/notifications/unsubscribe-auth/ATrwZCnxU-g8nFmMphXDBVHKrewHNYd0ks5tE8F2gaJpZM4O8ptm.

TahaSolutions avatar Dec 28 '17 16:12 TahaSolutions

v4 patch doesn't seem to work for a MBP 2017 (Radeon Pro 555).

A matching md5 sum was not found, so I forced v4.

shulter avatar Dec 29 '17 02:12 shulter

@aShure What resolution are you trying to get on your MBP?

TylerD89 avatar Dec 29 '17 02:12 TylerD89

@aShure and also, be sure you have the latest version of the patch. V4 is out so you shouldn’t have to force it...

TylerD89 avatar Dec 29 '17 02:12 TylerD89

@TylerD89 had to force it as the md5 sum didn't match. Latest High Sierra up to date, latest commit from git. Trying to use UHD 2160p60. USB-C to Displayport adapter. Screen, adapter, cable runs fine with 60Hz on Windows hosts.

shulter avatar Dec 29 '17 03:12 shulter

Did it work after forcing? Could you post MD5 output? :)

Floris497 avatar Dec 29 '17 04:12 Floris497

Sadly, it didn't work after forcing. See #242 for the MD5 output, I posted a log of the output when I first tried to force it.

shulter avatar Dec 29 '17 16:12 shulter

Update to 10.13.2 :)

Floris497 avatar Dec 29 '17 16:12 Floris497

Great idea :) It seems that the usual path of updating via the app store is not available with 10.13.1 -> 10.13.2. It even says so on https://support.apple.com/kb/DL1946?locale=en_US Apple, why oh why?

shulter avatar Dec 29 '17 16:12 shulter

Oh?? Really? That's strange..?

Floris497 avatar Dec 29 '17 16:12 Floris497

My bad, it just didn't show up in the app store as it was downloading in the background. Still a horrible UX :(

I patched CoreDisplay with autodetected correct MD5 now: (otool) Detected patched CoreDisplay on OS X 10.13.2 17C88.

Alas, SwitchResX still won't let me set 60Hz:

image

shulter avatar Dec 29 '17 17:12 shulter

I have macbook pro 2018 and im getting the unkown coredispay patch message. My specs

Radeon Pro 555X 4096 MB Intel UHD Graphics 630 1536 MB

My output.

SIP looks to be disabled, all good!

Unknown version of CoreDisplay found.. ---- BEGINNING MD5 HASH SUMS ---- version: 10.13.6 build:17G2307

 otool CoreDisplay: 20f0d2491e9370d3d74d25740aa855ba

otool CoreDisplay.bak: NO FILE (this is okay) CoreDisplay: 24349340f35fb931216e0ccdab2ad3c1 CoreDisplay.bak: NO FILE (this is okay)

---- ENDING MD5 HASH SUMS -------

any idea how i can get this to work? I have a 4k lg monitor.

LG Ultra HD: Resolution: 3840 x 2160 (2160p 4K UHD - Ultra High Definition) UI Looks like: 1920 x 1080 @ 30 Hz Framebuffer Depth: 30-Bit Color (ARGB2101010) Mirror: Off Online: Yes Rotation: Supported Automatically Adjust Brightness: No Connection Type: DVI or HDMI Adapter Firmware Version: 7.55

I cant get it to budge from 30hz

dragzter avatar Oct 13 '18 22:10 dragzter

I tried patching with v4 and v3

dragzter avatar Oct 13 '18 22:10 dragzter

My OS is High Sierra 10.13.6

dragzter avatar Oct 13 '18 22:10 dragzter