I want to compile OpenCV with CUDA support but first I need to install NVIDIA drivers. So my question is:

  1. Based on this thread, some people seem to have problems with disabling nouveau? And Ubuntu GUI might have weird problems? Is disabling nouveau safe/recommended?
  2. My laptop has an Intel integrated card with an NVIDIA GPU. Does disabling nouveau mean that it will use the GPU constantly, even to render the desktop?
  3. Is it possible to switch to NVIDIA drivers only when needed? Such as when using OpenCV with CUDA support?
  • 2
    ...tl;dr You have to install Nvidia driver to use it. Installing Nvidia driver disables nouveau. Nvidia is a much better driver then nouveau, and you might not have the problems others had. Jan 5, 2018 at 14:02

1 Answer 1


1) My experience I've not had any GUI issues using the NVIDIA drivers, though I have experienced less stability. As for safe, you should be able to just uninstall the nvidia drivers if you have problems and it should revert to using nouveau drivers again.

2) Installing NVIDIA drivers should add NVIDIA X Server Settings, which will allow you to select which GPU should be used. From the last time I used this the NVIDIA drivers by themselves only allows you to select one to use and a relogin is needed to switch. There's stuff like bumblebee and a few others that allows you to run on intel graphics by default and specifically run programs on the nvidia gpu.

3) Specifically for your use case I don't know, but look into bumblebee.

  • I found this answer whilst trying to ascertain how relevant bumblebee still is these days to nVidia. I've never used bumblebee but am starting to consider it. Jan 8, 2018 at 0:38

Not the answer you're looking for? Browse other questions tagged or ask your own question.