GeForce Now Linux with VAAPI Hardware Acceleration

So, being mostly a Linux user has caused me issues with GeForce Now. It is supported but unless you have hardware that is very capable of software decoding, it is going to be slow or very limited.

Google Chrome supports it well but there is no official VAAPI/LIBVA support, which only works for Chromebook devices. On the other hand, Firefox supports video acceleration out of the box nowadays but GeForce Now is not compatible. So this is mostly focused on GFN but you could use these instructions for other websites.

People seem to have had success with patched versions of Chromium but I have found that this has so many levers to pull that I decided to add some information to the discussion. Here is what worked for me.

Software and Hardware

I am running Linux Mint with an old Intel N3450 "Apollo Lake", with Chromium version 131. Any version higher or lower may not work due to different flags or even distro specific compilation flags.

This hardware is quite slow for software decoding but can decode via hardware for pretty much everything, except for 10bit VP9 and AV1.

On Mint and Debian based Linux, you need to install:
  • intel-media-va-driver-non-free
  • intel-gpu-tools (to use "intel_gpu_top")
  • libva-glx2
  • libva-drm2
  • libva-x11
  • vainfo
For other hardware, I haven't tested yet but I think AMD Radeon will have already enough Mesa plumbing that it just works.

You should then run 'vainfo' to make sure everything is working well:
libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.14 (libva 2.12.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 22.3.1 ()
vainfo: Supported profile and entrypoints
      VAProfileNone                   : VAEntrypointVideoProc
      VAProfileNone                   : VAEntrypointStats
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointFEI
      VAProfileH264Main               : VAEntrypointEncSliceLP
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointFEI
      VAProfileH264High               : VAEntrypointEncSliceLP
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointEncPicture
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264ConstrainedBaseline: VAEntrypointFEI
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
      VAProfileVP8Version0_3          : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointFEI
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD

 VAEntryPointVLD means it is decoder, for each line, and EncSlice means there is decoding support.

Chromium

Let's say I have had many issues getting this to work well, since everyone seems to be hanging on older flags that seem rather useless.

Browsing for recent code reviews, it seems the new flag is AcceleratedVideoDecodeLinuxGL, like so:
--enable-features=AcceleratedVideoDecodeLinuxGL

The other requirement is that this only works on X11, so you need to go to the "chrome://flags" URL and set the Ozone platform to force X11.

I will updated this if something changes.

GeForceNow Silliness

I have not managed to get Gnome + Wayland working without this going over XWayland.

For some bizarre reason, GFN reports Chromium as unsupported when running Chromium natively on Gnome/Wayland.

There is no amount of extensions that will fix this, you just need to run it over X11. User agent seems to always report X11, so it is likely the browser is sending other types of hints.

Some years ago, spoofing the user agent would make it work and work well. Now, it doesn't.

I think you can create a profile just for GeForce Now and have that load with X11 Ozone. But Chromium is usually much slower due to a lack of Profile Guided Optimizations (PGO), so you're better off with Chrome for most of the browsing. (especially on a slower machine!).

Encoding Support

I haven't found many reports on the web but you can also enable video encoding for other types of apps.

Just add the new flag, so the command line is:
--enable-features=AcceleratedVideoDecodeLinuxGL,AcceleratedVideoEncoder

The "GPU Internals page" will show decoder information, so you know it is working correctly:


 Let me know what is your experience and if you got it working this way.