#17 Fix formatting of bumblebee.adoc
Merged 6 years ago by jsmith. Opened 6 years ago by mayorga.
fedora-docs/ mayorga/quick-docs conversion_fixes  into  master

file modified
+1 -1
@@ -58,7 +58,7 @@ 

      File: autoupdates

    - Name: (FIX ME!) Building a custom kernel

      File: build-custom-kernel

-   - Name: (FIX ME!) Bumblebee

+   - Name: Bumblebee

      File: bumblebee

    - Name: (FIX ME!) Creating GPG Keys

      File: create-gpg-keys

file modified
+405 -445
@@ -1,551 +1,511 @@ 

- = Bumblebee

+ include::en-US/3rdparty-message.adoc[]

  

- '''

+ [[description]]

+ == Description

  

- [IMPORTANT]

- ======

+ NVIDIA Optimus is an optimization technology created by NVIDIA which, depending on the resource load generated by client software applications, will transparently and seamlessly switch between two graphics adapters within a computer system in order to provide either maximum performance or minimum power draw from the system's graphics rendering hardware.

+ From https://github.com/Bumblebee-Project/Bumblebee/wiki/FAQ[Bumblebee's FAQ]: Bumblebee is a effort to make NVIDIA Optimus enabled laptops work in GNU/Linux systems.

+ Such feature involves two graphics cards with two different power consumption profiles plugged in a layered way sharing a single framebuffer.

  

- This page was automatically converted from https://fedoraproject.org/wiki/Bumblebee

+ The discrete GPU (NVIDIA) is turned off when not in use and activated and turned on though ACPI calls when demanding OpenGL applications require the extra power the discrete GPU can give.

  

- It is probably

+ Demanding OpenGL applications might include such things as 3D games or 3D rendering software but would not include such things as a web browser or a video playback program like mplayer or VLC.

  

- * Badly formatted

- * Missing graphics and tables that do not convert well from mediawiki

- * Out-of-date

- * In need of other love

+ [[determine-wether-your-computer-supports-optimus]]

+ == Determine whether your computer supports Optimus

  

- Pull requests accepted at https://pagure.io/fedora-docs/quick-docs

+ If you have a laptop with an NVIDIA graphics card (usually you can tell by looking for an NVIDIA logo sticker on it), then it _might_ support the Optimus technology.

+ If you don't have an optimus technology computer nothing in this documentation is relevant to your PC.

+ (Optimus was slated at one point to go in desktop PCs but the industry ended up rejecting that concept…)

  

- Once you've fixed this page, remove this notice, and update

- `_topic_map.yml`.

+ * To tell, after you have installed the OS, open a terminal window and type:

+ +

+ ----

+ $ lspci -vnn | grep '\''[030[02]\]'

+ ----

  

- Once the document is live, go to the original wiki page and replace its text

- with the following macro:

+ * If you see two video cards in the output like:

+ +

+ ----

+ 00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 520 [8086:1916] (rev 07) (prog-if 00 [VGA controller])

+ 01:00.0 3D controller [0302]: NVIDIA Corporation GM108M [GeForce 930M] [10de:1346] (rev ff) (prog-if ff)

+ ----

  

- ....

- {{#fedoradocs: https://docs.fedoraproject.org/whatever-the-of-this-new-page}}

- ....

+ And one is a Intel Integrated Graphics Controller and the other is a NVIDIA Corporation chip, then you probably have an optimus notebook.

  

- ======

+ To further verify, if you have the two VGA devices with one as Intel Integrated and other as NVIDIA, as *root* look for the `/sys/kernel/debug/vgaswitcheroo/switch` file.

+ If it exists, then you have an optimus PC.

+ If its missing, then you might not.

+ (It might be that you have a card that nouveau can’t use yet because it is too new…)

  

- '''

+ [[before-you-get-started]]

+ == Preparing your system

  

+ Most users will want to turn off Secure boot in the BIOS or UEFI screen when you need nvidia drivers or bbswitch-dkms.

+ If you want to make your own public / private keys for kernel module signing you can look https://docs.fedoraproject.org/f{MAJOROSVER}/system-administrators-guide/kernel-module-driver-configuration/Working_with_Kernel_Modules.html#sect-signing-kernel-module-with-the-private-key[here] or https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-signing-kernel-modules-for-secure-boot.html[here] for more information on the subject.

+ If you end up doing that and use the closed source NVIDIA driver, you will need to edit the `/etc/bumblebee/bumblebee-nvidia-sign.conf` file.

  

- [[description]]

- Description

- ~~~~~~~~~~~

- 

- Nvidia Optimus is an optimization technology created by Nvidia which,

- depending on the resource load generated by client software

- applications, will transparently and seamlessly switch between two

- graphics adapters within a computer system in order to provide either

- maximum performance or minimum power draw from the system's graphics

- rendering hardware. From

- https://github.com/Bumblebee-Project/Bumblebee/wiki/FAQ[Bumblebee's

- FAQ]: Bumblebee is a effort to make Nvidia Optimus enabled laptops work

- in GNU/Linux systems. Such feature involves two graphics cards with two

- different power consumption profiles plugged in a layered way sharing a

- single framebuffer.

- 

- The discrete GPU (NVidia) is turned off when not in use and activated

- and turned on though ACPI calls when demanding OpenGL applications

- require the extra power the discrete GPU can give. Demanding OpenGL

- applications might include such things as 3D games or 3D rendering

- software but would not include such things as a web browser or a video

- playback program like mplayer or VLC.

- 

- [[how-can-you-tell-if-you-have-an-optimus-notebook-computer]]

- How can you tell if you have an optimus notebook computer?

- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- 

- If you purchased a notebook with an NVidia sticker on it, you _might_

- have a optimus computer. If you don’t have an optimus technology

- computer nothing in this documentation is relevant to your PC. (Optimus

- was slated at one point to go in desktop PCs but the industry ended up

- rejecting that concept…)

- 

- To tell, after you have installed the OS, open a terminal window and

- type:

- 

- ....

- $ lspci | grep 'VGA\|3D'

- ....

- 

- If you see two video cards in the output like:

- 

- ....

- $ lspci | grep 'VGA\|3D'

- 00:02.0 VGA compatible controller: Intel Corporation HD Graphics 530 (rev 06)

- 02:00.0 3D controller: NVIDIA Corporation GM108M [GeForce 940MX] (rev a2)

- ....

- 

- And one is a Intel “Integrated Graphics Controller” and the other is a

- “NVIDIA Corporation” chip, then you probably have an optimus notebook.

- 

- To further verify, if you have the two VGA devices with one as Intel

- Integrated and other as NVIDIA, as root look for the

- /sys/kernel/debug/vgaswitcheroo/switch file. If it exists, then you have

- an optimus PC. If its missing, then you might not. (It might be that you

- have a card that nouveau can’t use yet because it is too new…)

- 

- [[before-you-get-started]]

- Before you get started

- ~~~~~~~~~~~~~~~~~~~~~~

- 

- Most users will want to turn off “Secure boot” in the bios or UEFI

- screen when you need nvidia drivers or bbswitch-dkms. If you want to

- make your own public / private keys for kernel module signing you can

- look

- https://docs.fedoraproject.org/en-US/Fedora/22/html/System_Administrators_Guide/sect-signing-kernel-module-with-the-private-key.html[here]

- or

- https://access.redhat.com/documentation/en-US/Red_Hat_Enterprise_Linux/7/html/System_Administrators_Guide/sect-signing-kernel-modules-for-secure-boot.html[here]

- for more information on the subject. If you end up doing that and use

- the closed source NVidia driver, you will need to edit the

- /etc/bumblebee/bumblebee-nvidia-sign.conf file.

- 

- Next, do a dnf update before you begin. And just to be safe, reboot your

- PC so that you are booted into the newest kernel. The reason for this is

- that you want the kernel-devel package to match the kernel you are

- running under. If you don’t reboot after a dnf update these versions may

- differ which will cause compiling problems.

+ Next, run `dnf update` before you begin.

+ And just to be safe, reboot your PC so that you are booted into the newest kernel.

+ The reason for this is that you want the kernel-devel package to match the kernel you are running under.

+ If you don't reboot after a `dnf update` these versions may differ which will cause compiling problems.

  

  [[installation]]

- Installation

- ~~~~~~~~~~~~

- 

- [[for-free-or-open-source-solution]]

- For free or open source solution

- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- 

- Some users http://www.kroah.com/log/linux/stable_api_nonsense.html[feel

- strongly] that they should not use closed source kernel modules. This is

- understandable. In all cases,

- http://nouveau.freedesktop.org/wiki/Optimus/[PRIME] will work better

- then using bumblebee.

- 

- In fact, you can no longer use the bumblebee software with nouveau any

- longer even if you want to. See

- https://github.com/Bumblebee-Project/Bumblebee/issues/773[issue 773] for

- further information about this subject. You *MUST USE PRIME*. The

- nouveau driver already handles power saving nowadays so bumblebee would

- just be superfluous…

- 

- [[for-closed-source-solution]]

- For closed source solution

- ^^^^^^^^^^^^^^^^^^^^^^^^^^

- 

- Do not use the NVidia video drivers from *http://rpmfusion.org/*,

- *http://negativo17.org/*. I’m sure they are fine drivers and I am not

- trying to criticize them at all. But they *DO NOT support or work* with

- bumblebee without modifications. I have created a pair of drivers

- packages you may use that require no modifications to work. There is a

- managed version which contains a reasonably recent “long lived branch”

- driver blob. There is also a unmanaged repo which contains an empty

- drivers package. The unmanaged version requires you to download a “blob”

- from http://www.nvidia.com/object/unix.html[here] and then copy the file

- manually to the /etc/sysconfig/nvidia/ directory as root. You might need

- the “unmanaged” version if your laptop requires a “legacy” driver

- version or if you need the “short lived branch” driver for some reason.

- Do not install both the managed and unmanaged repos. You should pick one

- or the other depending on your needs. If you are unsure which to use,

- use the managed repo.

- 

- *Special note concerning versions 355.11-375.10:*

- 

- There is a bug which prevents certain versions from working with the

- unmanaged version of the bumblebee-nvidia shell script wrapper. I have

- opened a discussion thread

- https://devtalk.nvidia.com/default/topic/885657/linux/can-t-install-driver-to-work-with-bumblebee-with-version-355-11/[here]

- concerning this problem. See also

- https://github.com/NVIDIA/nvidia-installer/issues/1[this issue] on

- github.com. If you use a version older then 355.11 or newer then 375.10

- you should be ok. If you need one in between those you’ll have to patch

- and compile the nvidia-installer program yourself to get it to work.

- You’d need to disable the symlink check and the runtime check within the

- c code which is what we did for a while there with the “managed”

- version.

- 

- [[for-closed-source-solution-fedora]]

- For closed source solution fedora

- ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

- 

- Add bumblebee repo:

- 

- ....

- # dnf -y --nogpgcheck install http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee/fedora$(rpm -E %fedora)/noarch/bumblebee-release-1.2-1.noarch.rpm

- ....

- 

- Managed NVidia repo:

- 

- ....

- # dnf -y --nogpgcheck install http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee-nonfree/fedora$(rpm -E %fedora)/noarch/bumblebee-nonfree-release-1.2-1.noarch.rpm

- ....

- 

- or Unmanaged NVidia repo:

- 

- ....

- # dnf -y --nogpgcheck install http://install.linux.ncsu.edu/pub/yum/itecs/public/bumblebee-nonfree-unmanaged/fedora$(rpm -E %fedora)/noarch/bumblebee-nonfree-unmanaged-release-1.2-1.noarch.rpm

- ....

- 

- '''Remember, you do not want to install both the managed and unmanaged

- repos. Pick one or the other but not both! '''

- 

- No multilib fedora 23+:

- 

- ....

- # dnf install bumblebee-nvidia bbswitch-dkms primus kernel-devel

- ....

- 

- Multilib on a 64 bit install fedora 23+: (You may need to add additional

- 32 bit packages to get your 32 bit applications to work with

- bumblebee/primus)

- 

- ....

- # dnf install bumblebee-nvidia bbswitch-dkms VirtualGL.x86_64 VirtualGL.i686 primus.x86_64 primus.i686 kernel-devel

- ....

- 

- You will need to reboot before you can test if its working. *If you used

- the “unmanaged” repo don’t forget to copy the NVidia “blob” to

- /etc/sysconfig/nvidia/ before you reboot!* Most folks will want the

- “managed” version rather then the “unmanaged” version.

- 

- [[using-bumblebee-software]]

- Using bumblebee software

- ~~~~~~~~~~~~~~~~~~~~~~~~

- 

- *General usage*

- 

- ....

+ == Types of Drivers

+ 

+ [[nouveau]]

+ === Free and Open Source Driver (Nouveau)

+ 

+ NOTE: As of May 20th, 2016 you can no longer use Bumblebee with the open source Nouveau drivers.

+ If you wish to learn more about this, see https://github.com/Bumblebee-Project/Bumblebee/issues/773[issue 773].

+ Users are requested to use *Prime* instead of Bumblebee.

+ Since the nouveau driver already handles power saving now, using bumblebee would simply be superfluous.

+ 

+ Some users http://www.kroah.com/log/linux/stable_api_nonsense.html[feel strongly] that they should not use closed source kernel modules.

+ This is understandable.

+ In all cases, http://nouveau.freedesktop.org/wiki/Optimus/[PRIME] will work better then using Bumblebee.

+ 

+ In fact, you can no longer use the Bumblebee software with nouveau any longer even if you want to.

+ See https://github.com/Bumblebee-Project/Bumblebee/issues/773[issue 773] for further information about this subject.

+ You *MUST USE PRIME*.

+ The nouveau driver already handles power saving nowadays so Bumblebee would just be superfluous…

+ 

+ [[proprietary-driver]]

+ === Proprietary Closed Source Driver (NVIDIA)

+ 

+ Some users may prefer to use the closed-source proprietary drivers as they offer better performance than the open source ones.

+ In that case, there's two sources from where you can get your drivers: http://rpmfusion.org[RPMFusion] and http://negativo17.org/[Negativo17]. Although both these sources are valid and will work, the Negativo17 driver is generally recommended over the RPMFusion ones, as the Negativo17 drivers are generally kept up to date and follow Fedora packaging guidelines better. They have also been known to work with Fedora to improve integration.

+ 

+ NOTE: The Installation process detailed below uses the Negativo17 repository.

+ If you wish to use the RPMFusion repository instead, please adjust the steps according to your requirement

+ 

+ == Installation (NVIDIA Proprietary Driver)

+ 

+ . To install the NVIDIA drivers, first add the Negativo17 repository:

+ +

+ ----

+ # sudo dnf config-manager --add-repo=https://negativo17.org/repos/fedora-nvidia.repo

+ ----

+ 

+ . Then, install the necessary packages:

+ +

+ ----

+ # sudo dnf install nvidia-driver kernel-devel akmod-nvidia dkms acpi

+ ----

+ 

+ . To get Bumblebee, we first need to enable the https://copr.fedorainfracloud.org/coprs/chenxiaolong/bumblebee/ chenxiaolong/bumblebee[Copr repository]:

+ +

+ ----

+ # dnf copr enable chenxiaolong/bumblebee

+ ----

+ 

+ . Next, install the bbswitch driver, and the `bumblebee` and `primus` packages.

+ +

+ ----

+ # dnf install akmod-bbswitch bumblebee primus

+ ----

+ 

+ . For the `optirun` and `primusrun` commands to work, the current user must be added to the `bumblebee` group.

+ +

+ ----

+ # gpasswd -a $USER bumblebee

+ ----

+ 

+ . Enable the `bumblebeed` service and disable the `nvidia-fallback` service. This service comes from the Negativo17 drivers and will attempt to load `nouveau` if `nvidia` fails to load. However, when using Bumblebee, neither one should load at boot.

+ +

+ ----

+ # systemctl enable bumblebeed

+ # systemctl disable nvidia-fallback

+ ----

+ 

+ Finally, reboot and bumblebee should be ready to go.

+ 

+ [[usage]]

+ == Usage

+ 

+ * General usage syntax:

+ +

+ ----

  $ optirun [options] application [application-parameters]

- ....

- 

- For example, start a Windows applications with optimus named

- application.exe:

+ ----

  

- ....

+ * To start a Windows applications with optimus named application.exe:

+ +

+ ----

  $ optirun wine application.exe

- ....

- 

- For another example, open NVidia settings panel with optimus:

+ ----

  

- ....

+ * For another example, open NVidia settings panel with optimus:

+ +

+ ----

  $ optirun -b none nvidia-settings -c :8

- ....

+ ----

  

- For another example, open the java based Minecraft with primus bridge:

- 

- ....

+ * For another example, open the java based Minecraft with primus bridge:

+ +

+ ----

  $ optirun -b primus java -jar /PATH/TO/Minecraft.jar

- ....

- 

- For a list of the options for optirun, view its manual page:

+ ----

  

- ....

+ * For a list of the options for optirun, view its manual page:

+ +

+ ----

  $ man optirun

- ....

- 

- In general, using the primus bridge gives better performance then using

- the default VirtualGL bridge. In bumblebee 4.0 (coming soon) primus will

- become the default bridge and VirtuaGL will need to be called explicitly

- if you still want it. Also beginning with bumblebee 4.0 (coming soon)

- the VirtuaGL dependency will be replaced with a primus dependency

- instead. So you might not even have VirtuaGL installed by default in the

- future.

+ ----

  

- For primus, there is a separate shell script you can use to invoke it

- called “primusrun.”

+ In general, using the Primus bridge gives better performance then using the default VirtualGL bridge.

+ In Bumblebee 4.0 (coming soon) Primus will become the default bridge and VirtuaGL will need to be called explicitly if you still want it.

+ Also beginning with bumblebee 4.0 (coming soon) the VirtuaGL dependency will be replaced with a Primus dependency instead.

+ So you might not even have VirtuaGL installed by default in the future.

  

- For a list of the options for primusrun, view its manual page:

+ For Primus, there is a separate shell script you can use to invoke it called `primusrun`.

  

- ....

+ * For a list of the options for primusrun, view its manual page:

+ +

+ ----

  $ man primusrun

- ....

+ ----

  

- ....

+ * These are functionally equivalent commands:

+ +

+ ----

  $ primusrun java -jar /PATH/TO/Minecraft.jar

- ....

+ ----

  

- and

- 

- ....

+ * and

+ +

+ ----

  $ optirun -b primus java -jar /PATH/TO/Minecraft.jar

- ....

+ ----

+ 

+ It may become tedious to always use the optirun program in a terminal to launch 3D games or other 3D opengl applications.

+ You may wish to create desktop launchers which use the `optirun` or `primusrun` commands in order to streamline this process.

+ 

+ For example, in the MATE desktop environment, when you right click on an empty space in the desktop a popup menu is displayed.

+ One option on this menu is btn:[Create launcher…] which allows you to create a graphical launcher icon for your apps which can be left on the desktop or moved into some folder.

+ Other desktop environments also offer this functionality though the methods differ from desktop to desktop.

  

- are functionally equivalent commands.

+ [[uninstallation]]

+ == Uninstallation

  

- It may become tedious to always use the optirun program in a terminal to

- launch 3D games or other 3D opengl applications. You may wish to create

- desktop launchers which use the optirun or primusrun commands in order

- to streamline this process.

+ * To uninstall Bumblebee:

+ +

+ ----

+ # dnf remove akmod-bbswitch bumblebee primus

+ # systemctl preset nvidia-fallback

+ ----

  

- For example, in MATE desktop environment, when you right click on an

- empty space in the desktop a popup menu is displayed. One option on this

- menu is “Create launcher..” which allows you to create a graphical

- launcher icon for your apps which can be left on the desktop or moved

- into some folder. Other desktop environments also offer this

- functionality though the methods differ from desktop to desktop.

+ * To remove the `bumblebee` repository:

+ +

+ ----

+ # dnf copr remove chenxiaolong/bumblebee

+ ----

  

- [[multi-monitor-setup-with-closed-driver]]

- Multi monitor setup with closed driver

- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ * To uninstall the NVIDIA drivers:

+ +

+ ----

+ # dnf remove nvidia-driver kernel-devel akmod-nvidia

+ ----

  

- Optimus laptops have two video chips: an integrated Intel and a discrete

- NVidia one. If the port (DisplayPort / HDMI / VGA) is wired to the Intel

- chip, you do not need to do anything special to get external monitors to

- work.

+ * To remove the Negativo17 repository:

+ +

+ ----

+ # rm /etc/yum.repos.d/fedora-nvidia.repo

+ ----

  

- When the external port is wired into the NVidia chip, you cannot

- currently expand the screen over monitors without extra effort. Read on

- if you fall into this category…

+ Reboot.

  

- Install the intel-gpu-tools package.

+ [[multi-monitor-setup-with-proprietary-driver]]

+ == Multi monitor setup with proprietary driver

  

- ....

+ Optimus laptops have two graphics cards: an integrated Intel and a discrete NVIDIA one.

+ If the port (DisplayPort / HDMI / VGA) is wired to the Intel chip, you do not need to do anything special to get external monitors to work.

+ 

+ When the external port is wired into the NVIDIA card, you cannot currently expand the screen over monitors without extra effort.

+ Read on if you fall into this category…

+ 

+ . Install the `intel-gpu-tools` package.

+ +

+ ----

  # dnf install intel-gpu-tools

- ....

+ ----

  

- Running ‘intel-virtual-output’ (from the intel-gpu-tools rpm) without

- any extra parameters will daemonize itself and detect attached displays

- in the background. It will then perform all the trickery of virtualizing

- and cloning so that the newly attached screen can be used via

- conventional screen management methods, such as cloning/extending with

- xrandr.

+ . Start the `intel-virtual-output` daemon by running the

+ `intel-virtual-output` command with no additional command line options.

+ +

+ ----

+ $ intel-virtual-output

+ ----

  

- For example, if your laptop’s display is called eDP1, and your using a

- external adapter called HDMI1, and you wanted the display to be

- 1920×1080 resolution, you could run the following commands:

+ This daemon will automatically detect attached displays in the background.

+ It will then perform all the trickery of virtualizing and cloning so that the newly attached screen can be used via conventional screen management methods, such as cloning/extending with xrandr.

  

- To have your HDMI screen to the right of your desktop, run:

+ For example, if your laptop's display is called eDP1, and your using a external adapter called HDMI1, and you want the display to be 1920×1080 resolution, you could run the following commands:

  

- ....

+ . To have your HDMI screen to the right of your desktop, run:

+ +

+ ----

  $ xrandr –output eDP1 –mode 1920×1080 –output HDMI1 –mode 1920×1080 –right-of eDP1

- ....

- 

- To clone your desktop, run:

+ ----

  

- ....

+ . To clone your desktop, run:

+ +

+ ----

  $ xrandr –output eDP1 –mode 1920×1080 –output HDMI1 –mode 1920×1080 –same-as eDP1

- ....

- 

- There are many different possibilities. Type xrandr with no arguments to

- see what displays you have attached. See

- https://github.com/Bumblebee-Project/Bumblebee/wiki/Multi-monitor-setup[this

- web page] for further information on this subject. Read the manual page

- for xrandr for even more information on the possibilities this command

- provides.

- 

- If intel-virtual-output works ok running by hand you could add it to

- your startup automatically if you desire. One way would be to create a

- /etc/rc.d/rc.local script and add it into there. Another way might be to

- create a systemd unit file as Type=oneshot. A third way might be to run

- it at login using whatever mechanism your desktop environment supports

- for doing such things. For example, in MATE desktop environment, there

- is a mate-session-properties program (System -> Preferences -> Personal

- -> Startup Applications) that you can run programs from when you login.

- Most desktop environments offer similar functionality though the methods

- differ from desktop to desktop.

+ ----

+ 

+ There are many different possibilities. Type `xrandr` with no arguments to see what displays you have attached.

+ See https://github.com/Bumblebee-Project/Bumblebee/wiki/Multi-monitor-setup[this web page] for further information on this subject.

+ Read the manual page for xrandr for even more information on the possibilities this command provides.

+ 

+ If `intel-virtual-output` works ok running by hand you could add it to your startup automatically if you desire.

+ One way would be to create a `/etc/rc.d/rc.local` script and add it into there.

+ Another way might be to create a systemd unit file as `Type=oneshot`.

+ A third way might be to run it at login using whatever mechanism your desktop environment supports for doing such things.

+ 

+ For example, in the MATE desktop environment, there is a `mate-session-properties` program (System -> Preferences -> Personal -> Startup Applications) that you can run programs from when you login.

+ Most desktop environments offer similar functionality though the methods differ from desktop to desktop.

  

  [[troubleshooting]]

- Troubleshooting

- ~~~~~~~~~~~~~~~

+ == Troubleshooting

+ [[error-could-not-open-display]]

+ === [VGL] ERROR: Could not open display :8

+ 

+ There is a known problem with some wine applications that fork and kill the parent process without keeping track of it (for example the free to play online game "Runes of Magic")

+ 

+ This is a known problem with VirtualGL. As of Bumblebee 3.1, so long as you have it installed, you can use Primus as your render bridge:

+ 

+ ----

+ $ optirun -b primus wine windows program.exe

+ ----

+ 

+ [[error-cannot-access-secondary-gpu]]

+ === [ERROR]Cannot access secondary GPU: No devices detected

+ 

+ In some instances, running `optirun` will return:

+ 

+ ----

+ [ERROR]Cannot access secondary GPU - error: [XORG] (EE) No devices detected.

+ [ERROR]Aborting because fallback start is disabled.

+ ----

  

- When you are using the closed source NVidia drivers, there is a checking

- system you can run. To test, type this command:

+ In this case, you will need to move the file `/etc/X11/xorg.conf.d/20-intel.conf` to somewhere else, restart the bumblebeed daemon and it should work.

+ If you do need to change some features for the Intel module, a workaround is to merge `/etc/X11/xorg.conf.d/20-intel.conf` to `/etc/X11/xorg.conf`.

  

- ....

- $ bumblebee-nvidia --check

- ....

+ It might be also necessary to comment the driver line in `/etc/X11/xorg.conf.d/10-monitor.conf`.

  

- This will tell you if the NVidia driver and bbswitch-dkms compiled into

- the current kernel ok. It works with both the managed and unmanaged

- driver packages.

+ You might also need to define the NVIDIA card somewhere (e.g. `file /etc/bumblebee/xorg.conf.nvidia`), using the correct `BusID` according to `lspci` output:

  

- Some other errors you may encounter form the output from

- bumblebee-nvidia –check

+ ----

+ Section "Device"

+     Identifier "nvidiagpu1"

+     Driver "nvidia"

+     BusID "PCI:0:1:0"

+ EndSection

+ ----

  

- ....

- Error: Too many NVidia blobs in /etc/sysconfig/nvidia/

- Blob count = 2.

- ....

+ Note that the format of `lspci` output is in hexadecimal format, while in xorg it is in decimal.

+ So if the output of `lspci` is, for example, `0a:00.0` the `BusID` should be `PCI:10:0:0`.

  

- This means that there are too many NVidia “blobs” in

- /etc/sysconfig/nvidia/ and the solution is to delete one of them.

+ [[nvidia-failed-to-assign-any-connected-display]]

+ === NVIDIA(0): Failed to assign any connected display devices to X screen 0

  

- ....

- Error: No Nvidia blob in /etc/sysconfig/nvidia/

- ....

+ If the console output is:

  

- This means there is no blob in /etc/sysconfig/nvidia/ and you should

- copy one there if using the unmanaged repo or re-install

- bumblebee-nvidia if using the managed repo. (dnf reinstall

- bumblebee-nvidia)

+ ----

+ [ERROR]Cannot access secondary GPU - error: [XORG] (EE) NVIDIA(0): Failed to assign any connected display devices to X screen 0

+ [ERROR]Aborting because fallback start is disabled.

+ ----

  

- If the module did not compile, you can run:

+ Change this line in `/etc/bumblebee/xorg.conf.nvidia`:

  

- ....

- # bumblebee-nvidia --debug

- ....

+ ----

+ Option "ConnectedMonitor" "DFP"

+ ----

  

- as root or via sudo. This may give you clues as to why the nvidia

- installer was unable to work.

+ to:

  

- Type

+ ----

+ Option "ConnectedMonitor" "CRT"

+ ----

  

- ....

- $ bumblebee-nvidia --help

- ....

+ [[could-not-load-gpu-driver]]

+ === Could not load GPU driver

  

- to see a full list of options the wrapper script provides.

+ If the console output is:

  

- If you see this error:

+ ----

+ [ERROR]Cannot access secondary GPU - error: Could not load GPU driver

+ ----

  

- ....

- [ERROR]You've no permission to communicate with the Bumblebee daemon. Try adding yourself to the 'bumblebee' group

- [ERROR]Could not connect to bumblebee daemon - is it running?

- ....

+ And if you try to load the `nvidia` kernel module you get:

  

- It could be caused by adding another user account to your notebook after

- you have already installed the various bumblebee packages. The solution

- is to run:

+ ----

+ modprobe nvidia

+ modprobe: ERROR: could not insert 'nvidia': Exec format error

+ ----

  

- ....

- # usermod -a -G bumblebee USERNAME

- ....

+ This could be because the nvidia driver is out of sync with the Linux kernel, for example if you installed the latest nvidia driver and haven't updated the kernel in a while.

+ A full system update might resolve the issue.

  

- where *USERNAME* is your account name to add to the bumblebee group. You

- MUST be in the bumblebee group for primusrun or optirun to work.

  

- *Primusrun mouse delay/disable VSYNC*

+ [[failed-to-set-drm-interface-version]]

+ === /dev/dri/card0: failed to set DRM interface version 1.4: Permission denied

  

- For primusrun, VSYNC is enabled by default and as a result, it could

- make mouse input delay lag or even slightly decrease performance. Test

- primusrun without VSYNC:

+ This could be worked around by appending following lines in `/etc/bumblebee/xorg.conf.nvidia`:

  

- ....

+ ----

+ Section "Screen"

+     Identifier "Default Screen"

+     Device "DiscreteNvidia"

+ EndSection

+ ----

+ 

+ [[error-ld.so-object-libdlfaker.so-from-ld-preload]]

+ === ERROR: ld.so: object 'libdlfaker.so' from LD_PRELOAD cannot be preloaded: ignored

+ 

+ You're probably trying to start a 32-bit application with Bumblebee on a 64-bit system.

+ Please install the 32-bit versions of the packages mentioned above.

+ 

+ If the problem persists, please try using the primus bridge that was mentioned above.

+ 

+ [[fatal-io-error-11]]

+ === Fatal IO error 11 (Resource temporarily unavailable) on X server

+ 

+ Change `KeepUnusedXServer` in `/etc/bumblebee/bumblebee.conf` from `false` to `true`.

+ Your program forks into background and bumblebee doesn't know anything about it.

+ 

+ [[video-tearing]]

+ === Video Tearing

+ 

+ Video tearing is a somewhat common problem on Bumblebee.

+ To fix it, you need to enable vsync.

+ It should be enabled by default on the Intel card, but verify that from Xorg logs.

+ To check whether or not it is enabled for NVIDIA, make sure `nvidia-settings` is installed and run:

+ 

+ ----

+ # optirun -b none nvidia-settings -c :8

+ ----

+ 

+ `X Server XVideo Settings -> Sync to VBlank` and `OpenGL Settings -> Sync to VBlank` should both be enabled.

+ 

+ [[bumblebee-cannot-connect-to-socket]]

+ === Bumblebee cannot connect to socket

+ 

+ If the console output is:

+ 

+ ----

+ [ 1648.179533] [ERROR]You've no permission to communicate with the Bumblebee daemon. Try adding yourself to the 'bumblebee' group

+ [ 1648.179628] [ERROR]Could not connect to bumblebee daemon - is it running?

+ ----

+ 

+ Verify whether or not you are in the `bumblebee` group:

+ 

+ ----

+ # groups | grep bumblebee

+ ----

+ 

+ Another reason for this error could be that you haven't actually turned on both gpus in your bios, and as a result, the Bumblebee daemon is in fact not running.

+ Check the bios settings carefully and be sure intel graphics (integrated graphics - may be abbreviated in bios as something like igfx) has been enabled or set to auto, and that it's the primary gpu.

+ Your display should be connected to the onboard integrated graphics, not the discrete graphics card.

+ 

+ If you mistakenly had the display connected to the discrete graphics card and intel graphics was disabled, you probably installed Bumblebee after first trying to run Nvidia alone.

+ In this case, be sure to remove the `/etc/X11/xorg.conf` or `.../20-nvidia...` configuration files. If Xorg is instructed to use NVIDIA in a conf file, X will fail.

+ 

+ [[prismusrun-mouse-delay-disable-vsync]]

+ === Primusrun mouse delay/disable VSYNC

+ 

+ For `primusrun`, VSYNC is enabled by default and as a result, it could make mouse input delay lag or even slightly decrease performance.

+ Test `primusrun` without VSYNC:

+ 

+ ----

  $ vblank_mode=0 primusrun glxgears

- ....

+ ----

  

- *Primus issues under compositing window managers*

+ If you are satisfied with the above setting, create an alias (e.g. `alias primusrun="vblank_mode=0 primusrun"`).

  

- Since compositing hurts performance, invoking primus when a compositing

- WM is active is

- https://github.com/amonakov/primus#issues-under-compositing-wms[not

- recommended]. If you need to use primus with compositing and see

- flickering or bad performance, synchronizing primus’ display thread with

- the application’s rendering thread may help:

+ [[primus-issues-under-compositing]]

+ === Primus issues under compositing window managers

  

- ....

+ Since compositing hurts performance, invoking `primus` when a compositing WM is active is https://github.com/amonakov/primus#issues-under-compositing-wms[not recommended].

+ If you need to use `primus` with compositing and see flickering or bad performance, synchronizing primus’ display thread with the application’s rendering thread may help:

+ 

+ ----

  $ PRIMUS_SYNC=1 primusrun ...

- ....

- 

- *optirun crashes after you boot into “Troubleshooting -> Start Fedora

- Live in basic graphics mode” and do an install that way.*

- 

- If you did an install under “Troubleshooting -> Start Fedora Live in

- basic graphics mode.” bumblebee will not work. You can tell by examining

- the /var/log/Xorg.8.log log file and looking for Kernel command line:

- and seeing nomodeset on that line. When you use “Start Fedora Live in

- basic graphics mode.” it adds “nomodeset” to your kernel command line

- which will cause your machine to use the VESA driver and make bumblebee

- not work. (It will just crash when you try) To fix that, edit

- /etc/default/grub and on the GRUB_CMDLINE_LINUX= line, remove the word

- nomodeset and then save the file, next, either run

- 

- ....

+ ----

+ 

+ WARNING: optirun crashes after you boot into Troubleshooting -> Start Fedora Live in basic graphics mode” and do an install that way.

+ 

+ If you did an install under Troubleshooting -> Start Fedora Live in basic graphics mode, then Bumblebee will not work.

+ You can tell by examining the `/var/log/Xorg.8.log` log file and looking for Kernel command line: and seeing nomodeset on that line.

+ When you use Start Fedora Live in basic graphics mode it adds nomodeset to your kernel command line which will cause your machine to use the VESA driver and make Bumblebee not work.

+ (It will just crash when you try) To fix that, edit `/etc/default/grub` and on the GRUB_CMDLINE_LINUX= line, remove the word nomodeset and then save the file, next, either run:

+ 

+ ----

  # grub2-mkconfig -o /boot/grub2/grub.cfg

- ....

+ ----

  

  on a BIOS based notebook or

  

- ....

+ ----

  # grub2-mkconfig -o /boot/efi/EFI/fedora/grub.cfg

- ....

+ ----

  

- on a UEFI based notebook. Then reboot. After that

- bumblebee/optirun/primusrun should start working.

+ on a UEFI based notebook.

+ Then reboot.

+ After that bumblebee/optirun/primusrun should start working.

  

- [[compatibility-with-recent-laptops-that-have-american-megatrend-bioses]]

- Compatibility with recent laptops that have American Megatrend BIOSes

- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ [[american-megatrend-bios-compatibility]]

+ == American Megatrend BIOS compatibility

  

- Some recent laptop models featuring AMI bioses have some compatibility

- issues with bbswitch and Optimus, making them unable to load into

- graphics mode and crashing every time it is attempted, as discussed in

- further details in this post on the Bumblebee's github:

- https://github.com/Bumblebee-Project/Bumblebee/issues/764#issuecomment-234494238

- .

+ Some recent laptop models featuring AMI bioses have some compatibility issues with bbswitch and Optimus, making them unable to load into graphics mode and crashing every time it is attempted, as discussed in further details https://github.com/Bumblebee-Project/Bumblebee/issues/764#issuecomment-234494238in[this post] on the Bumblebee's GitHub project page.

  

- If you are trying to use Linux on a recent Optimus laptop and it crashes

- every time you try to enter a graphics environment, please try adding

- the following parameters to your boot loader (Fedora users usually have

- GRUB installed):

+ If you are trying to use Linux on a recent Optimus laptop and it crashes every time you try to enter a graphics environment, please try adding the following parameters to your boot loader (Fedora users usually have GRUB installed):

  

- ....

+ ----

  acpi_osi=! acpi_osi='Windows 2009'

- ....

+ ----

  

- This seems to work on most laptop models facing this issue, but bear in

- mind that this workaround has not been tested in every laptop model ever

- made – so your mileage may vary. If the problems persist, you could try

- updating your BIOS or look for more info in the Bumblebee documentation

- and their community.

+ This seems to work on most laptop models facing this issue, but bear in mind that this workaround has not been tested in every laptop model ever made – so your mileage may vary.

+ If the problems persist, you could try updating your BIOS or look for more info in the Bumblebee documentation and their community.

  

  [[broken-power-management-with-kernel-4.8]]

- Broken power management with kernel 4.8

- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

- 

- If you have a newer laptop (BIOS date 2015 or newer), then Linux 4.8

- might break bbswitch since bbswitch does not support the newer,

- recommended power management method. As a result, the dGPU may fail to

- power on, fail to power off or worse.

- 

- See https://github.com/Bumblebee-Project/bbswitch/issues/140[Issue 140]

- for further information about this problem.

+ == Broken power management with kernel 4.8

  

- As a workaround, add pcie_port_pm=off to your kernel parameters.

+ If you have a newer laptop (BIOS date 2015 or newer), then Linux 4.8 might break bbswitch since bbswitch does not support the newer, recommended power management method. As a result, the dGPU may fail to power on, fail to power off or worse.

+ See https://github.com/Bumblebee-Project/bbswitch/issues/140[Issue 140] for further information about this problem.

+ As a workaround, add `pcie_port_pm=off` to your kernel parameters.

  

- Alternatively, if you are only interested in power saving (and perhaps

- use of external monitors), remove bumblebee / bbswitch and rely on

- Nouveau runtime power-management (which supports the new method).

+ Alternatively, if you are only interested in power saving (and perhaps use of external monitors), remove Bumblebee / bbswitch and rely on nouveau runtime power-management (which supports the new method).

  

  [[mesa-13.0.3-6-and-libglvnd-issues]]

- mesa-13.0.3-6 and libglvnd issues

- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

+ == mesa-13.0.3-6 and libglvnd issues

  

- In fedora 25 and 26 a new library called libglvnd was added which

- initially caused some issues.

+ On Fedora 25 and 26 a new library called libglvnd was added which initially caused some issues.

  

- primus-1.1.03282015-4 and newer, bumblebee-3.2.1-13 and newer, and

- (managed version) bumblebee-nvidia-375.26-2 and newer, and (un-managed

- version) bumblebee-nvidia-3.0-2 and newer will work with the newer mesa

- and new libglvnd library.

+ primus-1.1.03282015-4 and newera, bumblebee-3.2.1-13 and newer, and (managed version) bumblebee-nvidia-375.26-2 and newer, and (un-managed version) bumblebee-nvidia-3.0-2 and newer will work with the newer mesa and new libglvnd library.

  

- When you first upgrade to mesa-13.0.3-6 or newer bumblebee-nvidia

- doesn't know that it needs to rebuild the shim. So you can force that by

- running the command:

+ When you first upgrade to mesa-13.0.3-6 or newer bumblebee-nvidia doesn't know that it needs to rebuild the shim.

+ So you can force that by running the command:

  

- ....

+ ----

  bumblebee-nvidia --force

- ....

+ ----

  

- via `su` as root or via `sudo`. And the primus bridge should work after

- that. You can track this issue upstream

- https://github.com/amonakov/primus/issues/193[here].

+ via `su` as root or via `sudo`. And the primus bridge should work after that.

  

- [[useful-links]]

- Useful links

- ~~~~~~~~~~~~

+ You can track this issue upstream https://github.com/amonakov/primus/issues/193[here].

  

- * http://bumblebee-project.org/

- * https://github.com/Bumblebee-Project/Bumblebee/wiki

- * https://github.com/Bumblebee-Project/Bumblebee/

- * https://github.com/Bumblebee-Project/bbswitch

- * https://github.com/amonakov/primus

- * https://www.linux.ncsu.edu/bumblebee/

+ [[additional-resources]]

+ == Additional resources

  

- http://www.thelinuxrain.com/articles/the-state-of-nvidia-optimus-on-linux[The

+ * http://bumblebee-project.org/[Bumblebee project homepage]

+ * https://github.com/Bumblebee-Project/Bumblebee/wiki[Bumblebee official wiki]

+ * https://github.com/Bumblebee-Project/bbswitch[The bbswitch kernel module's website]

+ * https://github.com/amonakov/primus[The primus library's website]

+ * https://copr.fedorainfracloud.org/coprs/chenxiaolong/bumblebee/[Bumblebee Copr respository]

+ * https://www.linux.ncsu.edu/bumblebee/[Bumblebee guide for RHEL and CentOS]

+ * http://www.thelinuxrain.com/articles/the-state-of-nvidia-optimus-on-linux[The

  State of NVIDIA Optimus on Linux]

- '''

  

- See a typo, something missing or out of date, or anything else which can be

- improved? Edit this document at https://pagure.io/fedora-docs/quick-docs.

+ See a typo, something missing or out of date, or anything else which can be improved? Edit this document at https://pagure.io/fedora-docs/quick-docs[quick-docs's git repository].

no initial comment

rebased onto f3a629d7cbe1c699a4823e2b269149fafa719f5b

6 years ago

rebased onto abc451b6004107bfe397759029d757c868b459ab

6 years ago

This is personal preference, but I don't think we need to include a header at the top of the document, since the page title does the same job (I think). I would omit.

We're linking to the old docs here. I'm not sure if there is a more recent place for this? @bex @rkratky @zoglesby @pbokoc ?

This is a general musing and doesn't have to be fixed today, but this line makes me a sad panda. :panda_face: I feel like the actual use of this section is unhelpful for some users since the RPMFusion / negativo drivers meet a lot of peoples' use cases (from my experience moderating the Fedora Telegram group).

But @mayorga, you don't need to worry about changing this now

This document goes between writing NVIDIA as NVIDIA or NVidia. I think either works, but whatever is chosen, it should be consistent throughout the entire document. I would change this and set the precedent.

Typo: propietary to proprietary

Typos:

  • automatially => automatically
  • attaced => attached
  • backgroud => background

Not sure why there's so many + signs in this sections. They render as plus signs in the document and it looks strange. Probably best to leave a blank line instead of the + signs on each line.

I would simplify this header. == American Megatrend BIOS compatibility

Another raw link. Maybe: https://github.com/Bumblebee-Project/Bumblebee/issues/764#issuecomment-234494238[in this post]

A lot of naked URLs in this section. It would be helpful to use a descriptive name for each URL. You could even use the <title> element in each page to keep it simple.

I made a quick pass through and left feedback in-line. Nice work so far, @mayorga :raised_hand: Hope the feedback helps.

rebased onto 5b8040c3974560342b62b53634c81611f3c11239

6 years ago

rebased onto 6e64072585320ca08ed93115cb9eb3d73ead449a

6 years ago

@jflory7 Thanks for reviewing this! I addressed your remarks in commit eed24de.

rebased onto eed24de2e61e25b50e3037263ff0bb316d0bc04d

6 years ago

Hey, out of curiosity, which version of the bumblebee wiki page is this?

I recall fixing a lot of these mistakes when I re-write the page a while ago.

@axeld I did the initial conversion at the end of October last year. Was your re-write newer than that?

@mattdm Oh, that makes sense then.
My rewrite was on the 4th of January this year.
I completely rewrote the install method and driver recommendation since this one has had a far better success rate at working in a stable way.
I also outlined a few common fixes for a lot of really common issues.

Ah! @mayorga Can you mean sure @axeld's changes are incorporated?

Also @mayorga, can you please put

include::en-US/3rdparty-message.adoc[]

at the top of the page (under the title)? Thanks!

rebased onto b39cba3213de06180c539750f00c5fbd0ace0830

6 years ago

Changes in commit b39cba3:

  • Address @jflory7's comments
  • Integrate @axeld's changes in the updated wiki
  • Add include::en-US/3rdparty-message.adoc[] at the top of the page

Thank you all.

The Fedora 22 docs are old and dated. This information lives here now and we should link to it:

docs.fedoraproject.org/f27/system-administrators-guide/kernel-module-driver-configuration/Working_with_Kernel_Modules.html#sect-signing-kernel-module-with-the-private-key

What we briefly discussed with @mattdm and @bex was using an attribute (like this) inside of the hyperlink so the docs will always be accurate. Rewritten, it might look like this:

https://docs.fedoraproject.org/f{MAJOROSVER}/system-administrators-guide/kernel-module-driver-configuration/Working_with_Kernel_Modules.html#sect-signing-kernel-module-with-the-private-key[here]

rebased onto 37ea990409ee816117cf14fe3557ea32980777db

6 years ago

Typo in the anchor and title: propietary => proprietary

This link should be a pretty link instead of a plain URL. Maybe https://pagure.io/fedora-docs/quick-docs[fedora-docs/quick-docs]?

Woot! Looks good to me. Only two catches on this pass. Once those are fixed, I think it's good to merge. :clapper:

rebased onto bb7e5e2

6 years ago

Merging this, based on @jflory7 's last review + the latest changes from @mayorga.

Pull-Request has been merged by jsmith

6 years ago