Floris497 / mac-pixel-clock-patch

105 stars 17 forks source link

AMD driver support #26

Open Slumber86 opened 8 years ago

Slumber86 commented 8 years ago

My 2011 MBP has AMD graphic card, the mod doesn't work with it. Can you patch it? My checksum:

$ md5 -q /System/Library/Extensions/AMDSupport.kext/Contents/MacOS/AMDSupport ac68dd9427ff690c4aac12f9abfcf708

Also if you don't have any way to test it i can help with test and some works.

Thank you

Agostino

Floris497 commented 8 years ago

these 2 should patch your driver:

sudo perl -i.bak -pe '$before = qr"\x85\x17\x00\x00\x00\xB8\x40\xB3\xD5\x09"s;s/$before/\x85\x17\x00\x00\x00\xB8\x00\x84\xD7\x17/g' /System/Library/Extensions/AMDSupport.kext/Contents/MacOS/AMDSupport
sudo touch /System/Library/Extensions

check if the values of these 2 commands are different, this indicates that the code has changed

md5 -q /System/Library/Extensions/AMDSupport.kext/Contents/MacOS/AMDSupport
md5 -q /System/Library/Extensions/AMDSupport.kext/Contents/MacOS/AMDSupport.bak

if you want to go back use these

sudo mv /System/Library/Extensions/AMDSupport.kext/Contents/MacOS/AMDSupport.bak /System/Library/Extensions/AMDSupport.kext/Contents/MacOS/AMDSupport
sudo touch /System/Library/Extensions

I have no idea if this will work, i only found 1 occurrence of 165MHz. and changed it to 400MHz. So no idea if this breaks the driver at a different point.. if it does not work, we have to find out what the new limit is..

Slumber86 commented 8 years ago

Ok thanks, I'll try when back home. If the patch will broke the driver i can just reboot in recovery?

Thanks.

Floris497 commented 8 years ago

If it breaks the driver your integrated graphics will take over, no need for recovery mode. just use the sudo mv command as described above :-)

Slumber86 commented 8 years ago

The driver isn't broken, but doesn't activate higher clock rates. Rolling back to default! schermata 2016-02-04 alle 22 39 47

Floris497 commented 8 years ago

What cable are you using?

Slumber86 commented 8 years ago

CableMatters mDP 1.2 to hdmi 1.4, cable not adapter. Reported to work.

Floris497 commented 8 years ago

Hm, HDMI 1.4 would be sufficient enough.. Maybe older version not. Can you try and see what the maximum pixel clock is that you can set? The apsolute maximum :)

This way i can try and find that value in the driver and make it higher

Slumber86 commented 8 years ago

165 works, 165,01 doesn't. Original driver

Floris497 commented 8 years ago

Ehm, let me think.. I looked for both 165 000 000 and 165 000 001 only the first I could find, and changed to 400Mhz