- Arch linux
- Linux 5.4.1
- Nvidia 440.36
- Xorg/XWayland 1.20.6
- bumblebee from git: 7aa457f
- Window manager: Sway 1.2 (wayland / wlroots)
- Dell XPS 15 9560 with GTX 1050 and integrated Intel graphics
I use Wayland via sway, and for the most part I need my Nvidia GPU to be powered off, because when it is powered on it uses about 7W of extra power, and therefore decimates battery life. I have PCIE power management enabled (because it saves up to 6W aswell), so I can’t use bbswitch. I use bumblebee/optirun to run specific apps on the Nvidia GPU from time to time.
Bumblebee has recently added support for disabling all of its own power management methods (bbswitch, vga_switcheroo) and instead adding an option to always unload the nvidia kernel module when optirun finishes running. This allows the kernel to power off the Nvidia GPU, and enable PCIE low power states, while preserving the ability to use the Nvidia GPU via optirun.
[driver-nvidia] KernelDriver=nvidia # Don't use bbswitch or anything else PMMethod=none # Unload Nvidia module after optirun completes to allow the kernel to turn it off and save battery AlwaysUnloadKernelDriver=true
Xorg: None (I use wayland, Xorg support is through XWayland which does not use configuration files)
# Prevent the nvidia module from loading on boot and turning on the GPU to save battery until it is needed blacklist nvidia blacklist nvidia_drm blacklist nvidia_modeset # Also prevent nouveau from trying blacklist nouveau
Whenever one of the following things happens, the nvidia module is loaded, and the GPU is powered on unecessarily:
- An XWayland process is started
- An Xorg server is started
- Steam is started
This results in a large unecessary battery drain.
I can work around the problem with starting X/XWayland by putting the following in my environment:
Besides being a surprising workaround (maybe causing other issues?), this still leaves the problem with steam.
Why does enumerating EGL providers result in loading the Nvidia kernel module and powering on the GPU? If the user blacklisted the module and chose not to load it, it seems to me that it should not be loaded unless the user explicitly does so. I assume there is something else that steam does that similarly calls some library which incidentally loads the kernel module. Again, why? None of these use cases actually use the nvidia GPU - there is no need to turn it on.
Is this intended behaviour?