Results 1 to 50 of 376

Thread: (Guide) Installing Nvidia + Bumblebee + CUDA for Optimus enabled Laptops

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    2013-Aug
    Location
    lost in space
    Posts
    580
    That's my 'dummyproof' edited version of your guide.

    Code:
    Update and upgrade Kali to latest
    
    apt-get update && apt-get upgrade && apt-get dist-upgrade
    
    Downloads
    You will need the files below (64 bit) I always go with 64bit as I am on Kali 64bit. Download in the Home folder or place them in the Home folder after.
    
    
    
    Install VirtualGL
    cd ~
    
    dpkg -i virtualgl*.deb
    
    Add the path for VirtualGL to .bashrc
    
    nano ~/.bashrc
    
    Add a line somewhere at the top that reads:
    export PATH=$PATH:/opt/VirtualGL/bin
    
    Save the file(Ctrl+x, then Y, then Enter)
    
    Export the path so we don't have to log out and in.
    
    export PATH=$PATH:/opt/VirtualGL/bin
    
    Install the linux headers
    
    apt-get install linux-headers-$(uname -r)
    
    Some dependencies for CUDA for later
    
    apt-get install freeglut3-dev libxmu-dev
    
    Add the wheezy backports Repo (yes, still needed for bumblebee but not the NVIDIA driver)
    Go to Computer > File System > etc > apt > souces.list, and open it with Leafpad, and add the following line to the file and then save.
    deb http://ftp.debian.org/debian wheezy-backports main contrib non-free
    
    apt-get update
    
    Install bumblebee (not bumblebee-nvidia)
    
    apt-get install bumblebee primus
    
    Edit the bumblebee.conf file
    
    nano /etc/bumblebee/bumblebee.conf
    
    Change line 22 so it reads:
    Driver=nvidia
    
    Run the following and record your PCI address for your video card. It will look similar to 03:00.0 (yours might be different)
    
    lspci | egrep 'VGA|3D'
    
    Edit xorg.conf.nvidia 
    
    nano /etc/bumblebee/xorg.conf.nvidia
    
    add a line under the 'Section "Device"' area so that is matches what is shown below. Change the bus ID to match what you recorded previously and take note that you recored a . before the last number and it is now a ':'. You need the ':'.
    
    Section "Device"
    Identifier "DiscreteNvidia"
    Driver "nvidia"
    VendorName "NVIDIA Corporation"
    BusID "PCI:03:00:0"
    
    Restart bumblebee with the following and ignore any ERROR/FAIL warnings
    
    /etc/init.d/bumblebeed restart
    
    Change NVIDIA installer permissions
    cd ~
    
    chmod +x NVIDIA*.run
    
    You now need to close gdm3 because it can't be running for the driver install. 
    Record what you need now. If you don't get a login screen when you close gdm3, press control + alt + F1
    
    /etc/init.d/gdm3 stop
    
    Now the NVIDIA install
    cd ~
    
    ./NVIDIA*.run --dkms -z
    
    -Accept the EULA
    -Select yes to register the kernel module with DKMS
    -No to libs (unless you want them)
    -Ok to acknowledge the website libs
    The install will take place...
    -Do not run X-Config. Select NO.
    The installer will close. 
    
    Restart kali with
    
    shutdown -r now 
    
    or Ctrl+Alt+Del
    
    When rebooted, run 
    
    optirun glxspheres64
    
    A 'modinfo nvidia' will show that you now have the 340.24 module loaded.
    
    modinfo nvidia
    
    To install CUDA, chmod the installer first
    cd ~
    
    chmod +x cuda*.run
    
    And now to install CUDA
    
    ./cuda*.run
    
    -Accept the EULA (Tab then, accept)
    -Select yes to unsupported configuration
    -No to graphics driver
    -Yes to the toolkit
    -Accept default location (press Enter only)
    -Yes to symbolic link
    -Yes to samples
    -Yes to default samples location (press Enter only)
    The toolkit will install...
    
    For the path, we will add a little more to what we defined for VirtualGL earlier.
    
    nano ~/.bashrc
    
     It should look like this in your bashrc file 
     export PATH=$PATH:/opt/VirtualGL/bin:/usr/local/cuda-6.0/bin
    
    Run the following so we don't have to log out
    
    export PATH=$PATH:/opt/VirtualGL/bin:/usr/local/cuda-6.0/bin
    
    Edit the following file so the contents match those shown below
    
    nano /etc/ld.so.conf
    
    Contents:
    include /etc/ld.so.conf.d/*.conf
    add /usr/local/cuda-6.0/lib64
    
    Save and close
    
    Run
    
    ldconfig
    
    Build the nvidia samples
    
    cd /root/NVIDIA_CUDA-6.0_Samples
    
    make
    
    cd 1_Utilities/deviceQuery
    
    optirun ./deviceQuery
    
    You should see Result = PASS!
    
    Now, I know you want to see it in action so the next part we'll install Pyrit.
    
    First, remove the Wheezy repo. 
    You may either comment out the line we added or delete it.
    Computer > File System > etc > apt > souces.list,
    Save the file. 
    
    apt-get update
    
    Checkout Pyrit
    
    svn checkout http://pyrit.googlecode.com/svn/trunk/ pyrit_svn
    
    Install required libraries and add CUDA support
    
    apt-get install libpcap-dev
    
    cd pyrit_svn/pyrit/
    
    python setup.py build
    
    python setup.py install
    
    cd ../cpyrit_cuda/
    
    python setup.py build
    
    python setup.py install
    
    Now, what we have been waiting for this entire time. Lets see it work.
    
    optirun pyrit benchmark


    as a side note, after all this my Kali installation went from a little less then 8Gb to 11Gb. Interesting...
    Last edited by Quest; 2014-07-18 at 06:11.
    Kali Linux USB Installation using LinuxLive USB Creator
    Howto Install HDD Kali on a USB Key
    Clean your laptop fan | basic knowledge

Similar Threads

  1. Replies: 6
    Last Post: 2017-01-04, 19:39
  2. NVIDIA and CUDA with OPTIMUS
    By jolubedju in forum TroubleShooting Archive
    Replies: 1
    Last Post: 2014-06-03, 10:52
  3. Kali Linux 1.05 nvidia optimus cuda and pyrit
    By gfbaggio in forum TroubleShooting Archive
    Replies: 3
    Last Post: 2014-04-28, 20:15

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •