(state of) Vulcan video platform in Fedora, and use of Vulcan API vs current VA-API on modern laptops?

Hey, i’ve looked though this helpful page (Hardware Video Acceleration - Fedora Project Wiki) and noticed that there’s a vulcan video API that with its proper drivers that is supposed to be more efficient for:

  • 4K+ video content;
  • modern laptops.

I know little about it, so decided to have a look at it a bit deeper.

It seems that there are currently 3 major video APIs:

1) VDPAU (Video Decode and Presentation API for UNIX)
legacy; used for fallback only

2) VA-API (Video Acceleration API)
current Fedora standard; widspread use

3) Vulkan Video
extra performance & optimizations, but considered experimental yet.

Vulcan video seems to be an extension, so it’s safe enabling it in addition to VA-API, right?

Does anybody use it currently?

Manufacturer Driver Fedora Component Purpose Status
AMD mesa-vulkan-drivers-freeworld mesa-vulkan-drivers-freeworld Vulkan decoding of H.264 and H.265 Experimental
Intel mesa-vulkan-drivers-freeworld mesa-vulkan-drivers-freeworld Vulkan decoding, experimental Experimental
Intel intel-media-driver + ANV_DEBUG - Vulkan video decoding/encoding, requires ANV_DEBUG environment variable Experimental
NVIDIA TBD Proprietary NVIDIA driver Vulkan video decoding/encoding for NVIDIA (currently experimental) Partial Support

Supported Intel Platforms for Vulkan Video

  • Tiger Lake (11th Gen Intel Core)
  • Alder Lake (12th Gen Intel Core)
  • Raptor Lake (13th Gen Intel Core)
  • Meteor Lake (14th Gen Intel Core)
  • Arrow Lake (15th Gen Intel Core)
  • all upcoming

These generations include integrated GPUs with experimental or emerging Vulkan Video support, especially if environment variables like ANV_DEBUG=video-decode,video-encode are set for enhanced functions.

Supported AMD Platforms for Vulkan Video

  • RDNA 2 architecture (e.g., Radeon RX 5000 series, Ryzen 5000 mobile GPUs)
  • RDNA 3 architecture (e.g., Radeon RX 6000 and 7000 series, Ryzen 7000)
  • Limited or experimental support on Vega series GPUs
  • Very limited support on Polaris series GPUs

From the site you linked at the top of your post.

🔗 nVIDIA
Accelerated video decoding works on NVIDIA proprietary drivers thanks to Stephen "elFarto" and his nvidia-vaapi-driver project. It's VA-API implemention using NVIDIA's NVDEC decoder.

You can enable VA-API on NVIDIA by these steps:

Install NVIDIA proprietary drivers. Don't forget to install cuda/nvdec/nvenc support.
Install ffmpeg-free from Fedora, install libavcodec-freeworld from RPM Fusion repository for H.264 and H.265 decoding.
Install nvidia-vaapi-driver from RPM Fusion repository non-free.

I would also note that the same applies to the current nvidia drivers from rpmfusion as was noted for the proprietary drivers.
Install the drivers with cuda using the command sudo dnf install akmod-nvidia xorg-x11-drv-nvidia-cuda and install the full ffmpeg version from rpmfusion with sudo dnf swap ffmpeg-free ffmpeg --allowerasing

The rpmfusion repos can be enabled as shown here.

This section seems to be outdated as rpmfusion doesn’t provide nvidia-vaapi-driver now. I think libva-nvidia-driver provided by fedora may be a better choice since it has the same upstream.

You are probably correct in that over time things tend to migrate between repos. In this case it appears that fedora has decided that the vaapi driver for nvidia is appropriate to distribute and has a different name in the fedora repo.

This message may not apply here, but this is one of the pages where Google direct people searching for "my GPU isn’t GPUing videos, my CPU is decoding 'hem; wot? ", so I might as well link this here:

F44 mesa has dropped vdpau support, I doubt many nvidia user still use it either.

I don’t believe nvidia-vaapi-driver has any real use other than for firefox, I certainly wouldn’t use it for media player use.

I have no idea how these things work, and [my life] does’t allow me to check and study on them.

I turned this stuff on, and now my GPU accelerates video on Brave (internet browser).

If there’s something better to do, please link here.

I use vulkan for acceleration for amdgpu or nvidia for google-chrome and mpv.

How can you do that?

Nouveau?

I’m also wondering how to get vulkan acceleration working on nvidia gpu. The hardware video acceleration wiki just says “TBD”, and I can’t tell if there’s still no solution or if the wiki is just outdated.

Chrome (google)

And for mpv-0.41.0, just edit it’s conf to

$ cat '/home/leigh/.config/mpv/mpv.conf' 
hwdec=vulkan

system monitor confirms near zero CPU use for chrome or mpv whilst playing video

I am sorry if I am gonna be a little impolite and pushy, but I’ve just spent yesterday and last night in a hospital.

I have 2 PCs, one with the GT 1030 and the other with the RTX 2070.
They are both on Fedora KDE 43 with the latest 580 driver available by default with Fedora, and I use Brave (a variant of chrome).
I am only testing this on the 2070.

If I force Vulkan to be the default, the window renders transparent and ghosts whatever passes over or under it.

How can I better check my issues? What should I do to make this stuff work?



I tried changing stuff under GPU too, but doesn’t seem to work.
What must I do?

There are several commands for you to check to see if you are using the right packages.

I actually wrote a tool for this and I’ll share the pastebin here so you can test it yourself. It’s in bash so no worries.

(edit : made a mistake when it sees amd+radv+nvidia+llvmpipe) corrected
copy it, paste it into a file and save it as vulkan-diag.sh and run it in the terminal as

sh vulcan-diag.sh

it should look like this:

You must have meant sh vulkan-diag.sh .

Also it doesn’t work, whatever this should have done.

:~/Downloads$ sh vulkan-diag.sh
vulkan-diag.sh: line 4: $'\r': command not found
: invalid option name5: set: pipefail

The file has Windoze file encoding, use

dos2unix vulkan-diag.sh
bash vulkan-diag.sh

I just enable the four options in google-chrome and it works, perhaps brave is broken.

Also note I use Xorg not Wayland.

I haven’t had much luck using chrome with wayland, it’s messed up with or without vulkan enabled.

:~/Downloads$ dos2unix vulkan-diag.sh
bash vulkan-diag.sh
dos2unix: converting file vulkan-diag.sh to Unix format...

╔══════════════════════════════════════════════════╗
║   Vulkan / VA-API diagnostic tool for Fedora     ║
╚══════════════════════════════════════════════════╝

Step 0 — Detecting GPU
  ────────────────────────────────────────────────────────────
  [INFO]  01:00.0 VGA compatible controller: NVIDIA Corporation TU106 [GeForce RTX 2070] (rev a1)
  [WARN]  NVIDIA GPU detected — Vulkan video is still TBD on Fedora; VA-API via libva-nvidia-driver is recommended

Step 1 — Vulkan support
  ────────────────────────────────────────────────────────────
  [ERROR] vulkaninfo returned an error — Vulkan is not initializing.
  [INFO]  Try: sudo dnf install mesa-vulkan-drivers

Step 2 — Vulkan video extensions
  ────────────────────────────────────────────────────────────
  [OK]    Vulkan video extensions found — VK_KHR_video_decode_queue detected.
  [INFO]        VK_KHR_video_decode_h264                      : extension revision 9
  [INFO]        VK_KHR_video_decode_h265                      : extension revision 8
  [INFO]        VK_KHR_video_decode_queue                     : extension revision 8
  [INFO]        VK_KHR_video_decode_vp9                       : extension revision 1
  [INFO]        VK_KHR_video_encode_h264                      : extension revision 14
  [INFO]        VK_KHR_video_encode_h265                      : extension revision 14

Step 3 — VA-API
  ────────────────────────────────────────────────────────────
  [WARN]  'vainfo' not found. Install with: sudo dnf install libva-utils

Step 4 — Driver packages
  ────────────────────────────────────────────────────────────
  [INFO]  intel-mediasdk-23.2.2-8.fc43.x86_64
  [INFO]  mesa-vulkan-drivers-25.3.6-3.fc43.x86_64
  [INFO]  mesa-va-drivers-25.3.6-3.fc43.x86_64
  [INFO]  libva-intel-media-driver-25.4.6-1.fc43.x86_64
  [INFO]  mesa-va-drivers-25.3.6-3.fc43.i686
  [INFO]  mesa-vulkan-drivers-25.3.6-3.fc43.i686
  [INFO]  libva-nvidia-driver-0.0.16-1.fc43.x86_64
  [OK]    Codec packages look good.

Step 5 — Firefox VA-API environment
  ────────────────────────────────────────────────────────────
  [INFO]  Session type: wayland
  [WARN]  MOZ_ENABLE_WAYLAND is not set (or not 1). Firefox may not use hardware decode on Wayland.
  [INFO]  Add to your shell profile: export MOZ_ENABLE_WAYLAND=1
  [INFO]  media.ffmpeg.vaapi.enabled not explicitly set (uses default).
  [INFO]  To ensure hardware decode: set media.ffmpeg.vaapi.enabled = true in about:config

╔══════════════════════════════════════════════════╗
║   Summary                                        ║
╚══════════════════════════════════════════════════╝

  ?  GPU vendor         nvidia
  ✘  Vulkan             ERROR — failed to initialize
  ✔  Vulkan video       OK
  ✘  VA-API             ERROR — vainfo not installed
  ✔  Packages           OK
  ?  Firefox            INFO — pref not set

RPM Fusion note:
  [INFO]  Some packages above require RPM Fusion. Enable it with:
  [INFO]    sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
  [INFO]    sudo dnf install https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

For more info: https://fedoraproject.org/wiki/Hardware_Video_Acceleration
USER:~$ sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
[sudo] password for isaac: 
Updating and loading repositories:
Repositories loaded.
 https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-43.noarch.rpm                                                                                                                     100% |  38.1 KiB/s |  11.3 KiB |  00m00s
Package "rpmfusion-free-release-43-1.noarch" is already installed.

Nothing to do.
USER:~$ sudo dnf install https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm
Updating and loading repositories:
Repositories loaded.
 https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-43. 100% |  19.2 KiB/s |  11.3 KiB |  00m01s
Package "rpmfusion-nonfree-release-43-1.noarch" is already installed.

Nothing to do.
USER:~$ sudo dnf install mesa-vulkan-drivers
Updating and loading repositories:
Repositories loaded.
Package "mesa-vulkan-drivers-25.3.6-3.fc43.x86_64" is already installed.
Package "mesa-vulkan-drivers-25.3.6-3.fc43.i686" is already installed.

Nothing to do.
USER:~$ sudo dnf install libva-utils
Updating and loading repositories:
Repositories loaded.
Package                               Arch       Version                               Repository               Size
Installing:
 libva-utils                          x86_64     2.22.0-5.fc43                         fedora                3.2 MiB

Transaction Summary:
 Installing:         1 package

Total size of inbound packages is 590 KiB. Need to download 590 KiB.
After this operation, 3 MiB extra will be used (install 3 MiB, remove 0 B).
Is this ok [y/N]: y
[1/1] libva-utils-0:2.22.0-5.fc43.x86_64                                    100% |   1.6 MiB/s | 590.1 KiB |  00m00s
--------------------------------------------------------------------------------------------------------------------
[1/1] Total                                                                 100% | 605.3 KiB/s | 590.1 KiB |  00m01s
Running transaction
[1/3] Verify package files                                                  100% |  76.0   B/s |   1.0   B |  00m00s
[2/3] Prepare transaction                                                   100% |   1.0   B/s |   1.0   B |  00m01s
[3/3] Installing libva-utils-0:2.22.0-5.fc43.x86_64                         100% |   3.4 MiB/s |   3.2 MiB |  00m01s
Complete!
USER:~$ 

Keeping on using Xorg is something I wasn’t thinking about, as a variable.

Still, gonna restart the PC to let these apply as properly as possible.

.

P.S.:
To revert a change, when Brave glitches out, I just edit the /home/isaac/.config/BraveSoftware/Brave-Browser/Local State directly.

firefox info is outdated:

  • MOZ_ENABLE_WAYLAND not required since version 121. you can force using xwayland with MOZ_ENABLE_WAYLAND=0 though
  • media.ffmpeg.vaapi.enabled is gone starting with version 137. For NVIDIA gpus configure media.hardware-video-decoding.force-enabled=true
  • media.av1.enabled = false for older GPUs with no support for AV1 hw decoding

I have no idea what these diagnostics do, and I can’t care because of my health.

As long as it helps making this work on Brave I’m happy.

@leigh123linux , I’ve restarted the PC and it still doesn’t work, just to let you know. I turned off the “force on” option.

~/Downloads$ dos2unix vulkan-diag.sh
bash vulkan-diag.sh
dos2unix: converting file vulkan-diag.sh to Unix format...

╔══════════════════════════════════════════════════╗
║   Vulkan / VA-API diagnostic tool for Fedora     ║
╚══════════════════════════════════════════════════╝

Step 0 — Detecting GPU
  ────────────────────────────────────────────────────────────
  [INFO]  01:00.0 VGA compatible controller: NVIDIA Corporation TU106 [GeForce RTX 2070] (rev a1)
  [WARN]  NVIDIA GPU detected — Vulkan video is still TBD on Fedora; VA-API via libva-nvidia-driver is recommended

Step 1 — Vulkan support
  ────────────────────────────────────────────────────────────
  [ERROR] vulkaninfo returned an error — Vulkan is not initializing.
  [INFO]  Try: sudo dnf install mesa-vulkan-drivers

Step 2 — Vulkan video extensions
  ────────────────────────────────────────────────────────────
  [OK]    Vulkan video extensions found — VK_KHR_video_decode_queue detected.
  [INFO]        VK_KHR_video_decode_h264                      : extension revision 9
  [INFO]        VK_KHR_video_decode_h265                      : extension revision 8
  [INFO]        VK_KHR_video_decode_queue                     : extension revision 8
  [INFO]        VK_KHR_video_decode_vp9                       : extension revision 1
  [INFO]        VK_KHR_video_encode_h264                      : extension revision 14
  [INFO]        VK_KHR_video_encode_h265                      : extension revision 14

Step 3 — VA-API
  ────────────────────────────────────────────────────────────
  [OK]    VA-API is working and exposes decode profiles.
  [INFO]          VAProfileMPEG2Simple            :     VAEntrypointVLD
  [INFO]          VAProfileMPEG2Main              :     VAEntrypointVLD
  [INFO]          VAProfileVC1Simple              :     VAEntrypointVLD
  [INFO]          VAProfileVC1Main                :     VAEntrypointVLD
  [INFO]          VAProfileVC1Advanced            :     VAEntrypointVLD
  [INFO]          VAProfileH264Main               :     VAEntrypointVLD

Step 4 — Driver packages
  ────────────────────────────────────────────────────────────
  [INFO]  intel-mediasdk-23.2.2-8.fc43.x86_64
  [INFO]  mesa-vulkan-drivers-25.3.6-3.fc43.x86_64
  [INFO]  mesa-va-drivers-25.3.6-3.fc43.x86_64
  [INFO]  libva-intel-media-driver-25.4.6-1.fc43.x86_64
  [INFO]  mesa-va-drivers-25.3.6-3.fc43.i686
  [INFO]  mesa-vulkan-drivers-25.3.6-3.fc43.i686
  [INFO]  libva-nvidia-driver-0.0.16-1.fc43.x86_64
  [OK]    Codec packages look good.

Step 5 — Firefox VA-API environment
  ────────────────────────────────────────────────────────────
  [INFO]  Session type: wayland
  [WARN]  MOZ_ENABLE_WAYLAND is not set (or not 1). Firefox may not use hardware decode on Wayland.
  [INFO]  Add to your shell profile: export MOZ_ENABLE_WAYLAND=1
  [INFO]  media.ffmpeg.vaapi.enabled not explicitly set (uses default).
  [INFO]  To ensure hardware decode: set media.ffmpeg.vaapi.enabled = true in about:config

╔══════════════════════════════════════════════════╗
║   Summary                                        ║
╚══════════════════════════════════════════════════╝

  ?  GPU vendor         nvidia
  ✘  Vulkan             ERROR — failed to initialize
  ✔  Vulkan video       OK
  ✔  VA-API             OK
  ✔  Packages           OK
  ?  Firefox            INFO — pref not set

RPM Fusion note:
  [INFO]  Some packages above require RPM Fusion. Enable it with:
  [INFO]    sudo dnf install https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm
  [INFO]    sudo dnf install https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm

For more info: https://fedoraproject.org/wiki/Hardware_Video_Acceleration

Do you have more than one GPU?

__NV_PRIME_RENDER_OFFLOAD=1 __VK_LAYER_NV_optimus=NVIDIA_only brave