Making the most out of Nvidia dGPU on laptop

Hello,

A recent driver update (see: Best branch for Nvidia hybrid laptop? - #12 by akarypid) has made my laptop super-stable with the Nvidia card enabled (I used to keep it “off” in the BIOS settings to avoid issues).

Since this is my first ever Nvidia card, I’m now looking into its software and I discovered Optimus. From what I see it is enabled and the power control is set to automatic:

> cat /etc/modprobe.d/nvidia.conf
# https://download.nvidia.com/XFree86/Linux-x86_64/545.29.06/README/dynamicpowermanagement.html
options nvidia NVreg_DynamicPowerManagement=0x02

> lspci -nn | grep -i nvidia
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation AD107M [GeForce RTX 4060 Max-Q / Mobile] [10de:28e0] (rev a1)

> cat /sys/bus/pci/devices/0000:01:00.0/power/control
auto


> cat /sys/bus/pci/devices/0000:01:00.0/power_state
D0

Now, my questions are:

  1. Does optimus automatically engage the Nvidia GPU when something demanding runs? For example, if I run a game with Steam, will Optimus automatically engage the Nvidia GPU for it?

  2. How do I force an application to use either the Intel iGPU, or the Nvidia dGPU ? What do I need to do in each case?

    2a) I recall seeing a command line utility that listed your GPUs along with environment variables that you need to set for using each GPU, but I can’t recall the command name… Would appreciate if someone would remind me.

  3. Is there some Gnome applet that will show which applications are using which GPU?

  4. Any must-have utilities/apps or general pointers that I should check out about the Nvidia card?

Forgot to say: I’m on bluefin-dx-nvidia using Wayland with Gnome.

Thanks!