As the title, I have a desktop and want to use iGPU for display and GTX 960 only for CUDA.
I know someone says this can be done by delete “Device” about Nvidia from xorg.conf and explicitly add BusID to “Device” under intel iGPU.
However, after I reboot, I meet a login loop, which means X window brings me back to the login window after I enter my password.
I went to tty1 and restart the lightdm service. It stops at loading extension GLX. I checked Xorg.0.log, it shows that when it tried to load GLX, it use /usr/lib/xorg//modules/extensions/libglx.so. However, this “libglx.so” is a link to “libglx.so.352.21”, which is from the NVIDIA 352.21 driver. So this means that X window tries to use Nvidia file for glx anyway because NVIDIA driver made a link to libglx.so.
The only way I can find to use iGPU for display is to uninstall NVIDIA driver. And then reinstall libglx.so (from a package about libg11 or something, I forget). But I can not use CUDA without NVIDIA driver.
To summary, install NVIDIA driver will delete former libglx.so (actually, also many other statics libraries like libGL.so.1 …). If I use Nvidia GTX 960 for display and cuda, it works fine. But, if I change the BIOS and xorg.conf to use intel iGPU for display, it tries to use Nvidia’s libglx.so.352.21, which leads me to a login loop. To use intel iGPU for display, I need get my previous statics libraries back which drives me crazy.
I wonder whether someone here can help me and tell me how to use intel iGPU for display and GTX 960 for CUDA only, considering my situations above.