Using GeForce 870M on optimus laptop as compute-only device

Hello,

I have a GeForce 870M on my laptop which has optimus.

I have installed nvidia-prime so that I can switch between using the Nvidia card and the Intel on-board graphics. (I used to use bumblebee).

My question is if it is possible somehow to use the Intel graphics for my display but still have the Nvidia driver loaded as a compute-only device. I kind-of did this with bumblebee by using optirun to run CUDA codes, which loaded the NVIDIA card, but in that case I think it loaded the card for graphics too.

I basically want to run my graphics using the on-board Intel card, and compute using CUDA on the 870M without it taking over the graphics.

Any ideas?

With Bumblebee, you can/could use “optirun --no-xorg” for that (it wouldn’t “take over” the graphics anyway, but starting the secondary X prevented the card from being available for debugging).