I would like to install Nvidia driver for CUDA only and use nouveau driver or Intel GPU for display (seems Nvidia driver has some issues with OpenGL). Both Nvidia driver and CUDA toolkit are available from repository. After installing, Nvidia driver is used for display too. Switching to Intel GPU through Nvidia settings makes it impossible for CUDA to use Nvidia GPU. Edited /etc/X11/xorg.conf file results to black screen.

I tried manual installation with the --no-opengl-files flag but got error like "pre-installation script failed".

How to install Nvidia driver for CUDA only from repository?

1 Answer 1


To install Nvidia drivers easily just open up

Settings -> Software & Updates -> Additional Drivers

give it a few seconds to auto refresh its list then pick the latest Nvidia driver version ... currently 367.35 which is stable yet very recent

After a reboot you can then install the CUDA SDK

PS. If you ignore above advice and instead install Nvidia drivers manually (which I have done many times) early on everyone always gets that error message : "pre-installation script failed" ... just ignore that notice since it has NO baring on eventual success or failure of the install

  • Standard installation breaks some KDE animations.
    – D. Ca
    Commented Aug 15, 2016 at 12:46
  • I would like to know how to do it without breaking.
    – D. Ca
    Commented Aug 15, 2016 at 13:06

You must log in to answer this question.

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