My laptop got 2 graphics cards, something very similar to: https://www.linuxbabe.com/desktop-linux/switch-intel-nvidia-graphics-card-ubuntu .

I would like to have Intel graphic card for display purpose only, and NVidia graphic card for heavy computation (GPGPU).

My questions:

  1. Do I still need to install NVidia driver? It seems the driver is for display ONLY ? So, is it a must to install NVidia driver if I do NOT expect to use NVidia card for display ?
  2. Without NVidia driver, will those 3rd-party libraries still be able to run? For instance, Tensorflow, etc.? From https://docs.nvidia.com/deploy/cuda-compatibility/index.html, it's clearly written that:

To build an application, a developer has to install only the CUDA Toolkit and necessary libraries required for linking.

In order to run a CUDA application, the system should have a CUDA enabled GPU and an NVIDIA display driver that is compatible with the CUDA Toolkit that was used to build the application itself.

It looks to me:

  • In order to run CUDA application, I have to install NVidia Driver, which enables the NVidia graphics card.
  • However, the NVidia Driver is for display purpose. In order to use it, I have to use NVidia graphics card for display, rather than using Intel card for display???

Sorry for my naive question. A kind of conceptually confused... Looking forward to the answer.

3 Answers 3


The nvidia driver is needed for any usage of the GPU, while for display you would need to load both the nvidia_drm and the nvidia_modeset, or at least this is the case on my machine. Just blacklisting them on boot with a /etc/modprobe.d/ file prevents the graphic stack to be loaded, but CUDA works just fine.

Indeed this is the trick I use to prevent the drm (which is used for display purposes AFAIK) driver to depends on the nvidia and, thus, allowing the reload the latter without any dependencies chain when new versions are released.

This is particulary helpful on a server where the display is provided by an integrated BMC and (likely) your GPU comes without any outputs.

  • This of course holds until you use the closed-source drivers, I cannot tell how it works for the Nouveau drivers, but I don't think is the case if you need any CUDA capability.
    – Mister G.
    Aug 12, 2022 at 8:08

It looks as if the NVidia graphic card may be used for CUDA computation as long as I do not enable it for display.


If you are using a laptop, you have to use the "optimus/prime" technology to do what you want, as is mentioned in the linked article. The nvidia driver decides (with your input) which graphics card to use. You need this because a laptop has only one display output and some kind of coordination between drivers is necessary.


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .