Difficulty: ★★☆☆☆
Lost in Optimus Manager settings? This tutorial will show you the most efficient ways to set it up. However, the second method (in the spoiler below) is less stable and reliable than the other one.
1st method, custom scrips
Don’t be afraid of wording. Those scripts are extremely simple.
-
First, before enabling optimus-manager.service, remove the config you might have already installed by mhwd:
sudo cp /etc/X11/xorg.conf.d/90-mhwd.conf /etc/X11/xorg.conf.d/90-mhwd.conf.bak
-
Now enable the service:
systemctl enable optimus-manager.service
-
Edit
/etc/optimus-manager/optimus-manager.conf
:[amd] DRI=3 driver=modesetting tearfree= [intel] DRI=3 accel= driver=modesetting modeset=yes tearfree=yes [nvidia] DPI=96 PAT=yes allow_external_gpus=no dynamic_power_management=no ignore_abi=no modeset=yes options=overclocking, triple_buffer [optimus] auto_logout=no pci_power_control=yes pci_remove=no pci_reset=no startup_auto_battery_mode=integrated startup_auto_extpower_mode=hybrid startup_mode=auto switching=custom
-
Find PCI bus of your Nvidia GPU by issuing the following in the terminal:
lspci -k | grep -E 'VGA|3D'
Hereinafter it will be referred to as
0000:01:00.0
just to make this writeup easier to follow. Usually it is the most common dGPU PCI address but yours may be different. -
Open a file
/etc/optimus-manager/nvidia-disable.sh
and insert there the following line:echo -n 1 > '/sys/bus/pci/devices/0000:01:00.0/remove'
-
Now edit
/etc/optimus-manager/nvidia-enable.sh
by adding the following line:echo 1 > /sys/bus/pci/rescan
That’s it.
2nd method, bbswitch
- Begin with installing
bbswitch
module for your kernel. There’s one for each kernel version in Manjaro repository. If you are using a custom kernel, head over to packages.archlinux.org and downloadbbswitch-dkms
there. - Next all you need to do is to set bbswitch as switching method in Optimus Manager settings.
The main drawback of using bbswitch is that sometimes it cuts power from dGPU too fast which makes display manager (like SDDM or GDM) fail to restart when you log out.