Nvidia + Optimus Manager - not powered off with Intel selected?

Hi everyone,
I’m having an issue I haven’t specifically seen anywhere else online so I was wondering if I could get some help.

I’m running kernel 5.10 with video-hybrid-intel-nvidia-prime using nvidia-460.39-9, as well as optimus-manager. I noticed recently that when I reboot with Intel selected, the icon is correct, and I see in the logs:

Feb 11 10:29:57  python3[534]: [338] INFO: Unloading modules ['nvidia_drm', 'nvidia_modeset', 'nvidia_uvm', 'nvidia'] (if loaded)
Feb 11 10:29:57  python3[534]: [352] INFO: Loaded extra Intel Xorg options (0 lines)
Feb 11 10:29:57  python3[534]: [352] INFO: Loaded extra Intel Xorg options (0 lines)
Feb 11 10:29:57  python3[534]: [352] INFO: Writing to /etc/X11/xorg.conf.d/10-optimus-manager.conf
Feb 11 10:29:57 python3[534]: [352] INFO: Writing state {'type': 'pending_post_xorg_start', 'switch_id': '20210211T102957', 'requested_mode': 'intel'}
Feb 11 10:29:57  python3[534]: [353] INFO: Xorg pre-start hook completed successfully.
Feb 11 10:29:57  systemd[1]: Started Optimus Manager Commands Daemon.

Optimus-manager seems to work correctly, however the nvidia driver does not get removed, and my red gpu indicator light on the laptop stays red. However, simply running nvidia-smi seemingly disables the GPU and causes it to work correctly and decrease my power consumption. Given I usually use nvidia while plugged in for my dual monitors and intel when I’m on battery, it’s not a big deal to remember to run nvidia-smi, but I’m more interested in why it doesn’t work/unload automatically, and why nvidia-smi fixes it when all nvidia-smi does is report load.

1 Like