Nvidia API mismatch

Doing the following solved it for me on Ubuntu 12.04 64bit with 3.0.29 kernel. Hope it helps.

sudo apt-get purge nvidia-current
sudo apt-get install nvidia-current

On finding out there were a load of old files crufting up /usr/lib32/ I moved them out the way with the following command:

sudo find /usr/lib32 -iname '*270.41.06*' -exec mv {} {}.old \;

And restarted X. This broke everything 3D. Huzzah. Using a previous commend I could see there were four broken links:

ls -l /usr/lib32/ | awk '{ print $8 " " $9 " " $10 }' | grep 270

libcuda.so.1 -> libcuda.so.270.41.06
libGL.so.1 -> libGL.so.270.41.06
libvdpau.so.1 -> libvdpau.so.270.41.06
libvdpau_trace.so -> vdpau/libvdpau_trace.so.270.41.06

Rather than manually replace the links for four files, I went to Elrond, Lord of Rivendell and tasked him with setting up a fellowship that could trapse into Morhdorh, toddle up to Mount Doom and craft me one command to bring me (and by that I do mean us all) and in the darkness bind us.

Enough of that. Here is the one command:

ls -l /usr/lib32/ | awk '{ print $8 " " $9 " " $10 }' | grep 270 | cut -d' ' -f1 | xargs -l1 sudo bash -c "rm /usr/lib32/\$0 && ln -s /usr/lib32/nvidia-current/\$0 /usr/lib32/\$0"

Isn't she spectacular. And it worked. I now have 4 shiny new symlinks:

ls -l /usr/lib32/ | awk '{ print $8 " " $9 " " $10 }' | grep '/nvidia-current'

libcuda.so.1 -> /usr/lib32/nvidia-current/libcuda.so.1
libGL.so.1 -> /usr/lib32/nvidia-current/libGL.so.1
libOpenCL.so -> nvidia-current/libOpenCL.so
libvdpau.so.1 -> /usr/lib32/nvidia-current/libvdpau.so.1
libvdpau_trace.so -> /usr/lib32/nvidia-current/libvdpau_trace.so

I then checked to see if everything had worked. Before restarting I thought I should check to see if the links were correct:

ls -l /usr/lib32/ | awk '{ print $8 " " $9 " " $10 }' | grep '/nvidia-current' | cut -d' ' -f3 | xargs file

/usr/lib32/nvidia-current/libcuda.so.1:      symbolic link to `libcuda.so.270.41.19'
/usr/lib32/nvidia-current/libGL.so.1:        symbolic link to `libGL.so.270.41.19'
/usr/lib32/nvidia-current/libvdpau.so.1:     ERROR: cannot open `/usr/lib32/nvidia-current/libvdpau.so.1' (No such file or directory)
/usr/lib32/nvidia-current/libvdpau_trace.so: ERROR: cannot open `/usr/lib32/nvidia-current/libvdpau_trace.so' (No such file or directory)

Great. So the mega-command only did two links right. After looking a little further, it seems the libvdpau files actually live in /usr/lib32/nvidia-current/vdpau/. No messing about this time:

sudo rm /usr/lib32/libvdpau{,_trace}.so*
sudo ln -s /usr/lib32/{nvidia-current/vdpau/,}libvdpau.so*
sudo ln -s /usr/lib32/{nvidia-current/vdpau/,}libvdpau_trace.so*

ls -l /usr/lib32/ | awk '{ print $8 " " $9 " " $10 }' | grep '/nvidia-current' | cut -d' ' -f3 | xargs file

/usr/lib32/nvidia-current/libcuda.so.1:                      symbolic link to `libcuda.so.270.41.19'
/usr/lib32/nvidia-current/libGL.so.1:                        symbolic link to `libGL.so.270.41.19'
/usr/lib32/nvidia-current/vdpau/libvdpau.so.270.41.19:       ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped
/usr/lib32/nvidia-current/vdpau/libvdpau_trace.so.270.41.19: ELF 32-bit LSB shared object, Intel 80386, version 1 (SYSV), dynamically linked, stripped

At least they're properly (if a little ungainily) linked in. Time to test.

Edit: This worked but learn from my struggle: Keep it simple.


also just do this:

$ dpkg --get-selections | grep nvidia

nvidia-common                   install
nvidia-current                  install
nvidia-current-updates              install
nvidia-experimental-x...            install
nvidia-settings                 install
nvidia-settings-updates             install

and then:

$ sudo apt-get purge nvidia-experimental-x...
...
$ sudo reboot

everything is OK!


I had this problem once, and it is surprisingly easy to fix.

The following is based on patchy memory so be careful!
First you need to see that the nvidia libraries in /usr/lib32/ match:

/usr/lib32/libOpenCL.so  
/usr/lib32/nvidia-current  
/usr/lib32/nvidia-current/libGL.la  
/usr/lib32/nvidia-current/libGL.so  
/usr/lib32/nvidia-current/libGL.so.1  
/usr/lib32/nvidia-current/libGL.so.270.41.06  
/usr/lib32/nvidia-current/libOpenCL.so  
/usr/lib32/nvidia-current/libOpenCL.so.1  
/usr/lib32/nvidia-current/libOpenCL.so.1.0  
/usr/lib32/nvidia-current/libOpenCL.so.1.0.0  
/usr/lib32/nvidia-current/libXvMCNVIDIA.so  
/usr/lib32/nvidia-current/libXvMCNVIDIA.so.1  
/usr/lib32/nvidia-current/libXvMCNVIDIA.so.270.41.06  
/usr/lib32/nvidia-current/libXvMCNVIDIA_dynamic.so.1  
/usr/lib32/nvidia-current/libcuda.so  
/usr/lib32/nvidia-current/libcuda.so.1  
/usr/lib32/nvidia-current/libcuda.so.270.41.06  
/usr/lib32/nvidia-current/libnvcuvid.so  
/usr/lib32/nvidia-current/libnvcuvid.so.1  
/usr/lib32/nvidia-current/libnvcuvid.so.270.41.06  
/usr/lib32/nvidia-current/libnvidia-cfg.so  
/usr/lib32/nvidia-current/libnvidia-cfg.so.1  
/usr/lib32/nvidia-current/libnvidia-cfg.so.270.41.06  
/usr/lib32/nvidia-current/libnvidia-compiler.so  
/usr/lib32/nvidia-current/libnvidia-compiler.so.1  
/usr/lib32/nvidia-current/libnvidia-compiler.so.270.41.06  
/usr/lib32/nvidia-current/libnvidia-glcore.so.270.41.06  
/usr/lib32/nvidia-current/libnvidia-ml.so  
/usr/lib32/nvidia-current/libnvidia-ml.so.1  
/usr/lib32/nvidia-current/libnvidia-ml.so.270.41.06  
/usr/lib32/nvidia-current/libnvidia-tls.so.270.41.06  
/usr/lib32/nvidia-current/libnvidia-wfb.so.270.41.06  
/usr/lib32/nvidia-current/tls  
/usr/lib32/nvidia-current/tls/libnvidia-tls.so.270.41.06  
/usr/lib32/nvidia-current/vdpau  
/usr/lib32/nvidia-current/vdpau/libvdpau.so.270.41.06  
/usr/lib32/nvidia-current/vdpau/libvdpau_nvidia.so  
/usr/lib32/nvidia-current/vdpau/libvdpau_nvidia.so.1  
/usr/lib32/nvidia-current/vdpau/libvdpau_nvidia.so.270.41.06  
/usr/lib32/nvidia-current/vdpau/libvdpau_trace.so.270.41.06  
/usr/lib32/vdpau 

According to what you described, they most likely do not match these. If this is the case, then you need to delete them (carefully - use a file manager, do not attempt to rm -rf !!!!!!!!!), and then reinstall nvidia-current :).
This should give you the right versions of the libraries and give you a working system.