Enhances the performance and power management on Nvidia Optimus Laptops, by properly selecting when to use each GPU.
The Nvidia GPU runs the whole desktop, while the Intel/AMD GPU acts as relay between the Nvidia GPU and the screen.
More info at the wiki.
- Thorougly test code.
- Open a pull request.
- Mention the user:
@es20490446e
. - Accepted in two days.
- Isolate which specific config is causing your issue.
- Open an issue report.
When requesting further info your issue may be closed. Just reopen it when done so.
- Graphic protocols: Xorg, Wayland without configurable options.
- Display managers : SDDM, LightDM, GDM, custom, none.
Remove interfering tools:
-
Tools that handle switching by themselves, like the
bumblebee
package. -
Configs generated by
nvidia-xconfig
utility or theSave to X Configuration File
button in the Nvidia control panel, at/etc/X11/xorg.conf
. -
The
nvidia-xrun
package and its configs. -
Anything GPU related at
/etc/X11/xorg.conf.d/
. -
GPU monitoring apps: Uninstall or close before switching to integrated mode, as they may prevent unloading the Nvidia driver.
If using gdm:
- Install gdm-prime.
- At
/etc/gdm/custom.conf
, remove the#
before#WaylandEnable=false
.
In any case:
- Install the Nvidia drivers. If your card is Turing or later, favor
nvidia-open
. - Install the
optimus-manager
package. In the AUR:optimus-manager-git
.
See /etc/optimus-manager/
.
Power management is disabled by default, as it is hardware specific. For enabling it see the guide on power management.
nvidia
switches to the Nvidia GPU.integrated
switches to the integrated GPU, and powers the Nvidia GPU off.hybrid
switches to the integrated GPU, but leaves the Nvidia GPU available for on-demand offloading. Similar to how Optimus works on Windows. More info at the Wiki.
- In the configuration file, if
auto_logout=yes
, switching will log out and close all applications. - Switching to and from "integrated" mode can be unstable.
All desktops:
Gnome:
Useful if you want to have different entries for different GPU startup modes.
This only affects which GPU your desktop session starts with, nothing prior to that.
Edit your boot loader config to have the kernel parameter optimus-manager.startup=[nvidia\integrated\hybrid]
.
Or if you are using the GRUB bootloader, you can use optimus-manager-grub
.
optimus-manager --switch [nvidia\integrated\hybrid]