153 words
1 minute
bbswitch fails to switch GPUs ON/OFF
System info
- Machine: Lenovo W540 with NVIDIA K2100
- OS: Archlinux with kernel 4.18.1
bbswitchversion: 0.8-117
The following were my settings at the time when this issue happened. Kernel module bbswitch was set to be automatically loaded:
$ cat /etc/modules-load.d/bbswitch.conf---------------------------------------bbswitchNVIDIA modules were put into the blacklist:
$ cat /etc/modprobe.d/blacklist.conf------------------------------------blacklist nvidiablacklist nvidia_drmblacklist nvidia_modesetinstall nvidia /bin/falsebbswitch was set to turn off the GPU right after boot:
$ cat /etc/modprobe.d/bbswitch.conf-----------------------------------options bbswitch load_state=0 unload_state=1Symptom
# tee /proc/acpi/bbswitch <<<OFF and # tee /proc/acpi/bbswitch <<<ON wouldn’t actually change the value in /proc/acpi/bbswitch. From the output of lspci -nk or lsmod | grep nvidia, it seems that after boot bbswitch was indeed loaded and NVIDIA modules were not. The GPU, however, was always on after boot. In other words, manually switching ON/OFF and automatically turning off the GPU were not working.
Solution
Add the following kernel parameters at boot:
acpi_osi="!Windows 2013" acpi_osi=LinuxFor more details, please refer to this discussion.
Reference
Written content, images, and videos in this post are licensed under CC BY-NC-SA 4.0
. Code snippets are licensed separately under BSD 3-Clause
.