* [[#Use_Nvidia_graphics_only|#Use NVIDIA graphics only]] - gives more performance than Intel graphics, but drains more battery (which is not welcome for mobile devices).

+

* [[#Use NVIDIA graphics only]] - gives more performance than Intel graphics, but drains more battery (which is not welcome for mobile devices).

−

* Using both (use NVIDIA GPU when needed and keep it powered off to save power):

+

* Using both (use NVIDIA GPU when need and power it off to save power when not needed):

−

** [[#Using_optimus-manager|#Using optimus-manager]] - switches graphics with a single command (logout and login required to take effect). It achieves maximum performance out of NVIDIA GPU and switches it off if not in use.

+

** [[#Using optimus-manager]] - an unofficial implementation of Nvidia's {{ic|nvidia-prime}} for Arch Linux. Due to its simplicity to use without compromising performance, it should be default choice for majority of users.

−

** [[#Using_nvidia-xrun|#Using nvidia-xrun]] - run separate X session on different TTY with NVIDIA graphics. It achieves maximum performance out of NVIDIA GPU and switches it off if not in use.

** [[#Using_Bumblebee|#Using Bumblebee]] - provides Windows-like functionality by allowing to run selected applications with NVIDIA graphics while using Intel graphics for everything else. Has significant performance issues and does not support [[Vulkan]].

+

** [[#Using Bumblebee]] - provides Windows-like functionality by allowing to run selected applications with NVIDIA graphics while using Intel graphics for everything else. Has significant performance issues and does not support [[Vulkan]].

−

** [[#Using_nouveau|#Using nouveau]] - offers poorer performance (compared to the proprietary NVIDIA driver) and may cause issues with sleep and hibernate. Does not work with latest Nvidia GPUs.

+

** [[#Using nouveau]] - offers poorer performance (compared to the proprietary NVIDIA driver) and may cause issues with sleep and hibernate. Does not work with latest NVIDIA GPUs.

== Use Intel graphics only ==

== Use Intel graphics only ==

Line 30:

Line 30:

If your BIOS does not allow to disable Nvidia graphics, you can disable it from the Linux itself. See [[Hybrid graphics#Fully Power Down Discrete GPU]].

If your BIOS does not allow to disable Nvidia graphics, you can disable it from the Linux itself. See [[Hybrid graphics#Fully Power Down Discrete GPU]].

−

== Use Nvidia graphics only ==

+

== Use NVIDIA graphics only ==

The proprietary NVIDIA driver does not support dynamic switching like the nouveau driver (meaning it can only use the NVIDIA device). It also has notable screen-tearing issues that NVIDIA recognizes but has not fixed, unless you are using x.org > 1.19 and enable prime sync, see [https://devtalk.nvidia.com/default/topic/957814/linux/prime-and-prime-synchronization/]. However, it does allow use of the discrete GPU and has (as of [https://www.phoronix.com/scan.php?page=article&item=nouveau-410-blob&num=1 January 2017]) a marked edge in performance over the nouveau driver.

The proprietary NVIDIA driver does not support dynamic switching like the nouveau driver (meaning it can only use the NVIDIA device). It also has notable screen-tearing issues that NVIDIA recognizes but has not fixed, unless you are using x.org > 1.19 and enable prime sync, see [https://devtalk.nvidia.com/default/topic/957814/linux/prime-and-prime-synchronization/]. However, it does allow use of the discrete GPU and has (as of [https://www.phoronix.com/scan.php?page=article&item=nouveau-410-blob&num=1 January 2017]) a marked edge in performance over the nouveau driver.

Line 70:

Line 70:

If you get a black screen when starting X, make sure that there are no ampersands after the two {{ic|xrandr}} commands in {{ic|~/.xinitrc}}. If there are ampersands, it seems that the window manager can run before the {{ic|xrandr}} commands finish executing, leading to a black screen.

If you get a black screen when starting X, make sure that there are no ampersands after the two {{ic|xrandr}} commands in {{ic|~/.xinitrc}}. If there are ampersands, it seems that the window manager can run before the {{ic|xrandr}} commands finish executing, leading to a black screen.

−

=== Display Managers ===

+

=== Display managers ===

If you are using a display manager then you will need to create or edit a display setup script for your display manager instead of using {{ic|~/.xinitrc}}.

If you are using a display manager then you will need to create or edit a display setup script for your display manager instead of using {{ic|~/.xinitrc}}.

Line 132:

Line 132:

== Troubleshooting ==

== Troubleshooting ==

+

+

{{Style|If this is relevant only for [[#Use NVIDIA graphics only]], it should be a subsection. Otherwise it should be the last section on the page.}}

Available methods

#Use NVIDIA graphics only - gives more performance than Intel graphics, but drains more battery (which is not welcome for mobile devices).

Using both (use NVIDIA GPU when need and power it off to save power when not needed):

#Using optimus-manager - an unofficial implementation of Nvidia's nvidia-prime for Arch Linux. Due to its simplicity to use without compromising performance, it should be default choice for majority of users.

#Using Bumblebee - provides Windows-like functionality by allowing to run selected applications with NVIDIA graphics while using Intel graphics for everything else. Has significant performance issues and does not support Vulkan.

#Using nouveau - offers poorer performance (compared to the proprietary NVIDIA driver) and may cause issues with sleep and hibernate. Does not work with latest NVIDIA GPUs.

Use Intel graphics only

If you only care to use a certain GPU without switching, check the options in your system's BIOS. There should be an option to disable one of the cards. Some laptops only allow disabling of the discrete card, or vice-versa, but it is worth checking if you only plan to use just one of the cards.

Use NVIDIA graphics only

The proprietary NVIDIA driver does not support dynamic switching like the nouveau driver (meaning it can only use the NVIDIA device). It also has notable screen-tearing issues that NVIDIA recognizes but has not fixed, unless you are using x.org > 1.19 and enable prime sync, see [1]. However, it does allow use of the discrete GPU and has (as of January 2017) a marked edge in performance over the nouveau driver.

First, install the NVIDIA driver and xorg-xrandr. Then, configure xorg.conf. You will need to know the PCI address of the NVIDIA card, which you can find by issuing

$ lspci | egrep 'VGA|3D'

The PCI address is the first 7 characters of the line that mentions NVIDIA. It will look something like 01:00.0. In the xorg.conf, you will need to format it as #:#:# while converting hexadecimal numbers to decimal numbers; e.g. 01:00.0 would be formatted as 1:0:0.

Next, add the following two lines to the beginning of your ~/.xinitrc:

~/.xinitrc

xrandr --setprovideroutputsource modesetting NVIDIA-0
xrandr --auto

Now reboot to load the drivers, and X should start.

If your display dpi is not correct add the following line:

xrandr --dpi 96

If you get a black screen when starting X, make sure that there are no ampersands after the two xrandr commands in ~/.xinitrc. If there are ampersands, it seems that the window manager can run before the xrandr commands finish executing, leading to a black screen.

Display managers

If you are using a display manager then you will need to create or edit a display setup script for your display manager instead of using ~/.xinitrc.

If Xorg wont start try swapping out all references of CRT to DFB.
card0 is the identifier for the intel card to which the display is connected via LVDS. The edid binary is in this directory. If the hardware arrangement is different, the value for CustomEDID might vary but yet this has to be confirmed. The path will start in any case with /sys/class/drm.

Alternatively you can generate your edid with tools like read-edid and point the driver to this file. Even modelines can be used, but then be sure to change "UseEDID" and "IgnoreEDID".

Wrong resolution without EDID errors

Using nvidia-xconfig, incorrect information might be generated in Xorg.conf and in particular wrong monitor refresh rates that restruct the possible resolutions. Try commenting out the HorizSync/VertRefresh lines. If this helps, you can probably also remove everything else not mentioned in this article.

Lockup issue (lspci hangs)

Applies to: newer laptops with GTX 965M or alike when bbswitch (e.g. via Bumblebee) or nouveau is in use.

When the dGPU power resource is turned on, it may fail to do so and hang in ACPI code (kernel bug 156341).

For known model-specific workarounds, see this issue.
In other cases you can try to boot with acpi_osi="!Windows 2015" or acpi_osi=! acpi_osi="Windows 2009" added to your Kernel parameters. (Consider reporting your laptop to that issue.)