I am currently on Ubuntu 19.10. I used 'prime-select' to select the 'on-demand' option thus:
$ sudo prime-select on-demand
Then rebooted. Now, all programs seem to use the default Intel graphics. To use steam and other programs with nvidia, I run then thus:
$ __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia steam
And then from steam, I can see from my system information that the nvidia gpu is indeed being shown, which is not true (and shows the intel card) without the above options.
$ sudo prime-select on-demand
Then rebooted. Now, all programs seem to use the default Intel graphics. To use steam and other programs with nvidia, I run then thus:
$ __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia steam
And then from steam, I can see from my system information that the nvidia gpu is indeed being shown, which is not true (and shows the intel card) without the above options.