(Mac) Stop CUDA prefpane from opening at login

Inexplicably, the CUDA prefpane opens every time I login, even if there’s no software update available. I don’t know why someone implemented this behavior, it’s really obnoxious, and I hope they remove it. In the meantime, how do I disable this?

(If an Nvidia engineer is reading, please also stop using an NSTabView with only one tab labeled “CUDA Driver Info & Updates.” This is not what that UI element is for.)

This seems to be due to the file /Library/LaunchAgents/com.nvidia.CUDASoftwareUpdate.plist which runs

COM_NVIDIA_CUDAPREF_FROM_LAUNCH_AGENT=TRUE /Library/Frameworks/CUDA.framework/Versions/A/Resources/compatibility_check open file:///Library/PreferencePanes/CUDA%20Preferences.prefPane

According to my disassembler, what compatibility_check is doing is loading the CUDA runtime and calling cuGetExportTable. This seems to return a table of function pointers, which is opaque to me, and calls one of them. I’m assuming what it’s doing is checking if CUDA is compatible with the GPU in my machine; if not, it executes the command.

Since my GPU is an external device, the compatibility check seems to fail soon after boot (before the device is plugged in or loaded or whatever) and this causes the prefpane to open every time.

rm -f /Library/LaunchAgents/com.nvidia.CUDASoftwareUpdate.plist