Results 1 to 50 of 376

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

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Join Date
    2013-Aug
    Location
    lost in space
    Posts
    580
    that's 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

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

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

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

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

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
  •