How to use integrated graphic card as video output and nvidia card as cuda processing unit?

I am using linux with nvidia card for cuda computing.

I set in BIOS to use the integrated card for video output
I am using CentOS 7 with GUI desktop
I installed cuda 6.5, with driver, but I can not enter the GUI anymore, it shows me an error message. Looks like something wrong with 'GLX'

I doubt the nvidia driver updated system settings to use nvidia card as main video output, but I don’t want to do this. So my questions are:

Do I have to install nvidia driver to run cuda programs? I am not planning to use nvidia card for video output.

If yes, how to configure these correctly to use the desktop GUI?

fedora uses x server; i suppose centos do too

if so, note your x server log for more detailed error messages

and examine your x server config (file) to see whether installing the nvidia driver has not updated the x server settings

on occasion, the drivers of different vendors clash - after a week i gave up trying to get my nvidia driver and onboard intel graphics driver to co-exist

and yes, you need the nvidia driver to drive your nvidia card, only if for cuda…

Typically one would install a software package like BumbleBee to take care of controlling the nVidia GPU.
Applications requiring the nVidia GPU for OpenGL or CUDA have to be run using a launcher utility called optirun. The main graphics stays on Intel.

This works for me on Ubuntu 12.04. It may be that the later Linux kernel revisions do things much differently.

Is this an optimus laptop? Or a desktop style motherboard with integrated graphics?

I am using deskdop with a GTX 760 card. Looks like there’s some conflicts with OpenGL. I installed nvidia driver in order to use cuda, but the driver also enabled some features for 3d processing. I installed the driver separately with ‘–no-opengl-files’ and now I can start X with native on-board video output. I can run cuda programs now but only the ones without opengl. I don’t use opengl, so in my case it’s ok