
{"id":45134,"date":"2024-01-08T15:34:36","date_gmt":"2024-01-08T15:34:36","guid":{"rendered":"https:\/\/ubuntuhandbook.org\/?p=45134"},"modified":"2024-01-08T15:34:36","modified_gmt":"2024-01-08T15:34:36","slug":"chromium-va-api-wayland","status":"publish","type":"post","link":"https:\/\/ubuntuhandbook.org\/index.php\/2024\/01\/chromium-va-api-wayland\/","title":{"rendered":"Chromium to Allow VA-API Hardware Decoding in Linux Wayland"},"content":{"rendered":"<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/05\/chromium-logo.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"alignleft size-thumbnail wp-image-39866\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/05\/chromium-logo-250x250.webp\" alt=\"\" width=\"250\" height=\"250\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/05\/chromium-logo-250x250.webp 250w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/05\/chromium-logo-300x300.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/05\/chromium-logo-600x600.webp 600w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/05\/chromium-logo-768x768.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2022\/05\/chromium-logo.webp 1200w\" sizes=\"auto, (max-width: 250px) 100vw, 250px\" \/><\/a><\/p>\n<p>For Chromium user, the popular web browser is finally to allow VA-API hardware decoding for video playback in Linux Wayland.<\/p>\n<p><b>Chromium so far does NOT officially support VA-API Video Acceleration API on Linux.<\/b> However, there are experimental flags to enable this feature, which might work on certain configurations, but without guarantees (See the <a href=\"https:\/\/chromium.googlesource.com\/chromium\/src\/+\/refs\/heads\/main\/docs\/gpu\/vaapi.md\" target=\"_blank\" rel=\"noopener\">official Docs<\/a>).<\/p>\n<p>This experimental feature however does not work in Linux with Wayland session. Meaning the most recent Ubuntu, Fedora, &amp; other Linux with GNOME Desktop.<\/p>\n<p>Just few days ago on Saturday, Chromium source merged the request to &#8220;<code><a href=\"https:\/\/chromium-review.googlesource.com\/c\/chromium\/src\/+\/3646633\" target=\"_blank\" rel=\"noopener\">allowing VA-API on Linux Ozone\/Wayland<\/a><\/code>&#8220;, submitted by JianHui J Dai.<\/p>\n<blockquote><p><i>VaapiWrapper has been updated to remove the usage of libva-x11 and the legacy VaapiVideoDecodeAccelerator, in favor of libva-drm only. This means now Linux Ozone\/Wayland can share the same code path as Linux Ozone\/X11. See CL:4938496.<\/i><\/p>\n<p><i>This CL removes the remaining libva-x11 codes from Ozone and VaapiWrapper, and allows VA-API by default on Linux Ozone\/Wayland.<\/i><\/p><\/blockquote>\n<p><!--more--><br \/>\n<b>So this experimental feature will also work for Linux on Wayland. NOTE: it&#8217;s NOT released yet, but expected in next Chromium 121 or even later releases.<\/b><\/p>\n<p>Once the feature is officially release, then, user can try to launch the browser with following flags, if the package in your system was built with <code>va-api<\/code> support:<\/p>\n<ul>\n<li><code style=\"font-size:11px;\">--enable-features=VaapiVideoDecodeLinuxGL --use-gl=angle --use-angle=gl --ozone-platform=x11<\/code> for Xorg.<\/li>\n<li><code style=\"font-size:11px;\">--enable-features=VaapiVideoDecodeLinuxGL --use-gl=angle --use-angle=gl --ozone-platform=wayland<\/code> for Wayland.<\/li>\n<\/ul>\n<h3>Try Chromium Snap package with VA-API Hardware Acceleration<\/h3>\n<p><a href=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/01\/chromium-snap-vappi.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-large wp-image-45135\" src=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/01\/chromium-snap-vappi-700x372.webp\" alt=\"\" width=\"610\" height=\"324\" srcset=\"https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/01\/chromium-snap-vappi-700x372.webp 700w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/01\/chromium-snap-vappi-300x160.webp 300w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/01\/chromium-snap-vappi-768x409.webp 768w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/01\/chromium-snap-vappi-1320x702.webp 1320w, https:\/\/ubuntuhandbook.org\/wp-content\/uploads\/2024\/01\/chromium-snap-vappi.webp 1511w\" sizes=\"auto, (max-width: 610px) 100vw, 610px\" \/><\/a><\/p>\n<p>Ubuntu has been <a href=\"https:\/\/bugs.launchpad.net\/ubuntu\/+source\/chromium-browser\/+bug\/1816497\" target=\"_blank\" rel=\"noopener\">working on VA-API support<\/a> for its Chromium snap package for a few years. It works for me on <code>Intel i5-10400<\/code> with built-in <code>UHD 630<\/code>, but not for many other machines as reported.<\/p>\n<p>1. To try it out, press <code>Ctrl+Alt+T<\/code> on keyboard to open terminal. Then, run command to install it:<\/p>\n<pre>sudo snap install --beta chromium<\/pre>\n<p>If you already installed Chromium as Snap, use the command below instead to switch to Beta channel:<\/p>\n<pre>sudo snap refresh --beta chromium<\/pre>\n<p>2. Once installed, launch the browser either from start menu (or app grid), or by running <code>snap run chromium<\/code> command from terminal.<\/p>\n<p>Then, start playing a video to verify. For YouTube video, you have to install a <a href=\"https:\/\/chromewebstore.google.com\/detail\/enhanced-h264ify\/omkfmpieigblcllmkgbflkikinpkodlk\" target=\"_blank\" rel=\"noopener\">browser extension<\/a> to block VP8\/VP9 codecs.<\/p>\n<p>And, for Intel GPU, run the command below to install the tool:<\/p>\n<pre>sudo apt install intel-gpu-tools<\/pre>\n<p>Then, run <code>sudo intel_gpu_top<\/code> to check video engine while playback.<\/p>\n<p>3. (<b>Optional<\/b>) If the Snap package does not work for you, either switch back to stable version by running command:<\/p>\n<pre>sudo snap refresh --stable chromium<\/pre>\n<p>Or remove the package by:<\/p>\n<pre>sudo snap remove chromium<\/pre>","protected":false},"excerpt":{"rendered":"<p>For Chromium user, the popular web browser is finally to allow VA-API hardware decoding for video playback in Linux Wayland. Chromium so far does NOT officially support VA-API Video Acceleration API on Linux. However, there are experimental flags to enable this feature, which might work on certain configurations, but without guarantees (See the official Docs). [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":39866,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[866,2057],"class_list":["post-45134","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-news","tag-chromium-browser","tag-web"],"_links":{"self":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/45134","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/comments?post=45134"}],"version-history":[{"count":0,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/posts\/45134\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media\/39866"}],"wp:attachment":[{"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/media?parent=45134"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/categories?post=45134"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ubuntuhandbook.org\/index.php\/wp-json\/wp\/v2\/tags?post=45134"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}