Using NVidia GPU for computing only


I have recently installed Ubuntu 20.04 on my Laptop which has NVIDIA GeForce MX150 GPU card. I have installed the CUDA Toolkit 11.0 on it by following the instruction at the given link:

I installed it via the package manager. Everything is working fine, the driver and CUDA samples are working fine.

I am trying to use NVIDIA GPU for computing only, not the display as I have integrated Intel card. I am trying to set the Intel card for display and use NVIDIA GPU for computations. I followed the “Advanced Setup” instruction at following link:

I changed my xorg.conf file as mentioned in the “Use a specific GPU for rendering the display” section on above link. I rebooted my system and tried to run couple of CUDA samples. On some samples, I get an error. Screenshot of the error is attached. Same samples were working fine before I changed my xorg.conf file.

Kindly help me resolve this issue. Help me setup Intel graphics for display and NVIDIA graphics for computations.

Best Regards,