Here’s the story … I have a Lenovo Ideapad S410p which have Kali 1.0.9a (which based on Debian Whezzy) installed and I want to install steam on it. It turns that it need more then just a simple Nvidia driver installing.
So I download Bumblebee and CUDA and try to install it.
This is what I do (all the installation process I do as root, so don’t forget to su or sudo su) :
- Make sure I have the latest update.
sudo apt-get update && sudo apt-get upgrade.
- Download the CUDA driver
I used cuda 5.5.22 64bit driver (tried the latest 6.5 first but it didn’t worked on my machine).
Those who need the 32 bit driver can download this cuda 5.5.22 32bit - Download latest VirtualGL 64bit
At my time installing this it’s on version 2.3.90
- Install linux headers. So we will able to compile some source later.
apt-get install linux-headers-$(uname -r)
- And some dependencies for CUDA
apt-get install freeglut3-dev libxmu-dev
- And then Install VirtualGL
cd [directory-where-I-save-virtualgl]
dpkg -i virtualgl_2.3.90_amd64.deb - Add the path for VirtualGL to .bashrc
pico ~/.bashrc
Add a line somewhere near the top and save it. (Ctrl O [enter] Ctrl X):
export PATH=$PATH:/opt/VirtualGL/bin
This can be accomplish by typing the command in the terminal, it’ll be temporary but it would do. - Add the Wheezy Backports Repository
pico /etc/apt/sources.list
Add the following line to the file and then save
deb http://ftp.debian.org/debian wheezy-backports main contrib non-freeDon’t forget to do:
apt-get update - Install Bumblebee. If you see a couple of pop ups, just acknowledge them.
apt-get install bumblebee-nvidia primus
- And then install the nvidia driver
apt-get install nvidia-glx
- Check where your Nvidia card is installed.
lspci | egrep ‘VGA|3D’
rumy@cbug-lair:~$ lspci | egrep ‘VGA|3D’
04:00.0 3D controller: NVIDIA Corporation Device 1140 (rev ff)Mine is in 04.00.0
- Add the address to the xorg.conf.nvidia file
pico /etc/bumblebee/xorg.conf.nvidia
Add BusID “PCI:04:00:0” at the end of this Section
Section “Device”
Identifier “DiscreteNvidia”
Driver “nvidia”
VendorName “Nvidia Corporation
BusID “PCI:04:00:0”
and Save it - Now, Open the bumblebee.conf file, edit and Save it.
pico /etc/bumblebee/bumblebee.conf
Edit line 22 so it will be like this :
Driver=nvidia
Edit line 55 so it will be like this :
KernelDriver=nvidia-current
- Restart Bumblebee
/etc/init.d/bumblebeed restart
- Run the next command to confirm that bumblebee is working
optirun /opt/VirtualGL/bin/glxspheres64
You should see the graphics after that, means that your bumblebee is working
- Now for the CUDA part, first we need to install some cuda library.
apt-get install libcuda1
- And then install CUDA
cd [directory-where-I-saved-cuda]
chmod +x cuda_5.5.22_linux_64.run
./cuda_5.5.22_linux_64.run
Read and Scroll to the bottom of the file with space-bar and (a)ccept the EULA
Select (y)es to continue with an unsupported configuration
Select (N)O. DO NOT WANT TO INSTALL THE NVIDIA DRIVER.
Select (y)es. You do want the CUDA 5.5 Toolkit
(Enter) for default location
Select (y)es for CUDA 5.5 samples
(Enter) for default locationWait till it finish, if there is a warning, ignore it.
Take a note about LD_LIBRARY_PATH (I am using the 64bit path)
- Adding the library path to ld.so.conf, so it will look like this, and Save it
pico /etc/ld.so.conf
include /etc/ld.so.conf.d/*.conf
/usr/local/cuda-5.5/lib64
/libDon’t forget to run this, after Save the file :
ldconfig
- Fix the nvidia-uvm module (it’s broken so we need to fix it). Remember as root!
cd /usr/src/nvidia-current-331.67
make
cp Module.symvers uvm/cd uvm/
make
Be very careful with this :
rm /lib/modules/3.14-kali1-amd64/updates/dkms/nvidia-uvm.ko
This command should be in one line :
cp /usr/src/nvidia-current-331.67/uvm/nvidia-uvm.ko /lib/modules/3.14-kali1-amd64/updates/dkms/If all the above went well, the next modprobe should working without error.
modprobe nvidia-uvm - Now to make CUDA Samples.
cd ~/NVIDIA_CUDA-5.5_Samples/NVIDIA_CUDA-5.5_Samples/
make
Wait until it finish, it will take a while.
- And test it, and see if it works!
cd 1_Utilities/deviceQuery
optirun ./deviceQueryYou should see this :
Result = PASS!