I have a laptop running Ubuntu 18.04 with both Intel and NVIDIA graphics cards
00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
01:00.0 VGA compatible controller: NVIDIA Corporation GM204M [GeForce GTX 970M] (rev a1)
I would like to use the Intel card for my actual graphics display, and my NVIDIA card for simultaneously running GPGPU things (e.g. TensorFlow models, other CUDA stuff, OpenCL). Is this possible? How would I go about this?
Ideally, I'd be able to turn the NVIDIA GPU on and off easily, so that I can just turn it on when I need to run something on it, and turn it off after to save power.
Currently, I have it set up with nvidia-prime so that I can switch between one card or the other (I need to reboot in between). However, if I've loaded the Intel card for graphics (prime-select intel), then the NVIDIA kernel drivers never get loaded and I can't access the NVIDIA GPU (nvidia-smi doesn't work).
I tried loading the NVIDIA kernel module with sudo modprobe nvidia when running the graphics on Intel, but I get ERROR: could not insert 'nvidia': No such device.