Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bypass 160 MHz limit in VGA adapters #323

Open
joevt opened this issue Aug 31, 2019 · 0 comments
Open

bypass 160 MHz limit in VGA adapters #323

joevt opened this issue Aug 31, 2019 · 0 comments

Comments

@joevt
Copy link

joevt commented Aug 31, 2019

I have a plugable USB-C to VGA adapter (2 lanes HBR2) which is capable of up to 330 MHz pixel clock but Apple's Intel graphics drivers have a limit of 160 MHz.

Below is a script to patch all Intel drivers. It sets the limit to 360 MHz. Tested IntelCFL in 10.14.6 and 10.15.2 and IntelSKL in 10.13.6.

Should probably change the perl command so that it tells you if the patch was successful.

#!/bin/sh

theoldhex=$(printf "%08x" 160000000)
theoldhex="\x${theoldhex:6:2}\x${theoldhex:4:2}\x${theoldhex:2:2}\x${theoldhex:0:2}"

thenewhex=$(printf "%08x" 360000000)
thenewhex="\x${thenewhex:6:2}\x${thenewhex:4:2}\x${thenewhex:2:2}\x${thenewhex:0:2}"

IFS=$'\n'
for thefile in $(find /System/Library/Extensions -name '*AppleIntel*Framebuffer'); do
	printf "Patching $thefile\n"
	#mv $thefile.bak $thefile.bak2
	sudo perl -i.bak -pe '$before = qr"(\x48\xc7\x85..\xff\xff)'${theoldhex}'"s;s/$before/$1'${thenewhex}'/g' $thefile
	printf "Re-signing $thefile\n"
	sudo codesign -f -s - $thefile
done
sudo touch /System/Library/Extensions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant