Archive for December, 2014

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) :

  1. Make sure I have the latest update.

    sudo apt-get update && sudo apt-get upgrade.

  2. 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

  3. Download latest VirtualGL 64bit

    At my time installing this it’s on version 2.3.90

  4. Install linux headers. So we will able to compile some source later.

    apt-get install linux-headers-$(uname -r)

  5. And some dependencies for CUDA

    apt-get install freeglut3-dev libxmu-dev

  6. And then Install VirtualGL

    cd [directory-where-I-save-virtualgl]
    dpkg -i virtualgl_2.3.90_amd64.deb

  7. 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.

  8. Add the Wheezy Backports Repository

    pico /etc/apt/sources.list
    Add the following line to the file and then save
    deb wheezy-backports main contrib non-free

    Don’t forget to do:
    apt-get update

  9. Install Bumblebee. If you see a couple of pop ups, just acknowledge them.

    apt-get install bumblebee-nvidia primus

  10. And then install the nvidia driver

    apt-get install nvidia-glx

  11. 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

  12. 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

  13. Now, Open the bumblebee.conf file, edit and Save it.

    pico /etc/bumblebee/bumblebee.conf

    Edit line 22 so it will be like this :
    Edit line 55 so it will be like this :

  14. Restart Bumblebee

    /etc/init.d/bumblebeed restart

  15. 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

  16. Now for the CUDA part, first we need to install some cuda library.

    apt-get install libcuda1

  17. And then install CUDA

    cd [directory-where-I-saved-cuda]
    chmod +x

    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 (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 location

    Wait till it finish, if there is a warning, ignore it.

    Take a note about LD_LIBRARY_PATH (I am using the 64bit path)

  18. Adding the library path to, so it will look like this, and Save it

    pico /etc/

    include /etc/*.conf

    Don’t forget to run this, after Save the file :

  19. Fix the nvidia-uvm module (it’s broken so we need to fix it). Remember as root!

    cd /usr/src/nvidia-current-331.67
    cp Module.symvers uvm/cd uvm/

    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

  20. Now to make CUDA Samples.

    cd ~/NVIDIA_CUDA-5.5_Samples/NVIDIA_CUDA-5.5_Samples/

    Wait until it finish, it will take a while.

  21. And test it, and see if it works!

    cd 1_Utilities/deviceQuery
    optirun ./deviceQuery

    You should see this :
    Result = PASS!

For those who use kernel 3.14 (in my case Kali Linux 1.0.9a/Debian) and having trouble installing VMWare Workstation 10.xx, here’s the workaround :

  1. Download this patch
  2. Open Terminal and su/login as root
  3. And apply this

cd /usr/lib/vmware/modules/source/

cp vmnet.tar vmnet.tar.original

tar xvf vmnet.tar vmnet-only/filter.c

patch vmnet-only/filter.c < /location_of_patch/kernel-3.14-vmware-filter.c.diff

tar -uvf vmnet.tar vmnet-only/filter.c

rm -rf vmnet-only/

vmware-modconfig –console –install-all