After installing CUDA driver from NVIDIA website, Ubuntu 13.04/14.04 window manager decorations (Unity, via Compiz) may stop working properly on Optimus machines (primary low-end Intel GPU + secondary high-end NVIDIA GPU).
This tutorial explains how to bring back window manager decorations.
(Also available as PDF)
Purpose of CUDA driver install:
- We want to install CUDA driver to enable the use of NVIDIA GPU in compute applications
- We want to have the newest CUDA development driver from NVIDIA website
- We do NOT want to do desktop acceleration with NVIDIA GPU – desktop shall still be managed by Intel GPU
- If you want to do NVIDIA desktop acceleration, this tutorial is NOT for you. Look into bumblebee instead.
Breaking by installing vanilla CUDA driver:
-
Switch to console-mode tty:
Ctrl+Alt+F2
-
Disable Nouveau:
$ cd Downloads $ sudo service lightdm stop $ chmod +x cuda_6.0.37_linux_64.run $ sudo ./cuda_6.0.37_linux_64.run $ sudo reboot
-
Install driver, CUDA toolkit and samples:
$ cd Downloads $ sudo service lightdm stop $ sudo ./cuda_6.0.37_linux_64.run $ sudo reboot
After reboot and login, decorations and main main menu may disappear:
The following steps describe how to bring back the normal desktop:
-
Press
Ctrl+Alt+T
to open terminal -
Install mc:
$ sudo apt-get install mc
-
Execute mc under admin:
$ sudo mc
-
Delete files in
/usr/lib/xorg/modules/extensions
as shown below: -
Delete libGL* files in
/usr/lib
, and libGL* and libGLES* files in/usr/lib32
-
Reinstall GLX module:
$ sudo apt-get install --reinstall libgl1-mesa-glx
-
Reinstall xserver:
$ sudo apt-get install --reinstall xserver-org-core
-
Reinstall xorg:
$ sudo apt-get install --reinstall xorg
-
Reset and restart compiz:
$ dconf reset -f /org/compiz/ $ compiz –replace
-
You should now see decorator and main menu running normally:
How to avoid this problem in future: do not install OpenGL files:
- Install graphics driver separately w/o OpenGL (–no-opengl-files):
Ctrl+Alt+F2
$ cd Downloads
$ ./cuda_6.0.37_linux_64.run --extract=$HOME/Downloads/cuda
$ cd cuda
$ sudo service lightdm stop
$ sudo ./NVIDIA-Linux-x86_64-331.62.run --no-opengl-files
- Then install CUDA and CUDA samples:
$ cd ..
$ sudo ./cuda_6.0.37_linux_64.run
Do you accept the previously read EULA? (accept/decline/quit): accept
Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 331.62? ((y)es/(n)o/(q)uit): n
Install the CUDA 6.0 Toolkit? ((y)es/(n)o/(q)uit): y
Enter Toolkit Location [ default is /usr/local/cuda-6.0 ]: /opt/cuda
Do you want to install a symbolic link at /usr/local/cuda? ((y)es/(n)o/(q)uit): y
Install the CUDA 6.0 Samples? ((y)es/(n)o/(q)uit): y
$ sudo reboot
Applied Parallel Computing LLC
If you need help with Machine Learning, Computer Vision or with GPU computing in general, please reach out to us at Applied Parallel Computing LLC.