The original post: /r/debian by /u/chennystar on 2024-12-26 14:36:26.
Bookworm 12.8, on a laptop w/ hybrid graphics (Intel i7-12700H integrated GPU and Nvidia RTX 3050Ti). I was pleasantly surprised that, after having applied Debian’s wiki config recommendations, Wayland/Gnome/Nvidia/Optimus work just fine.
I use the recommended PRIME offload method (https://wiki.debian.org/NVIDIA Optimus#Using_NVIDIA_PRIME_Render_Offload). Now, I’m aware that with the (now outdated) Bumblebee method, one had to explicitly invoke programs that we wanted to run on the Nvidia GPU, automatic detection has never been implemented (unlike under Windows, see https://en.wikipedia.org/wiki/Nvidia_Optimus#Linux_support).
Is it the same with the newer PRIME offloading method ? So far I launched some programs using :
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia command
It works fine, but I wonder if in some cases the system decides by itself to use the Nvidia GPU rather than the Intel one. I couldn’t find the answer for the PRIME offload method. My guess would be that, as with Bumblebee, one always has to explicitly specify that we want to use Nvidia for a program. But then, I’m surprised that by default, after booting the laptop, nvidia-smi
shows the /usr/bin/gnome-shell
process using Nvidia graphics (it’s the only process). So it seems that “the system” decided by itself to use Nvidia graphics for Gnome Shell.
So, does Optimus/Prime offload method automatically detect which GPU to use ? Or does one always have to specify __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia
to use Nvidia GPU ?