-
Turn of secure boot in the BIOS.
-
See here.
-
pacman -Syu mesa xf86-video-intel nvidia bumblebee bbswitch
-
sudo gpasswd -a user bumblebee
(replace user with your username) -
sudo systemctl enable bumblebeed.service
-
If tlp is installed and enabled:
-
Find the address of the GPU with
lspci | grep 3D
(First column, such as01:00.0
) -
Edit
/etc/default/tlp
:... RUNTIME_PM_BLACKLIST="01:00.0" ...
-
-
Configure bbswitch by editing:
/etc/modprobe.d/bbswitch.conf
options bbswitch load_state=0 unload_state=1
-
Reboot
-
To see if the dGPU is turned off/on:
cat /proc/acpi/bbswitch
-
To manually turn the dGPU on:
sudo tee /proc/acpi/bbswitch <<< ON
-
To manually turn the dGPU off:
sudo tee /proc/acpi/bbswitch <<< OFF
-
To unload nvidia modules manually:
sudo rmmod nvidia_uvm && sudo rmmod nvidia
-
To test if bumblebee is working correctly:
-
Check if dGPU is turned OFF
-
Run
optirun glxspheres64
oroptirun glxgears -info
(both in packagemesa-demos
) -
While
glxgears
runs, check if dGPU is ON -
Close the optirun terminal
-
Check if dGPU is OFF
-
For performance comparison, run
glxspheres64
orglxgears
(without optirun)
-
-
For improving performance, check https://wiki.archlinux.org/index.php/bumblebee#Optimizing_speed
Adding this to my ~/.Xresources
has solved 90% of scaling for me (120 for 125% scaling):
~/.Xresources
Xft.dpi: 120 Xft.autohint: 0 Xft.lcdfilter: lcddefault Xft.hintstyle: hintfull Xft.hinting: 1 Xft.antialias: 1 Xft.rgba: rgb ...
-
Install
throttled
from the community repository. -
Configure
/etc/lenovo_fix.conf
with the desired undervolting etc. -
Start the service with
sudo systemctl enable --now lenovo_fix.service
-
ATTENTION: Choose your parameters carefully and do proper testing. Bad values may cause system instability, inability to boot or worse (possibly, I don’t really know). Just be careful and change values incrementally with tests in between. Optimal values are individual to your machine.
-
Packages:
-
tlp
-
acpi_call
-
Some buttons (Fn+F11
, Fn+F12
) have a keycode above 255 and are
thus not supported by X. They can be remapped using:
-
pacman -Syu acpid
-
sudo systemctl enable acpid.service
-
Modify
/etc/acpi/handler.sh
:/etc/acpi/handler.sh
# ... ibm/hotkey) case "$4" in 00001311) logger 'Favorites' /etc/acpi/actions/favorites-key.sh ;; 00001315) logger 'Keyboard' /etc/acpi/actions/keyboard-key.sh ;; *) logger "ACPI action undefined: $1 : $2 : $3 : $4" ;; esac ;; # ...
-
Modify
/etc/udev/hwdb.d/90-thinkpad-keyboard.hwdb
:/etc/udev/hwdb.d/90-thinkpad-keyboard.hwdb
evdev:name:ThinkPad Extra Buttons:dmi:bvn*:bvr*:bd*:svnLENOVO*:pn* KEYBOARD_KEY_45=prog1 KEYBOARD_KEY_49=prog2
-
sudo udevadm hwdb --update
-
sudo udevadm trigger --sysname-match="event*"