Saturday, December 14, 2019

How to use the nvidia gpu on-demand on ubuntu 19.10 for optimus laptops (a short reminder for myself)

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.