vinc3m1 / mac-pixel-clock-patch

36 stars 26 forks source link

No available patch for Yosemite public release (14A389) #5

Open peterhajas opened 9 years ago

peterhajas commented 9 years ago

It looks like the .command has been updated for a Yosemite beta, but not for the public release.

The md5 of IOKit on my system is:

2a8cbc2f6616d3f7a5e499bd2d5593ab

Floris497 commented 9 years ago

See my fork: https://github.com/Floris497/mac-pixel-clock-patch I just added support for the public release.

from2001 commented 9 years ago

I tried Floris497 version on my Mac mini late 2012 with Yosemite, but I am still not able to change screen resolution to 4k. I was able to use 4k with Mavericks even without this patch. Do you have any tips or advice for me?

tiagojrocha commented 9 years ago

I'm exactly the same problem!

I tried Floris497 version on my Mac mini late 2012 with Yosemite, but I am still not able to change screen resolution to 4k. I was able to use 4k with Mavericks even without this patch. Do you have any tips or advice for me?

Floris497 commented 9 years ago

I was not sure it worked, but it may not be the pixel clock then, my macbook air 2013 will not do 4k but my mini 2011 will, but i have not used the public release there, but on the golden masters it worked, so i only changed the md5. I will look into it tomorrow morning.

Floris497 commented 9 years ago

I got to test mine and it works as expected.. (mac mini 2011 AOC 4k Displayport[40Hz]/hdmi[30Hz]) so there is something else getting in the way... i'm trying to fix the same thing for my macbook air, where the 2011 model works the 2012/2013/2014 model will not :sob:

from2001 commented 9 years ago

Hi Floris497, I executed md5 -q /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit and got 7a1a25493dd7b012cad81bdb9b0ae78a , which is different from your code.

Could this md5 hash be different with different Mac models even on the same version of Yosemite?

Floris497 commented 9 years ago

Can you look up the exact version of your os? I'm sure i'm running the correct one, can you see if there is a bak file in the directory? You might be on the wrong version (14A388 = last GM 14A389 = public release) or you already ran it, if you have no bak file, the easyes is to just put your md5 in de 10.10 variable at the top of the file and run it again ;) should work.

The md5 from a clean install can not differ in any way, the are the same unless you changed the file or maybe resigned the original one. (in the last case, just replace the md5 in the top of the file)

Do you use switchresx to add a resolution to your display?

from2001 commented 9 years ago

Hi Floris497, I confirmed that my Yosemite is public release (14A389).

Do you use switchresx to add a resolution to your display? I have switchresx on my Mac, but i don't use it now.

the easyes is to just put your md5 in de 10.10 variable at the top of the file and run it again ; I put my md5 value to the source code and ran it, but it didn't work...

can you see if there is a bak file in the directory? What kind of bak file are you talking about, and which directory should I find at?

Floris497 commented 9 years ago

Oh sorry, if you run the patch the script will produce a backup file IOKit.bak, that should be in the same directory as the original/patched version of IOKit.

most of the time, your system does not know about the 4k resolutions, so you need to add it to the custom resolutions of your display.

note that if you have a dedicated AMD/Nvidia card this mod will not currently work, but they are easy to patch, but i have no way of testing them nor do i know how to make them yet.

I hope your IOKit got patched, and your system just does not understand the resolution yet, this can be fixed with xswitchres as said before.

Hope this helps you.

rogdog commented 9 years ago

Floris: Awesome! I've been miserable since Yosemite killed my Seiki 4K monitor. It was so great to see 3840x2160 (30 MHz) reappear in my SwitchResX resolutions! In the future, I need to be more careful about upgrading. Either that, or learn to follow the formula so I can contribute a new patch. PS: I'm using a 2011 Macbook i5 with the Accell B086B-008B Mini DisplayPort 1.1 to HDMI 1.4 Active Adapter.

Floris497 commented 9 years ago

rogdog: this time it was really simple, I just added the md5 hash and voila, new patch, i have produced 1 patch for myself so I knew how it was done, and it took me quite some time to finally understand it. So in a short time i will add my own guide for making the patch, and also one for the nvidea/amd (those are really simple from what I heard)

from2001 commented 9 years ago

Hi Floris497, I don't still get it working.

I think the patch is correctly executed (I have IOKit.bak file in /System/Library/Frameworks/IOKit.framework/Versions/A/ ).

I added custom resolution on Switchresx referring to this site.

Switchresx custom resolution status says "Not activated - Invalid?".

By the way, after I used the patch, the md5 hash value changed to another string. Is this normal?

peterhajas commented 9 years ago

from2001, I'm getting the same problem with Floris497's patch. I'm using a 2012 Mac mini with the Seiki attached through the HDMI port.

rogdog commented 9 years ago

If you are having trouble, I suggest that you ensure you are using an HDMI 1.4 Active Adapter. As an experiment, I temporarily replaced mine with an old passive adapter that worked fine with smaller monitors. Didn't work!

TundraTech commented 9 years ago

Hi there I have a 2012 mac mini running Yosemite, I'm about to pull the trigger on a new set of displays for my second office. Currently I'm using two TB displays, but i can get 2 * 4k displays for cheaper.

Is there a solution that will work here under Yosemite yet?

From what i understand you need:

active HDMI to DP adapter such as This patch IOKit copy of switchresX?

rogdog commented 9 years ago

Not quite. I think Mac video ports are Mini DisplayPort, not full-size DisplayPort, so that looks like the wrong cable. Two 4k displays simultaneously? I'm skeptical. But, with that setup, my 2011 Macbook drives the internal display and the external 4K simultaneously.

TundraTech commented 9 years ago

Thanks for the the reply rogdog,

Yes, i was thinking i would use Mini DisplayPort for one monitor, then use the active adapter/IOKithack/switchresx over the HDMI port?

Should i just get another set of 2560 x 1440 monitors? I found a good deal and can get two for 800 bucks (Acer K272HUL)

but dual 4k for $1200 (ASUS PB287Q) seems like the better buy

Floris497 commented 9 years ago

Do not forget that this little machine maybe is a little power house the newest macpro can only drive 3 4k monitors, so I think you are asking a little to much from a mini if you want two times 4k, I give you little chance if getting it to work..

TundraTech commented 9 years ago

it'll work if we can figure out a way to do 4k@30hz over the HDMI port, with an accel adapter 4k@30 over the minidp works out of the box

Floris497 commented 9 years ago

You have the ports for it but the GPU can't handle that, i'm sure of that, i can get 4k@40Hz max on my mini 2011, so that's equal to 2*4k@15/20Hz I think.. So if you are ready to make the investment and it does not work, you have been warned, but if it works, i'd like to hear :), when i connect my 4k monitor over DP and HDMI at the same time 4k does not really work. it displays a 4k image on both inputs, but not something you can recognise a desktop in..

TundraTech commented 9 years ago

Honestly from what I'm reading it would be possible to do dual 4k,there are tons of forums with guys who have 4k displays running over either interface with a 2012 mini...however none that I read with Yosemite..and none simultaneously, but according to intel's docs its possible.

However the 4k over HDMI would be stuck at 17 hz unless the yosemite pixel clock limit can be cracked... and even then the best case scenario would be 4k @ 30hz over both screens....i decided because I'm in front of a screen ten hours a day, that it would be harmful for my eyes squinting at 30hz....I went with quad 2560x1440, out of the box yosemite will do 2560x1440@40hz over hdmi, and 60z over display port....thats a worse case scenario i can deal with.

I will sell both my existing thunderbolt displays to pay for it.

When thunderbolt 3 comes out i will upgrade to 4k/5k panels, a new mini or macbook with crystalwell. By then there will be reasonable priced IPS or better 4k labels on the market, right now the only decent sub $1000 dollar panels seem to be TN.

ezrasuki commented 9 years ago

I tried @Floris497 patch but didn't really understand what I have to do this to make this work. I followed the procedure written on the readme file, but it's not working. I read someone talking about bak files above but I don't really understand what it means. Do I need to remove the original file and rename the bak file as the original filename? Or should it just work after following the following procedure?:

Download the .command file

Download it into your Downloads folder. Open Terminal and run:

cd ~/Downloads

chmod +x macPixelClockPatcher.command

./macPixelClockPatcher.command

You will be asked to enter your password to approve changes in your system.

Pay attention to the output - it should say it detected unpatched IOKit and NVIDIA driver on (your OS X version) and patch it.

Reboot your system.

After reboot, you should be able to get custom resolutions with over 165 MHz pixel clock to work using SwitchResX (not required after 10.9).

Floris497 commented 9 years ago

It seems like some newer mac's need a second patch.. We are currently waiting on apple to release the source code of IOKit..

you can leave the modified IOKit in place if you can still boot it does no harm. if you want to get rid of it replace the patched file with the bak file like this: $ cd /System/Library/Frameworks/IOKit.framework/Versions/A; sudo mv ./IOKit.bak ./IOKit if this says there is no bak file, the patch did not work, and your IOKit has a different md5 hash.

TundraTech commented 9 years ago

Well i got my monitors, applied patch.. something not quite right. I'm on a mac mini 2012. (intel hd4000 chipset)

Without any patching i can do 2560 x 1440 @40hz

After patch, switchresx allows me to select 60hz, but the screen flickers and shows a portion at the proper resolution, but then ultimately goes blank.

I looked inside the command file...does this patch only unlock OSX on systems using amd/nvidia chipsets?

msimerson commented 9 years ago

Thanks @Floris497, your patch worked on my 2014 Mac Mini with 10.10.1

serwera commented 9 years ago

Hi @Floris497 ,

I have tried again today after applying your patch, but I couldnt get any resolutions added on my SwitchresX. Doing something wrong maybe? I have uploaded a clip with my system info.

Thanks a lot for your responses again, really appreciate it.

http://s9.postimg.org/9vdrooe67/Screen_Shot_2014_11_19_at_2_12_03_AM.png

serwera commented 9 years ago

Tried all I could :) http://s27.postimg.org/5poxt9983/Screen_Shot_2014_11_19_at_2_25_02_AM.png

serwera commented 9 years ago

Sorry for spamming here but somehow I cant see IOKit Framework anymore, why would that be? http://s29.postimg.org/ol87aey07/Screen_Shot_2014_11_19_at_2_26_28_AM.png

Floris497 commented 9 years ago

you should be looking in /System/Library/Frameworks/ not in /Library/Frameworks/ look if there is a IOKit and or IOKit.bak file in: /System/Library/Frameworks/IOKit.framework/Versions/A/

You are trying to patch the already modified version of IOKit, that is not detected by the script. check the IOKit md5's md5 -q <file>

note: when you take a screen shot, press space then you can select a window instead of dragging a square :-)

serwera commented 9 years ago

Thanks again @Floris497

Here is my md5: 7a1a25493dd7b012cad81bdb9b0ae78a

Floris497 commented 9 years ago

@serwera, if that is the IOKit md5 i can't do anything with it.. it is code signed with your unique system wildcard certificate, so this hash is unique for everyone. so this might be an unsuccessful or successful patched IOKit executable. but I have no idea what your problem is at this point?

serwera commented 9 years ago

Hi @Floris497 Sorry I thought you would somehow have an idea if the patch was successful or not.

My aim is to tweak Retina Macbook Air 13" Pixel Clock to a higher level so I can get 60Hz@ 4K on my Dell UP2414Q display. Yet, after tweaking I still can't get any higher than 30Hz. No more resolutions added on my SwitchResX ( looking for 3640 x 2160 60Hz HiDPI, normally system would not allow me drive higher than 30Hz. - Actually I can do 52 Hz but UP2414Q supports only 30 and 60 :/ So I gotta tweak that 52 to 60 somehow. ( I am using thunderbolt 2 port over Mini DP to DP cable ) I thought this patch would help me on that, since even people with Mac Mini managed to drive 4K over HDMI. Why should it work with Thunderbolt 2 ? Maybe Thunderbolt 2 is limited to 450Hz even with this tweak?

Any ideas would be appreciated. If I can drive it using two thunderbolt ports with an adapter, or thunderbolt+hdmi, or this tweak maybe works somehow?

Thanks for your patience again

Floris497 commented 9 years ago

It seems like only the 2011 machines can do 4k@(for me 40Hz/for others no idea). If you have Thunderbolt 2 iirc you have DP 1.2 and MST which allows you to do 4k@60Hz over the DP cable, make sure you select DP1.2/MST on your display.

It differs of what year your mac is and if you have dedicated graphics, not sure if any 13" retina has that. if so this patch is not yet updated for nVidia and AMD cards.

From your screenshot's i'm not able to see if you added custom resolutions, the fact that your IOKit is patched does not mean the resolutions will pop up (in very rare cases they do) but normally you need to add a custom resolution.

I hope this helps you, feel free to ask anything else.

serwera commented 9 years ago

Hi again @Floris497,

Actually this is an issue of every Mac 13" User. I have DP 1.2 enabled on the monitor.

Let me explain the problem in details.

So I am guessing I have two constraints here.

  1. : Max pixelclock set for my rMBP 13 is 450MhZ.
  2. : Dell 2414Q does not accept any other frequency for 3840 x 2160 than preset values of 30Hz and 60Hz

This screenshot is from the manual of the UP2414Q explaining frequencies supported.

screen shot 2014-11-20 at 12 27 46 am

Other 4K screens like Samsung accept variable frequencies. So all you need to do as a regular rMBP user is to install SwitchresX and tweak to 52-53Hz, which is much better than 30Hz, and still under the system pixel clock limit of 450MhZ

screen shot 2014-11-20 at 12 14 48 am

This is a perfect solution for all 4K monitors except the one I owe. ( should work for Samsung 4K and others. )

Best 60Hz resolution @60Hz I could get so far is 2560 x 1440 ( 720P HiDPi) which is fine for movies etc. Yet since I have this device why shouldnt I benefit from all the performance I can get.

At this point I was hoping that this patch would help me to increase system Maximum Pixel Clock output above 450Hz. I need at least 502.89Hz in order to get 60Hz output at native 4K resolution as it can be seen from the config below pushed to the lowest levels at 60Hz.

screen shot 2014-11-20 at 12 03 46 am

Of course higher is better, but this is more than enough :)

Yet when I try to install new settings to SwitchresX even after installing the patch I get " Not Activated-Invalid" error every time. Thats I assume is because I still can't get higher than 450MHz.

screen shot 2014-11-20 at 12 03 33 am

If we could sort this out we could make many UP2414Q and RMB 13" Retina owners happy :)

My system in details once again:

= MBP 13" Retina Mid 2014 with Iris Graphics ( Not pro, not Nvidia. )

( - MBP 15 Pro Retina has that and works perfectly with all 4K monitors at 60Hz )

= DELL UP2414Q DP 1.2 Enabled, connected to Macbook with provided Displayport to Mini DP cable on Thunderbolt 2 port.

= SwitchresX 4.4.1 Licensed ( Let me know if you need my help with this )

= Yosemite OSX 10.10.1

Thats the story. Thanks once again.

rogdog commented 9 years ago

FYI: After thoughtlessly pushing the button to upgrade to OSX 10.10.1, I went into a panic, worrying that I would lose my 4K. The monitor came up in 1K. I reinstalled this patch, and then I reset the resolution to 4K with SwitchResX. Now my panic is over. I don't know whether I even needed to reinstall the patch; I should have tried SwitchResX first. But I was in a panic!

serwera commented 9 years ago

@Floris497 any ideas?

Floris497 commented 9 years ago

@serwera no i'm sorry, it is so weird.. My mini 2011 does show a 4k@60Hz but it does not work.. But it looks like the block is not only in the iokit anymore.. But also somewhere else. But no idea where. :(

serwera commented 9 years ago

@Floris497 thanks a lot for your time anyway Floris, I think I should just sell this one and buy a Samsung :)

cdunn2001 commented 9 years ago

@rogdog, I upgraded to OSX 10.10.1, lost 4k, re-installed this patch, and got 4k back. So yes, re-patching is necessary (probably for the signature). I have 2011 MacAir.

ezrasuki commented 9 years ago

@Floris497 just to clarify, is your patch only working for 2011 Macbook air? I asked above a couple months ago but couldn't figure it out so have moved on. Right now i have a huge 50 inch Seiki 4k TV working as a huge super low resolution TV :(

Floris497 commented 9 years ago

@ezrasuki no it should work with every mac that has intel graphics the amd/nvidia patches are outdated. most 2011(HD3000) models get 4k by this patch. then most of the 2012/2013(HD4000/HD5000) are not working and most of the 2014(most iris or dedicated) models have native support for it. We are still unsure how to eneble it for most 2012/2013 models. What model do you have?

ezrasuki commented 9 years ago

@Floris497 I am confused, you said "it should work with every mac that has intel graphics", and then you say "most 2011 models get 4k by this patch, then most of the 2012/2013 are not working". Mine is late 2012 macbook air. No matter what I try it doesn't work.

Floris497 commented 9 years ago

It differs from OS to OS, intel 4000 wil get some upgrade later you can copy some kext from maverics to get it to work, but this is not easy and i've only read about it. I'm currently realy busy with a lot of things so maybe ill update my fork, but if that will be today or a week or longer in cannot tell you..

You have an hd4000 i guess so thats good news.

I find this confusing myself :p ill keep you posted

dmelgar commented 9 years ago

Hello. I have a mid 2012 Macbook Air. It has Intel 4000. I have a Seiki 39" 4k TV ($290 @ Tiger). Accell mDP1.1 to HDMI1.4 adapter. Using displayresx. I've read elsewhere that this configuration works, except that I'm running Yosemite. I can't get this to work at 3840x2160 regardless of framerate. I was able to apply this patch, but it hasn't changed behavior at all.

Any ideas? Other threads had said it worked for 2012 Macbook Airs but not 2013-2014 because of a driver issue with the Intel 5000.

Is there any hope for this configuration? I can still return the TV. Not useful regardless of the price if I can't get it to do 4k for me.

THanks

hoangu2013 commented 9 years ago

Hello. Similar to @dmelgar, I have a rMBP late 2012 with Intel 4000, running Yosemite 10.10.1. I just bought a Seiki 39" 4k TV and Accell mDP1.1 to HDMI1.4 adapter. I have been trying to get the 4k working for almost a week now trying various patch but without any success. Has anybody with same hardware as mine got it working yet? If so, can you please give me some guidance on this? Without 4k capability, the TV is no good to me and needs to be returned. Thanks.

Floris497 commented 9 years ago

read comments here: https://code.google.com/p/mac-pixel-clock-patch/wiki/Documentation you can replace some kext file for the frame buffer. (you can get them from the OSX installer if you have no backup)

dmelgar commented 9 years ago

@Floris497 Thanks! I got it working after some trial and error. Posted on that thread.

Floris497 commented 9 years ago

i've used this script to alter my frame buffer (renaming it can also alter Capri kext) https://github.com/Piker-Alpha/AppleIntelFramebufferAzul.sh read the comments on the google code repo linked few posts above. it was partially successful and a little scary.

EDIT @serwera this might help's you if you still have the monitor.

tcchau commented 9 years ago

Just wanted to report on my experiences on this thread since it seems to have been the most active on this topic.

My system configuration: Mac mini Late 2012, 2.3 GHz i7, 16GB RAM, running Yosemite 10.10.1 with an IOKit MD5 hash of 2a8cbc2f6616d3f7a5e499bd2d5593ab.

By using Floris497's fork of mac-pixel-clock patch which was updated to work with 10.10.1, and replacing my AppleIntelFramebufferCapri.kext extension with the version from Mavericks 10.9.5, I was able to get 4K @ 30Hz working on a Dell P2815Q driven off the Thunderbolt.

There were initially some video glitches like patches of the display where there was memory or other corruption, but these went away shortly.

My initial goal was to use this as a second monitor to my current set up that uses one Apple Thunderbolt display. However, at this point, adding the P2815Q as a second monitor driven from the HDMI port will limit me to 1080p resolution.

TundraTech is incorrect in their assessment of the possibilities, because the HDMI port hardware design in the Mac mini Late 2012 limits the output resolution to 1920 x 1200 by most accounts, and the active adapter they're referencing is not bi-directional -- it converts a DisplayPort 1.1 signal to HDMI 1.4 only, and not in the other direction.

The next step in acquiring a dual monitor set up is to purchase Elgato's Thunderbolt 2 Dock, from which I should be able to drive my current Thunderbolt display from its Thunderbolt port, and my P2815Q at 4K from the HDMI port.

swhitlow commented 9 years ago

@Floris497 - I have a newer MacBook Pro Retina with the Intel Iris graphics. I have the Seiki 39" 4k (with the July 2014 firmware. But I have tried all of the popular ones out there so far). I am trying to get a couple of resolutions unlocked that I have seen other places (namely 1080p@150hz and the holy grail for me - 2560x1440@72Hz).

I have tried to apply this patch (and it seemed to work). However, when I rebooted nothing happens and no other resolutions are unlocked.

I have been using SwitchResX but none of my resolutions are being recognized. Would you happen to know anything I can try at all?

Thanks!