Intel integrated GPU + NVidia dedicated GPU.

The following configurations have been tested on Ubuntu 20.04 with UHD Graphics 610 using Mesa 20.0.8 and a GeForce GTX 1050 Ti using nvidia 440.64.

sudo prime-select nvidia and sudo prime-select intel can switch between using the nvidia or the intel GPU as primary GPU (the GPU the X Server primarily runs on). Reboot required after switch.

1. prime-select nvidia

1.1 monitor connected to intel gpu, HMD connected to nvidia gpu

Note: nvidia may choose an nvidia-only setup when there are monitors connected to nvidia. When connecting monitors to the intel GPU, connect ONLY a HMD to the nvidia gpu.

1.2 monitor connected to nvidia GPU, HMD connected to intel GPU

Same as 1.1.

1.3 monitor connected to intel GPU, HMD connected to intel GPU

X Error of failed request:  BadMatch (invalid parameter attributes)
  Major opcode of failed request:  156 (NV-GLX)
  Minor opcode of failed request:  31 ()
  Serial number of failed request:  31
  Current serial number in output stream:  31

Note for 1.1 and 1.2

When running in prime-select nvidia mode, other Vulkan applications like vkmark also lock up with a black window when attempting to run on the intel GPU. (see for GPU selection in vkmark)

2. prime-select intel

Completely disables the nvidia GPU on my desktop PC. Please contribute to this article if you have an Optimus Laptop that behaves differently.

2.1 monitor connected to intel GPU, HMD connected to intel GPU