Prime-select - Nvidia selected but not used

Fresh install Ubuntu 20.04 LTS, on Dell XPS 9550. It seems to me that everything is installed correctly, but I have issues that even Prime-select shows Nvidia is used, and nvidia-smi shows drivers are working, none of the apps, except when doing CUDA calculation, are using Nvidia. That is also shown in nvidia-smi.
Also when start nvidia-settings, everything is blank, except Prime profiles.

glxinfo | grep OpenGL output shows Intel GPU is used:

OpenGL vendor string: Intel
OpenGL renderer string: Mesa Intel(R) HD Graphics 530 (SKL GT2)
OpenGL core profile version string: 4.6 (Core Profile) Mesa 20.0.4
OpenGL core profile shading language version string: 4.60
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
OpenGL version string: 4.6 (Compatibility Profile) Mesa 20.0.4
OpenGL shading language version string: 4.60
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL extensions:
OpenGL ES profile version string: OpenGL ES 3.2 Mesa 20.0.4
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.20
OpenGL ES profile extensions:

Attached is bug report.

What setting I am missing here …

nvidia-bug-report.log (1.8 MB)

Please make sure gpu-manager is enabled:
sudo systemctl enable gpu-manager
and switch to nvidia profile again
sudo prime-select nvidia
then reboot.

Thanks for reply. What I did is that I added this to xorg.cong (created it also).

Section "ServerLayout"
  Identifier "layout"
  Option "AllowNVIDIAGPUScreens"
EndSection

And now I see xorg as process in nvidia-smi. Also if I want for app use Nvidia GPU I need to right-click on icon and choose ‘Launch using Dedicated Graphics Card’ and it works. WHich is I guess even better than just using Nvidia GPU, power saving wise. Only question is how to start apps from terminal to use Nvida?

Ubuntu’s gpu-manager still sets the nvidia gpu as primary so that file is ignored. AFAIK, prime-select now has the option “on-demand” which should make that config being used.

It did look to me even though I had Nvidia chosen, it behaves like On Demand. When I remove xorg.conf, even though I start app with that ‘Use Dedicated GPU’ option, it does not use Nvidia. Only when I have that in xorg it does…

To start something on the nvidia gpu when in offload mode, prepend
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia
e.g.
__NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo | grep vendor
opposed to
glxinfo | grep vendor
See:
https://download.nvidia.com/XFree86/Linux-x86_64/440.64/README/primerenderoffload.html

Thank you very much! My laptop works best, including Windows, from moment I purchased it few years ago :D Top notch! Thanks for great work!