OpenGL, NVIDIA and Ubuntu 14.04 issues

Hello, we have a dell r370 running Linux Ubuntu 14.04 LTS.

We are at a loss of what to do, and confused on how all of this should work. We are novices with GPU acceleration and CUDA.

Here is the setup of our graphics.

sudo lshw -C display

*-display description: 3D controller
product: GK104GL [Tesla K10]
vendor: NVIDIA Corporation
physical id: 0
bus info: pci@0000:05:00.0
version: a1
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list
configuration: driver=nvidia latency=0
resources: iomemory:33f0-33ef iomemory:33f0-33ef irq:31 memory:92000000-92ffffff memory:33fe0000000-33fefffffff memory:33ff0000000-33ff1ffffff
description: 3D controller
product: GK104GL [Tesla K10]
vendor: NVIDIA Corporation
physical id: 0
bus info: pci@0000:06:00.0
version: a1
width: 64 bits
clock: 33MHz
capabilities: pm msi pciexpress bus_master cap_list
configuration: driver=nvidia latency=0
resources: iomemory:33f0-33ef iomemory:33f0-33ef irq:31 memory:91000000-91ffffff memory:33fc0000000-33fcfffffff memory:33fd0000000-33fd1ffffff
*-display UNCLAIMED
description: VGA compatible controller
product: G200eR2
vendor: Matrox Electronics Systems Ltd.
physical id: 0
bus info: pci@0000:0c:00.0
version: 01
width: 32 bits
clock: 33MHz
capabilities: pm vga_controller bus_master cap_list
configuration: latency=64 maxlatency=32 mingnt=16
resources: memory:90000000-90ffffff memory:93800000-93803fff memory:93000000-937fffff

We have a Matrox video card for display, and two Tesla K10 cards for acceleration.

The NVIDIA driver was manually installed. We downloaded a *.run file from the NVIDIA site and installed it:

sudo ./

We have several windows clients connecting remotely to the server using freenx.

The issue we have is here:

glxinfo | grep Open
OpenGL vendor string: Mesa project:
OpenGL renderer string: Mesa GLX Indirect
OpenGL core profile version string: 1.2 (1.5 Mesa 6.4.1)
OpenGL core profile extensions:
OpenGL version string: 1.2 (1.5 Mesa 6.4.1)
OpenGL extensions:

Also here are some select lines of output from the debugger:

LIBGL_DEBUG=verbose glxinfo |more
name of display: :2000.0
Warning: GL error 0x500 at line 922
display: :2000 screen: 0
direct rendering: No (If you want to find out why, try setting LIBGL_DEBUG=verbose)
server glx vendor string: SGI
server glx version string: 1.2

server glx extensions:
GLX_ARB_multisample, GLX_EXT_import_context, GLX_EXT_visual_info,
GLX_EXT_visual_rating, GLX_OML_swap_method, GLX_SGIS_multisample,
GLX_SGIX_fbconfig, GLX_SGIX_hyperpipe, GLX_SGIX_swap_barrier,
client glx vendor string: NVIDIA Corporation
client glx version string: 1.4

We run commands like glxgears successfully.

However, For OpenGL version string, we don’t have NVIDIA listed. Also, the version string listed, 1.2, is so low that we can’t use software applications requiring OpenGL version string 1.4 or higher.

Trying unset ALWAYS INDIRECT,unset LIBGL_ALWAYS_INDIRECT, has no affect.

  1. We don’t have NVIDIA OpenL version string, despite it already installed.

  2. Even if we wanted to use Mesa, only version string installed is 1.2. We have another Ubuntu server running 14.04 with a generic Matrox card but NO additional GPU’s, and the OpenGL string version is t 2.1 and Mesa 10.1.3

The goal is to use the VGA card just for display and the Tesla cards for GPU acceleration only. And run software applications on the server where the OpenGL string version is at least 1.4 or higher. Not 1.2.

Any suggestions, advice, input would be much appreciated.



nvidia-bug-report.log (980 KB)

You haven’t attached nvidia-bug-report but from the look of it your nvidia drivers are not properly installed.

Please install the drivers from official Ubuntu repos:

I don’t really know if that would work you’re trying to do.

  • FreeNX uses indirect rendering, which is a problem by itself.
  • The Matrox has a KMS driver, but no MESA 3D hardware, only software driver, that’s used currently as it seems.
    Also it’s not quite clear what you’re trying to do, running something locally with the Matrox as output or plain remote over NX, or both? Please elaborate.
    As birdie mentioned, run (as root) and attach the tar.gz file it produces to your post. It contains the relevant logfiles.

Thanks for the responses everyone. I’ve attached the nvidia-bug-report_log in the original post. When I attached it, it was scanning for several minutes.

We are running a software application remotely over NX. I think the problem is the fact that we have two graphics cards or “hybrid” setup with the two NVIDIA cards and the Matrox.

For the software application we want to run, the software rendering is fine for our purposes. The problem is with the way we have the NVIDIA drivers installed I think. I say this because we have the same exact setup on another server, same Matrox card, but NO NVIDIA cards installed. The glxinfo output says the OpenGL version string is 2.1, not 1.2 like we have on our current setup with both Matrox and NVIDIA cards.

When, we first purchased the server over two years ago, the NVIDIA drivers from the Ubuntu repositories were not up to date. We tried using the ppa with not much success. Therefore, we installed the NVIDIA driver manually from the NVIDIA website. At that time, I might have overwritten ubuntu default opengl files without knowing it. Installed Cuda manually as well. Ran the Cuda installation tests, and everything checked out fine. Two years later, we are trying to run a new application, and an error message appears stating we are using OpenGL 1.2, and we need OpenGL 1.4 or higher. This is when I discovered we are stuck with GLX Mesa Indirect, and OpenGL version string 1.2. On our other server with just the Matrox card installed, we can run this application fine because the OpenGL version string is 2.1.

So, I think it is something with our NVIDIA driver installation. I’m new with this OpenGL stuff, so I’m not quite sure.


Update: Okay, i uninstalled the manual driver *.run file using the command:

sudo ./NVIDIA*.run  --uinstall

I then followed birdie’s advice and tried to install from the Ubuntu repositories:

sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
sudo apt-get install nvidia-384

Rebooted the machine.

Now when I run glixinfo or glxgears, they don’t work at all.

name of display: :2000.0
Error: couldn't find RGB GLX visual or fbconfig
Error: couldn't find RGB GLX visual or fbconfig

Error: couldn't get an RGB, Double-buffered visual

inxi -b

Graphics:  Card: Matrox Systems G200eR2 
           X.Org: 7.0.0 drivers: mga,nouveau (unloaded: nvidia,fbdev,vesa) Resolution: 1914x1131@60.0hz 
           GLX Renderer: N/A GLX Version: N/A

If you notice, the output from inxi for Graphics lack GLX Rendere and GLX Version with the repository installation.

At least with the *.run installation, I’m able to run glxgears and glxinfo.

I’ve attached another nvidia_bug_report from the repositories installation. You can compare the two reports and see if there are different problems.

On another note, the Tesla K10 cards are listed as 3D-controllers. Are these graphics cards for video or graphics cards meant ONLY for parallel computing via CUDA?



from-repos-nvidia-bug-report.log (970 KB)


I have the same issus under ubuntu 16.04 with the same driver version direct from the current ppa.

inxi -b

CPU: Quad core Intel Core i7-3770 (-HT-MCP-) speed/max: 1599/3900 MHz
Graphics: Card-1: NVIDIA GK104 [GeForce GTX 760]
Card-2: NVIDIA GK110GL [Tesla K20c]
Display Server: X.Org 1.18.4 driver: nvidia Resolution: 2560x1440@59.95hz
GLX Renderer: N/A GLX Version: N/A

Thanks and best regards.

The Tesla is targeted at compute tasks but can also be used for (virtual) graphics.
Your current status after installing the driver from ppa:
Nvidia kernel module is loaded
xorg.conf not available, so X starts autoconfig
Nvidia GPUs have no monitor, fails.
Matrox has a monitor connected, is used.
GLX points to nvidia drivers, GLX fails
so glxgears doesn’t run

You can switch GL/eGL implementation using update-alternatives
Switch to mesa

# Configure for mesa GLX via update-alternatives
   update-alternatives --set i386-linux-gnu_gl_conf /usr/lib/i386-linux-gnu/mesa/
   update-alternatives --set i386-linux-gnu_egl_conf /usr/lib/i386-linux-gnu/mesa-egl/
   update-alternatives --set x86_64-linux-gnu_gl_conf /usr/lib/x86_64-linux-gnu/mesa/
   update-alternatives --set x86_64-linux-gnu_egl_conf /usr/lib/x86_64-linux-gnu/mesa-egl/

To switch back to nvidia

# Configure for nvidia GLX via update-alternatives
   update-alternatives --set i386-linux-gnu_gl_conf /usr/lib/${nvidia_driver}/
   update-alternatives --set i386-linux-gnu_egl_conf /usr/lib/${nvidia_driver}/
   update-alternatives --set x86_64-linux-gnu_gl_conf /usr/lib/${nvidia_driver}/
   update-alternatives --set x86_64-linux-gnu_egl_conf /usr/lib/${nvidia_driver}/

Now the question arises, what do you want to use the Nvidia GPUs for? Providing the desktop or CUDA?
To get a desktop on the Nividias, you would have to create a xorg.conf with a fake monitor entry. Use nvidia-xconfig for that.
I’m not very familiar with freenx but iirc it uses by default indirect rendering, so OpenGL is rendered on the Windows clients. Unless you use nxagent, then it’s rendered on the server but only with software rendering. For hardware rendering on the server you would have to use something like VirtualGL, I think.

I switch ONLY the NVIDIA driver version and it works, but with version 384.66 it didn’t work. It have nothing to do with a remote solution stuff.

And I have both tesla and normal Nvidia Graphic card.

Please open your own thread and attach the output file of there. It’s something completely different what you’re experiencing.
No thread hijacking, please.


Thanks for your response.

My are responses below:

Okay, I will uninstall the manually installed driver, and try the ppa method again.

Using, update-alternatives method, is there a way to rollback the commands below. For example, if you install an application, you could remove or purge it. Is there a comparable command for remove previously implemented update-alternatives?

Also, if you I use nvidia GLX am I using video or just computational/computing/CUDA related processes?

We would like to use the Nvidia GPU’s for computation/parallel process. We use nxagent and software rendering if fine. We don’t really need hardware rendering on the server for our purposes.



GLX is the OpenGL extension for the Xserver. If the Xserver runs on the nvidia gpu, you have to use the Nvidia glx, running on Matrox you have to use the Mesa glx. As the name says, it is used for video, not compute.
You want to use the Matrox for video and the Nvidias for compute, so you will have to install the nvidia driver from repositories or ppa and then switch to Mesa glx/eglx using the aforementioned update-alternatives commands.
Another twist: there are actually two ways of using the Matrox.

  1. (currently installed) no KMS driver and mga DDX
  2. KMS driver (mgag200, don’t know if ubuntu provides that) and modesetting DDX
    DDX means Xserver 2D display driver. Don’t know which one is better.

I don’t really know what you mean by ‘update-alternatives rollback’, the original files get installed along the mesa and nvidia driver packages.


Thanks again for your assistance.

Just curious what exactly the ‘update-alternatives’ command is doing. If it changes anything, I wanted to know how to revert the changes, is there a command to get the settings as they were prior to using the ‘update-alternatives’ commands.


update-alternative is the control program of debian’s alternatives system. It’s an implementation switcher, for setting the default library or program if different packages exist that are doing the same. E.g. the default browser or in this case the default opengl implementation for the xserver to use.
update-alternatives --get-selections
lists the possible groups where alternatives exist
update-alternatives --list
lists the possible alternatives to set.

On a fresh install of the OS, in the case of gl/egl it is switched to mesa.
When you install the nvidia-driver from repositories/ppa, gl/egl gets switched to nvidia by the package install script.
So, manually switching back to mesa is already the ‘rollback’.


I’m still having issues.

I removed the manually installed cuda and nvidia drivers, and then installed the graphics ppa. Then installed nvidia-385.

Ran the alternative commands you suggested.

Whether I point them to nvidia or mesa, I still get the same error messages:

name of display: :2000.0
Error: couldn't find RGB GLX visual or fbconfig
Error: couldn't find RGB GLX visual or fbconfig

Error: couldn't get an RGB, Double-buffered visual

Now our server is located a large server room with many racks. We don’t have a monitored connected to it. Would that cause an issue? Or is it another problem?



Please rerun to have current logs. How do you run glxinfo, over ssh?
Edit: switch to mesa first, of course.

Yes, it is over ssh using freenx.

I tried running, and it wouldn’t even work. Meaning, the command itself would not appear as if it wasn’t even installed. I even tried installing the nvidia-375 from the Ubuntu repos, not the ppa. Same issue. Not sure what happened. I just updated the kernel. That is the only difference. I was able to generate the nvidia bug report command before this kernel update.

I must say, I’ve haven’t had as many issues installing NVIDIA drivers manually, as opposed to using the ppa and Ubuntu repos. Same with thing Cuda. Using the run file install has been a much cleaner and workable experience then using .deb for cuda or sudo-apt get for the NVIDIA driver for our system.

The main issue has been this OpenGL string version being stuck at 1.2 for Mesa. Not a higher version for NVIDIA or Mesa which is should be given that we have higher version on other systems with just the same Matrox card installed.

With the ppa method and I can’t get output from glxinfo to know which version I’m running.

Is there any disadvantage of manually installing drivers and cuda? Just based on my experience these past few years,we’ve only run into one issue vs several just getting the ppa/ubuntu repos method to work for a few hours.

I’ve attached a nvidia report bug log with manually Nvidia and cuda installation.


nvidia-bug-report.log (969 KB)

Using the manual installer, you’re overriding the alternatives system so you can’t switch to mesa, you are locked to nvidia gl. You need mesa since you want video to run on the matrox.
Now you’re back to X on matrox with nvidia glx, which doesn’t work.
The GL renderer client string is 1.4 due to indirect rendering, it’s the limit. You need direct rendering, i.e. a properly configured nxagent to get a higher opengl version. But first a properly configured xserver.
Seems like the ubuntu packages don’t provide the nvidia bug report script, but the needed logs are just the output of dmesg and /var/log/Xorg.0.log
Please revert to the ppa installed driver, switch to mesa and post the two logs mentioned.


I’ve uninstalled the manually installed cuda 8.0 and Nvidia drivers.

I then used the ppa for my installation steps.

sudo add-apt-repository ppa:graphics-drivers

sudo apt-get update

sudo ubuntu-drivers devices
== /sys/devices/pci0000:00/0000:00:02.0/0000:03:00.0/0000:04:10.0/0000:06:00.0 ==
modalias : pci:v000010DEd0000118Fsv000010DEsd0000097Fbc03sc02i00
model    : GK104GL [Tesla K10]
vendor   : NVIDIA Corporation
driver   : xserver-xorg-video-nouveau - distro free builtin
driver   : nvidia-384 - third-party free recommended
driver   : nvidia-381 - third-party free
driver   : nvidia-340 - third-party free
driver   : nvidia-375 - third-party free
driver   : nvidia-378 - third-party free
driver   : nvidia-304 - distro non-free

sudo apt-get install nvidia-384

Now I get a different error message when trying to use the glxinfo and glxgears commands:

glxgears: error while loading shared libraries: cannot open shared object file: No such file or directory

glxinfo: error while loading shared libraries: cannot open shared object file: No such file or directory

I tried using the update-alternative commands you suggested to switch to mesa:

sudo update-alternatives --set i386-linux-gnu_gl_conf /usr/lib/i386-linux-gnu/mesa/

[b]sudo update-alternatives --set i386-linux-gnu_egl_conf /usr/lib/i386-linux-gnu/mesa-egl/
update-alternatives: error: alternative /usr/lib/i386-linux-gnu/mesa-egl/ for i386-linux-gnu_egl_conf not registered; not setting

sudo update-alternatives --set x86_64-linux-gnu_gl_conf /usr/lib/x86_64-linux-gnu/mesa/
sudo update-alternatives --set x86_64-linux-gnu_egl_conf /usr/lib/x86_64-linux-gnu/mesa-egl/

The second command line doesn’t work for some reason.

I’ve also attached dmesg and Xorg.0 Logs.



Xorg-0-log.txt (34 KB)
dmesg.txt (113 KB)

Oh dear. By messing around with the nvidia drivers and using the binary installer you broke your mesa install. While using the .run installer on a nvidia-only system mostly works, this is deadly on a mixed-vendor system like yours.
So now you will first have to get back to a working mesa.

  1. Purge everything nvidia
  2. reinstall mesa and maybe glvnd and carefully look for warnings
    Then check
  • in Xorg.0.log for the line
    Module glx: vendor=“X.Org Foundation”
  • the update-alternatives commands don’t give errors
    If that works again, you can reinstall the nvidia drivers from repo and switch back to mesa.

Maybe an explanation what caused all this fuzz. Of course, it’s just an educated guess since I never deliberately broke my system;)
-Installing the nvidia driver with .run installer
-Overwriting OpenGL system files
-Hardlinking GLX to nvidia
-Xserver loading nvidia GLX
-Doesn’t work on Matrox gpu, disables direct rendering
-nx using indirect rendering as fall back
-indirect rendering limited to 1.4 by design
-uninstalling the .run driver
-leaving missing system files
-no working GLX at all


Thank you for your suggestions. I removed the .run installations for both Nvidia drivers and cuda.

I ran the following steps:

sudo apt-get remove --purge xorg-driver-fglrx fglrx*
sudo apt-get remove --purge fglrx*
sudo apt-get install build-essential cdbs fakeroot dh-make debhelper debconf libstdc++6 dkms libqtgui4 wget execstack libelfg0 dh-modaliases
sudo apt-get install --reinstall libgl1-mesa-glx libgl1-mesa-dri

sudo dpkg-reconfigure xserver-xorg

rebooted the machine

sudo apt-get install mesa-utils

Now glxinfo works. I now see the version string version I see on our other systems with the same Matrox card. glxgears also works.

glxinfo | grep Open
OpenGL vendor string: VMware, Inc.
OpenGL renderer string: Gallium 0.4 on llvmpipe (LLVM 3.4, 256 bits)
OpenGL version string: 2.1 Mesa 10.1.3
OpenGL shading language version string: 1.30
OpenGL extensions:

However, I did not install/reinstall glvnd. What is that,and would I reinstall it?

I installed the ppa graphics-card and installed the latest Nvidia driver.

Here is the select output from the logs:

more /var/log/Xorg.0.log | grep vendor
[    24.519] (II) Module mga: vendor="X.Org Foundation"
[    24.535] (II) Module modesetting: vendor="X.Org Foundation"
[    24.539] (II) Module fbdev: vendor="X.Org Foundation"
[    24.541] (II) Module vesa: vendor="X.Org Foundation"
[    24.553] (II) Module fbdevhw: vendor="X.Org Foundation"
[    24.559] (II) Module vgahw: vendor="X.Org Foundation"
[    24.581] (II) Module vbe: vendor="X.Org Foundation"
[    24.600] (II) Module int10: vendor="X.Org Foundation"
[    24.796] (II) Module fb: vendor="X.Org Foundation"
[    24.922] (II) Module evdev: vendor="X.Org Foundation"

more /var/log/Xorg.0.log | grep glx
[    24.485] (II) LoadModule: "glx"
[    24.486] (II) Loading /usr/lib/x86_64-linux-gnu/xorg/extra-modules/
[    24.501] (EE) Failed to load /usr/lib/x86_64-linux-gnu/xorg/extra-modules/ cannot open shared object file: No such file or directory
[    24.501] (II) UnloadModule: "glx"
[    24.501] (II) Unloading glx
[    24.501] (EE) Failed to load module "glx" (loader failed, 7)

I ran the update-alternatives commands. And still get the output above.

I’ve installed the most recent version of cuda

sudo dpkg -i cuda-repo-ubuntu1404_8.0.61-1_amd64.deb`
`sudo apt-get update`
`sudo apt-get install cuda`

However, when I install the samples and run deviceQuery and bandwithtest, I get the following errors:

./deviceQuery Starting...

 CUDA Device Query (Runtime API) version (CUDART static linking)

cudaGetDeviceCount returned 35
-> CUDA driver version is insufficient for CUDA runtime version
Result = FAIL

[CUDA Bandwidth Test] - Starting...
Running on...

cudaGetDeviceProperties returned 35
-> CUDA driver version is insufficient for CUDA runtime version
CUDA error at code=35(cudaErrorInsufficientDriver) "cudaSetDevice(currentDevice)"

Not sure what is going on, but does the output below have something to do with it (see Bold font):

sudo dpkg --list | egrep -i '(nvidia|cuda)'
ii  bbswitch-dkms                                            0.7-2ubuntu1                               amd64        Interface for toggling the power on nVidia Optimus video cards
ii  cuda                                                     8.0.61-1                                   amd64        CUDA meta-package
ii  cuda-8-0                                                 8.0.61-1                                   amd64        CUDA 8.0 meta-package
ii  cuda-command-line-tools-8-0                              8.0.61-1                                   amd64        CUDA command-line tools
ii  cuda-core-8-0                                            8.0.61-1                                   amd64        CUDA core tools
ii  cuda-cublas-8-0                                                                 amd64        CUBLAS native runtime libraries
ii  cuda-cublas-dev-8-0                                                             amd64        CUBLAS native dev links, headers
ii  cuda-cudart-8-0                                          8.0.61-1                                   amd64        CUDA Runtime native Libraries
ii  cuda-cudart-dev-8-0                                      8.0.61-1                                   amd64        CUDA Runtime native dev links, headers
ii  cuda-cufft-8-0                                           8.0.61-1                                   amd64        CUFFT native runtime libraries
ii  cuda-cufft-dev-8-0                                       8.0.61-1                                   amd64        CUFFT native dev links, headers
ii  cuda-curand-8-0                                          8.0.61-1                                   amd64        CURAND native runtime libraries
ii  cuda-curand-dev-8-0                                      8.0.61-1                                   amd64        CURAND native dev links, headers
ii  cuda-cusolver-8-0                                        8.0.61-1                                   amd64        CUDA solver native runtime libraries
ii  cuda-cusolver-dev-8-0                                    8.0.61-1                                   amd64        CUDA solver native dev links, headers
ii  cuda-cusparse-8-0                                        8.0.61-1                                   amd64        CUSPARSE native runtime libraries
ii  cuda-cusparse-dev-8-0                                    8.0.61-1                                   amd64        CUSPARSE native dev links, headers
ii  cuda-demo-suite-8-0                                      8.0.61-1                                   amd64        Demo suite for CUDA
ii  cuda-documentation-8-0                                   8.0.61-1                                   amd64        CUDA documentation
ii  cuda-driver-dev-8-0                                      8.0.61-1                                   amd64        CUDA Driver native dev stub library
<b>ii  cuda-drivers                                             384.66-1                                   amd64        </b>
CUDA Driver meta-package
ii  cuda-license-8-0                                         8.0.61-1                                   amd64        CUDA licenses
ii  cuda-misc-headers-8-0                                    8.0.61-1                                   amd64        CUDA miscellaneous headers
ii  cuda-npp-8-0                                             8.0.61-1                                   amd64        NPP native runtime libraries
ii  cuda-npp-dev-8-0                                         8.0.61-1                                   amd64        NPP native dev links, headers
ii  cuda-nvgraph-8-0                                         8.0.61-1                                   amd64        NVGRAPH native runtime libraries
ii  cuda-nvgraph-dev-8-0                                     8.0.61-1                                   amd64        NVGRAPH native dev links, headers
ii  cuda-nvml-dev-8-0                                        8.0.61-1                                   amd64        NVML native dev links, headers
ii  cuda-nvrtc-8-0                                           8.0.61-1                                   amd64        NVRTC native runtime libraries
ii  cuda-nvrtc-dev-8-0                                       8.0.61-1                                   amd64        NVRTC native dev links, headers
ii  cuda-repo-ubuntu1404                                     8.0.61-1                                   amd64        cuda repository configuration files
ii  cuda-repo-ubuntu1404-8-0-local-cublas-performance-update 8.0.61-1                                   amd64        cuda repository configuration files
ii  cuda-runtime-8-0                                         8.0.61-1                                   amd64        CUDA Runtime 8.0 meta-package
ii  cuda-samples-8-0                                         8.0.61-1                                   amd64        CUDA example applications
ii  cuda-toolkit-8-0                                         8.0.61-1                                   amd64        CUDA Toolkit 8.0 meta-package
ii  cuda-visual-tools-8-0                                    8.0.61-1                                   amd64        CUDA visual tools
ii  libcuda1-384                                             384.69-0ubuntu0~gpu14.04.1                 amd64        NVIDIA CUDA runtime library
ii  nouveau-firmware                                         20091212-0ubuntu1                          all          Firmware for nVidia graphics cards
ii  nvidia-384                                               384.69-0ubuntu0~gpu14.04.1                 amd64        NVIDIA binary driver - version 384.69
ii  nvidia-384-dev                                           384.69-0ubuntu0~gpu14.04.1                 amd64        NVIDIA binary Xorg driver development files
ii  nvidia-modprobe                                          384.66-0ubuntu1                            amd64        Load the NVIDIA kernel driver and create device files
ii  nvidia-opencl-icd-384                                    384.69-0ubuntu0~gpu14.04.1                 amd64        NVIDIA OpenCL ICD
ii  nvidia-prime                                                                       amd64        Tools to enable NVIDIA's Prime
ii  nvidia-settings                                          384.69-0ubuntu0~gpu14.04.1                 amd64        Tool for configuring the NVIDIA graphics driver

I think what is going on is that there is a mismatch for the nvidia driver cuda tries to install vs what is initially installed with the ppa:graphics-card. Is that case? Or is it something simple to fix?

Would I need to install cuda and nvidia manually again, but this time with the --no-opengl-files? Woud that work?