I'm on Ubuntu 19.04 with a Nvidia GTX 1050 Mobile, using the latest nvidia-driver-430 from the ppa.
In the PRIME profile, I have selected Nvidia instead of Intel. It seems like this is acknowledged (OpenGL ES 3.0 Renderer: GeForce GTX 1050 with Max-Q Design/PCIe/SSE2).
nvidia-smi also reports that the GPU is under load.
However, this is where it gets strange: The size of the window which renders 3D OpenGL graphics has a huge effect on performance. Most of the time (not always!) a window sized at 720p or below is as performant as I'd expect it to be, and the CPU load is minimal. However, resizing it to be larger causes everything (even the OS itself) becomes incredibly laggy due to the graphics processing load.
I think that somehow, Intel graphics are used with larger windows. The reason is that there is a major increase in CPU usage when this happens.
nvidia-smi does still also show the GPU-Util at 100% and the program in the
Processes tab though...
I'd really appreciate some help since the performance is really unbearable with full-screen windows.
I'm mainly noticing this as a big problem with the Godot engine. Edit: It also only happens in Godot with GLES3, not with GLES2, so it could be a GLES3 problem with my system!
Edit: This is an example of how the CPU usage looks when resizing the window just a bit above the lag threshold, and then back down: https://i.imgur.com/WIZxHqk.png With more complex 3D scenes, the jump can get much higher. When this happens, FPS go down from >60 to around 10 in an almost empty scene.
That threshold somehow seems to be a bit different after each reboot.