Contribute
Register

OpenCL thread crashing

Status
Not open for further replies.
That's a B card, ignore the "revision" area and look at bios revision.

A cards are 80.10
B cards are 80.80

I don't think the program properly detects B so you have to go by bios
 
That's a B card, ignore the "revision" area and look at bios revision.

A cards are 80.10
B cards are 80.80

I don't think the program properly detects B so you have to go by bios

Thanks Mystical. I didn't know that. Guess I have a "B" then.
 
Hello my friends!

I absolutely failed in removing OpenCL support from the GPU itself. (Well, technically from the drivers) So now going to plan B, Forcing all OpenCL applications to use CPU even when GPU is requested. If this fails too (and there are many reasons why this could cause instability) then going to plan C, removing all OpenCL support (GPU + CPU) by lying to the requesting apps (via the OpenCL framework) that there is no device that supports OCL which again could easily fail, if there is a requesting application that assumes that at least the CPU is OCL capable.

I'll update soon.
 
Update time!

What I had success with: after messing around with OpenCL.framework I managed to disable GPU support. I could start Luxmark and do a CPU only benchmark without it crashing.

It is 64bit only.

But, here's the new problem, some apps (like Preview, TextEdit and Finder) actually triggers a codesign check and then it fails.
This means that:
a, after I reboot the computer the screen flashes/crashes and everything funny
b, with the modified framework probably only non-codesigned apps work as expected

I don't have enough time now, but there is a small hole that I can mod it.
 
That's just wrong approach (modifying opencl itself). You should be able to edit the lib inside just geforce gamework and make only THAT report as a non opencl device. I just don't have knowhow for this. I keep hoping netkas finds time to do this :)

I'm confident it can be done there though cause in past we had other video cards where the reverse had to be done (cards that could do opencl that reported they could not, that had to be edited to say they could).
 
Well, that was the first approach. But it's rather complicated. When I modified the drivers (clh) then I got the same flashing screen after bootup which could mean that the codesigning in the driver got damaged due to the modification. There is a chance that I already had the fix by modifying the driver, but I got screwed over by codesigning.

Editing the OCL framework was my fallback plan and because I only have one GPU I knew the disabling option was good enough for me. (HD4000 is disabled in UEFI)
 
OpenCL thread crashing - An Applescript Hack

Well I just upgraded to a GTX 780 (from my 660ti) also to find that certain necessary programs are not functioning as they should. I use programs like Coda and Transmit to do development work, and these too crashed, so not wanting to return the card (or drop my 660ti back in there), I did a bit of applescript code to essentially "disable" the "libclh.dylib" file by renaming it to "libclh.dylib.bak", then launching the program I needed, then renaming it back to "libclh.dylib"

I havent gotten this to work for Word (which i don't really use, though disabling the popup templates window from showing fixed it easily) or Preview (which I can just use another image viewer/editor) yet, but it works nicely with Coda and Transmit and might be of use to those out there who want to modify for their needs.

Here's the code:
Code:
[B]set[/B] fileAlias [B]to[/B] ([I]POSIX file[/I] "/System/Library/Extensions/GeForceGLDriver.bundle/Contents/MacOS/libclh.dylib") [B]as[/B] [I]alias[/I]


[B]tell[/B] [I]application[/I] "Finder"
	[B]set[/B] [B]the[/B] name [B]of[/B] fileAlias [B]to[/B] "libclh.dylib.bak"
[B]end[/B] [B]tell[/B]


[B]tell[/B] [I]application[/I] "Coda 2" [B]to[/B] [B]activate[/B]


[B]set[/B] fileAlias [B]to[/B] ([I]POSIX file[/I] "/System/Library/Extensions/GeForceGLDriver.bundle/Contents/MacOS/libclh.dylib.bak") [B]as[/B] [I]alias[/I]


[B]tell[/B] [I]application[/I] "Finder"
	[B]set[/B] [B]the[/B] name [B]of[/B] fileAlias [B]to[/B] "libclh.dylib"
[B]end[/B] [B]tell[/B]

Copy/Paste this into an AppleScript window, change "Coda 2" to whatever program you want to try it with, i.e. "Transmit", and then save as an Application wherever you want.

Another caveat is that if you don't want to authenticate each time, then you should add your user to have read/write permissions on the /System/Library/Extensions/GeForceGLDriver.bundle/Contents/MacOS/ folder. Not ideal, but better than authenticating each time.

It has worked great for my needs, and allows me to use Coda and Transmit at least with no issues once its started, but the few caveats are that you need to launch it each time you want to start the program (I just replaced this application in my dock and when the program is running both icons show in the dock). I even tried opening Photoshop after Coda 2 (PS needs that libclh.dylib file to detect the card for performance) and PS opened up right away with no issues.

It's not a permanent fix but it might make some people a bit less crazy about this 780 situation.

Also, if you want to just have an app for disabling the file then copy paste this in an Applescript window and save as an Application:
Code:
[B]set[/B] fileAlias [B]to[/B] ([I]POSIX file[/I] "/System/Library/Extensions/GeForceGLDriver.bundle/Contents/MacOS/libclh.dylib") [B]as[/B] [I]alias[/I]

[B]tell[/B] [I]application[/I] "Finder"
[B]set[/B] [B]the[/B] name [B]of[/B] fileAlias [B]to[/B] "libclh.dylib.bak"
[B]end[/B] [B]tell[/B]

And to reenable the file:
Code:
[B]set[/B] fileAlias [B]to[/B] ([I]POSIX file[/I] "/System/Library/Extensions/GeForceGLDriver.bundle/Contents/MacOS/libclh.dylib.bak") [B]as[/B] [I]alias[/I]

[B]tell[/B] [I]application[/I] "Finder"
[B]set[/B] [B]the[/B] name [B]of[/B] fileAlias [B]to[/B] "libclh.dylib"
[B]end[/B] [B]tell[/B]

Hope this helps.
 
Well I just upgraded to a GTX 780 (from my 660ti) also to find that certain necessary programs are not functioning as they should. I use programs like Coda and Transmit to do development work, and these too crashed, so not wanting to return the card (or drop my 660ti back in there), I did a bit of applescript code to essentially "disable" the "libclh.dylib" file by renaming it to "libclh.dylib.bak", then launching the program I needed, then renaming it back to "libclh.dylib"

I havent gotten this to work for Word (which i don't really use, though disabling the popup templates window from showing fixed it easily) or Preview (which I can just use another image viewer/editor) yet, but it works nicely with Coda and Transmit and might be of use to those out there who want to modify for their needs.

Here's the code:
Code:
[B]set[/B] fileAlias [B]to[/B] ([I]POSIX file[/I] "/System/Library/Extensions/GeForceGLDriver.bundle/Contents/MacOS/libclh.dylib") [B]as[/B] [I]alias[/I]


[B]tell[/B] [I]application[/I] "Finder"
	[B]set[/B] [B]the[/B] name [B]of[/B] fileAlias [B]to[/B] "libclh.dylib.bak"
[B]end[/B] [B]tell[/B]


[B]tell[/B] [I]application[/I] "Coda 2" [B]to[/B] [B]activate[/B]


[B]set[/B] fileAlias [B]to[/B] ([I]POSIX file[/I] "/System/Library/Extensions/GeForceGLDriver.bundle/Contents/MacOS/libclh.dylib.bak") [B]as[/B] [I]alias[/I]


[B]tell[/B] [I]application[/I] "Finder"
	[B]set[/B] [B]the[/B] name [B]of[/B] fileAlias [B]to[/B] "libclh.dylib"
[B]end[/B] [B]tell[/B]

Copy/Paste this into an AppleScript window, change "Coda 2" to whatever program you want to try it with, i.e. "Transmit", and then save as an Application wherever you want.


Code:
[B]set[/B] fileAlias [B]to[/B] ([I]POSIX file[/I] "/System/Library/Extensions/GeForceGLDriver.bundle/Contents/MacOS/libclh.dylib") [B]as[/B] [I]alias[/I]

[B]tell[/B] [I]application[/I] "Finder"
[B]set[/B] [B]the[/B] name [B]of[/B] fileAlias [B]to[/B] "libclh.dylib.bak"
[B]end[/B] [B]tell[/B]

And to reenable the file:
Code:
[B]set[/B] fileAlias [B]to[/B] ([I]POSIX file[/I] "/System/Library/Extensions/GeForceGLDriver.bundle/Contents/MacOS/libclh.dylib.bak") [B]as[/B] [I]alias[/I]

[B]tell[/B] [I]application[/I] "Finder"
[B]set[/B] [B]the[/B] name [B]of[/B] fileAlias [B]to[/B] "libclh.dylib"
[B]end[/B] [B]tell[/B]

Hope this helps.

Well, thanks for the Word tip, it solved my problem. I've been having the opencl problem with dreamweaver. But when I open the Applescript Editor it crashes with opencl crash... Is there a different way to open it?
 
Thanks BloodyYelle!! I had to go and install Smile but I got your script to work. It does solve my problem, now if we can just get Nvidia to do us right.
 
Status
Not open for further replies.
Back
Top