-


NVIDIA 435.17 Linux Beta Driver Adds PRIME Offloading For Vulkan and OpenGL+GLX

NVIDIA On-Demand PRIME offloading

The latest NVIDIA 435.17 Linux beta driver has added Vulkan and OpenGL+GLX support for PRIME render offload.

PRIME is a collection of features in the Linux kernel, display server, and various drivers to enable GPU offloading with multi-GPU configurations under Linux, like laptops using NVIDIA Optimus (which use an integrated Intel GPU and a discrete NVIDIA GPU).

Thanks to the new on-demand PRIME render offload, you'll be able to run specific application on the discrete NVIDIA GPU, while using the integrated GPU for everything else, saving battery power.

The latest NVIDIA 435.17 Linux beta driver supports Vulkan and OpenGL+GLX for PRIME render offload, but NVIDIA's EGL is not yet supported.

To make use of the new PRIME render offload feature of the latest beta NVIDIA driver, you'll need X Server with some patches that have not yet made it into any official X Server releases, though a PPA for Ubuntu 19.04 or 18.04 is offered for those willing to test it (but the NVIDIA Drivers PPA only has version 435.17 for Ubuntu 19.10 right now, so if you use an older version, you'll have to wait). Some extra X screen configuration (xorg.conf) is also required to get things working.

It's also worth noting that it looks like to get graphical applications to be offloaded to the NVIDIA GPU screen, some environment variables are needed, depending on the type of application you're trying to run:

  • for Vulkan applications you'll need to use __NV_PRIME_RENDER_OFFLOAD=1 (e.g.: __NV_PRIME_RENDER_OFFLOAD=1 vkcube)
  • for GLX applications you'll need to use both __NV_PRIME_RENDER_OFFLOAD=1 and __GLX_VENDOR_LIBRARY_NAME=nvidia (e.g.: __NV_PRIME_RENDER_OFFLOAD=1 __GLX_VENDOR_LIBRARY_NAME=nvidia glxinfo | grep vendor).

Read more about the changes in NVIDIA 435.17 Linux beta driver and check out the details and requirements of PRIME render offload.

My old Nvidia Optimus laptop does not support the latest NVIDIA drivers (I need to use the legacy 390 version), so I could not test this; that's why my NVIDIA Settings screenshot does include the new "NVIDIA On-Demand" option, but no other settings. Therefore I can't offer any extra details or a proper, tested how-to for setting up and using this.

via /r/linux_gaming (/u/Anti-Ultimate)