Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
howtos:hardware:nvidia_optimus [2013/09/20 18:36 (UTC)]
whitewolf1776 [Sources]
howtos:hardware:nvidia_optimus [2015/04/24 06:03 (UTC)]
tommyc
Line 10: Line 10:
 You should also note the terminal commands used on this page. The code lines that begin with ''​$''​ refers to commands to be run by a regular user, and ''#''​ refers to commands to be run as root or a user with sufficient privileges. You should also note the terminal commands used on this page. The code lines that begin with ''​$''​ refers to commands to be run by a regular user, and ''#''​ refers to commands to be run as root or a user with sufficient privileges.
  
-Also please note the differences between Bumblebee and bumblebeedbumblebeed ​is the daemon for bumblebee.+Also please note the differences between Bumblebee and bumblebeebumblebee ​is the daemon for bumblebee.
 </​note>​ </​note>​
  
Line 20: Line 20:
 ==== Installing Bumblebee ==== ==== Installing Bumblebee ====
 ---- ----
 +=== The Automated Way ===
 +There is a new, automated way of installing Bumblebee thanks to Slacker: Ryan McQuen.
 +<note warning>​USE AT YOUR OWN RISK!
 +If you have modified the SlackBuilds in any way, this script may not be for you.</​note>​
 +
 +You can run this as root:
 +<​code>​
 +curl https://​raw.githubusercontent.com/​ryanpcmcquen/​linuxTweaks/​master/​slackware/​crazybee.sh | sh
 +</​code>​
 +
 +Alternatively you can download the script and run it as root on your system directly.
 +
 +This script detects multilib, creates the necessary group, adds users and applies the necessary /​etc/​rc.d/​rc.local entries and also comes with a stable option which can be used by passing this instead:
 +
 +<​code>​
 +curl https://​raw.githubusercontent.com/​ryanpcmcquen/​linuxTweaks/​master/​slackware/​crazybee.sh | STABLE=yes sh
 +</​code>​
 +
 +It also uses upgradepkg'​s %%--%%reinstall %%--%%install-new features for use after kernel upgrades.
 +=== The Manual Way ===
 === Getting the SlackBuilds === === Getting the SlackBuilds ===
-A fellow Slacker, jgeboski, ​provides ​SlackBuilds that mostly follow the [[http://​www.slackbuilds.org/​guidelines/​|SlackBuilds.org]] requirements for Bumblebee on [[https://​github.com/​jgeboski/​Bumblebee-SlackBuilds|github]]. Remember to check which directory you're in first, as they will be downloaded to that directory. Assuming you're ready, the SlackBuilds can simply be git cloned as such. Then we're going to change into the new directory and begin the build process.+A fellow Slacker, jgeboski, ​originally provided ​SlackBuilds that mostly follow the [[http://​www.slackbuilds.org/​guidelines/​|SlackBuilds.org]] requirements for Bumblebee. Now, another Slacker has taken over where he has left off on his own [[https://​github.com/​WhiteWolf1776/​Bumblebee-SlackBuilds|github ​repo]]. Remember to check which directory you're in first, as they will be downloaded to that directory. Assuming you're ready, the SlackBuilds can simply be git cloned as such. Then we're going to change into the new directory and begin the build process.
 <​code>​ <​code>​
-$ git clone https://​github.com/​jgeboski/​Bumblebee-SlackBuilds.git+$ git clone https://​github.com/​whitewolf1776/​Bumblebee-SlackBuilds.git
 $ cd Bumblebee-SlackBuilds $ cd Bumblebee-SlackBuilds
 </​code>​ </​code>​
Line 29: Line 49:
 Or you can download the full tarball containing the SlackBuilds instead: Or you can download the full tarball containing the SlackBuilds instead:
 <​code>​ <​code>​
-$ wget --content-disposition https://​github.com/​jgeboski/​Bumblebee-SlackBuilds/​tarball/​master +$ wget --content-disposition https://​github.com/​whitewolf1776/​Bumblebee-SlackBuilds/​tarball/​master 
-$ tar xf jgeboski-Bumblebee-SlackBuilds-<​changing hexadecimal> ​   # Tab completion is helpful. +$ tar -xf whitewolf1776-Bumblebee-SlackBuilds-<​changing hexadecimal> ​   # Tab completion is helpful. 
-$ cd jgeboski-Bumblebee-SlackBuilds+$ cd whitewolf1776-Bumblebee-SlackBuilds
 </​code>​ </​code>​
 There is a README file, but you probably won't be reading it as you're reading this instead, so we're basically going to post it here. There is a README file, but you probably won't be reading it as you're reading this instead, so we're basically going to post it here.
  
-=== Getting the Dependencies ​=== +=== Getting the Source Files === 
-The dependencies, as with all SlackBuilds,​ must be downloaded manually and placed into their respective directories. ​However ​the SLACKBUILDS.TXT file does give links for the downloads ​as well as their MD5SUMs to make sure the files were not corrupt. You can use the provided script to download them and check them against their MD5SUM for corruption, like this:+The source files, as with all SlackBuilds,​ must be downloaded manually and placed into their respective directories. ​Amongst ​the repos are a SLACKBUILDS.TXT file that does give links for the source files as well as their MD5SUMs to make sure the files were not corrupt. You can use the provided script to download them and check them against their MD5SUM for corruption, like this:
 <code sh> <code sh>
 ./​download.sh ./​download.sh
Line 50: Line 70:
  
 === Building and Installing Bumblebee'​s Core === === Building and Installing Bumblebee'​s Core ===
-1. Build and install: bbswitch (optional but highly recommended), libbsd and bumblebeed in order as you go.+1. Build and install: bbswitch (optional but highly recommended).
 <​code>​ <​code>​
 # cd bbswitch # You don't actually need to ''​cd''​ as root, but who wants to ''​su''​ all the time? # cd bbswitch # You don't actually need to ''​cd''​ as root, but who wants to ''​su''​ all the time?
 # ./​bbswitch.SlackBuild # ./​bbswitch.SlackBuild
 # upgradepkg --install-new bbswitch-*.t?​z # upgradepkg --install-new bbswitch-*.t?​z
 +</​code>​
 +
 +2. Build and install: libbsd (required).
 +<​code>​
 # cd ../libbsd # cd ../libbsd
 # ./​libbsd.SlackBuild # ./​libbsd.SlackBuild
 # upgradepkg --install-new libbsd-*.t?​z # upgradepkg --install-new libbsd-*.t?​z
-# cd ../bumblebeed +</​code>​ 
-# ./bumblebeed.SlackBuild+ 
 +3. Build and install: bumblebee (obviously required). 
 +<​code>​ 
 +# cd ../bumblebee 
 +# ./bumblebee.SlackBuild
 # upgradepkg --install-new bumblebee-*.t?​z # upgradepkg --install-new bumblebee-*.t?​z
 </​code>​ </​code>​
Line 69: Line 97:
 <​note>​Bumblebee can use either primusrun (requires a mesa rebuild in Slackware 14.0 and below) or bumblebee'​s own optirun. Take your pick which one you would like to use (or you can install both). Each one has their own advantages and disadvantages. <​note>​Bumblebee can use either primusrun (requires a mesa rebuild in Slackware 14.0 and below) or bumblebee'​s own optirun. Take your pick which one you would like to use (or you can install both). Each one has their own advantages and disadvantages.
 </​note>​ </​note>​
 +
 +=== Primus ===
 +Primus, like optirun (instructions below) can be used to run your desired program via bumblebee. Primus also comes with a COMPAT32 option as well.
 +
 +<note warning>
 +If you are using Slackware 14.0 or older you need to rebuild mesa. The new github repository does not offer a SlackBuild for mesa to support Slackware 14.0 or older. Therefore you must use Slackware 14.1 or newer, or rebuild mesa manually with a different script. One can choose to use the old repository and simply update the SlackBuild script appropriately,​ or add ''​%%--%%enable-shared-glapi''​ into a mesa.SlackBuild from the source of a newer Slackware version.
 +<​code>​
 +# # For the old repository, one would have done:
 +# cd ../mesa
 +# ./​mesa.SlackBuild
 +</​code>​
 +mesa does not have a COMPAT32 option because it is an official Slackware package, but you can easily create the compat32 package after creating the original package by using:
 +<​code>​
 +# ./​mesa-compat32.SlackBuild # Only in the old repository
 +</​code>​
 +</​note>​
 +
 +1. Build and install: primus
 +<​code>​
 +# cd ../primus
 +# ./​primus.SlackBuild
 +# upgradepkg --install-new primus-*.t?​z
 +</​code>​
 +<​code>​
 +# COMPAT32=yes ./​primus.SlackBuild
 +</​code>​
  
 === VirtualGL === === VirtualGL ===
 +VirtualGL provides support for optirun that also allows one to run programs via bumblebee. However, it is recommended that one uses primusrun for a few reasons. ​
 +<note warning>
 +Although VirtualGL (and its dependency libjpeg-turbo) are still supported by the Bumblebee project and maintained by their developers, the new github repo does not include SlackBuild scripts for these packages. This section is for the old github repository that was once maintained by jgeboski. If you would like to use VirtualGL (e.g. you're in one of the rare cases where VirtualGL provides better performance than primus) then you can use your own personal SlackBuilds or the old ones (although the old SlackBuilds will be out-of-date).
 +</​note>​
 1. Build and install: libjpeg-turbo (32-bit compatibility available) 1. Build and install: libjpeg-turbo (32-bit compatibility available)
 <​code>​ <​code>​
Line 95: Line 153:
 <​code>​ <​code>​
 # COMPAT32=yes ./​VirtualGL.SlackBuild # COMPAT32=yes ./​VirtualGL.SlackBuild
-</​code>​ 
- 
-=== Primus === 
-Primus is another program designed to be used much like optirun. However, primus does not require VirtualGL (and therefore will not require libjpeg-turbo as well) but only requires mesa with %%--%%enable-shared-glapi (Slackware 14.0 and below must have mesa rebuilt). Primus also comes with a COMPAT32 option as well. 
- 
-1. Rebuild mesa if you're using Slackware 14.0 or older 
-<​code>​ 
-# cd ../mesa 
-# ./​mesa.SlackBuild 
-</​code>​ 
- 
-mesa does not have a COMPAT32 option because it is a Slackware official package, but you can easily create the compat32 package after creating the original package by using: 
-<​code>​ 
-# ./​mesa-compat32.SlackBuild # located in the same directory as mesa.SlackBuild 
-</​code>​ 
- 
-2. Build and install: primus 
-<​code>​ 
-# cd ../primus 
-# ./​primus.SlackBuild 
-# upgradepkg --install-new primus-*.t?​z 
-</​code>​ 
-<​code>​ 
-# COMPAT32=yes ./​primus.SlackBuild 
 </​code>​ </​code>​
  
Line 124: Line 158:
 If you want to use the nVidia proprietary drivers, you must not use nouveau, as the drivers interfere with each other. This can be prevented by removing nouveau, installing xf86-video-nouveau-blacklist from /extra, or blacklisting nouveau manually. If you want to use the nVidia proprietary drivers, you must not use nouveau, as the drivers interfere with each other. This can be prevented by removing nouveau, installing xf86-video-nouveau-blacklist from /extra, or blacklisting nouveau manually.
  
-<​note>​ 
 This part is entirely optional. Slackware 13.37 and above comes with xf86-video-nouveau,​ the open source nVidia graphics card drivers. If you are using this, you do not need the closed source proprietary nVidia drivers. However, if you wish to use the closed source drivers, then install the packages listed in this section before going on. This part is entirely optional. Slackware 13.37 and above comes with xf86-video-nouveau,​ the open source nVidia graphics card drivers. If you are using this, you do not need the closed source proprietary nVidia drivers. However, if you wish to use the closed source drivers, then install the packages listed in this section before going on.
  
 <note warning> <note warning>
-Some nvidia driver versions are incompatible with certain kernel versions. One example is nvidia's 319.32 ​driver ​and the 3.10.* kernel ​seriesIn order to use the official proprietary ​nvidia ​319.32 ​driver with the 3.10.* kernel series, one had to apply this patch: http://​sprunge.us/​UaaH or use a newer version of the driver that does support ​the kernel version. You can also [[http://​www.slackbuilds.org/​faq/#​version_update|follow the SlackBuilds.org guideline ​when newer version ​is out and the maintainer has not updated it]].+Some nvidia driver versions are incompatible with certain kernel versions ​and vice versa (some kernel versions are incompatible with some nvidia driver ​versions) for various reasonsA specific ​kernel ​configuration,​ a specific nvidia driver against a specific kernel version amongst other possibilitiesGenerally it is best to use the nvidia driver ​package provided along with the kernel ​packages provided by your Slackware ​version. You can also [[http://​www.slackbuilds.org/​faq/#​version_update|follow the SlackBuilds.org guideline]] for manually updating ​a version ​of some software yourself
 </​note>​ </​note>​
  
-1Build and installlibvdpau ​(Now required to assist in building the newer nvidia-bumblebee packages)+<​note>​If you are using Slackware 14.1 or older, you will need to install libvdpau. Newer Slackware versions now ship libvdpau.
 <​code>​ <​code>​
 # cd ../libvdpau # cd ../libvdpau
Line 137: Line 170:
 # upgradepkg --install-new libvdpau-*.t?​z # upgradepkg --install-new libvdpau-*.t?​z
 </​code>​ </​code>​
 +</​note>​
  
-2. Build and install: nvidia-bumblebee+1. Build and install: nvidia-bumblebee
 <code sh> <code sh>
 # cd ../​nvidia-bumblebee # cd ../​nvidia-bumblebee
Line 148: Line 182:
 </​code>​ </​code>​
  
-3. Build and install: nvidia-kernel+2. Build and install: nvidia-kernel
 <code sh> <code sh>
 # cd ../​nvidia-kernel # cd ../​nvidia-kernel
Line 154: Line 188:
 # upgradepkg --install-new nvidia-kernel-*.t?​z # upgradepkg --install-new nvidia-kernel-*.t?​z
 </​code>​ </​code>​
-<​code>​ 
-# COMPAT32=yes ./​nvidia-kernel.SlackBuild # Only for 32-bit compatible binaries and libraries on an x86_64 based system. 
-</​code>​ 
-</​note>​ 
-Now that we have those 32-bit compatible and optional packages out of the way, let us build what remains. 
 ==== Post-Installation ==== ==== Post-Installation ====
-Excellent. Now we're ready to do some post-installation setup. The bumblebeed ​package provided us with an rc.bumblebeed ​script in /etc/rc.d where the other startup scripts are also located. Remember to make this script executable and, if you so desire, start it!+Excellent. Now we're ready to do some post-installation setup. The bumblebee ​package provided us with an rc.bumblebee ​script in /etc/rc.d where the other startup scripts are also located. Remember to make this script executable and, if you so desire, start it!
 <​code>​ <​code>​
 # chmod +x /​etc/​rc.d/​rc.bumblebeed # chmod +x /​etc/​rc.d/​rc.bumblebeed
Line 171: Line 200:
 </​code>​ </​code>​
  
-You can even go a step further by having ​bumblebeed ​stop with your system by adding the following lines to /​etc/​rc.d/​rc.local_shutdown. You can create this file if it does not exist.+You can even go a step further by having ​bumblebee ​stop with your system by adding the following lines to /​etc/​rc.d/​rc.local_shutdown. You can create this file if it does not exist.
 <code sh> <code sh>
 [ -x /​etc/​rc.d/​rc.bumblebeed ] && /​etc/​rc.d/​rc.bumblebeed stop [ -x /​etc/​rc.d/​rc.bumblebeed ] && /​etc/​rc.d/​rc.bumblebeed stop
Line 242: Line 271:
   * Bumblebee Project Wiki: [[https://​github.com/​Bumblebee-Project/​Bumblebee/​wiki]]   * Bumblebee Project Wiki: [[https://​github.com/​Bumblebee-Project/​Bumblebee/​wiki]]
   * For making this page possible: [[https://​github.com/​jgeboski/​|jgeboski]]   * For making this page possible: [[https://​github.com/​jgeboski/​|jgeboski]]
-  * SlackBuilds:​ https://​github.com/​jgeboski/​Bumblebee-SlackBuilds+  * Original ​SlackBuilds:​ https://​github.com/​jgeboski/​Bumblebee-SlackBuilds 
 +  * New SlackBuilds:​ https://​github.com/​whitewolf1776/​Bumblebee-SlackBuilds
   * Originally written by [[wiki:​user:​tommyc | TommyC]]   * Originally written by [[wiki:​user:​tommyc | TommyC]]
  
 <!-- Please do not modify anything below, except adding new tags.--> <!-- Please do not modify anything below, except adding new tags.-->
 {{tag>​howtos software hardware nvidia author_tommyc}} {{tag>​howtos software hardware nvidia author_tommyc}}

In Other Languages
QR Code
QR Code howtos:hardware:nvidia_optimus (generated for current page)