- Joined
- Jul 13, 2012
- Messages
- 95
- Motherboard
- Z68MA-D2H-B3 (UEFI BIOS)
- CPU
- Intel Core i5 (2500K) 3.30 Ghz
- Graphics
- Geforce GTX 560 Ti 1GB
- Mac
- Classic Mac
- Mobile Phone
Thanks goes to "vczilla" This is from him, and it enables the OpenCL
A happy camper here too!
The freezes and random graphic glitches were starting to drive me crazy.
With the new Nvidia kext everything works way better, although I still have the occasional freeze and 'NVDA(OpenGL):Channel exception!' message in my logs.
Anyway I just wanted to share this patch for libclh.dylib since the old one doesn't work anymore and it's quite frustrating that OpenCL isn't working out of the box so to speak. And it took some time to work it out since Nvidia anonymized the function names in the library.
Just copy and paste this in a terminal window (don't forget to backup libclh.dylib beforehand).
Code:
sudo perl -pi -e '$c+=s/\x8b\x81\x1c\x0c\x00\x00\xeb\x06\x8b\x81\x20\x0c\x00\x00/\xb8\x02\x00\x00\x00\x90\xeb\x06\xb8\x00\x00\x00\x00\x90/; END { printf "%s: %d substitution%s made.\n",($c==1 ? "Success" : "Error"),$c,(!$c || $c>1 ? "s" : ""); $?=($c!=1); }' /System/Library/Extensions/GeForceGLDriver.bundle/Contents/MacOS/libclh.dylib
Alternatively you can use a hex editor to search for:
8b 81 1c 0c 00 00 eb 06 8b 81 20 0c 00 00
and replace it by:
b8 02 00 00 00 90 eb 06 b8 00 00 00 00 90
There should be only one occurrence of this in the whole file. The perl script will tell you the number of substitutions it made.
Normally it should take effect immediately so there's no need to reboot, it should also trigger a rebuild of the kernel cache.
If like me you're a cautious person feel free to do those two things manually.
There were some empty spaces that were giving me errors when I ran it on Terminal so here's the fixed version. It works on my 560Ti. Thank you!
Code:
sudo perl -pi -e '$c+=s/\x8b\x81\x1c\x0c\x00\x00\xeb\x06\x8b\x81\x20\x0c\x00\x00/\xb8\x02\x00\x00\x00\x90\xeb\x06\xb8\x00\x00\x00\x00\x90/; END { printf "%s: %d substitution%s made.\n",($c==1 ? "Success" : "Error"),$c,(!$c || $c>1 ? "s" : ""); $?=($c!=1); }' /System/Library/Extensions/GeForceGLDriver.bundle/Contents/MacOS/libclh.dylib