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
    Quote Originally Posted by nab View Post
    Hi staticn0de!
    First, thank for your guide. it helped me a lot. The result show pass.
    But i don't know is it working? I see in system setting->details: it don't show graphics driver!
    Then i tried test:
    glxinfo | grep -i "direct rendering"
    It show:
    Xlib: extension "GLX" missing on display ":0.0".
    Xlib: extension "GLX" missing on display ":0.0".
    Xlib: extension "GLX" missing on display ":0.0".
    Xlib: extension "GLX" missing on display ":0.0".
    Xlib: extension "GLX" missing on display ":0.0".
    Error: couldn't find RGB GLX visual or fbconfig
    Xlib: extension "GLX" missing on display ":0.0".
    Xlib: extension "GLX" missing on display ":0.0".
    Xlib: extension "GLX" missing on display ":0.0".
    Xlib: extension "GLX" missing on display ":0.0".
    Xlib: extension "GLX" missing on display ":0.0".
    Xlib: extension "GLX" missing on display ":0.0".
    Xlib: extension "GLX" missing on display ":0.0".

    Is it problem?
    Hi there,

    Prefix your command with optirun.

    If you have a pass from the cuda device detect script the driver is working. You must prefix commands which require the driver to be loaded with optirun.

    The nvidia card is disabled during normal use to save power. Optirun enables it for the duration the program running needs it

  2. #2
    Join Date
    2014-Aug
    Posts
    2
    Quote Originally Posted by staticn0de View Post
    Hi there,

    Prefix your command with optirun.

    If you have a pass from the cuda device detect script the driver is working. You must prefix commands which require the driver to be loaded with optirun.

    The nvidia card is disabled during normal use to save power. Optirun enables it for the duration the program running needs it
    Oh, it working. thank you.
    And one more thing i can't understand. nvidia-settings require me do nvdia-xconfig. If i do , X server can't start and i have to remove xorg.conf. it like cycle! (sr my bad english)

  3. #3
    Join Date
    2014-Aug
    Location
    lotusland
    Posts
    3
    Hi static, first, thanks for taking me further along the road to installing my cuda drivers than I had thought possible, outstanding instructions. Like the fellow above me, when I run "optirun glxinfo | grep -i "direct rendering"", I get the following:

    [ 205.729643] [ERROR]Cannot access secondary GPU - error: [XORG] (EE) NVIDIA(GPU-0): Failed to initialize the NVIDIA GPU at PCI:1:0:0. Please

    [ 205.729694] [ERROR]Aborting because fallback start is disabled.


    Dual boot win7/ kali 1.08 AMD64, lenovo w530

    Bumblebee isn't starting for whatever reason. Any thoughts? Thanks.

  4. #4
    I followed latest instructions using latest Nvidia drivers but now my Nvidia card is running all the time.
    It wont switch to Intel. Also should we not be installing bumblebee-nvidia as we are now using official drivers?
    Kali boots using Intel and as soon as you use optirun or primerun it loads Nvidia and then never switches it off.
    Last edited by nekromantik; 2014-08-08 at 10:26.

  5. #5
    Join Date
    2014-Apr
    Location
    Down Under
    Posts
    315
    Quote Originally Posted by nekromantik View Post
    I followed latest instructions using latest Nvidia drivers but now my Nvidia card is running all the time.
    It wont switch to Intel. Also should we not be installing bumblebee-nvidia as we are now using official drivers?
    Kali boots using Intel and as soon as you use optirun or primerun it loads Nvidia and then never switches it off.

    Please post the output of

    lsmod

    and

    cat /proc/acpi/bbswitch

    No. bumblebee-nvidia is a meta package which installs both the bumbelbee and nvidia-driver packages. The nvidia-driver package in the repo is old and not supported by many modern graphics cards. That is why the driver package is downloaded from the nvidia website.

    If you are stuck on the nvidia driver and will not swap to the power saving one, try

    service bumblebeed restart

    and

    service bumblebeed status

    Also, how do you know the driver is being loaded and not being switched off?

    For example, run

    Code:
    optirun glxspheres64
    and then run

    Code:
    glxspheres64
    Did the second command work without optirun?

  6. #6
    Join Date
    2014-Aug
    Posts
    3
    Even I am experiencing the same problem!! I am a new member to this forum and kali linux too, so forgive me if there are any mistakes.
    the second command works fine (the one without optirun)
    for me the optirun glxspheres64 returns

    [ 3224.482379] [ERROR]Cannot access secondary GPU - error: X did not start properly

    [ 3224.482467] [ERROR]Aborting because fallback start is disabled.

  7. #7
    Join Date
    2014-Apr
    Location
    Down Under
    Posts
    315
    Quote Originally Posted by Xperianist View Post
    Even I am experiencing the same problem!! I am a new member to this forum and kali linux too, so forgive me if there are any mistakes.
    the second command works fine (the one without optirun)
    for me the optirun glxspheres64 returns

    [ 3224.482379] [ERROR]Cannot access secondary GPU - error: X did not start properly

    [ 3224.482467] [ERROR]Aborting because fallback start is disabled.

    Hi there,

    Please try the following commands one after each other and post all the output

    Code:
    lspci | egrep 'VGA|3D'
    Code:
    echo ON >> /proc/acpi/bbswitch
    Code:
    modprobe nvidia
    Code:
    modprobe nvidia-uvm
    Code:
    optirun glxspheres64
    Code:
    dmesg | tail -n 100
    Code:
    echo $PATH
    Code:
    cat /etc/bumblebee/bumblebee.conf
    Code:
    cat /etc/bumblebee/xorg.conf.nvidia
    Code:
    service bumblebeed restart
    Last edited by staticn0de; 2014-08-11 at 09:05.

  8. #8
    Join Date
    2014-Aug
    Posts
    3

    Post

    Thanks for the reply!

    Code:
       lspci | egrep 'VGA|3D'
                  00:02.0 VGA compatible controller: Intel Corporation Haswell-ULT Integrated Graphics Controller (rev 09)
                  0a:00.0 3D controller: NVIDIA Corporation Device 1292 (rev ff)


    Code:
    root@Kali:~# echo ON >> /proc/acpi/bbswitch
               root@Kali:~# modprobe nvidia
               root@Kali:~# modprobe nvidia-uvm
               root@Kali:~# optirun glxspheres64
               [  196.534830] [ERROR]Cannot access secondary GPU - error: X did not start properly
    
                [  196.534915] [ERROR]Aborting because fallback start is disabled.

    Code:
    root@Kali:~# dmesg | tail -n 100
    [    7.833718] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
    [    7.977371] uvcvideo: Found UVC 1.00 device HP Truevision HD (04f2:b40d)
    [    7.986270] input: HP Truevision HD as /devices/pci0000:00/0000:00:14.0/usb1/1-3/1-3:1.0/input/input10
    [    7.986450] usbcore: registered new interface driver uvcvideo
    [    7.986451] USB Video Class driver (1.1.1)
    [    8.115977] usb 1-2: ath9k_htc: Firmware htc_9271.fw requested
    [    8.116096] usbcore: registered new interface driver ath9k_htc
    [    8.375737] cfg80211: World regulatory domain updated:
    [    8.375741] cfg80211:  DFS Master region: unset
    [    8.375741] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
    [    8.375745] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm)
    [    8.375746] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)
    [    8.375748] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm)
    [    8.375749] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm)
    [    8.375751] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm)
    [    8.375752] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm)
    [    8.512885] usb 1-2: firmware: direct-loading firmware htc_9271.fw
    [    8.746372] Console: switching to colour frame buffer device 170x48
    [    8.752407] i915 0000:00:02.0: fb0: inteldrmfb frame buffer device
    [    8.752410] i915 0000:00:02.0: registered panic notifier
    [    8.753259] [Firmware Bug]: ACPI(PEGP) defines _DOD but not _DOS
    [    8.753984] ACPI: Video Device [PEGP] (multi-head: yes  rom: yes  post: no)
    [    8.754174] ACPI Error: [\_SB_.PCI0.GFX0.DD02._BCL] Namespace lookup failure, AE_NOT_FOUND (20131218/psargs-359)
    [    8.754184] ACPI Error: Method parse/execution failed [\_SB_.PCI0.RP05.PEGP.DD02._BCL] (Node ffff88015e8806f0), AE_NOT_FOUND (20131218/psparse-536)
    [    8.754299] input: Video Bus as /devices/LNXSYSTM:00/device:00/PNP0A08:00/device:19/LNXVIDEO:00/input/input11
    [    8.795342] usb 1-2: ath9k_htc: Transferred FW: htc_9271.fw, size: 51272
    [    8.796068] [drm] Enabling RC6 states: RC6 on, RC6p off, RC6pp off
    [    8.799829] ACPI: Video Device [GFX0] (multi-head: yes  rom: no  post: no)
    [    8.844430] acpi device:3b: registered as cooling_device5
    [    8.844704] input: Video Bus as /devices/LNXSYSTM:00/device:00/PNP0A08:00/LNXVIDEO:01/input/input12
    [    8.844935] [drm] Initialized i915 1.6.0 20080730 for 0000:00:02.0 on minor 0
    [    8.846918] snd_hda_intel 0000:00:1b.0: irq 61 for MSI/MSI-X
    [    8.852338] snd_hda_intel 0000:00:03.0: irq 62 for MSI/MSI-X
    [    8.997402] input: HDA Intel HDMI HDMI/DP,pcm=8 as /devices/pci0000:00/0000:00:03.0/sound/card0/input15
    [    8.997663] input: HDA Intel HDMI HDMI/DP,pcm=7 as /devices/pci0000:00/0000:00:03.0/sound/card0/input14
    [    8.997888] input: HDA Intel HDMI HDMI/DP,pcm=3 as /devices/pci0000:00/0000:00:03.0/sound/card0/input13
    [    9.026024] input: HDA Intel PCH Headphone as /devices/pci0000:00/0000:00:1b.0/sound/card1/input17
    [    9.026238] input: HDA Intel PCH Mic as /devices/pci0000:00/0000:00:1b.0/sound/card1/input16
    [    9.032636] ath9k_htc 1-2:1.0: ath9k_htc: HTC initialized with 33 credits
    [    9.298616] ath9k_htc 1-2:1.0: ath9k_htc: FW Version: 1.3
    [    9.298623] ath: EEPROM regdomain: 0x809c
    [    9.298626] ath: EEPROM indicates we should expect a country code
    [    9.298629] ath: doing EEPROM country->regdmn map search
    [    9.298631] ath: country maps to regdmn code: 0x52
    [    9.298635] ath: Country alpha2 being used: CN
    [    9.298637] ath: Regpair used: 0x52
    [    9.303397] ieee80211 phy1: Atheros AR9271 Rev:1
    [    9.303431] cfg80211: Calling CRDA for country: CN
    [    9.310588] cfg80211: Regulatory domain changed to country: CN
    [    9.310596] cfg80211:  DFS Master region: unset
    [    9.310599] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
    [    9.310603] cfg80211:   (2402000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm)
    [    9.310606] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2300 mBm)
    [    9.310609] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz), (N/A, 2300 mBm)
    [    9.310612] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 3000 mBm)
    [    9.310615] cfg80211:   (57240000 KHz - 59400000 KHz @ 2160000 KHz), (N/A, 2800 mBm)
    [    9.310618] cfg80211:   (59400000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4400 mBm)
    [    9.310620] cfg80211:   (63720000 KHz - 65880000 KHz @ 2160000 KHz), (N/A, 2800 mBm)
    [   11.865869] EXT4-fs (sda5): re-mounted. Opts: (null)
    [   15.144614] EXT4-fs (sda5): re-mounted. Opts: errors=remount-ro
    [   15.589589] loop: module loaded
    [   19.478453] Netfilter messages via NETLINK v0.30.
    [   19.547083] bbswitch: version 0.8
    [   19.547099] bbswitch: Found integrated VGA device 0000:00:02.0: \_SB_.PCI0.GFX0
    [   19.547111] bbswitch: Found discrete VGA device 0000:0a:00.0: \_SB_.PCI0.RP05.PEGP
    [   19.547131] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131218/nsarguments-95)
    [   19.547286] bbswitch: detected an Optimus _DSM function
    [   19.547311] pci 0000:0a:00.0: enabling device (0006 -> 0007)
    [   19.547418] bbswitch: Succesfully loaded. Discrete card 0000:0a:00.0 is on
    [   19.552195] bbswitch: disabling discrete graphics
    [   19.552222] ACPI Warning: \_SB_.PCI0.RP05.PEGP._DSM: Argument #4 type mismatch - Found [Buffer], ACPI requires [Package] (20131218/nsarguments-95)
    [   25.557236] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
    [   31.072128] r8169 0000:09:00.0: firmware: direct-loading firmware rtl_nic/rtl8106e-2.fw
    [   31.105575] r8169 0000:09:00.0 eth0: link down
    [   31.105630] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [   35.640636] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
    [   36.758510] r8169 0000:09:00.0 eth0: link down
    [   36.758584] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
    [   37.367795] IPv6: ADDRCONF(NETDEV_UP): wlan1: link is not ready
    [   41.386377] wlan1: authenticate with 9c:8e:dc:1d:35:8c
    [   41.677621] wlan1: send auth to 9c:8e:dc:1d:35:8c (try 1/3)
    [   41.679346] wlan1: authenticated
    [   41.681608] wlan1: associate with 9c:8e:dc:1d:35:8c (try 1/3)
    [   41.685362] wlan1: RX AssocResp from 9c:8e:dc:1d:35:8c (capab=0x411 status=0 aid=1)
    [   41.695106] wlan1: associated
    [   41.695139] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
    [   41.695214] cfg80211: Calling CRDA for country: TW
    [   41.702625] cfg80211: Regulatory domain changed to country: TW
    [   41.702632] cfg80211:  DFS Master region: unset
    [   41.702635] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
    [   41.702640] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 3000 mBm)
    [   41.702643] cfg80211:   (5270000 KHz - 5330000 KHz @ 40000 KHz), (N/A, 1700 mBm)
    [   41.702646] cfg80211:   (5490000 KHz - 5590000 KHz @ 80000 KHz), (N/A, 3000 mBm)
    [   41.702648] cfg80211:   (5650000 KHz - 5710000 KHz @ 40000 KHz), (N/A, 3000 mBm)
    [   41.702651] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 3000 mBm)
    [  181.701038] bbswitch: enabling discrete graphics
    [  192.293592] nvidia: module license 'NVIDIA' taints kernel.
    [  192.293599] Disabling lock debugging due to kernel taint
    [  192.314235] NVRM: loading NVIDIA UNIX x86_64 Kernel Module  331.67  Fri Apr  4 13:48:39 PDT 2014
    [  192.410048] nvidia_uvm: Loaded the UVM driver, major device number 249
    Code:
    root@Kali:~# echo $PATH
    /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/opt/VirtualGL/bin:/opt/VirtualGL

  9. #9
    Join Date
    2014-Apr
    Location
    Down Under
    Posts
    315
    @Xperianist

    For your path, you don't need the second /opt/VirtualGL (you have it at the end) as there is no bins in that folder. Additonal paths can break your install.

    That being said, I don't think that is the issue. I can see you have installed the older drivers. I have left those there for a kind of legacy reason but you should use the latest drivers which start at post 25.

    I know it is most likely not what you are looking for but the newer drivers will most likely fix your issue ( as they have for quite a few people now)

    As for your partiular fault, do you have an Nvidia GT750M?

  10. #10
    Join Date
    2014-Aug
    Posts
    3
    Code:
    root@Kali:~# 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@Kali:~# 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:0a: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

  11. #11
    Quote Originally Posted by staticn0de View Post
    Please post the output of

    lsmod

    and

    cat /proc/acpi/bbswitch

    No. bumblebee-nvidia is a meta package which installs both the bumbelbee and nvidia-driver packages. The nvidia-driver package in the repo is old and not supported by many modern graphics cards. That is why the driver package is downloaded from the nvidia website.

    If you are stuck on the nvidia driver and will not swap to the power saving one, try

    service bumblebeed restart

    and

    service bumblebeed status

    Also, how do you know the driver is being loaded and not being switched off?

    For example, run

    Code:
    optirun glxspheres64
    and then run

    Code:
    glxspheres64
    Did the second command work without optirun?
    It seems like bbswitch was not installed by default.
    I installed it and now it switches fine.
    Thanks

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
  •