I've finally installed the latest nvidia drivers running with Bumblebee. It works just fine now with optirun.
The driver is called nvidia_352.
Now I'm trying to get CUDA working. I can modprobe manually nvidia_352 and nvidia_352_uvm and it works as expected. However, if I haven't yet run modprobe manually, it tries to load the nvidia and the nvidia_uvm drivers and so it fails (as those drivers don't exist).
This is similarly the case if I try to use nvidia-modprobe.
I suspect there is some underlying setting which is telling nvidia-modprobe to try to load the nvidia driver, but I don't know what that is. Does anybody have a suggestion?
I guess a workaround is to explicitly load those drivers at boot, but they are currently blacklisted by bumblebee, so that wants to take control, and also I'm not sure of the power implications of loading the driver.