Page 1 of 8 12345678 LastLast
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
    2014-Apr
    Location
    Down Under
    Posts
    315

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

    Updated for Kali 2.0 Sana

    Hey guys, I'm rewriting this to use the repo as Kali Sana looks to have up-to-date nvidia drivers straight out of the gate.

    Code:
    NVIDIA Driver 352.21
    CUDA 7.5.18 (the repo has 6.0.37-5, it's a bit old so I'm manually installing 7.5.18)
    VirtualGL 2.4.90
    Pyrit v308 (optional)
    cudaHashcat (optional)
    Couple of points

    1. This guide and all GPU passthrough software such as cuda_pyrit and cudahashcat will never work if run from within a Virtual Machine. Please don't post that it does not work for you in a VM because you should have read this.

    2. I'm going to assume that you are either on a fresh install of Kali or have the skills to clean up any conflicting software.

    3. I run 64bit software. If you don't, change the files you download to match what you use. (Edit: CUDA does not support 32bit anymore)

    4. If you have any issues or if something does not work, follow the template linked here and post the results of all commands.

    Lets get started.

    1. Update Kali
    Code:
    apt-get update && apt-get upgrade && apt-get dist-upgrade
    2. Download VirtualGL and install it. Grab the latest non-beta
    Code:
    http://sourceforge.net/projects/virtualgl/files/
    
    Install with:
    cd ~
    dpkg -i virtualgl*.deb
    3. Download CUDA 7.5. Grab the x64 or 14.04 *.run file (should be 1.1gb)
    Code:
    https://developer.nvidia.com/cuda-downloads
    5. Install linux headers for your kernel
    Code:
    apt-get install linux-headers-$(uname -r)
    6. Install dependencies we will need later. The first two are for CUDA and the last is for pyrit
    Code:
    apt-get install freeglut3-dev libxmu-dev libpcap-dev
    7. Update system PATH. Notice that the PATH references CUDA 7.5. If you have a different version, change it to match.
    Code:
    nano ~/.bashrc
    
    Add the following line and then save and close bashrc
    export PATH=$PATH:/opt/VirtualGL/bin:/usr/local/cuda-7.5/bin
    8. Export the system path. We export the path from terminal so we can take advantage of it without restart. Run the following in terminal
    Code:
    export PATH=$PATH:/opt/VirtualGL/bin:/usr/local/cuda-7.5/bin
    9. Install bumblebee-nvidia and primus. Just press enter when the messages appear and ignore the warning about rrmod.
    Code:
    apt-get install bumblebee-nvidia primus
    10. Edit the bumblebee config file so bumblebee knows we are using the NVIDIA driver. Change the 'Driver=' value. Should be line 22. The module from the repo driver is 'nvidia-current' but we set 'nvidia' here so that the nvidia section of bumblebee.conf is called.
    Code:
    nano +22 /etc/bumblebee/bumblebee.conf
    
    Make it read:
    Driver=nvidia
    
    check line 55 and make sure it reads:
    KernelDriver=nvidia-current
    
    Save and close
    11. Run the following and record the PCI address of your video card. It will look similar to 03:00.0
    Code:
    lspci | egrep 'VGA|3D'
    12. Edit the xorg.conf.nvidia file so it knows the PCI address of your video card. Note that the last group of numbers is now seperated with a ":" instead of a ".". We are editing under the area 'Section "Device"'
    Code:
    nano /etc/bumblebee/xorg.conf.nvidia
    
    Section "Device"
    Identifier "DiscreteNvidia"
    Driver "nvidia"
    VendorName "NVIDIA Corporation"
    BusID "PCI:03:00:0"
    14. Reboot
    Code:
    shutdown -r now
    15. Now we have restarted, test the driver. glxsheres64 will test the driver and modinfo nvidia will show the version loaded.
    Code:
    optirun glxspheres64
    
    modinfo nvidia
    16. Prepare CUDA for install
    Code:
    cd ~
    chmod +x cuda*.run
    17. Run the CUDA install
    Code:
    ./cuda*.run
    
    Accept the EULA
    Select yes to unsupported configuration
    No to graphics driver
    Yes to the toolkit
    Accept default location
    Yes to symbolic link
    Yes to samples
    Yes to default samples location
    The toolkit will install
    18. Set up the dynamic linker for CUDA. Notice that this is slightly different than the path added for .bashrc
    Code:
    nano /etc/ld.so.conf
    
    Match the contents below
    
    include /etc/ld.so.conf.d/*.conf
    /usr/local/cuda-7.5/lib64
    19. Excute the following to load our changes
    Code:
    ldconfig
    20. Install libcuda1. You will get an incorrect driver version error if you don't.
    Code:
    apt-get install libcuda1
    21. Build the NVIDIA samples so we can confirm CUDA is working with optirun
    Code:
    cd /root/NVIDIA_CUDA-7.5_Samples/1_Utilities/deviceQuery/
    make
    22. Run deviceQuery and then post your pass! If you see a pass, it all worked out! If not, follow the link at the start of the guide and post everything asked.
    Code:
    optirun ./deviceQuery
    Last edited by staticn0de; 2015-12-13 at 20:19.

  2. #2
    Join Date
    2014-Apr
    Location
    Down Under
    Posts
    315
    Optional Installs - cudaHashcat and Pyrit

    This section is for optional installs. If you installed CUDA on Kali, Im tipping these are both applications you are interested in.

    Points

    1. If you have any issues installing any of this, post the complete output of any commands entered.

    cudaHashcat

    You have two options, download the archive from the hashcat website and install it manually (sorry, I'm not going into that. If you need instructions, check their wiki)

    The second option is download my deb file. You can install it with a single command and then call cuda hashcat with either 'cudahashcat64' (for 64bit) or 'cudahashcat32' (for 32bit). Grab and install it from the link below.

    Disclaimer
    While some forum members make use of my deb, I am not a member of either the hashcat team or the Kali dev team. I could have edited the contents of the deb in any way (including maliciously). Take care when downloading from unknown sources. I provide no warranty and do not claim that it is fit for any purpose, including that which it is intended.

    I repackaged the hashcat binary in accordance with their EULA so it would install easily on Kali. I also removed non-linux binaries.

    1. cudahashcat 2.01
    Code:
    https://mega.nz/#!sZFngKJR!njrug2Y4nxs0aHemQg-SKKGAmXiK1XeALTtnP8IGYNU
    
    dpkg -i cudahashcat-2.01.deb
    2. cudahashcat 1.36
    Code:
    https://mega.co.nz/#!gAtAQDJY!x9FIs2ssQ66HmlXMdGDUiPI-l45el0dAFUpaGTm_P-0
    
    dpkg -i cudahashcat-1.36.deb
    3. cudahashcat 1.35
    Code:
    https://mega.co.nz/#!dN8ESI7D!-jxoTZBwVddzKZ2r0MuQ5T4sDJZ5NSOnkrNvxpDuNNg
    
    dpkg -i cudahashcat-1.35.deb
    4. cudahashcat 1.34
    Code:
    https://mega.co.nz/#!0Z9DHBob!0QA3clJqszGEExTKlKTBPLJEoDvXIiBwBepiYgWZbew
    
    dpkg -i cudahashcat-1.34.deb
    5. cudahashcat 1.33
    Code:
    https://mega.co.nz/#!oQNQhRyT!gTSxCEB5APkMgdaJl_k91h_9lgwK4LWUfwfTdGHAbEU
    
    dpkg -i cudahashcat-1.33.deb
    6. cudahashcat 1.31 (seems to be faster than 1.33)
    Code:
    https://mega.co.nz/#!kFMC2RQC!D1ccQYAwsWyGKD0CaV4W7n5Ghtc-YKFFxs7Qj1pgcw0
    
    dpkg -i cudahashcat-1.31.deb
    The deb sums are
    Code:
    cudahashcat 2.01
    md5sum = 69a9289e05a6e4b25728d5738a48f76c
    
    cudahashcat 1.36
    md5sum = f4ea04116a8495ea3e850fc993220554
    
    cudahashcat 1.35
    md5sum = ccdc7ebf4c4a947d14fa663a982e3c10
    
    cudahashcat 1.34
    md5sum = e611e16ab1f3c42c5e98d3ef615a0cd4
    
    cudahashcat 1.33
    md5sum = 82f4975f02af1288de058c93552b981d
    
    cudahashcat 1.31
    md5sum = b753c393264b3c40e51f057a96f3f6e9
    Test it with
    Code:
    optirun cudahashcat64 -t 32 -a 7 example0.hash ?a?a?a?a example.dict
    To remove it
    Code:
    dpkg -r cudahashcat-2.01
    
    and check the following directories and files are removed
    
    /usr/bin/cudahashcat32 (file)
    /usr/bin/cudahashcat64 (file)
    /usr/share/cudahashcat (directory)
    Pyrit

    The following instructions are slightly modified from the pyrit google code page here
    Code:
    https://code.google.com/p/pyrit/wiki/Installation
    1. Move to your home directory (I'm installing it there) and then check out the pyrit trunk
    Code:
    cd ~
    
    svn checkout http://pyrit.googlecode.com/svn/trunk/ pyrit_svn
    2. Build and install pyrit
    Code:
    cd pyrit_svn/pyrit/
    python setup.py build
    python setup.py install
    3. Add CUDA support
    Code:
    cd ../cpyrit_cuda/
    python setup.py build
    python setup.py install
    4. Test pyrit
    Code:
    optirun pyrit benchmark
    Last edited by staticn0de; 2015-12-13 at 22:03.

  3. #3
    Join Date
    2014-Apr
    Location
    Down Under
    Posts
    315
    Reporting your issues

    Most issues people have are a simple typo in their config files. Double check them before posting. I know this is a lot of commands to go through, but many users are new and experience delays in posting. Not giving enough information can result in multiple day turn arounds.

    1. Use the [*CODE] brackets to paste the output of commands (the open and close code brackets are [*CODE] and [*/CODE] without the *. Put all the text between them.

    Commands to execute

    1.
    Code:
    lspci | egrep 'VGA|3D'
    2.
    Code:
    modprobe nvidia
    3.
    Code:
    modprobe nvidia-uvm
    4.
    Code:
    optirun glxspheres64
    5.
    Code:
    dmesg | tail -n 100
    6.
    Code:
    echo $PATH
    7.
    Code:
    cat /etc/bumblebee/bumblebee.conf
    8.
    Code:
    cat /etc/bumblebee/xorg.conf.nvidia
    9.
    Code:
    service bumblebeed restart
    10.
    Code:
    modinfo nvidia
    11.
    Code:
    find 2> /dev/null / -name nvidia*.ko
    Last edited by staticn0de; 2015-02-17 at 08:38.

  4. #4
    Join Date
    2014-Sep
    Posts
    4
    Quote Originally Posted by staticn0de View Post
    Now, I know you want to see it in action so the next part will install pryit.

    First, remove the wheezy repo. You may either comment out the line we added or delete it.
    nano /etc/apt/sources.list
    Save the file
    apt-get update

    The following instructions are slightly modified from the pyrit google code page here. Give them all your love.
    https://code.google.com/p/pyrit/wiki/Installation

    Moving to home directory as I'm installing there
    cd ~

    Checkout pyrit
    svn checkout http://pyrit.googlecode.com/svn/trunk/ pyrit_svn


    Install required libraries
    apt-get install libpcap-dev

    cd pyrit_svn/pyrit/
    python setup.py build
    python setup.py install


    Now to add CUDA support
    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

    And we are done.
    Who had problem when issued command #python setup.py build and screen give output like this
    root@kali:~/pyrit-0.4.0# python setup.py build
    svn: '.' is not a working copy
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-2.7
    copying pyrit_cli.py -> build/lib.linux-x86_64-2.7
    creating build/lib.linux-x86_64-2.7/cpyrit
    copying cpyrit/__init__.py -> build/lib.linux-x86_64-2.7/cpyrit
    copying cpyrit/cpyrit.py -> build/lib.linux-x86_64-2.7/cpyrit
    copying cpyrit/util.py -> build/lib.linux-x86_64-2.7/cpyrit
    copying cpyrit/pckttools.py -> build/lib.linux-x86_64-2.7/cpyrit
    copying cpyrit/config.py -> build/lib.linux-x86_64-2.7/cpyrit
    copying cpyrit/network.py -> build/lib.linux-x86_64-2.7/cpyrit
    copying cpyrit/storage.py -> build/lib.linux-x86_64-2.7/cpyrit
    running build_ext
    building 'cpyrit._cpyrit_cpu' extension
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/cpyrit
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c cpyrit/_cpyrit_cpu.c -o build/temp.linux-x86_64-2.7/cpyrit/_cpyrit_cpu.o -Wall -fno-strict-aliasing -DVERSION="0.4.0"
    cpyrit/_cpyrit_cpu.c:32:20: fatal error: Python.h: No such file or directory
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    Solution :

    #apt-get install build-essential python-dev libssl-dev

    and it should be works now

  5. #5
    Join Date
    2014-Sep
    Posts
    4
    Quote Originally Posted by staticn0de View Post
    Now, I know you want to see it in action so the next part will install pryit.

    First, remove the wheezy repo. You may either comment out the line we added or delete it.
    nano /etc/apt/sources.list
    Save the file
    apt-get update

    The following instructions are slightly modified from the pyrit google code page here. Give them all your love.
    https://code.google.com/p/pyrit/wiki/Installation

    Moving to home directory as I'm installing there
    cd ~

    Checkout pyrit
    svn checkout http://pyrit.googlecode.com/svn/trunk/ pyrit_svn


    Install required libraries
    apt-get install libpcap-dev

    cd pyrit_svn/pyrit/
    python setup.py build
    python setup.py install


    Now to add CUDA support
    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

    And we are done.
    Who had problem like me when issued command #phyton setup.py build , and your screen give output like this

    root@kali:~/pyrit-0.4.0# python setup.py build
    svn: '.' is not a working copy
    running build
    running build_py
    creating build
    creating build/lib.linux-x86_64-2.7
    copying pyrit_cli.py -> build/lib.linux-x86_64-2.7
    creating build/lib.linux-x86_64-2.7/cpyrit
    copying cpyrit/__init__.py -> build/lib.linux-x86_64-2.7/cpyrit
    copying cpyrit/cpyrit.py -> build/lib.linux-x86_64-2.7/cpyrit
    copying cpyrit/util.py -> build/lib.linux-x86_64-2.7/cpyrit
    copying cpyrit/pckttools.py -> build/lib.linux-x86_64-2.7/cpyrit
    copying cpyrit/config.py -> build/lib.linux-x86_64-2.7/cpyrit
    copying cpyrit/network.py -> build/lib.linux-x86_64-2.7/cpyrit
    copying cpyrit/storage.py -> build/lib.linux-x86_64-2.7/cpyrit
    running build_ext
    building 'cpyrit._cpyrit_cpu' extension
    creating build/temp.linux-x86_64-2.7
    creating build/temp.linux-x86_64-2.7/cpyrit
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -I/usr/include/python2.7 -c cpyrit/_cpyrit_cpu.c -o build/temp.linux-x86_64-2.7/cpyrit/_cpyrit_cpu.o -Wall -fno-strict-aliasing -DVERSION="0.4.0"
    cpyrit/_cpyrit_cpu.c:32:20: fatal error: Python.h: No such file or directory
    compilation terminated.
    error: command 'gcc' failed with exit status 1
    this command should fix it

    #apt-get install build-essential python-dev libssl-dev

  6. #6
    Join Date
    2015-Dec
    Posts
    1

    Exclamation something weired please look for this... I hav nvidia GT 720M

    1.
    Code:
     lspci | egrep 'VGA|3D'
    00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 09)
    04:00.0 3D controller: NVIDIA Corporation GF117M [GeForce 610M/710M/820M / GT 620M/625M/630M/720M] (rev ff)
    2.
    Code:
     modprobe nvidia  --> NO ouput in terminal
    3.
    Code:
     modprobe nvidia-uvm  --> NO ouput in terminal
    4.
    Code:
     modinfo nvidia
    modinfo: ERROR: Module nvidia not found 
    $ modinfo nvidia-uvm
      filename:       /lib/modules/4.0.0-kali1-amd64/updates/dkms/nvidia-uvm.ko
    supported:      external
    license:        MIT
    depends:        nvidia
    vermagic:       4.0.0-kali1-amd64 SMP mod_unload modversions 
    parm:           NVuvm_prefetch_stats:int
    parm:           NVuvm_prefetch_threshold:int
    parm:           NVuvm_prefetch_adaptive:int
    parm:           NVuvm_prefetch_epoch:int
    parm:           NVuvm_prefetch_sparsity_inc:int
    parm:           NVuvm_prefetch_sparsity_dec:int
    parm:           NVuvm_prefetch:int
    5.
    Code:
    echo $PATH
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/VirtualGL/bin:/usr/local/cuda-7.5/bin
    6.
    Code:
    dmesg | tail -n 100
    [   27.169640] systemd-journald[271]: Received request to flush runtime journal from PID 1
    [   33.199522] bbswitch: version 0.8
    [   33.199530] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
    [   33.199539] bbswitch: Found discrete VGA device 0000:04:00.0: \_SB_.PCI0.RP05.PEGP
    [  501.380850] nvidia: module license 'NVIDIA' taints kernel.
    [  501.380856] Disabling lock debugging due to kernel taint
    [  501.839747] nvidia 0000:04:00.0: enabling device (0000 -> 0003)
    [  501.840241] [drm] Initialized nvidia-drm 0.0.0 20150116 for 0000:04:00.0 on minor 1
    [  501.840246] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  352.21  Tue Jun  9 21:53:31 PDT 2015
    [  501.869241] nvidia_uvm: Loaded the UVM driver, major device number 248
    [  519.056665] vgaarb: this pci device is not a vga device
    [  519.074805] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150204/nsarguments-95)
    [  519.074864] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150204/nsarguments-95)
    [  519.074896] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150204/nsarguments-95)
    [  519.074925] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150204/nsarguments-95)
    [  519.074953] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150204/nsarguments-95)
    [  519.074981] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150204/nsarguments-95)
    [  519.075026] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150204/nsarguments-95)
    [  519.075055] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150204/nsarguments-95)
    [  519.092205] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150204/nsarguments-95)
    [  519.296065] vgaarb: this pci device is not a vga device
    [  526.205863] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150204/nsarguments-95)
    7.
    Code:
    cat /etc/bumblebee/bumblebee.conf
    [bumblebeed]
    # The secondary Xorg server DISPLAY number
    VirtualDisplay=:8
    # Should the unused Xorg server be kept running? Set this to true if waiting
    # for X to be ready is too long and don't need power management at all.
    KeepUnusedXServer=false
    # The name of the Bumbleblee server group name (GID name)
    ServerGroup=bumblebee
    # Card power state at exit. Set to false if the card shoud be ON when Bumblebee
    # server exits.
    TurnCardOffAtExit=false
    # The default behavior of '-f' option on optirun. If set to "true", '-f' will
    # be ignored.
    NoEcoModeOverride=false
    # The Driver used by Bumblebee server. If this value is not set (or empty),
    # auto-detection is performed. The available drivers are nvidia and nouveau
    # (See also the driver-specific sections below)
    Driver=nvidia
    # Directory with a dummy config file to pass as a -configdir to secondary X
    XorgConfDir=/etc/bumblebee/xorg.conf.d
    ## Client options. Will take effect on the next optirun executed.
    [optirun]
    # Acceleration/ rendering bridge, possible values are auto, virtualgl and
    # primus.
    Bridge=auto
    # The method used for VirtualGL to transport frames between X servers.
    # Possible values are proxy, jpeg, rgb, xv and yuv.
    VGLTransport=proxy
    # List of paths which are searched for the primus libGL.so.1 when using
    # the primus bridge
    PrimusLibraryPath=/usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus:/usr/lib/primus:/usr/lib32/primus
    # Should the program run under optirun even if Bumblebee server or nvidia card
    # is not available?
    AllowFallbackToIGC=false
    # Driver-specific settings are grouped under [driver-NAME]. The sections are
    # parsed if the Driver setting in [bumblebeed] is set to NAME (or if auto-
    # detection resolves to NAME).
    # PMMethod: method to use for saving power by disabling the nvidia card, valid
    # values are: auto - automatically detect which PM method to use
    #         bbswitch - new in BB 3, recommended if available
    #       switcheroo - vga_switcheroo method, use at your own risk
    #             none - disable PM completely
    # https://github.com/Bumblebee-Project/Bumblebee/wiki/Comparison-of-PM-methods
    
    ## Section with nvidia driver specific options, only parsed if Driver=nvidia
    [driver-nvidia]
    # Module name to load, defaults to Driver if empty or unset
    KernelDriver=nvidia-current
    PMMethod=auto
    # colon-separated path to the nvidia libraries
    LibraryPath=/usr/lib/x86_64-linux-gnu/nvidia:/usr/lib/i386-linux-gnu/nvidia:/usr/lib/nvidia
    # comma-separated path of the directory containing nvidia_drv.so and the
    # default Xorg modules path
    XorgModulePath=/usr/lib/nvidia,/usr/lib/xorg/modules
    XorgConfFile=/etc/bumblebee/xorg.conf.nvidia
    
    ## Section with nouveau driver specific options, only parsed if Driver=nouveau
    [driver-nouveau]
    KernelDriver=nouveau
    PMMethod=auto
    XorgConfFile=/etc/bumblebee/xorg.conf.nouveau
    8.
    
    Code:
    cat /etc/bumblebee/xorg.conf.nvidia
    Section "ServerLayout"
        Identifier  "Layout0"
        Option      "AutoAddDevices" "false"
        Option      "AutoAddGPU" "false"
    EndSection
    
    Section "Device"
        Identifier  "DiscreteNvidia"
        Driver      "nvidia"
        VendorName  "NVIDIA Corporation"
        BusID "PCI:04:00:0"
    
    #   If the X server does not automatically detect your VGA device,
    #   you can manually set it here.
    #   To get the BusID prop, run `lspci | egrep 'VGA|3D'` and input the data
    #   as you see in the commented example.
    #   This Setting may be needed in some platforms with more than one
    #   nvidia card, which may confuse the proprietary driver (e.g.,
    #   trying to take ownership of the wrong device). Also needed on Ubuntu 13.04.
    #   BusID "PCI:01:00:0"
    
    #   Setting ProbeAllGpus to false prevents the new proprietary driver
    #   instance spawned to try to control the integrated graphics card,
    #   which is already being managed outside bumblebee.
    #   This option doesn't hurt and it is required on platforms running
    #   more than one nvidia graphics card with the proprietary driver.
    #   (E.g. Macbook Pro pre-2010 with nVidia 9400M + 9600M GT).
    #   If this option is not set, the new Xorg may blacken the screen and
    #   render it unusable (unless you have some way to run killall Xorg).
        Option "ProbeAllGpus" "false"
    
        Option "NoLogo" "true"
        Option "UseEDID" "false"
        Option "UseDisplayDevice" "none"
    EndSection
    9.
    Code:
    find 2> /dev/null / -name nvidia*.ko
    /var/lib/dkms/nvidia-current/352.21/4.0.0-kali1-amd64/x86_64/module/nvidia-current.ko
    /var/lib/dkms/nvidia-current/352.21/4.0.0-kali1-amd64/x86_64/module/nvidia-uvm.ko
    /lib/modules/4.0.0-kali1-amd64/updates/dkms/nvidia-current.ko
    /lib/modules/4.0.0-kali1-amd64/updates/dkms/nvidia-uvm.ko
    10. cat /etc/modprobe.d/nvidia.conf alias nvidia nvidia-current remove nvidia-current rmmod nvidia nvidia-uvm
    11.
    Code:
    ls /lib/modules/3.14-kali1-amd64/updates/dkms
    ls: cannot access /lib/modules/3.14-kali1-amd64/updates/dkms: No such file or directory
    12.
    Code:
    cat /lib/modules/3.14-kali1-amd64/modules.dep | grep -i nvidia
    cat: /lib/modules/3.14-kali1-amd64/modules.dep: No such file or directory
    13.
    Code:
     dmesg
    [  501.380850] nvidia: module license 'NVIDIA' taints kernel.
    [  501.380856] Disabling lock debugging due to kernel taint
    [  501.839747] nvidia 0000:04:00.0: enabling device (0000 -> 0003)
    [  501.840241] [drm] Initialized nvidia-drm 0.0.0 20150116 for 0000:04:00.0 on minor 1
    [  501.840246] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  352.21  Tue Jun  9 21:53:31 PDT 2015
    [  501.869241] nvidia_uvm: Loaded the UVM driver, major device number 248
    [  519.056665] vgaarb: this pci device is not a vga device
    14.
    Code:
    lsmod
    Module                  Size  Used by
    nvidia_uvm             73728  0 
    nvidia               8519680  1 nvidia_uvm
    nfnetlink_queue        24576  0 
    nfnetlink_log          20480  0 
    nfnetlink              16384  2 nfnetlink_log,nfnetlink_queue
    bluetooth             425984  0 
    bbswitch               16384  0 
    binfmt_misc            20480  1

  7. #7
    Join Date
    2013-Aug
    Location
    lost in space
    Posts
    580

    Links for OFF-Line installation

    Great guide staticn0de!



    - This post edited with download links for an OFF-Line installation on Kali 1.1.0 -


    Download CUDA, VirtualGL, Nvidia, CudaHashcat, from previous posts above.
    This does not include Kali Linux updates or Headers. Just the extra packs required for this guide.
    All links point to Debian wheezy(stable) packages whenever possible or equivalent/default.
    • Scroll down the page at Debian and choose your architecture under "Download".
    • Choose a server to download from.

    All packs go in Home, the /root directory. Remove them when installation is done.
    Install from root with
    Code:
    dpkg -i name.deb


    (6.) Download and Install dependencies for CUDA and Pyrit.

    freeglut3-dev
    https://packages.debian.org/wheezy/freeglut3-dev

    libxmu-headers
    https://packages.debian.org/wheezy/libxmu-headers

    libxmu-dev
    https://packages.debian.org/wheezy/libxmu-dev

    libpcap-dev
    https://packages.debian.org/wheezy/libpcap-dev



    (9.) Download and Install bumblebee and primus.

    linux-headers (another "linux headers")(mine was linux-headers-amd64_3.18+63+kali2.1_amd64.deb)
    http://ftp.tku.edu.tw/kali/pool/main/l/linux-latest/

    dkms
    https://packages.debian.org/wheezy/dkms

    bbswitch-dkms
    https://packages.debian.org/wheezy-b.../bbswitch-dkms

    bumblebee
    https://packages.debian.org/wheezy-backports/bumblebee

    primus-libs
    https://packages.debian.org/wheezy-b...ts/primus-libs

    primus
    https://packages.debian.org/wheezy-backports/primus



    Optional. Download and Install Pyrit and add-on for Nvidia CUDA.

    pyrit_svn 0.4.1-dev svn r308

    From Linux, enter in a console;
    Code:
    svn checkout http://pyrit.googlecode.com/svn/trunk/ pyrit_svn
    That will download a folder in /root (Home) named, pyrit_svn
    That folder is pyrit 0.4.1 svn r308. You can then save that folder for later off-line installations.

    Built and install Pyrit and add CUDA support.

    Code:
    cd pyrit_svn/pyrit/
    Code:
    python setup.py build
    Code:
    python setup.py install
    Code:
    cd ../cpyrit_cuda/
    Code:
    python setup.py build
    Code:
    python setup.py install


    Total: 11 packs. 2,05 Mb
    Last edited by Quest; 2015-03-13 at 03:57.
    Kali Linux USB Installation using LinuxLive USB Creator
    Howto Install HDD Kali on a USB Key
    Clean your laptop fan | basic knowledge

  8. #8
    Join Date
    2014-Apr
    Location
    Down Under
    Posts
    315
    Quote Originally Posted by Quest View Post
    Great guide staticn0de!

    Everyting worked well, until...




    my output was


    Any advice?

    Many thanks staticn0de I'm getting closer!
    I'm not sure what's causing that, but let's see if we can get you sorted out.

    To start, run:
    diff /usr/src/nvidia-current-331.67/Module.symvers /usr/src/nvidia-current-331.67/uvm/Module.symvers

    Any feedback from the above command means you need to delete the Module.symvers from the folder on the right and copy from the directory on the left into the directory on the right again. Once copied, run make in the uvm/ folder and copy it to /lib/modules/3.14-kali1-amd64/updates/dkms/

    Post the feedback from below:
    echo $PATH

    Post the feedback from:
    cat /etc/modprobe.d/nvidia.conf

    Post the feedback from:
    ls /lib/modules/3.14-kali1-amd64/updates/dkms

    Run modprobe nvidia-uvm and then run dmesg right after. Post the output in code brackets.

    Run lsmod and post output in code brackets

    You could also try modprobe nvidia and then modprobe nvidia-current and then modprobe nvidia-uvm

    Edit: Some other cool stuff you could try is a:
    depmod -a
    modprobe nvidia-uvm

    and then post the output of:
    cat /lib/modules/3.14-kali1-amd64/modules.dep | grep -i nvidia
    Last edited by staticn0de; 2014-07-08 at 07:09.

  9. #9
    Join Date
    2013-Aug
    Location
    lost in space
    Posts
    580
    the odds are that it was the operator(me), though I would like to reassure you that I fallowed your guide precisely, on a fresh installation of Kali 1.0.7 x64. I can even point out a small mistake in a syntax(induced by LibreOffice auto correction)
    First, install the linux headers. We need this so we can compile bbswitch later
    apt-get install linux-headers-$(uname –r)
    I did however strugeled alot with the nano console, as I did not know how to save changes. Save with F2, then Y, then "File Name to Write: xxxxxx, Enter

    Last night I decided to re-install, so I will do it again, then if I still encounter the same problem, I will proceed with post#5 and report back.

    Thank you my friend
    Last edited by Quest; 2014-07-08 at 14:29.
    Kali Linux USB Installation using LinuxLive USB Creator
    Howto Install HDD Kali on a USB Key
    Clean your laptop fan | basic knowledge

  10. #10
    Join Date
    2014-Apr
    Location
    Down Under
    Posts
    315
    Good pickup! I've fixed it now.

    As for nano, control + x, then y and then enter will save your changes and then close the file.

  11. #11
    Join Date
    2013-Aug
    Location
    lost in space
    Posts
    580
    Exact ame results as yesterday.

    root@kali:~# rm /lib/modules/3.14-kali1-amd64/updates/dkms/nvidia-uvm.ko
    root@kali:~# cp /usr/src/nvidia-current-331.67/uvm/nvidia-uvm.ko /lib/modules/3.14-kali1-amd64/updates/dkms/
    root@kali:~# modprobe nvidia-uvm
    ERROR: could not insert 'nvidia_uvm': No such device
    i ran into this last night when search for a possible solution. This is recent 2 May 2014. Could there be a bug with versions nvidia-graphics-drivers/331.67-1, nvidia-graphics-drivers/331.67-2, nvidia-graphics-drivers/331.79-1 ?

    https://bugs.debian.org/cgi-bin/bugr...cgi?bug=746643 OpenCL not supported by lastest NVIDIA driver



    These are the my outputs:


    Code:
    00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
    01:00.0 VGA compatible controller: NVIDIA Corporation GF108 [GeForce GT 630M] (rev ff)
    
    
    
    
    root@kali:~# optirun glxspheres64 
    Polygons in scene: 62464
    Visual ID of window: 0x21
    Context is Direct
    OpenGL Renderer: GeForce GT 630M/PCIe/SSE2
    243.416053 frames/sec - 204.644744 Mpixels/sec
    246.672039 frames/sec - 207.382117 Mpixels/sec
    195.415671 frames/sec - 164.289863 Mpixels/sec
    170.460050 frames/sec - 143.309173 Mpixels/sec
    171.786163 frames/sec - 144.424063 Mpixels/sec
    167.925432 frames/sec - 141.178269 Mpixels/sec
    166.438969 frames/sec - 139.928570 Mpixels/sec
    168.091304 frames/sec - 141.317721 Mpixels/sec
    171.926627 frames/sec - 144.542154 Mpixels/sec
    170.618800 frames/sec - 143.442638 Mpixels/sec
    168.957864 frames/sec - 142.046256 Mpixels/sec
    174.145734 frames/sec - 146.407802 Mpixels/sec
    172.519375 frames/sec - 145.040489 Mpixels/sec
    169.868780 frames/sec - 142.812081 Mpixels/sec
    
     
    
    
    ===========
    = Summary =
    ===========
    
    Driver:   Not Selected
    Toolkit:  Installed in /usr/local/cuda-5.5
    Samples:  Installed in /root/NVIDIA_CUDA-5.5_Samples
    
    * Please make sure your PATH includes /usr/local/cuda-5.5/bin
    
    * Please make sure your LD_LIBRARY_PATH
    *   for 32-bit Linux distributions includes /usr/local/cuda-5.5/lib
    *   for 64-bit Linux distributions includes /usr/local/cuda-5.5/lib64:/lib
    * OR
    *   for 32-bit Linux distributions add /usr/local/cuda-5.5/lib
    *   for 64-bit Linux distributions add /usr/local/cuda-5.5/lib64 and /lib
    * to /etc/ld.so.conf and run ldconfig as root
    
    * To uninstall CUDA, remove the CUDA files in /usr/local/cuda-5.5
    * Installation Complete
    
    Please see CUDA_Getting_Started_Linux.pdf in /usr/local/cuda-5.5/doc/pdf for detailed information on setting up CUDA.
    
    
    
    
    root@kali:~# rm /lib/modules/3.14-kali1-amd64/updates/dkms/nvidia-uvm.ko
    root@kali:~# cp /usr/src/nvidia-current-331.67/uvm/nvidia-uvm.ko /lib/modules/3.14-kali1-amd64/updates/dkms/
    root@kali:~# modprobe nvidia-uvm
    ERROR: could not insert 'nvidia_uvm': No such device
    
    
    
    - CONTENT OF dkms.conf -
    
    # DKMS configuration for the NVIDIA kernel module.  -*- sh -*-
    
    # The version is replaced at build time by dh_dkms invoked in debian/rules.
    PACKAGE_NAME="nvidia-current"
    PACKAGE_VERSION="331.67"
    
    BUILT_MODULE_NAME[0]="nvidia"
    DEST_MODULE_NAME[0]="$PACKAGE_NAME"
    DEST_MODULE_LOCATION[0]="/updates/dkms"
    AUTOINSTALL=yes
    
    MAKE[0]="env CCACHE_DISABLE=1 \
        make -C . SYSSRC=${kernel_source_dir}"
    CLEAN="make -C . SYSSRC=${kernel_source_dir} clean"
    
    BUILT_MODULE_NAME[1]="nvidia-uvm"
    BUILT_MODULE_LOCATION[1]="uvm/"
    DEST_MODULE_LOCATION[1]="/updates/dkms"
    MAKE[0]+="; env CCACHE_DISABLE=1 \
        make -C uvm SYSSRC=${kernel_source_dir}"
    CLEAN+="; make -C uvm SYSSRC=${kernel_source_dir} clean"
    
    - END OF CONTENT -
    
    
    
    
    
    root@kali:~# diff /usr/src/nvidia-current-331.67/Module.symvers /usr/src/nvidia-current-331.67/uvm/Module.symvers
    root@kali:~# 
    NO FEEDBACK
    
    
    root@kali:~# echo $PATH
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/VirtualGL/bin
    
    
    root@kali:~# cat /etc/modprobe.d/nvidia.conf
    alias nvidia nvidia-current
    remove nvidia-current rmmod nvidia
    
    
    root@kali:~# modprobe nvidia-uvm
    ERROR: could not insert 'nvidia_uvm': No such device
    
    root@kali:~#  lsmod 
    Module                  Size  Used by
    nls_utf8               12456  1 
    nls_cp437              16553  1 
    vfat                   17185  1 
    fat                    57965  1 vfat
    nfnetlink_log          17241  0 
    nfnetlink              12989  1 nfnetlink_log
    bbswitch               12866  0 
    binfmt_misc            16949  1 
    loop                   26605  0 
    dm_crypt               22731  0 
    joydev                 17108  0 
    snd_hda_codec_hdmi     45004  1 
    snd_hda_codec_realtek    54360  1 
    snd_hda_codec_generic    59079  1 snd_hda_codec_realtek
    btusb                  25619  0 
    bluetooth             243618  2 btusb
    6lowpan_iphc           16588  1 bluetooth
    x86_pkg_temp_thermal    12965  0 
    intel_powerclamp       17159  0 
    arc4                   12543  2 
    snd_hda_intel          39656  3 
    i915                  743012  2 
    snd_hda_codec          99921  4 snd_hda_codec_realtek,snd_hda_codec_hdmi,snd_hda_codec_generic,snd_hda_intel
    iTCO_wdt               12831  0 
    iTCO_vendor_support    12649  1 iTCO_wdt
    snd_hwdep              13148  1 snd_hda_codec
    lpc_ich                20768  0 
    ir_rc6_decoder         12433  0 
    ir_jvc_decoder         12433  0 
    iwldvm                130998  0 
    mac80211              488308  1 iwldvm
    iwlwifi                87784  1 iwldvm
    drm_kms_helper         39998  1 i915
    drm                   240557  3 i915,drm_kms_helper
    i2c_algo_bit           12751  1 i915
    intel_rapl             17344  0 
    snd_pcm                88538  3 snd_hda_codec_hdmi,snd_hda_codec,snd_hda_intel
    snd_timer              26606  1 snd_pcm
    snd                    61039  14 snd_hda_codec_realtek,snd_hwdep,snd_timer,snd_hda_codec_hdmi,snd_pcm,snd_hda_codec_generic,snd_hda_codec,snd_hda_intel
    soundcore              13026  1 snd
    mei_me                 13446  0 
    i2c_i801               16963  0 
    mei                    50039  1 mei_me
    i2c_core               24265  5 drm,i915,i2c_i801,drm_kms_helper,i2c_algo_bit
    cfg80211              436618  3 iwlwifi,mac80211,iwldvm
    ir_sony_decoder        12435  0 
    ir_sanyo_decoder       12437  0 
    ir_lirc_codec          12675  0 
    ir_mce_kbd_decoder     12574  0 
    ir_nec_decoder         12433  0 
    lirc_dev               16951  1 ir_lirc_codec
    ir_rc5_decoder         12433  0 
    coretemp               12854  0 
    kvm_intel             138949  0 
    kvm                   404503  1 kvm_intel
    rc_rc6_mce             12396  0 
    ene_ir                 21814  0 
    rc_core                18235  12 lirc_dev,ir_lirc_codec,ir_rc5_decoder,ir_nec_decoder,ir_sony_decoder,ene_ir,ir_mce_kbd_decoder,ir_jvc_decoder,ir_rc6_decoder,ir_sanyo_decoder,rc_rc6_mce
    psmouse                86464  0 
    serio_raw              12849  0 
    evdev                  17489  13 
    rtsx_pci_ms            12802  0 
    memstick               13696  1 rtsx_pci_ms
    mxm_wmi                12515  0 
    toshiba_acpi           18063  0 
    sparse_keymap          12760  1 toshiba_acpi
    rfkill                 18902  5 cfg80211,toshiba_acpi,bluetooth
    toshiba_bluetooth      12641  0 
    battery                13101  0 
    processor              28221  0 
    ac                     12678  0 
    video                  17804  1 i915
    thermal_sys            27685  4 video,intel_powerclamp,processor,x86_pkg_temp_thermal
    wmi                    17339  2 toshiba_acpi,mxm_wmi
    button                 12944  1 i915
    ext4                  489943  1 
    crc16                  12343  2 ext4,bluetooth
    mbcache                13082  1 ext4
    jbd2                   86788  1 ext4
    dm_mod                 89276  1 dm_crypt
    hid_generic            12393  0 
    usbhid                 44481  0 
    hid                    94062  2 hid_generic,usbhid
    sg                     30043  0 
    sr_mod                 21898  0 
    cdrom                  39232  1 sr_mod
    sd_mod                 44346  5 
    crc_t10dif             12431  1 sd_mod
    usb_storage            52037  4 
    rtsx_pci_sdmmc         17076  0 
    mmc_core               93950  1 rtsx_pci_sdmmc
    crct10dif_pclmul       13348  1 
    crct10dif_common       12356  2 crct10dif_pclmul,crc_t10dif
    crc32_pclmul           12915  0 
    crc32c_intel           21809  0 
    ghash_clmulni_intel    12978  0 
    ahci                   29195  0 
    aesni_intel           151423  0 
    libahci                27103  1 ahci
    aes_x86_64             16719  1 aesni_intel
    lrw                    12757  1 aesni_intel
    gf128mul               12970  1 lrw
    glue_helper            12690  1 aesni_intel
    ablk_helper            12572  1 aesni_intel
    cryptd                 14560  3 ghash_clmulni_intel,aesni_intel,ablk_helper
    libata                169163  2 ahci,libahci
    scsi_mod              186841  5 sg,usb_storage,libata,sd_mod,sr_mod
    rtsx_pci               33623  2 rtsx_pci_ms,rtsx_pci_sdmmc
    mfd_core               12601  2 lpc_ich,rtsx_pci
    r8169                  64490  0 
    mii                    12675  1 r8169
    ehci_pci               12472  0 
    xhci_hcd              111830  0 
    ehci_hcd               48517  1 ehci_pci
    usbcore               166472  6 btusb,usb_storage,ehci_hcd,ehci_pci,usbhid,xhci_hcd
    usb_common             12440  1 usbcore
    root@kali:~# 
    
    
    root@kali:~# modprobe nvidia
    root@kali:~# modprobe nvidia-current
    ERROR: could not insert 'nvidia_current': No such device
    root@kali:~# modprobe nvidia-uvm
    ERROR: could not insert 'nvidia_uvm': No such device
    
    
    root@kali:~# depmod -a
    root@kali:~# 
    
    root@kali:~# cat /lib/modules/3.14-kali1-amd64/modules.dep | grep -i nvidia
    kernel/drivers/net/ethernet/nvidia/forcedeth.ko:
    updates/dkms/nvidia-uvm.ko: updates/dkms/nvidia-current.ko kernel/drivers/i2c/i2c-core.ko
    updates/dkms/nvidia-current.ko: kernel/drivers/i2c/i2c-core.ko
    Kali Linux USB Installation using LinuxLive USB Creator
    Howto Install HDD Kali on a USB Key
    Clean your laptop fan | basic knowledge

  12. #12
    Join Date
    2014-Apr
    Location
    Down Under
    Posts
    315
    I don't believe a bug is causing this as It's working here. Like all things linux, it will be a one liner somewhere that will fix it.

    Would you please post your /etc/bumblebee/bumblebee.conf and xorg.nvidia.conf in the same directory.

    The way it works is that nvidia-uvm depends on the nvidia-current module. We know that works because you can use optirun glxspheres.

    Did you have any useful dmesg feedback from after the modprobe?

    Did you add the cuda libraries and then run ldconfig? I'm sure you did, but I was just going through the feedback you posted (I assume you omitted doing it because I didn't ask for it)

    Hopefully we can get this sorted out soon

  13. #13
    Join Date
    2013-Aug
    Location
    lost in space
    Posts
    580
    xD yes it definitely feels like the setup is missing a line somewhere.


    Here is the output of bumblebee.conf and xorg.conf.nvidia..

    bumblebee.conf
    Code:
    # Configuration file for Bumblebee. Values should **not** be put between quotes
    
    ## Server options. Any change made in this section will need a server restart
    # to take effect.
    [bumblebeed]
    # The secondary Xorg server DISPLAY number
    VirtualDisplay=:8
    # Should the unused Xorg server be kept running? Set this to true if waiting
    # for X to be ready is too long and don't need power management at all.
    KeepUnusedXServer=false
    # The name of the Bumbleblee server group name (GID name)
    ServerGroup=bumblebee
    # Card power state at exit. Set to false if the card shoud be ON when Bumblebee
    # server exits.
    TurnCardOffAtExit=false
    # The default behavior of '-f' option on optirun. If set to "true", '-f' will
    # be ignored.
    NoEcoModeOverride=false
    # The Driver used by Bumblebee server. If this value is not set (or empty),
    # auto-detection is performed. The available drivers are nvidia and nouveau
    # (See also the driver-specific sections below)
    Driver=nvidia
    # Directory with a dummy config file to pass as a -configdir to secondary X
    XorgConfDir=/etc/bumblebee/xorg.conf.d
    
    ## Client options. Will take effect on the next optirun executed.
    [optirun]
    # Acceleration/ rendering bridge, possible values are auto, virtualgl and
    # primus.
    Bridge=auto
    # The method used for VirtualGL to transport frames between X servers.
    # Possible values are proxy, jpeg, rgb, xv and yuv.
    VGLTransport=proxy
    # List of paths which are searched for the primus libGL.so.1 when using
    # the primus bridge
    PrimusLibraryPath=/usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus:/usr/lib/primus:/usr/lib32/primus
    # Should the program run under optirun even if Bumblebee server or nvidia card
    # is not available?
    AllowFallbackToIGC=false
    
    
    # Driver-specific settings are grouped under [driver-NAME]. The sections are
    # parsed if the Driver setting in [bumblebeed] is set to NAME (or if auto-
    # detection resolves to NAME).
    # PMMethod: method to use for saving power by disabling the nvidia card, valid
    # values are: auto - automatically detect which PM method to use
    #         bbswitch - new in BB 3, recommended if available
    #       switcheroo - vga_switcheroo method, use at your own risk
    #             none - disable PM completely
    # https://github.com/Bumblebee-Project/Bumblebee/wiki/Comparison-of-PM-methods
    
    ## Section with nvidia driver specific options, only parsed if Driver=nvidia
    [driver-nvidia]
    # Module name to load, defaults to Driver if empty or unset
    KernelDriver=nvidia-current
    PMMethod=auto
    # colon-separated path to the nvidia libraries
    LibraryPath=/usr/lib/x86_64-linux-gnu/nvidia:/usr/lib/i386-linux-gnu/nvidia:/usr/lib/nvidia
    # comma-separated path of the directory containing nvidia_drv.so and the
    # default Xorg modules path
    XorgModulePath=/usr/lib/nvidia,/usr/lib/xorg/modules
    XorgConfFile=/etc/bumblebee/xorg.conf.nvidia
    
    ## Section with nouveau driver specific options, only parsed if Driver=nouveau
    [driver-nouveau]
    KernelDriver=nouveau
    PMMethod=auto
    XorgConfFile=/etc/bumblebee/xorg.conf.nouveau
    xorg.conf.nvidia
    Code:
    Section "ServerLayout"
        Identifier  "Layout0"
        Option      "AutoAddDevices" "false"
        Option      "AutoAddGPU" "false"
    EndSection
    
    Section "Device"
        Identifier  "DiscreteNvidia"
        Driver      "nvidia"
        VendorName  "NVIDIA Corporation"
        BusID	 "PCI:01:00:0"
    
    #   If the X server does not automatically detect your VGA device,
    #   you can manually set it here.
    #   To get the BusID prop, run `lspci | egrep 'VGA|3D'` and input the data
    #   as you see in the commented example.
    #   This Setting may be needed in some platforms with more than one
    #   nvidia card, which may confuse the proprietary driver (e.g.,
    #   trying to take ownership of the wrong device). Also needed on Ubuntu 13.04.
    #   BusID "PCI:01:00:0"
    
    #   Setting ProbeAllGpus to false prevents the new proprietary driver
    #   instance spawned to try to control the integrated graphics card,
    #   which is already being managed outside bumblebee.
    #   This option doesn't hurt and it is required on platforms running
    #   more than one nvidia graphics card with the proprietary driver.
    #   (E.g. Macbook Pro pre-2010 with nVidia 9400M + 9600M GT).
    #   If this option is not set, the new Xorg may blacken the screen and
    #   render it unusable (unless you have some way to run killall Xorg).
        Option "ProbeAllGpus" "false"
    
        Option "NoLogo" "true"
        Option "UseEDID" "false"
        Option "UseDisplayDevice" "none"
    EndSection

    I can't remember if I had any useful dmesg feedback from after the modprobe.

    I did add the cuda libraries and then run ldconfig. Yes. I can reinstall again and copy the info from ldconfig and modprobe if need be.



    Let me know if I can provide anything else for the investigation
    Last edited by Quest; 2014-07-09 at 02:28.
    Kali Linux USB Installation using LinuxLive USB Creator
    Howto Install HDD Kali on a USB Key
    Clean your laptop fan | basic knowledge

  14. #14
    Join Date
    2014-Aug
    Location
    Paris
    Posts
    1

    Angry Can't make bumblebee working properly ! part 1

    Greetings,

    I'm fighting for a good 2 months trying to install bumblebee properly on my laptop, to enable my Nvidia 650m .

    I've been following this guide step by step, and i'm stuck at the 'optirun glxspheres64' part. My computer simply shutdown without any warnings, as soon as I hit 'Enter' in the prompt .

    I did install the 340 driver correctly, and i can tell it's loaded as it should, thanks to the "modinfo nvidia" command.

    Here is what 'uname -r' returns :

    Code:
     3.14-kali1-amd64
    Here is my xorg.conf.nvidia :

    Code:
     Section "ServerLayout"
        Identifier  "Layout0"
        Option      "AutoAddDevices" "false"
        Option      "AutoAddGPU" "false"
    EndSection
    
    Section "Device"
        Identifier  "DiscreteNvidia"
        Driver      "nvidia"
        VendorName  "NVIDIA Corporation"
        BusID "PCI:01:00:0"
    
    #   If the X server does not automatically detect your VGA device,
    #   you can manually set it here.
    #   To get the BusID prop, run `lspci | egrep 'VGA|3D'` and input the data
    #   as you see in the commented example.
    #   This Setting may be needed in some platforms with more than one
    #   nvidia card, which may confuse the proprietary driver (e.g.,
    #   trying to take ownership of the wrong device). Also needed on Ubuntu 13.04.
    #   BusID "PCI:01:00:0"
    
    #   Setting ProbeAllGpus to false prevents the new proprietary driver
    #   instance spawned to try to control the integrated graphics card,
    #   which is already being managed outside bumblebee.
    #   This option doesn't hurt and it is required on platforms running
    #   more than one nvidia graphics card with the proprietary driver.
    #   (E.g. Macbook Pro pre-2010 with nVidia 9400M + 9600M GT).
    #   If this option is not set, the new Xorg may blacken the screen and
    #   render it unusable (unless you have some way to run killall Xorg).
        Option "ProbeAllGpus" "false"
    
        Option "NoLogo" "true"
        Option "UseEDID" "false"
        Option "UseDisplayDevice" "none"
    EndSection
    Here is my bumblebee.conf :

    Code:
     # Configuration file for Bumblebee. Values should **not** be put between quotes
    
    ## Server options. Any change made in this section will need a server restart
    # to take effect.
    [bumblebeed]
    # The secondary Xorg server DISPLAY number
    VirtualDisplay=:8
    # Should the unused Xorg server be kept running? Set this to true if waiting
    # for X to be ready is too long and don't need power management at all.
    KeepUnusedXServer=false
    # The name of the Bumbleblee server group name (GID name)
    ServerGroup=bumblebee
    # Card power state at exit. Set to false if the card shoud be ON when Bumblebee
    # server exits.
    TurnCardOffAtExit=false
    # The default behavior of '-f' option on optirun. If set to "true", '-f' will
    # be ignored.
    NoEcoModeOverride=false
    # The Driver used by Bumblebee server. If this value is not set (or empty),
    # auto-detection is performed. The available drivers are nvidia and nouveau
    # (See also the driver-specific sections below)
    Driver=nvidia
    # Directory with a dummy config file to pass as a -configdir to secondary X
    XorgConfDir=/etc/bumblebee/xorg.conf.d
    
    ## Client options. Will take effect on the next optirun executed.
    [optirun]
    # Acceleration/ rendering bridge, possible values are auto, virtualgl and
    # primus.
    Bridge=auto
    # The method used for VirtualGL to transport frames between X servers.
    # Possible values are proxy, jpeg, rgb, xv and yuv.
    VGLTransport=proxy
    # List of paths which are searched for the primus libGL.so.1 when using
    # the primus bridge
    PrimusLibraryPath=/usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus:/usr/lib/$
    # Should the program run under optirun even if Bumblebee server or nvidia card
    # is not available?
    AllowFallbackToIGC=false
    
    
    # Driver-specific settings are grouped under [driver-NAME]. The sections are
    # parsed if the Driver setting in [bumblebeed] is set to NAME (or if auto-
    # detection resolves to NAME).
    # PMMethod: method to use for saving power by disabling the nvidia card, valid
    # values are: auto - automatically detect which PM method to use 
    #           bbswitch - new in BB 3, recommended if available
    #        switcheroo - vga_switcheroo method, use at your own risk
    #                none - disable PM completely
    # https://github.com/Bumblebee-Project/Bumblebee/wiki/Comparison-of-PM-methods
    
    ## Section with nvidia driver specific options, only parsed if Driver=nvidia
    [driver-nvidia]
    # Module name to load, defaults to Driver if empty or unset
    KernelDriver=nvidia
    PMMethod=auto
    # colon-separated path to the nvidia libraries
    LibraryPath=/usr/lib/x86_64-linux-gnu/nvidia:/usr/lib/i386-linux-gnu/nvidia:/usr/lib/nvidia
    # comma-separated path of the directory containing nvidia_drv.so and the
    # default Xorg modules path
    XorgModulePath=/usr/lib/nvidia,/usr/lib/xorg/modules
    XorgConfFile=/etc/bumblebee/xorg.conf.nvidia
    
    ## Section with nouveau driver specific options, only parsed if Driver=nouveau
    [driver-nouveau]
    KernelDriver=nouveau
    PMMethod=auto
    XorgConfFile=/etc/bumblebee/xorg.conf.nouveau
    Here is what 'modinfo nvidia' returns :

    Code:
     filename:       /lib/modules/3.14-kali1-amd64/updates/dkms/nvidia.ko
    alias:          char-major-195-*
    version:        340.24
    supported:      external
    license:        NVIDIA
    alias:          pci:v000010DEd00000E00sv*sd*bc04sc80i00*
    alias:          pci:v000010DEd00000AA3sv*sd*bc0Bsc40i00*
    alias:          pci:v000010DEd*sv*sd*bc03sc02i00*
    alias:          pci:v000010DEd*sv*sd*bc03sc00i00*
    depends:        drm,i2c-core
    vermagic:       3.14-kali1-amd64 SMP mod_unload modversions 
    parm:           NVreg_Mobile:int
    parm:           NVreg_ResmanDebugLevel:int
    parm:           NVreg_RmLogonRC:int
    parm:           NVreg_ModifyDeviceFiles:int
    parm:           NVreg_DeviceFileUID:int
    parm:           NVreg_DeviceFileGID:int
    parm:           NVreg_DeviceFileMode:int
    parm:           NVreg_RemapLimit:int
    parm:           NVreg_UpdateMemoryTypes:int
    parm:           NVreg_InitializeSystemMemoryAllocations:int
    parm:           NVreg_RMEdgeIntrCheck:int
    parm:           NVreg_UsePageAttributeTable:int
    parm:           NVreg_MapRegistersEarly:int
    parm:           NVreg_RegisterForACPIEvents:int
    parm:           NVreg_CheckPCIConfigSpace:int
    parm:           NVreg_EnablePCIeGen3:int
    parm:           NVreg_EnableMSI:int
    parm:           NVreg_MemoryPoolSize:int
    parm:           NVreg_RegistryDwords:charp
    parm:           NVreg_RmMsg:charp
    parm:           NVreg_AssignGpus:charp
    Here is what 'modinfo nvidia-uvm' returns :

    Code:
     filename:       /lib/modules/3.14-kali1-amd64/updates/dkms/nvidia-uvm.ko                                                                                                                      
    supported:      external                                                                                                                                                                      
    license:        MIT                                                                                                                                                                           
    depends:        nvidia                                                                                                                                                                        
    vermagic:       3.14-kali1-amd64 SMP mod_unload modversions
    Here is what 'echo $PATH' returns :

    Code:
     /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/VirtualGL/bin
    Here is what 'find 2> /dev/null / -name nvidia*.ko' returns :

    Code:
    /var/lib/dkms/nvidia/340.24/3.14-kali1-amd64/x86_64/module/nvidia.ko                                                                                                                          
    /var/lib/dkms/nvidia/340.24/3.14-kali1-amd64/x86_64/module/nvidia-uvm.ko                                                                                                                      
    /lib/modules/3.14-kali1-amd64/updates/dkms/nvidia.ko                                                                                                                                          
    /lib/modules/3.14-kali1-amd64/updates/dkms/nvidia-uvm.ko

  15. #15
    Join Date
    2015-Feb
    Location
    127.0.0.1
    Posts
    3

    Battery Consumption

    Hi,

    With your laptop on, and not plugged in, and not being used for 1 or 2 mins, can you perform the following?
    Code:
    upower -d
    Please post the results. I've been dealing with nvidia and optimus and cuda since 2011, and some of the steps you did seem a bit unnecessary.

    Thanks

  16. #16
    First of all, I would like to thank staticn0de for starting this thread. Optimus users should stick with this thread. Also thanks to Quest for his solutions that kept this thread up-to-date.

    Users, I see a lot of posts regarding failed installation and errors. Let me clarify few things
    1. Mix-matching NVIDIA repo driver and NVIDIA site driver will BREAK your GUI and in most cases you will end up reinstalling.
    2. I've added a new guide for Kali Linux 1.1.0 kernel 3.18. This guide also works fine on a new installation. Again do not mix match 2 sets of drivers.
    3. If GPU processing is what you're after, perhaps Debian/Kali is not the best distro (incoming flame! )
    4. Both guides will work flawlessly in new installation where users didn't muck around with Display drivers. Choose one and stick with it.


    Btw, staticn0de why VirtualGL?
    I thought it only helps to run OpenGL applications with full 3D hardware acceleration remotely! So if I am only after GPU processing, I don't need it. If I want to run an application with 3D acceleration movie at work (hmm, I shouldn't) over vnc from my home PC, then I go install it? Right?

  17. #17
    Join Date
    2014-Apr
    Location
    Down Under
    Posts
    315
    Quote Originally Posted by blackMORE View Post
    First of all, I would like to thank staticn0de for starting this thread. Optimus users should stick with this thread. Also thanks to Quest for his solutions that kept this thread up-to-date.

    Users, I see a lot of posts regarding failed installation and errors. Let me clarify few things
    1. Mix-matching NVIDIA repo driver and NVIDIA site driver will BREAK your GUI and in most cases you will end up reinstalling.
    2. I've added a new guide for Kali Linux 1.1.0 kernel 3.18. This guide also works fine on a new installation. Again do not mix match 2 sets of drivers.
    3. If GPU processing is what you're after, perhaps Debian/Kali is not the best distro (incoming flame! )
    4. Both guides will work flawlessly in new installation where users didn't muck around with Display drivers. Choose one and stick with it.


    Btw, staticn0de why VirtualGL?
    I thought it only helps to run OpenGL applications with full 3D hardware acceleration remotely! So if I am only after GPU processing, I don't need it. If I want to run an application with 3D acceleration movie at work (hmm, I shouldn't) over vnc from my home PC, then I go install it? Right?
    Hi blackmore,

    I wrote it a while ago, but if I remember right (without Kali in front of me) I included it as it installed glxspheres64 for testing the driver.
    chown -R us ./base

  18. #18
    Join Date
    2015-Mar
    Posts
    3

    Exclamation

    I'm a very new to linux and am trying to learn i have some of the basics down and an ready to go in to more "harder" territories. I have been trying to get this to work for about 4 days and have reinstalled kali about 7 times because i just couldn't get past it.
    I followed this guide and actually got GDM3 to work, (unkike other times i have tried), after installing i installed pyrit, and tried to use it, At first i used the pyrit benchmark but i saw my speeds were slower than my aircrack speeds, this puzzled me because i saw people getting hudge speeds with far less advanced GPU than mine. (I am using a GTX 860m, with 640 Cuda cores)
    http://pastebin.com/DScfwXAJ
    Any suggestions? I'm coming to my wits end.

  19. #19
    Join Date
    2014-Apr
    Location
    Down Under
    Posts
    315
    Quote Originally Posted by Ramrsoccer View Post
    I'm a very new to linux and am trying to learn i have some of the basics down and an ready to go in to more "harder" territories. I have been trying to get this to work for about 4 days and have reinstalled kali about 7 times because i just couldn't get past it.
    I followed this guide and actually got GDM3 to work, (unkike other times i have tried), after installing i installed pyrit, and tried to use it, At first i used the pyrit benchmark but i saw my speeds were slower than my aircrack speeds, this puzzled me because i saw people getting hudge speeds with far less advanced GPU than mine. (I am using a GTX 860m, with 640 Cuda cores)
    http://pastebin.com/DScfwXAJ
    Any suggestions? I'm coming to my wits end.
    Hi there,

    If the driver installed correctly and you don't get errors I would need to see your aircrack and pyrit speeds. Have you tried asking on the aircrack or pyrit forums?
    chown -R us ./base

  20. #20
    Join Date
    2016-Jan
    Posts
    1

    Red face

    Code:
    root@0b51d14n:~/NVIDIA_CUDA-7.5_Samples/1_Utilities/deviceQuery# optirun ./deviceQuery
    ./deviceQuery Starting...
    
     CUDA Device Query (Runtime API) version (CUDART static linking)
    
    Detected 1 CUDA Capable device(s)
    
    Device 0: "GeForce 920M"
      CUDA Driver Version / Runtime Version          7.5 / 7.5
      CUDA Capability Major/Minor version number:    3.5
      Total amount of global memory:                 1024 MBytes (1073610752 bytes)
      ( 2) Multiprocessors, (192) CUDA Cores/MP:     384 CUDA Cores
      GPU Max Clock rate:                            954 MHz (0.95 GHz)
      Memory Clock rate:                             900 Mhz
      Memory Bus Width:                              64-bit
      L2 Cache Size:                                 524288 bytes
      Maximum Texture Dimension Size (x,y,z)         1D=(65536), 2D=(65536, 65536), 3D=(4096, 4096, 4096)
      Maximum Layered 1D Texture Size, (num) layers  1D=(16384), 2048 layers
      Maximum Layered 2D Texture Size, (num) layers  2D=(16384, 16384), 2048 layers
      Total amount of constant memory:               65536 bytes
      Total amount of shared memory per block:       49152 bytes
      Total number of registers available per block: 65536
      Warp size:                                     32
      Maximum number of threads per multiprocessor:  2048
      Maximum number of threads per block:           1024
      Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
      Max dimension size of a grid size    (x,y,z): (2147483647, 65535, 65535)
      Maximum memory pitch:                          2147483647 bytes
      Texture alignment:                             512 bytes
      Concurrent copy and kernel execution:          Yes with 1 copy engine(s)
      Run time limit on kernels:                     Yes
      Integrated GPU sharing Host Memory:            No
      Support host page-locked memory mapping:       Yes
      Alignment requirement for Surfaces:            Yes
      Device has ECC support:                        Disabled
      Device supports Unified Addressing (UVA):      Yes
      Device PCI Domain ID / Bus ID / location ID:   0 / 4 / 0
      Compute Mode:
         < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >
    
    deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 7.5, CUDA Runtime Version = 7.5, NumDevs = 1, Device0 = GeForce 920M
    Result = PASS
    THANKS.

  21. #21
    Join Date
    2016-Jan
    Posts
    2

    Unhappy Also not working...

    Hi all, unfortunately I have the same issue like reintakura:

    lspci | egrep 'VGA|3D'
    Code:
    00:02.0 VGA compatible controller: Intel Corporation Core Processor Integrated Graphics Controller (rev 18)
    01:00.0 VGA compatible controller: NVIDIA Corporation GF108M [GeForce GT 425M] (rev a1)
    modprobe nvidia, modprobe nvidia-uvm
    Code:
    No Output
    optirun glxspheres64
    Code:
    [ 3464.033594] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) 
    
    [ 3464.033700] [ERROR]Aborting because fallback start is disabled.
    dmesg | tail -n 50
    Code:
    [   11.678275] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
    [   12.324145] Adding 7971836k swap on /dev/sda5.  Priority:-1 extents:1 across:7971836k FS
    [   14.535880] intel ips 0000:00:1f.6: i915 driver attached, reenabling gpu turbo
    [   18.918289] Bluetooth: Core ver 2.20
    [   18.918308] NET: Registered protocol family 31
    [Bluetooth]
    [   18.969846] Netfilter messages via NETLINK v0.30.
    [IPv6]
    [wlan0]
    [   23.267068] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
    [   23.270952] cfg80211: Regulatory domain changed to country: DE
    [   23.270956] cfg80211:  DFS Master region: ETSI
    [   23.270958] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
    [   23.270960] cfg80211:   (2400000 KHz - 2483500 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
    [   23.270963] cfg80211:   (5150000 KHz - 5250000 KHz @ 80000 KHz, 200000 KHz AUTO), (N/A, 2000 mBm), (N/A)
    [   23.270965] cfg80211:   (5250000 KHz - 5350000 KHz @ 80000 KHz, 200000 KHz AUTO), (N/A, 2000 mBm), (0 s)
    [   23.270966] cfg80211:   (5470000 KHz - 5725000 KHz @ 160000 KHz), (N/A, 2698 mBm), (0 s)
    [   23.270968] cfg80211:   (57000000 KHz - 66000000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A)
    [   23.872947] sha256_ssse3: Using SSSE3 optimized SHA-256 implementation
    [   24.118613] bbswitch: version 0.8
    [   24.118621] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
    [   24.118629] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.P0P1.PEGP
    [   24.118647] ACPI Warning: \_SB_.PCI0.P0P1.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150818/nsarguments-95)
    [   24.118836] bbswitch: detected an Optimus _DSM function
    [   24.118852] pci 0000:01:00.0: enabling device (0006 -> 0007)
    [   24.118859] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on
    [   24.120831] bbswitch: disabling discrete graphics
    [   24.120845] ACPI Warning: \_SB_.PCI0.P0P1.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150818/nsarguments-95)
    [   31.993462] fuse init (API version 7.23)
    [Bluetooth]
    [   94.050737] bbswitch: enabling discrete graphics
    [   94.383372] nvidia: module license 'NVIDIA' taints kernel.
    [   94.383381] Disabling lock debugging due to kernel taint
    [   94.395197] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=io+mem,decodes=none:owns=none
    [   94.396188] [drm] Initialized nvidia-drm 0.0.0 20150116 for 0000:01:00.0 on minor 1
    [   94.396194] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  352.55  Thu Oct  8 15:18:00 PDT 2015
    Last edited by Bobbybaum; 2016-01-29 at 15:12. Reason: Typo

  22. #22
    Join Date
    2016-Jan
    Posts
    2

    ...continue of my post, because of firewall-error in this forum

    echo $PATH

    Code:
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/VirtualGL/bin:/usr/local/cuda-7.5/bin
    cat /etc/bumblebee/bumblebee.conf

    Code:
    # Configuration file for Bumblebee. Values should **not** be put between quotes
    
    ## Server options. Any change made in this section will need a server restart
    # to take effect.
    [bumblebeed]
    # The secondary Xorg server DISPLAY number
    VirtualDisplay=:8
    # Should the unused Xorg server be kept running? Set this to true if waiting
    # for X to be ready is too long and don't need power management at all.
    KeepUnusedXServer=false
    # The name of the Bumbleblee server group name (GID name)
    ServerGroup=bumblebee
    # Card power state at exit. Set to false if the card shoud be ON when Bumblebee
    # server exits.
    TurnCardOffAtExit=false
    # The default behavior of '-f' option on optirun. If set to "true", '-f' will
    # be ignored.
    NoEcoModeOverride=false
    # The Driver used by Bumblebee server. If this value is not set (or empty),
    # auto-detection is performed. The available drivers are nvidia and nouveau
    # (See also the driver-specific sections below)
    Driver=nvidia
    # Directory with a dummy config file to pass as a -configdir to secondary X
    XorgConfDir=/etc/bumblebee/xorg.conf.d
    
    ## Client options. Will take effect on the next optirun executed.
    [optirun]
    # Acceleration/ rendering bridge, possible values are auto, virtualgl and
    # primus.
    Bridge=auto
    # The method used for VirtualGL to transport frames between X servers.
    # Possible values are proxy, jpeg, rgb, xv and yuv.
    VGLTransport=proxy
    # List of paths which are searched for the primus libGL.so.1 when using
    # the primus bridge
    PrimusLibraryPath=/usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus:/usr/lib/primus:/usr/lib32/primus
    # Should the program run under optirun even if Bumblebee server or nvidia card
    # is not available?
    AllowFallbackToIGC=false
    
    
    # Driver-specific settings are grouped under [driver-NAME]. The sections are
    # parsed if the Driver setting in [bumblebeed] is set to NAME (or if auto-
    # detection resolves to NAME).
    # PMMethod: method to use for saving power by disabling the nvidia card, valid
    # values are: auto - automatically detect which PM method to use
    #         bbswitch - new in BB 3, recommended if available
    #       switcheroo - vga_switcheroo method, use at your own risk
    #             none - disable PM completely
    # https://github.com/Bumblebee-Project/Bumblebee/wiki/Comparison-of-PM-methods
    
    ## Section with nvidia driver specific options, only parsed if Driver=nvidia
    [driver-nvidia]
    # Module name to load, defaults to Driver if empty or unset
    KernelDriver=nvidia-current
    PMMethod=auto
    # colon-separated path to the nvidia libraries
    LibraryPath=/usr/lib/x86_64-linux-gnu/nvidia:/usr/lib/i386-linux-gnu/nvidia:/usr/lib/nvidia
    # comma-separated path of the directory containing nvidia_drv.so and the
    # default Xorg modules path
    XorgModulePath=/usr/lib/nvidia,/usr/lib/xorg/modules
    XorgConfFile=/etc/bumblebee/xorg.conf.nvidia
    
    ## Section with nouveau driver specific options, only parsed if Driver=nouveau
    [driver-nouveau]
    KernelDriver=nouveau
    PMMethod=auto
    XorgConfFile=/etc/bumblebee/xorg.conf.nouveau
    cat /etc/bumblebee/xorg.conf.nvidia

    Code:
    Section "ServerLayout"
        Identifier  "Layout0"
        Option      "AutoAddDevices" "false"
        Option      "AutoAddGPU" "false"
    EndSection
    
    Section "Device"
        Identifier  "DiscreteNvidia"
        Driver      "nvidia"
        VendorName  "NVIDIA Corporation"
        BusID "PCI:01:00:0"
    
    #   If the X server does not automatically detect your VGA device,
    #   you can manually set it here.
    #   To get the BusID prop, run `lspci | egrep 'VGA|3D'` and input the data
    #   as you see in the commented example.
    #   This Setting may be needed in some platforms with more than one
    #   nvidia card, which may confuse the proprietary driver (e.g.,
    #   trying to take ownership of the wrong device). Also needed on Ubuntu 13.04.
    #   BusID "PCI:01:00:0"
    
    #   Setting ProbeAllGpus to false prevents the new proprietary driver
    #   instance spawned to try to control the integrated graphics card,
    #   which is already being managed outside bumblebee.
    #   This option doesn't hurt and it is required on platforms running
    #   more than one nvidia graphics card with the proprietary driver.
    #   (E.g. Macbook Pro pre-2010 with nVidia 9400M + 9600M GT).
    #   If this option is not set, the new Xorg may blacken the screen and
    #   render it unusable (unless you have some way to run killall Xorg).
        Option "ProbeAllGpus" "false"
    
        Option "NoLogo" "true"
        Option "UseEDID" "false"
        Option "UseDisplayDevice" "none"
    EndSection
    service bumblebeed restart

    Code:
    No Output
    modinfo nvidia-current

    Code:
    filename:       /lib/modules/4.3.0-kali1-amd64/updates/dkms/nvidia-current.ko
    alias:          char-major-195-*
    version:        352.55
    supported:      external
    license:        NVIDIA
    alias:          pci:v000010DEd00000E00sv*sd*bc04sc80i00*
    alias:          pci:v000010DEd*sv*sd*bc03sc02i00*
    alias:          pci:v000010DEd*sv*sd*bc03sc00i00*
    depends:        drm
    vermagic:       4.3.0-kali1-amd64 SMP mod_unload modversions 
    parm:           NVreg_Mobile:int
    parm:           NVreg_ResmanDebugLevel:int
    parm:           NVreg_RmLogonRC:int
    parm:           NVreg_ModifyDeviceFiles:int
    parm:           NVreg_DeviceFileUID:int
    parm:           NVreg_DeviceFileGID:int
    parm:           NVreg_DeviceFileMode:int
    parm:           NVreg_UpdateMemoryTypes:int
    parm:           NVreg_InitializeSystemMemoryAllocations:int
    parm:           NVreg_UsePageAttributeTable:int
    parm:           NVreg_MapRegistersEarly:int
    parm:           NVreg_RegisterForACPIEvents:int
    parm:           NVreg_CheckPCIConfigSpace:int
    parm:           NVreg_EnablePCIeGen3:int
    parm:           NVreg_EnableMSI:int
    parm:           NVreg_MemoryPoolSize:int
    parm:           NVreg_RegistryDwords:charp
    parm:           NVreg_RmMsg:charp
    parm:           NVreg_AssignGpus:charp
    find 2> /dev/null / -name nvidia*.ko

    Code:
    /lib/modules/4.3.0-kali1-amd64/updates/dkms/nvidia-current-uvm.ko
    /lib/modules/4.3.0-kali1-amd64/updates/dkms/nvidia-current.ko
    /var/lib/dkms/nvidia-current/352.55/4.3.0-kali1-amd64/x86_64/module/nvidia-current-uvm.ko
    /var/lib/dkms/nvidia-current/352.55/4.3.0-kali1-amd64/x86_64/module/nvidia-current.ko
    Thanks for your help!
    Last edited by Bobbybaum; 2016-01-28 at 13:38. Reason: Changing from nvidia to nvidia-current & typo

  23. #23
    how to install graphic on lenovo l510 (thinkpad) Lenovo Mobile Intel® GM45 Express Chipset

    root@BT5KL:~# lspci
    00:00.0 Host bridge: Intel Corporation Mobile 4 Series Chipset Memory Controller Hub (rev 07)
    00:02.0 VGA compatible controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
    00:02.1 Display controller: Intel Corporation Mobile 4 Series Chipset Integrated Graphics Controller (rev 07)
    00:1a.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #4 (rev 03)
    00:1a.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #5 (rev 03)
    00:1a.2 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #6 (rev 03)
    00:1a.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #2 (rev 03)
    00:1b.0 Audio device: Intel Corporation 82801I (ICH9 Family) HD Audio Controller (rev 03)
    00:1c.0 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 1 (rev 03)
    00:1c.1 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 2 (rev 03)
    00:1c.2 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 3 (rev 03)
    00:1c.3 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 4 (rev 03)
    00:1c.4 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 5 (rev 03)
    00:1c.5 PCI bridge: Intel Corporation 82801I (ICH9 Family) PCI Express Port 6 (rev 03)
    00:1d.0 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #1 (rev 03)
    00:1d.1 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #2 (rev 03)
    00:1d.2 USB controller: Intel Corporation 82801I (ICH9 Family) USB UHCI Controller #3 (rev 03)
    00:1d.7 USB controller: Intel Corporation 82801I (ICH9 Family) USB2 EHCI Controller #1 (rev 03)
    00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev 93)
    00:1f.0 ISA bridge: Intel Corporation ICH9M LPC Interface Controller (rev 03)
    00:1f.2 SATA controller: Intel Corporation 82801IBM/IEM (ICH9M/ICH9M-E) 4 port SATA Controller [AHCI mode] (rev 03)
    00:1f.3 SMBus: Intel Corporation 82801I (ICH9 Family) SMBus Controller (rev 03)
    02:00.0 System peripheral: JMicron Technology Corp. SD/MMC Host Controller
    02:00.2 SD Host controller: JMicron Technology Corp. Standard SD Host Controller
    02:00.3 System peripheral: JMicron Technology Corp. MS Host Controller
    02:00.4 System peripheral: JMicron Technology Corp. xD Host Controller
    05:00.0 Network controller: Intel Corporation PRO/Wireless 5100 AGN [Shiloh] Network Connection
    08:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 03)
    Last edited by bt5kl; 2016-02-18 at 08:45.

  24. #24
    Join Date
    2013-Jul
    Posts
    2
    Hoping someone can help here. Desktop system with 64-bit Kali 2.0 Rolling installed to HDD.

    When running(as root) the CUDA install, I get the following output:
    Code:
    chmod +x cuda_7.5.18_linux.run
    ./cuda_7.5.18_linux.run
    
    Accept the EULA
    Select yes to unsupported configuration
    No to graphics driver
    Yes to the toolkit
    Accept default location
    Yes to symbolic link
    Yes to samples
    Yes to default samples location
    The toolkit will install
    
    ERROR:
    Error: unsupported compiler: 5.3.1. Use –override to override this check.
    Missing recommended library: libGLU.so
    Missing recommended library: libXi.so
    Missing recommended library: libXmu.so
    
    Error: Cannot find Toolkit in /usr/local/cuda-7.5
    So, the error seems pretty obvious that I do not have the correct compiler, but how should I find the correct one?

    I did install all the CUDA dependencies:
    Code:
    apt-get install freeglut3-dev libxmu-dev libpcap-dev libssl-dev
    Any help is much appreciated!

  25. #25
    Join Date
    2015-Nov
    Posts
    5
    Tx/Rx >>>

    apt-get install freeglut3-dev build-essential libx11-dev libxmu-dev libxi-dev libgl1-mesa-glx libglu1-mesa libglu1-mesa-dev


    ./cuda*.run --override compiler

    Accept the EULA
    Select yes to unsupported configuration
    No to graphics driver
    Yes to the toolkit
    Accept default location
    Yes to symbolic link
    Yes to samples
    Yes to default samples location
    The toolkit will install
    Last edited by x5ctf; 2016-03-04 at 07:04.

  26. #26
    Join Date
    2015-Jul
    Posts
    6
    I have a problem guys. I can succesfully run optirun glxspheres64 but modinfo nvidia says that I don't have nvidia module installed

    1. lspci | egrep 'VGA|3D

    Code:
    00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
    01:00.0 3D controller: NVIDIA Corporation GK107M [GeForce GT 750M] (rev a1)
    2. modprobe nvidia

    Code:
    modprobe: FATAL: Module nvidia not found in directory /lib/modules/4.4.0-kali1-amd64
    3. modprobe nvidia-uvm

    Code:
    modprobe: FATAL: Module nvidia-uvm not found in directory /lib/modules/4.4.0-kali1-amd64
    4. optirun glxspheres64

    Code:
    Polygons in scene: 62464 (61 spheres * 1024 polys/spheres)
    Visual ID of window: 0x20
    Context is Direct
    OpenGL Renderer: GeForce GT 750M/PCIe/SSE2
    306.941638 frames/sec - 342.546869 Mpixels/sec
    305.789812 frames/sec - 341.261430 Mpixels/sec
    310.069638 frames/sec - 346.037716 Mpixels/sec
    308.716589 frames/sec - 344.527713 Mpixels/sec
    5. dmesg | tail -n 100

    Code:
    [  296.115287] nvidia: module license 'NVIDIA' taints kernel.
    [  296.115290] Disabling lock debugging due to kernel taint
    [  296.123083] [drm] Initialized nvidia-drm 0.0.0 20150116 for 0000:01:00.0 on minor 1
    [  296.123087] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  352.79  Wed Jan 13 16:17:53 PST 2016
    [  297.819878] vgaarb: this pci device is not a vga device
    [  297.841735] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
    [  297.841774] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
    [  297.841797] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
    [  297.841818] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
    [  297.841840] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
    [  297.841860] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
    [  297.841893] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
    [  297.841915] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
    [  297.865676] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
    [  298.059827] vgaarb: this pci device is not a vga device
    [  306.727138] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
    [  531.063360] vgaarb: this pci device is not a vga device
    [  531.065402] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
    [  531.065441] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
    [  531.065464] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
    [  531.065486] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
    [  531.065507] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
    [  531.065528] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
    [  531.065560] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
    [  531.065581] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
    [  531.065964] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
    [  531.254516] vgaarb: this pci device is not a vga device
    [  541.237741] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
    6. echo $PATH

    Code:
    /usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/opt/oracle/instantclient_11_2:/opt/VirtualGL/bin:/usr/local/cuda-7.5/bin
    7. cat /etc/bumblebee/bumblebee.conf

    Code:
    # Configuration file for Bumblebee. Values should **not** be put between quotes
    
    ## Server options. Any change made in this section will need a server restart
    # to take effect.
    [bumblebeed]
    # The secondary Xorg server DISPLAY number
    VirtualDisplay=:8
    # Should the unused Xorg server be kept running? Set this to true if waiting
    # for X to be ready is too long and don't need power management at all.
    KeepUnusedXServer=false
    # The name of the Bumbleblee server group name (GID name)
    ServerGroup=bumblebee
    # Card power state at exit. Set to false if the card shoud be ON when Bumblebee
    # server exits.
    TurnCardOffAtExit=false
    # The default behavior of '-f' option on optirun. If set to "true", '-f' will
    # be ignored.
    NoEcoModeOverride=false
    # The Driver used by Bumblebee server. If this value is not set (or empty),
    # auto-detection is performed. The available drivers are nvidia and nouveau
    # (See also the driver-specific sections below)
    Driver=nvidia
    # Directory with a dummy config file to pass as a -configdir to secondary X
    XorgConfDir=/etc/bumblebee/xorg.conf.d
    
    ## Client options. Will take effect on the next optirun executed.
    [optirun]
    # Acceleration/ rendering bridge, possible values are auto, virtualgl and
    # primus.
    Bridge=auto
    # The method used for VirtualGL to transport frames between X servers.
    # Possible values are proxy, jpeg, rgb, xv and yuv.
    VGLTransport=proxy
    # List of paths which are searched for the primus libGL.so.1 when using
    # the primus bridge
    PrimusLibraryPath=/usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus:/usr/lib/primus:/usr/lib32/primus
    # Should the program run under optirun even if Bumblebee server or nvidia card
    # is not available?
    AllowFallbackToIGC=false
    
    
    # Driver-specific settings are grouped under [driver-NAME]. The sections are
    # parsed if the Driver setting in [bumblebeed] is set to NAME (or if auto-
    # detection resolves to NAME).
    # PMMethod: method to use for saving power by disabling the nvidia card, valid
    # values are: auto - automatically detect which PM method to use
    #         bbswitch - new in BB 3, recommended if available
    #       switcheroo - vga_switcheroo method, use at your own risk
    #             none - disable PM completely
    # https://github.com/Bumblebee-Project/Bumblebee/wiki/Comparison-of-PM-methods
    
    ## Section with nvidia driver specific options, only parsed if Driver=nvidia
    [driver-nvidia]
    # Module name to load, defaults to Driver if empty or unset
    KernelDriver=nvidia-current
    PMMethod=auto
    # colon-separated path to the nvidia libraries
    LibraryPath=/usr/lib/x86_64-linux-gnu/nvidia:/usr/lib/i386-linux-gnu/nvidia:/usr/lib/nvidia
    # comma-separated path of the directory containing nvidia_drv.so and the
    # default Xorg modules path
    XorgModulePath=/usr/lib/nvidia,/usr/lib/xorg/modules
    XorgConfFile=/etc/bumblebee/xorg.conf.nvidia
    
    ## Section with nouveau driver specific options, only parsed if Driver=nouveau
    [driver-nouveau]
    KernelDriver=nouveau
    PMMethod=auto
    XorgConfFile=/etc/bumblebee/xorg.conf.nouveau
    8. cat /etc/bumblebee/xorg.conf.nvidia

    Code:
    Section "ServerLayout"
        Identifier  "Layout0"
        Option      "AutoAddDevices" "false"
        Option      "AutoAddGPU" "false"
    EndSection
    
    Section "Device"
        Identifier  "DiscreteNvidia"
        Driver      "nvidia"
        VendorName  "NVIDIA Corporation"
        BusID       "PCI:01:00:0"
    9. service bumblebeed restart

    Restarted succesfully

    10. modinfo nvidia

    Code:
    modinfo: ERROR: Module nvidia not found
    11. find 2> /dev/null / -name nvidia*.ko

    Code:
    /var/lib/dkms/nvidia-current/352.79/4.4.0-kali1-amd64/x86_64/module/nvidia-current.ko
    /var/lib/dkms/nvidia-current/352.79/4.4.0-kali1-amd64/x86_64/module/nvidia-current-uvm.ko
    /lib/modules/4.4.0-kali1-amd64/updates/dkms/nvidia-current.ko
    /lib/modules/4.4.0-kali1-amd64/updates/dkms/nvidia-current-uvm.ko
    EDIT: I get PASS with CUDA deviceQuery
    Last edited by Cricco95; 2016-03-05 at 12:23.

  27. #27
    Join Date
    2016-Mar
    Posts
    4

    Kali Rolling, 4.4.0-kali1-amd64 Kernel, GTX 870M with Optimus

    I got to step 15 but couldn't get optirun to work.
    In the guide it doesn't look like we are disabling nouveau anywhere, shouldn't this cause a conflict with the Nvidia driver loading?

    Code:
    root@DEFNOTKALI:~# lspci | egrep 'VGA|3D'
    00:02.0 VGA compatible controller: Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06)
    01:00.0 3D controller: NVIDIA Corporation GK104M [GeForce GTX 870M] (rev a1)
    Code:
    root@DEFNOTKALI:~# modprobe nvidia
    Code:
    root@DEFNOTKALI:~# modprobe nvidia-uvm
    Code:
    root@DEFNOTKALI:~# optirun glxspheres64
    [  146.023065] [ERROR]The Bumblebee daemon has not been started yet or the socket path /var/run/bumblebee.socket was incorrect.
    [  146.023114] [ERROR]Could not connect to bumblebee daemon - is it running?
    Code:
    root@DEFNOTKALI:~# /etc/init.d/bumblebeed start
    [ ok ] Starting bumblebeed (via systemctl): bumblebeed.service.
    Code:
    root@DEFNOTKALI:~# optirun glxspheres64
    [  166.013170] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) 
    
    [  166.013201] [ERROR]Aborting because fallback start is disabled.
    Code:
    root@DEFNOTKALI:~# dmesg | tail -n 100
    [    8.332790] [Firmware Bug]: ACPI(PEGP) defines _DOD but not _DOS
    [    8.333960] ACPI: Video Device [PEGP] (multi-head: yes  rom: yes  post: no)
    [    8.333964] ACPI Error: [\_SB_.PCI0.GFX0.DD02._BCL] Namespace lookup failure, AE_NOT_FOUND (20150930/psargs-359)
    [    8.333968] ACPI Error: Method parse/execution failed [\_SB.PCI0.PEG0.PEGP.DD02._BCL] (Node ffff8802270e2220), AE_NOT_FOUND (20150930/psparse-542)
    [    8.334106] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/device:5e/LNXVIDEO:00/input/input16
    [    8.335503] ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no)
    [    8.335609] input: Video Bus as /devices/LNXSYSTM:00/LNXSYBUS:00/PNP0A08:00/LNXVIDEO:01/input/input17
    ...
    [    8.373529] intel_rapl: Found RAPL domain package
    ...
    [    8.373580] intel_rapl: RAPL package 0 domain dram locked by BIOS
    [    8.396062] [drm] GMBUS [i915 gmbus vga] timed out, falling back to bit banging on pin 2
    [    8.540116] snd_hda_intel 0000:00:03.0: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
    [    8.540124] [drm] Initialized i915 1.6.0 20151010 for 0000:00:02.0 on minor 0
    [    8.553731] fbcon: inteldrmfb (fb0) is primary device
    [    8.587479] ieee80211 phy0: Selected rate control algorithm 'iwl-mvm-rs'
    [    8.599189] input: HDA Intel HDMI HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:03.0/sound/card0/input18
    [    8.599255] input: HDA Intel HDMI HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:03.0/sound/card0/input19
    [    8.599310] input: HDA Intel HDMI HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:03.0/sound/card0/input20
    [    8.865906] Netfilter messages via NETLINK v0.30.
    [    9.768266] Console: switching to colour frame buffer device 400x112
    [    9.776747] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
    [   17.625014] fuse init (API version 7.23)
    [  132.106742] nvidia: module license 'NVIDIA' taints kernel.
    [  132.106746] Disabling lock debugging due to kernel taint
    [  132.114807] nvidia 0000:01:00.0: enabling device (0006 -> 0007)
    [  132.114995] [drm] Initialized nvidia-drm 0.0.0 20150116 for 0000:01:00.0 on minor 1
    [  132.114998] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  352.79  Wed Jan 13 16:17:53 PST 2016
    [  138.579100] nvidia_uvm: Loaded the UVM driver, major device number 247
    [  163.380537] bbswitch: version 0.8
    [  163.380544] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
    [  163.380549] bbswitch: Found discrete VGA device 0000:01:00.0: \_SB_.PCI0.PEG0.PEGP
    [  163.380560] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
    [  163.380653] bbswitch: detected an Optimus _DSM function
    [  163.380667] bbswitch: Succesfully loaded. Discrete card 0000:01:00.0 is on
    [  163.383584] nvidia_uvm: Unregistered the UVM driver
    [  163.400337] [drm] Module unloaded
    [  163.437393] bbswitch: disabling discrete graphics
    [  163.437408] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20150930/nsarguments-95)
    [  163.452106] pci 0000:01:00.0: Refused to change power state, currently in D0
    [  165.457270] bbswitch: enabling discrete graphics
    [  166.007073] [drm] Initialized nvidia-drm 0.0.0 20150116 for 0000:01:00.0 on minor 1
    [  166.007077] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  352.79  Wed Jan 13 16:17:53 PST 2016
    Code:
    root@DEFNOTKALI:~# echo $PATH
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/VirtualGL/bin:/usr/local/cuda-7.5/bin
    Code:
    root@DEFNOTKALI:~# cat /etc/bumblebee/bumblebee.conf 
    # Configuration file for Bumblebee. Values should **not** be put between quotes
    
    ## Server options. Any change made in this section will need a server restart
    # to take effect.
    [bumblebeed]
    # The secondary Xorg server DISPLAY number
    VirtualDisplay=:8
    # Should the unused Xorg server be kept running? Set this to true if waiting
    # for X to be ready is too long and don't need power management at all.
    KeepUnusedXServer=false
    # The name of the Bumbleblee server group name (GID name)
    ServerGroup=bumblebee
    # Card power state at exit. Set to false if the card shoud be ON when Bumblebee
    # server exits.
    TurnCardOffAtExit=false
    # The default behavior of '-f' option on optirun. If set to "true", '-f' will
    # be ignored.
    NoEcoModeOverride=false
    # The Driver used by Bumblebee server. If this value is not set (or empty),
    # auto-detection is performed. The available drivers are nvidia and nouveau
    # (See also the driver-specific sections below)
    Driver=nvidia
    # Directory with a dummy config file to pass as a -configdir to secondary X
    XorgConfDir=/etc/bumblebee/xorg.conf.d
    
    ## Client options. Will take effect on the next optirun executed.
    [optirun]
    # Acceleration/ rendering bridge, possible values are auto, virtualgl and
    # primus.
    Bridge=auto
    # The method used for VirtualGL to transport frames between X servers.
    # Possible values are proxy, jpeg, rgb, xv and yuv.
    VGLTransport=proxy
    # List of paths which are searched for the primus libGL.so.1 when using
    # the primus bridge
    PrimusLibraryPath=/usr/lib/x86_64-linux-gnu/primus:/usr/lib/i386-linux-gnu/primus:/usr/lib/primus:/usr/lib32/primus
    # Should the program run under optirun even if Bumblebee server or nvidia card
    # is not available?
    AllowFallbackToIGC=false
    
    # Driver-specific settings are grouped under [driver-NAME]. The sections are
    # parsed if the Driver setting in [bumblebeed] is set to NAME (or if auto-
    # detection resolves to NAME).
    # PMMethod: method to use for saving power by disabling the nvidia card, valid
    # values are: auto - automatically detect which PM method to use
    #         bbswitch - new in BB 3, recommended if available
    #       switcheroo - vga_switcheroo method, use at your own risk
    #             none - disable PM completely
    # https://github.com/Bumblebee-Project/Bumblebee/wiki/Comparison-of-PM-methods
    
    ## Section with nvidia driver specific options, only parsed if Driver=nvidia
    [driver-nvidia]
    # Module name to load, defaults to Driver if empty or unset
    KernelDriver=nvidia-current
    PMMethod=auto
    # colon-separated path to the nvidia libraries
    LibraryPath=/usr/lib/x86_64-linux-gnu/nvidia:/usr/lib/i386-linux-gnu/nvidia:/usr/lib/nvidia
    # comma-separated path of the directory containing nvidia_drv.so and the
    # default Xorg modules path
    XorgModulePath=/usr/lib/nvidia,/usr/lib/xorg/modules
    XorgConfFile=/etc/bumblebee/xorg.conf.nvidia
    
    ## Section with nouveau driver specific options, only parsed if Driver=nouveau
    [driver-nouveau]
    KernelDriver=nouveau
    PMMethod=auto
    XorgConfFile=/etc/bumblebee/xorg.conf.nouveau
    Code:
    root@DEFNOTKALI:~# cat /etc/bumblebee/xorg.conf.nvidia 
    Section "ServerLayout"
        Identifier  "Layout0"
        Option      "AutoAddDevices" "false"
        Option      "AutoAddGPU" "false"
    EndSection
    
    Section "Device"
        Identifier  "DiscreteNvidia"
        Driver      "nvidia"
        VendorName  "NVIDIA Corporation"
        BusID       "PCI:01:00:0"
    
    #   If the X server does not automatically detect your VGA device,
    #   you can manually set it here.
    #   To get the BusID prop, run `lspci | egrep 'VGA|3D'` and input the data
    #   as you see in the commented example.
    #   This Setting may be needed in some platforms with more than one
    #   nvidia card, which may confuse the proprietary driver (e.g.,
    #   trying to take ownership of the wrong device). Also needed on Ubuntu 13.04.
    #   BusID "PCI:01:00:0"
    
    #   Setting ProbeAllGpus to false prevents the new proprietary driver
    #   instance spawned to try to control the integrated graphics card,
    #   which is already being managed outside bumblebee.
    #   This option doesn't hurt and it is required on platforms running
    #   more than one nvidia graphics card with the proprietary driver.
    #   (E.g. Macbook Pro pre-2010 with nVidia 9400M + 9600M GT).
    #   If this option is not set, the new Xorg may blacken the screen and
    #   render it unusable (unless you have some way to run killall Xorg).
        Option "ProbeAllGpus" "false"
    
        Option "NoLogo" "true"
        Option "UseEDID" "false"
        Option "UseDisplayDevice" "none"
    EndSection
    Code:
    root@DEFNOTKALI:~# service bumblebeed restart
    Code:
    root@DEFNOTKALI:~# modinfo nvidia
    modinfo: ERROR: Module nvidia not found.
    Code:
    root@DEFNOTKALI:~# find 2> /dev/null / -name nvidia*.ko
    /var/lib/dkms/nvidia-current/352.79/4.4.0-kali1-amd64/x86_64/module/nvidia-current.ko
    /var/lib/dkms/nvidia-current/352.79/4.4.0-kali1-amd64/x86_64/module/nvidia-current-uvm.ko
    /lib/modules/4.4.0-kali1-amd64/updates/dkms/nvidia-current.ko
    /lib/modules/4.4.0-kali1-amd64/updates/dkms/nvidia-current-uvm.ko

  28. #28
    Join Date
    2014-Sep
    Posts
    11
    Here we're back again.
    After installing the last Kali version (2016.1), I'm finding impossible to install the nVidia drivers with the guide in the first post: simply, like other users said, the guide is not applying from the step 15.
    Someone found a way to make Kali work with those **** graphic drivers?

  29. #29
    Join Date
    2013-Aug
    Location
    lost in space
    Posts
    580
    you know what, everything is fine until that step..

    Now to fix the nvidia-uvm module (You don't know this yet, but it's broken.)

    cd /usr/src/nvidia-current-331.67
    make

    cp Module.symvers uvm/

    cd uvm/
    make
    Can you confirm that:
    1. capital 'M' in "Module.symvers uvm/" syntax
    2. the nvidia-uvm module is really broken, and needs fixing

    I will try without fixing tomorrow see what happens. Now I'm going to dream about using piryt and hashcat
    Kali Linux USB Installation using LinuxLive USB Creator
    Howto Install HDD Kali on a USB Key
    Clean your laptop fan | basic knowledge

  30. #30
    Join Date
    2013-Aug
    Location
    lost in space
    Posts
    580
    Nevermind the above post.


    After a 3rd reinstall. Same results.

    Here are some interesting bits, that might have nothing to do with it(?)

    Code:
    root@kali:~# uname -r
    3.14-kali1-amd64
    
    
    
    
    
    depmod....
    
    DKMS: install completed.
    Setting up nvidia-driver (331.67-2kali1) ...
    Setting up bumblebee-nvidia (3.2.1-4~bpo70+1) ...
    update-alternatives: using /usr/lib/mesa-diverted to provide /usr/lib/glx (glx) in manual mode
    [ ok ] Restarting bumblebeed: bumblebeed.
    Processing triggers for initramfs-tools ...
    update-initramfs: Generating /boot/initrd.img-3.14-kali1-amd64
    cryptsetup: WARNING: failed to detect canonical device of /dev/sdb5
    331.67-2 !!?? There are two version of the same. Really?

    Code:
    root@kali:~# apt-get install nvidia-glx
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following NEW packages will be installed:
      nvidia-glx
    0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
    Need to get 119 kB of archives.
    After this operation, 158 kB of additional disk space will be used.
    Get:1 http://http.kali.org/kali/ kali/non-free nvidia-glx amd64 331.67-2kali1 [119 kB]
    Fetched 119 kB in 6s (19.1 kB/s)                                                                   
    Selecting previously unselected package nvidia-glx.
    (Reading database ... 343139 files and directories currently installed.)
    Unpacking nvidia-glx (from .../nvidia-glx_331.67-2kali1_amd64.deb) ...
    Setting up nvidia-glx (331.67-2kali1) ...
    root@kali:~#
    Code:
    root@kali:~# apt-get install nvidia-glx
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following NEW packages will be installed:
      nvidia-glx
    0 upgraded, 1 newly installed, 0 to remove and 0 not upgraded.
    Need to get 119 kB of archives.
    After this operation, 158 kB of additional disk space will be used.
    Get:1 http://http.kali.org/kali/ kali/non-free nvidia-glx amd64 331.67-2kali1 [119 kB]
    Fetched 119 kB in 6s (19.1 kB/s)                                                                   
    Selecting previously unselected package nvidia-glx.
    (Reading database ... 343139 files and directories currently installed.)
    Unpacking nvidia-glx (from .../nvidia-glx_331.67-2kali1_amd64.deb) ...
    Setting up nvidia-glx (331.67-2kali1) ...
    root@kali:~# 
    
    
    
    
    root@kali:~# lspci | egrep 'VGA|3D'
    00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
    01:00.0 VGA compatible controller: NVIDIA Corporation GF108 [GeForce GT 630M] (rev ff)
    root@kali:~# 
    
    
    
    
    root@kali:~# apt-get install libcuda1
    Reading package lists... Done
    Building dependency tree       
    Reading state information... Done
    The following extra packages will be installed:
      nvidia-smi
    Suggested packages:
      nvidia-cuda-mps
    Recommended packages:
      libcuda1-i386
    The following NEW packages will be installed:
      libcuda1 nvidia-smi
    0 upgraded, 2 newly installed, 0 to remove and 0 not upgraded.
    Need to get 5,688 kB of archives.
    After this operation, 14.5 MB of additional disk space will be used.
    Do you want to continue [Y/n]? y
    Get:1 http://http.kali.org/kali/ kali/non-free libcuda1 amd64 331.67-2kali1 [5,480 kB]
    Get:2 http://http.kali.org/kali/ kali/non-free nvidia-smi amd64 331.67-2kali1 [207 kB]             
    Fetched 5,688 kB in 31s (178 kB/s)                                                                 
    Selecting previously unselected package libcuda1:amd64.
    (Reading database ... 343147 files and directories currently installed.)
    Unpacking libcuda1:amd64 (from .../libcuda1_331.67-2kali1_amd64.deb) ...
    Selecting previously unselected package nvidia-smi.
    Unpacking nvidia-smi (from .../nvidia-smi_331.67-2kali1_amd64.deb) ...
    Processing triggers for man-db ...
    Setting up libcuda1:amd64 (331.67-2kali1) ... 
    Setting up nvidia-smi (331.67-2kali1) ...
    root@kali:~# 
    
    
    CUDA 
    
    Do you accept the previously read EULA? (accept/decline/quit): accept
    You are attempting to install on an unsupported configuration. Do you wish to continue? ((y)es/(n)o) [ default is no ]: y
    Install NVIDIA Accelerated Graphics Driver for Linux-x86_64 319.37? ((y)es/(n)o/(q)uit): n
    Install the CUDA 5.5 Toolkit? ((y)es/(n)o/(q)uit): y
    Enter Toolkit Location [ default is /usr/local/cuda-5.5 ]: 
    Install the CUDA 5.5 Samples? ((y)es/(n)o/(q)uit): y
    Enter CUDA Samples Location [ default is /root/NVIDIA_CUDA-5.5_Samples ]: 
    Installing the CUDA Toolkit in /usr/local/cuda-5.5 ...
    
    WAIT.............
    
    
    ===========
    = Summary =
    ===========
    
    Driver:   Not Selected
    Toolkit:  Installed in /usr/local/cuda-5.5
    Samples:  Installed in /root/NVIDIA_CUDA-5.5_Samples
    
    * Please make sure your PATH includes /usr/local/cuda-5.5/bin
    
    * Please make sure your LD_LIBRARY_PATH
    *   for 32-bit Linux distributions includes /usr/local/cuda-5.5/lib
    *   for 64-bit Linux distributions includes /usr/local/cuda-5.5/lib64:/lib
    * OR
    *   for 32-bit Linux distributions add /usr/local/cuda-5.5/lib
    *   for 64-bit Linux distributions add /usr/local/cuda-5.5/lib64 and /lib
    * to /etc/ld.so.conf and run ldconfig as root
    
    * To uninstall CUDA, remove the CUDA files in /usr/local/cuda-5.5
    * Installation Complete
    
    
    
    
    
    
    root@kali:~# ldconfig
    root@kali:~# 
    NOTHING HAPPENS
    
    
    
    AFTER SETUP I RUN optirun glxspheres64 again and...
    
    
    root@kali:~# /etc/init.d/bumblebeed restart
    [ ok ] Restarting bumblebeed: bumblebeed.
    root@kali:~# optirun glxspheres64
    [10223.471114] [ERROR]Cannot access secondary GPU - error: Could not load GPU driver
    
    [10223.471198] [ERROR]Aborting because fallback start is disabled.
    root@kali:~#
    dmesg modprobe (Notice the interesting bit at the end):

    Code:
    root@kali:~# dmesg
    CANNOT POST THE WHOLE THING  
    
    ...
    [Package] (20131218/nsarguments-95)
    [ 6170.453345] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131218/nsarguments-95)
    [ 6170.453385] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131218/nsarguments-95)
    [ 6176.843757] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131218/nsarguments-95)
    [ 6178.305207] bbswitch: disabling discrete graphics
    [ 6178.305228] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131218/nsarguments-95)
    [ 6178.318591] pci 0000:01:00.0: Refused to change power state, currently in D0
    [ 6550.299909] bbswitch: enabling discrete graphics
    [ 6550.757766] bbswitch: disabling discrete graphics
    [ 6550.757788] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131218/nsarguments-95)
    [ 6561.213529] bbswitch: enabling discrete graphics
    [ 6561.651014] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=none,decodes=none:owns=none
    [ 6561.651157] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  331.67  Fri Apr  4 13:48:39 PDT 2014
    [ 6561.681517] nvidia 0000:01:00.0: irq 49 for MSI/MSI-X
    [ 6561.692369] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131218/nsarguments-95)
    [ 6561.692454] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131218/nsarguments-95)
    [ 6561.692501] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131218/nsarguments-95)
    [ 6561.692543] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131218/nsarguments-95)
    [ 6561.692584] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131218/nsarguments-95)
    [ 6561.692624] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131218/nsarguments-95)
    [ 6561.692690] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131218/nsarguments-95)
    [ 6561.692731] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131218/nsarguments-95)
    [ 6568.469916] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131218/nsarguments-95)
    [ 6657.371547] bbswitch: disabling discrete graphics
    [ 6657.371569] ACPI Warning: \_SB_.PCI0.PEG0.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131218/nsarguments-95)
    [ 6657.384771] pci 0000:01:00.0: Refused to change power state, currently in D0
    [ 8142.331643] vgaarb: device changed decodes: PCI:0000:01:00.0,olddecodes=none,decodes=none:owns=none
    [ 8142.331723] NVRM: The NVIDIA GPU 0000:01:00.0 (PCI ID: 10de:0de9)
    [ 8142.331723] NVRM: installed in this system is not supported by the 331.67
    [ 8142.331723] NVRM: NVIDIA Linux driver release.  Please see 'Appendix
    [ 8142.331723] NVRM: A - Supported NVIDIA GPU Products' in this release's
    [ 8142.331723] NVRM: README, available on the Linux driver download page
    [ 8142.331723] NVRM: at www.nvidia.com.
    [ 8142.331795] nvidia: probe of 0000:01:00.0 failed with error -1
    [ 8142.331853] NVRM: The NVIDIA probe routine failed for 1 device(s).
    [ 8142.331855] NVRM: None of the NVIDIA graphics adapters were initialized!
    [ 8142.332042] NVRM: NVIDIA init module failed!
    root@kali:~#
    Last edited by Quest; 2014-07-09 at 18:40.
    Kali Linux USB Installation using LinuxLive USB Creator
    Howto Install HDD Kali on a USB Key
    Clean your laptop fan | basic knowledge

  31. #31
    Join Date
    2013-Aug
    Location
    lost in space
    Posts
    580
    post too long continued here...

    The NVIDIA GPU 0000:01:00.0 (PCI ID: 10de:0de9)
    installed in this system is not supported by the 331.67
    NVIDIA Linux driver release. Please see 'Appendix
    A - Supported NVIDIA GPU Products' in this release's
    README, available on the Linux driver download page
    OH really? Let's go and see...

    http://us.download.nvidia.com/XFree8...rtedchips.html

    Note that the list of supported GPU products provided below and on the driver download page is provided to indicate which GPUs are supported by a particular driver version. Some designs incorporating supported GPUs may not be compatible with the NVIDIA Linux driver: in particular, notebook and all-in-one desktop designs with switchable (hybrid) or Optimus graphics will not work if means to disable the integrated graphics in hardware are not available. Hardware designs will vary from manufacturer to manufacturer, so please consult with a system's manufacturer to determine whether that particular system is compatible.
    10de:0de9 is not supported by the 331.67 NVIDIA Linux driver release
    Last edited by Quest; 2014-07-09 at 18:51.
    Kali Linux USB Installation using LinuxLive USB Creator
    Howto Install HDD Kali on a USB Key
    Clean your laptop fan | basic knowledge

  32. #32
    Join Date
    2013-Mar
    Location
    http://rastamouse.me
    Posts
    86
    This worked perfectly for me. Thanks staticn0de.
    OSCP
    --
    If it smells like a duck, walks like a duck and quacks like a duck; then it probably is a duck.

  33. #33
    Join Date
    2013-Aug
    Location
    lost in space
    Posts
    580
    Let me understand something here... Why are we working with driver 331.67, and only that version. Is it because of bumblebee? (I'm quite stubborn and still looking for a solution, even within an obvious failure framework).

    In any case, thank you staticn0de
    Kali Linux USB Installation using LinuxLive USB Creator
    Howto Install HDD Kali on a USB Key
    Clean your laptop fan | basic knowledge

  34. #34
    Join Date
    2014-Apr
    Location
    Down Under
    Posts
    315
    Quote Originally Posted by Quest View Post
    Let me understand something here... Why are we working with driver 331.67, and only that version. Is it because of bumblebee? (I'm quite stubborn and still looking for a solution, even within an obvious failure framework).

    In any case, thank you staticn0de
    Hi there Quest,

    You don't have to use that driver version. That is just what is in the wheezy backports repo.

    I have not tried a newer version on Kali (I've used 337 on Ubuntu with bumblebee - that had its own issues)

    To install a newer version, you will need to add the Jessie or Sid repo.

    Jessie is the testing repo and has the 337.19-1 driver under the name nvidia-driver or the transitional package Nvidia-glx.

    Sid is the unstable repo and has nvidia 331.79-1 under the same names as that above.

    These should work if you want to try them. I'm sure you understand how easily you can break Kali with unsupported repos (wheezy backports is not much better I'm sure)

    deb http://http.debian.net/debian sid main contrib non-free

    Or

    deb http://http.debian.net/debian jessie main contrib non-free

  35. #35
    Join Date
    2014-Jul
    Posts
    3
    See this article I was very moved when I thank staticn 0. Thank you. notebook can be normal working the

  36. #36
    Join Date
    2014-Apr
    Location
    Down Under
    Posts
    315
    For those interested, much to my amazement I was able to get Nvidia 340.24 working on Kali

    root@kali:/proc/driver/nvidia# cat version
    NVRM version: NVIDIA UNIX x86_64 Kernel Module 340.24 Wed Jul 2 14:24:20 PDT 2014
    GCC version: gcc version 4.7.2 (Debian 4.7.2-5)
    It was a bit of an "unclean" install as I kind of had to force it on there, but glxspheres64 and optirun is working. I'll try and get CUDA 6 working and keep you posted. If I get it, i'll clean up the process and post that too.

    Edit:

    It's looking promising!

    deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 6.5, CUDA Runtime Version = 6.0, NumDevs = 1, Device0 = GeForce GT 740M
    Result = PASS
    Last edited by staticn0de; 2014-07-11 at 10:24.

  37. #37
    Join Date
    2014-Jul
    Posts
    9
    staticn0de, thankyou for the work that went into this write up. It worked really well. I did have one issue but solved it here: https://wiki.archlinux.org/index.php/bumblebee
    Last edited by London; 2014-07-12 at 13:32.

  38. #38
    Join Date
    2013-Aug
    Location
    lost in space
    Posts
    580
    that's cool

    even though most can figure it out for themselves, I was thinking that maybe(?) it would be nice to have all the command lines, and links to, an OFF_LINE installation. There's nothing wrong with this procedure as is, but we already DLing CUDA (and now probly new NVIDIA drivers), so maybe DL everything and than install?

    I'm not a big fan of being dependent on the Internet for installations, for one, and I've had my connexion cut or network manager shut down my connexion while fallowing this guide more than once. Nothing bad happened as a result, but it made me think that I'd be better off-line.

    So without changing this guide(because it works beautifully), an 'off-Line Annex' would be appreciated. Just a link in the first post pointing to another post with the command lines/links to firstly DL everything and then the command lines to install from Home *if I have everything I need in Home maybe the whole installation can be scripted hmmm [evil laugh]* Just saying.
    Kali Linux USB Installation using LinuxLive USB Creator
    Howto Install HDD Kali on a USB Key
    Clean your laptop fan | basic knowledge

  39. #39
    Join Date
    2014-Apr
    Location
    Down Under
    Posts
    315
    Quote Originally Posted by Quest View Post
    that's cool

    even though most can figure it out for themselves, I was thinking that maybe(?) it would be nice to have all the command lines, and links to, an OFF_LINE installation. There's nothing wrong with this procedure as is, but we already DLing CUDA (and now probly new NVIDIA drivers), so maybe DL everything and than install?
    Hmmm I like the idea, it would save some effort. My concern is that bumblebee is a decent effort to compile and then install. That, and it has dependencies. And those dependencies have dependencies.Trying to install all them without a repo would be a pain.

    On another note, if you can't go to the mountain, you can always bring the mountain to you. You could host your own repo on your local network. I've looked into it but Kali looks after it a little different to other distros where you can just clone them with rsync. If you had a local repo, you won't need the internet anymore. This clearly isn't the solution for everyone....

    In short, I don't really have the time (and maybe not the skill!) to document the requirements for this as an offline install. Although, I'm about to type up the CUDA6 and NVIDIA 340.24 version and with the exception of bumblebee (not bumblebee-nvidia) it is an offline install. It's easier to install than what I already wrote as it does not need manual modifications to nvidia-uvm.ko.
    Last edited by staticn0de; 2014-07-13 at 10:16.

  40. #40
    Join Date
    2014-Apr
    Location
    Down Under
    Posts
    315
    The following will install the latest at the time (340.24) NVIDIA driver and latest CUDA (version 6) on Kali with
    Bumblebee for Optimus laptops. Usual notes about clean installs and selecting either 32bit or 64bit depending on your
    needs from the first page still apply.

    First, update and upgrade Kali to latest
    apt-get update && apt-get upgrade && apt-get dist-upgrade

    Download VirtualGL
    http://downloads.sourceforge.net/pro...se_mirror=ufpr

    Download CUDA (this is V6 64bit)
    http://developer.download.nvidia.com...7_linux_64.run

    Download the nvidia*.run driver. Follow the bouncing ball to get what you need for your hardware
    http://www.nvidia.com/Download/index.aspx?lang=en-us

    Install VirtualGL
    cd ~
    dpkg -i virtualgl*.deb


    Add the path for VirtualGL to .bashrc
    nano ~/.bashrc
    Add a line somewhere near the top that reads:
    export PATH=$PATH:/opt/VirtualGL/bin

    Export the path so we don't have to log out and in. Run the following from terminal
    export PATH=$PATH:/opt/VirtualGL/bin

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

    Some dependencies for CUDA later
    apt-get install freeglut3-dev libxmu-dev


    Add the wheezy backports Repo (yes, still needed for bumblebee but not the NVIDIA driver)
    nano /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-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

    We do not need to edit line 55 as the module the nvidia installer will build is called nvidia and not nvidia-current.

    Save and close.

    Run the following and record your PCI address for your video card. It will look similar to 03:00.0

    lspci | egrep 'VGA|3D'

    Edit xorg.conf.nvidia and 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"


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

    When rebooted, run optirun glxspheres64 and confirm it's working. A 'modinfo nvidia' will show that you now have the 340.24 module loaded.

    To install CUDA, chmod the installer first
    cd ~
    chmod +x cuda*.run


    And now to install
    ./cuda*.run

    Accept the EULA
    Select yes to unsupporrted configuration
    No to graphics driver
    Yes to the toolkit
    Accept default location
    Yes to symbolic link
    Yes to samples
    Yes to default samples location
    The toolkit will install

    For the path, we will add a little more to what we defined for VirtualGL. It should look like this in your bashrc file
    nano ~./bashrc
    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

    Code:
    include /etc/ld.so.conf.d/*.conf
    /usr/local/cuda-6.0/lib64
    Save and close

    Run:
    ldconfig

    Build the nvidia samples

    cd /root/NVIDIA_CUDA-6.0_Samples
    make


    Follow the steps from the second post to run the CUDA deviceQuery script and you should see pass.

    Remember to remove or comment out the wheezy backports repo
    Last edited by staticn0de; 2014-09-14 at 10:31.

  41. #41
    Join Date
    2014-Aug
    Posts
    1
    Quote Originally Posted by staticn0de View Post
    The following will install the latest at the time (340.24) NVIDIA driver and latest CUDA (version 6) on Kali with
    Bumblebee for Optimus laptops. Usual notes about clean installs and selecting either 32bit or 64bit depending on your
    needs from the first page still apply.

    First, update and upgrade Kali to latest
    apt-get update && apt-get upgrade && apt-get dist-upgrade

    Download VirtualGL
    http://downloads.sourceforge.net/pro...se_mirror=ufpr

    Download CUDA (this is V6 64bit)
    http://developer.download.nvidia.com...7_linux_64.run

    Download the nvidia*.run driver. Follow the bouncing ball to get what you need for your hardware
    http://www.nvidia.com/Download/index.aspx?lang=en-us

    Install VirtualGL
    cd ~
    dpkg -i virtualgl*.deb


    Add the path for VirtualGL to .bashrc
    nano ~/.bashrc
    Add a line somewhere near the top that reads:
    export PATH=$PATH:/opt/VirtualGL/bin

    Export the path so we don't have to log out and in. Run the following from terminal
    export PATH=$PATH:/opt/VirtualGL/bin

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

    Some dependencies for CUDA later
    apt-get install freeglut3-dev libxmu-dev


    Add the wheezy backports Repo (yes, still needed for bumblebee but not the NVIDIA driver)
    nano /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-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

    We do not need to edit line 55 as the module the nvidia installer will build is called nvidia and not nvidia-current.

    Save and close.

    Run the following and record your PCI address for your video card. It will look similar to 03:00.0

    lspci | egrep 'VGA|3D'

    Edit xorg.conf.nvidia and 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 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 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

    When rebooted, run optirun glxspheres64 and confirm it's working. A 'modinfo nvidia' will show that you now have the 340.24 module loaded.

    To install CUDA, chmod the installer first
    cd ~
    chmod +x cuda*.run


    And now to install
    ./cuda*.run

    Accept the EULA
    Select yes to unsupporrted configuration
    No to graphics driver
    Yes to the toolkit
    Accept default location
    Yes to symbolic link
    Yes to samples
    Yes to default samples location
    The toolkit will install

    For the path, we will add a little more to what we defined for VirtualGL. It should look like this in your bashrc file
    nano ~./bashrc
    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

    Code:
    include /etc/ld.so.conf.d/*.conf
    /usr/local/cuda-6.0/lib64
    Save and close

    Run:
    ldconfig

    Build the nvidia samples

    cd /root/NVIDIA_CUDA-6.0_Samples
    make


    Follow the steps from the second post to run the CUDA deviceQuery script and you should see pass.

    Remember to remove or comment out the wheezy backports repo
    Hi Static,

    first things first: Sorry for my english, im German ^^

    thx a lot for your How-To!

    I have a Lenovo Y500 Ideapad with 2 GT650m SLI, 16GB RAM, Intel i7.
    I have several Problems getting my GPU's to run properly with the Nvidia Driver.
    Is there any way you can help me - i mean to chat with you over Whatsapp or something like that, sendind you Images from my Screen and having a real time help?
    I am willing to pay for your efforts.

    As I checked my Hardware in Windows there are only the both Nvidia GPU's listed, no Intel onboard GPU.
    The Cards support Optimus technology, following the Nvidia Website, but do i really need Optimus, if there is no Intel onboard GPU?

    Following your How-To step by step i get stuck after editing the Bumblebee .conf, i added both BusID's of the GPU's and the SLI Option

    Section "Device"
    Identifier "DiscreteNvidia"
    Driver "nvidia"
    VendorName "NVIDIA Corporation"
    BusID "PCI:01:00:0"
    BusID "PCI:02:00:0"
    and activating the SLI in the Options.

    After restarting bumblebee and stopping the GDM3 Service i get a black Screen with blinking cursor -> no way to get to TTY1 with "ALT CTRL F1", nor any other Hotkeys working.
    I worked around that booting in the Recovery Mode in Console.

    In Recovery mode its no Problem stopping the GDM3 and installing Nvidia.
    After rebooting i tried the optirun glxspheres64 -> Error.

    I also tried an other How-To without Bumblebee:
    http://www.blackmoreops.com/2014/03/...er-kali-linux/

    -> eveything worked fine (yeah, i edited the Xorg.conf with both BusID's and SLI and MultiGPU Option) until step 6
    In booting process after the boot information "GDM3 start", my screens gets Black, flashing one time for a second, getting black again, then both GT650m's Fans getting full thrust (airflow getting very hot) and after 30 secs or something the Laptopn shuts down - no way to get to TTY1 or anything -> no way to have any influence after the GDM3 starts.

    After reading many many Hours in Forums, HOW-To's, the Nvidia Support section, and the official Nvidia Documentation i have no Clue what to do.

    Would be nice to get an answer from You.

  42. #42
    Join Date
    2014-Apr
    Location
    Down Under
    Posts
    315
    Quote Originally Posted by Steffen025 View Post
    Hi Static,

    first things first: Sorry for my english, im German ^^

    thx a lot for your How-To!

    I have a Lenovo Y500 Ideapad with 2 GT650m SLI, 16GB RAM, Intel i7.
    I have several Problems getting my GPU's to run properly with the Nvidia Driver.
    Is there any way you can help me - i mean to chat with you over Whatsapp or something like that, sendind you Images from my Screen and having a real time help?
    I am willing to pay for your efforts.

    As I checked my Hardware in Windows there are only the both Nvidia GPU's listed, no Intel onboard GPU.
    The Cards support Optimus technology, following the Nvidia Website, but do i really need Optimus, if there is no Intel onboard GPU?

    Following your How-To step by step i get stuck after editing the Bumblebee .conf, i added both BusID's of the GPU's and the SLI Option

    Section "Device"
    Identifier "DiscreteNvidia"
    Driver "nvidia"
    VendorName "NVIDIA Corporation"
    BusID "PCI:01:00:0"
    BusID "PCI:02:00:0"
    and activating the SLI in the Options.

    After restarting bumblebee and stopping the GDM3 Service i get a black Screen with blinking cursor -> no way to get to TTY1 with "ALT CTRL F1", nor any other Hotkeys working.
    I worked around that booting in the Recovery Mode in Console.

    In Recovery mode its no Problem stopping the GDM3 and installing Nvidia.
    After rebooting i tried the optirun glxspheres64 -> Error.

    I also tried an other How-To without Bumblebee:
    http://www.blackmoreops.com/2014/03/...er-kali-linux/

    -> eveything worked fine (yeah, i edited the Xorg.conf with both BusID's and SLI and MultiGPU Option) until step 6
    In booting process after the boot information "GDM3 start", my screens gets Black, flashing one time for a second, getting black again, then both GT650m's Fans getting full thrust (airflow getting very hot) and after 30 secs or something the Laptopn shuts down - no way to get to TTY1 or anything -> no way to have any influence after the GDM3 starts.

    After reading many many Hours in Forums, HOW-To's, the Nvidia Support section, and the official Nvidia Documentation i have no Clue what to do.

    Would be nice to get an answer from You.
    Hi there,

    I don't have SLI in my laptop so this is not somehting I have worked with. Another forum member had issues with SLI and I replied with some information I found and they never came back, it was either very useful or not useful at all so give it a try.

    First, post the output of the following so I can tell you if you need optimus at all

    Code:
    lspci | egrep 'VGA|3D'
    This is the post I replied about SLI

    https://forums.kali.org/showthread.p...ll=1#post35604

    If you don't have the onboard intel you do not need optimus. If it's just enabling SLI, it should be as *easy* as installing NVIDIA, enabling SLI in XORG and rebooting. Lets see how we go.

    If you don't need optimus and installed bumblebee, it would do an awesome job at killing your graphics.

  43. #43
    Join Date
    2014-Jul
    Posts
    9
    staticn0de, thank you for the write-up!

    I did everything succesfully and the tests worked, but I'm unsure about a few things.
    1. If the nVidia driver automatically removes nouveau then why is there a xorg.conf.nouveau file in the /etc/bumblebee directory?
    2. How can I make sure the nVidia driver is the default driver at startup?
    3. Lastly, when I lsmod | grep nvidia there is no output, when I lsmod | grep nouveau there is also no output. Shouldn't at least one of them show something?

  44. #44
    Join Date
    2014-Apr
    Location
    Down Under
    Posts
    315
    Quote Originally Posted by London View Post
    staticn0de, thank you for the write-up!

    I did everything succesfully and the tests worked, but I'm unsure about a few things.
    1. If the nVidia driver automatically removes nouveau then why is there a xorg.conf.nouveau file in the /etc/bumblebee directory?
    2. How can I make sure the nVidia driver is the default driver at startup?
    3. Lastly, when I lsmod | grep nvidia there is no output, when I lsmod | grep nouveau there is also no output. Shouldn't at least one of them show something?
    Hi there, don't mistake my guide as making me an expert on bumblebee, but i'll try and answer your question.

    1. The nvidia driver does not remove nouveau, bumblebee changes between the graphics card which includes disabling one driver and enabling the nvidia driver. Both remain on the system. The xorg.conf.nouveau does not matter as it is only called if you set driver=nouveau in the bumblebee.conf file.

    2. You don't set nvidia to start at start up. The reason bumblebee is used is so you can benefit from the power saving of having the intel card in use when the graphics card is not needed. When you use optirun glxspheres64 (for example) the nvidia card is enabled which uses more power so that the graphicly demanding application has a performance boost.

    3. Unless you have used optirun, the nvidia modules will not be loaded. For example, run the command lsmod | grep -i nvidia and you will receive nothing. Run optirun glxspheres64 and while it is running use lsmod | grep -i nvidia and it will display the nvidia modules are the driver has loaded to use the discrete card.

  45. #45
    Join Date
    2014-Jul
    Posts
    9
    Thank you! that really brings it all together for me. I usually have to run the optispheres64 command twice before it works, but everything is working perfectly other than that. Really appreciate it!

  46. #46
    Join Date
    2013-Aug
    Location
    lost in space
    Posts
    580

    Cool

    Code:
    root@kali:~/NVIDIA_CUDA-6.0_Samples/1_Utilities/deviceQuery# optirun ./deviceQuery
    ./deviceQuery Starting...
    
     CUDA Device Query (Runtime API) version (CUDART static linking)
    
    Detected 1 CUDA Capable device(s)
    
    Device 0: "GeForce GT 630M"
      CUDA Driver Version / Runtime Version          6.5 / 6.0
      CUDA Capability Major/Minor version number:    2.1
      Total amount of global memory:                 2048 MBytes (2147155968 bytes)
      ( 2) Multiprocessors, ( 48) CUDA Cores/MP:     96 CUDA Cores
      GPU Clock rate:                                950 MHz (0.95 GHz)
      Memory Clock rate:                             900 Mhz
      Memory Bus Width:                              128-bit
      L2 Cache Size:                                 131072 bytes
      Maximum Texture Dimension Size (x,y,z)         1D=(65536), 2D=(65536, 65535), 3D=(2048, 2048, 2048)
      Maximum Layered 1D Texture Size, (num) layers  1D=(16384), 2048 layers
      Maximum Layered 2D Texture Size, (num) layers  2D=(16384, 16384), 2048 layers
      Total amount of constant memory:               65536 bytes
      Total amount of shared memory per block:       49152 bytes
      Total number of registers available per block: 32768
      Warp size:                                     32
      Maximum number of threads per multiprocessor:  1536
      Maximum number of threads per block:           1024
      Max dimension size of a thread block (x,y,z): (1024, 1024, 64)
      Max dimension size of a grid size    (x,y,z): (65535, 65535, 65535)
      Maximum memory pitch:                          2147483647 bytes
      Texture alignment:                             512 bytes
      Concurrent copy and kernel execution:          Yes with 1 copy engine(s)
      Run time limit on kernels:                     Yes
      Integrated GPU sharing Host Memory:            No
      Support host page-locked memory mapping:       Yes
      Alignment requirement for Surfaces:            Yes
      Device has ECC support:                        Disabled
      Device supports Unified Addressing (UVA):      Yes
      Device PCI Bus ID / PCI location ID:           1 / 0
      Compute Mode:
         < Default (multiple host threads can use ::cudaSetDevice() with device simultaneously) >
    
    deviceQuery, CUDA Driver = CUDART, CUDA Driver Version = 6.5, CUDA Runtime Version = 6.0, NumDevs = 1, Device0 = GeForce GT 630M
    Result = PASS
    root@kali:~/NVIDIA_CUDA-6.0_Samples/1_Utilities/deviceQuery#
    i have to tell ya, I've been meaning to do this now for over 7 months with a week of intense web search, and that last Howto above f i n a l l y did it!

    Many thanks staticn0de ! =]
    Kali Linux USB Installation using LinuxLive USB Creator
    Howto Install HDD Kali on a USB Key
    Clean your laptop fan | basic knowledge

  47. #47
    Join Date
    2014-Apr
    Location
    Down Under
    Posts
    315
    Hi Quest,

    I'm happy to hear that. I'll update the first post so others know the newer drivers may work in lieu of the old.

    Thanks for posting to let everyone know it worked for you.

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

  49. #49
    Join Date
    2014-Jul
    Posts
    2
    Quote Originally Posted by staticn0de View Post
    Run the command below to confirm that bumblebee is working
    optirun glxspheres64
    Hi,
    I have the following problem: when I enter this last command optirun glxspheres64, my screen goes totally black and my nvidia vgas start to run on full speed (vents go on full throttle) and after 20s my laptop shuts down. I suppose my hardware causes the peoblem, I have 3VGAs: the integrated intel hd4400, and 2 nvidia gt750M. I don't want to use SLI, I only want to use one VGA which makes me able to change the kali's resolution to fullhd.

  50. #50
    Join Date
    2014-Apr
    Location
    Down Under
    Posts
    315
    Quote Originally Posted by barni123 View Post
    Hi,
    I have the following problem: when I enter this last command optirun glxspheres64, my screen goes totally black and my nvidia vgas start to run on full speed (vents go on full throttle) and after 20s my laptop shuts down. I suppose my hardware causes the peoblem, I have 3VGAs: the integrated intel hd4400, and 2 nvidia gt750M. I don't want to use SLI, I only want to use one VGA which makes me able to change the kali's resolution to fullhd.
    Hi there,

    I've been doing some reading on SLI (I have just about the cheapest laptop I could buy so I don't have it) and it requires a little extra configuration in the /etc/bumblebee/xorg.conf.nvidia file.

    So, when you run the command:
    Code:
    lspci | grep VGA
    You should see two nvidia cards with two BusID. You will need to configure both within the /etc/bumblebee/xorg.conf.nvidia file.

    So, within that file, add those BusIDs under the Device section. After that, you need to find the section which includes a bunch of "Option" settings (bottom of the file). Add a new line with:
    Code:
    Option "SLI" "AA"
    Read more about it here, it's writen for arch but the config files are the same. https://wiki.archlinux.org/index.php...A#Enabling_SLI

    Did you use the latest Nvidia 340 drivers or did you install the ones from the first post? If you tried the first post, try the latest drivers.

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
  •