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

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

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

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

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
  •