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
  • bbswitch version: 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
---------------------------------------
bbswitch

NVIDIA modules were put into the blacklist:

$ cat /etc/modprobe.d/blacklist.conf
------------------------------------
blacklist nvidia
blacklist nvidia_drm
blacklist nvidia_modeset
install nvidia /bin/false

bbswitch was set to turn off the GPU right after boot:

$ cat /etc/modprobe.d/bbswitch.conf
-----------------------------------
options bbswitch load_state=0 unload_state=1

Symptom#

# 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=Linux

For more details, please refer to this discussion.

Reference#

  1. Issue #592 @ Bumblebee
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 .