How To Enable Hardware Accelerated Video Decode In Google Chrome, Brave, Vivaldi And Opera Browsers On Debian, Ubuntu Or Linux Mint (2023)

LogixUpdated on 2023-01-11T18:10:44Zchromium,how-to,video

How To Enable Hardware Accelerated Video Decode In Google Chrome, Brave, Vivaldi And Opera Browsers On Debian, Ubuntu Or Linux Mint (1)

Google Chrome 88 (and newer) has made hardware accelerated video decoding available on Linux, but it's not enabled by default. Google Chrome is not the only Chromium-based web browser to support hardware acceleration on Linux though. This article explains how to enable hardware-accelerated video decoding in Google Chrome, Brave, Vivaldi and Opera web browsers running on Debian, Ubuntu, Pop!_OS or Linux Mint (Xorg only).

Using hardware-accelerated video decode in your web browser should result in using less CPU usage (and thus, less battery draining) when playing online videos.

It's worth noting that Chromium web browser had patches that allowed making hardware accelerated video decoding available on Linux for some time, and some Linux distributions packaged it using those patches. So Chromium users have had hardware acceleration on Linux for some time, depending on their Linux distribution or if they installed the patched Chromium in some other way. E.g. on Ubuntu / Linux Mint there's a PPA with VA-API patched Chromium builds. Thus, these instructions may also work for Chromium browser, depending on how it's built.

I'd also like to add that these instructions to enable hardware accelerated video decoding also work on other Linux distributions, and not just Debian / Ubuntu-based Linux distributions, however, the driver names are different.

I tested these instructions using Ubuntu 20.10 desktop with Nvidia graphics, and the web browsers listed below installed using their original Ubuntu packaging (using a DEB package). Also tested using a laptop with Intel graphics (10th gen) on Ubuntu 20.04 and 20.10. I don't own a device with AMD graphics to test this.

In my test, I was able to get hardware-accelerated video decode to work on Linux using:

  • Google Chrome stable 88
  • Brave stable 1.19
  • Vivaldi snapshot 3.6 / [Edit] The latest Vivaldi stable 3.6 also works
  • Opera Beta 74

Obviously, it should continue to work with versions newer than these (so Google Chrome 89, Brave 1.20, etc.).

For me, hardware-accelerated video decode didn't work using:

  • Vivaldi stable 3.5. Vivaldi stable is now version 36, and that does have working hardware-accelerated video decoding
  • Opera stable 73
  • Microsoft Edge - there's not even a chrome://flags/#enable-accelerated-video-decode flag (to enable hardware-accelerated video decode).

You can use VA-API on XWayland, using the--use-gl=egl command line flag, but I did not try it. Starting with Google Chrome 91 (and other browsers based on Chromium 91), you'll also need to append the --enable-features=VaapiVideoDecoderand--disable-features=UseChromeOSDirectVideoDecoder flags.

[[Edit]] I've tried using the instructions below, and then launch the browser with the --use-gl=egland--disable-features=UseChromeOSDirectVideoDecoder flags on Wayland, on a laptop with Intel graphics, and hardware-accelerated video playback works. However, the videos stutter on this laptop with these settings. So in this case I prefer Firefox with hardware-accelerated video playback (on which, using Wayland and Firefox on the same laptop, video playback is fluid, but the CPU usage is greater than using a Chromium-based browser).


How to enable hardware-accelerated video decode in Google Chrome, Brave, Vivaldi And Opera web browsers on Debian, Ubuntu or Linux Mint (X11)

Things you need to enable hardware-accelerated video decode in the web browsers I mentioned above (so Google Chrome 88+, Brave 1.19+, Vivaldi 3.6+ and Opera 74+):

1. Enable the following web browser flags:

For browsers based on Google Chrome 90 and older:

  • Override software rendering list: chrome://flags/#ignore-gpu-blocklist
  • Hardware-accelerated video decode: chrome://flags/#enable-accelerated-video-decode

For browsers based on Google Chrome 91 and newer (there's no hardware-accelerated video decode any more, but we'll need to use a new command line flag - see step 4):

  • Override software rendering list: chrome://flags/#ignore-gpu-blocklist

2.Install the VA-API driver to be able to decode media (source), as well as libva-drm2 and libva-x11-2 (these 2 are probably already installed, but just in case; I added these 2 in a later edit, after I noticed hardware acceleration was not working without them, and as soon as I installed vainfo, which has these 2 packages as dependencies, it would start working):

  • For Intel Gen 7 and earlier hardware:
sudo apt install i965-va-driver-shaders libva-drm2 libva-x11-2

  • For Intel Gen 8+ hardware:
sudo apt install intel-media-va-driver-non-free libva-drm2 libva-x11-2

  • For Nouveau and AMD drivers (I couldn't get any browser to use hardware acceleration with the Nouveau drivers, maybe you have better luck):
sudo apt install mesa-va-drivers libva-drm2 libva-x11-2
  • For proprietary Nvidia drivers - you can install them from the repositories or by using the Proprietary GPU Drivers PPA(e.g. launch the Additional Drivers dialog on Ubuntu and install it from there). If you're using proprietary Nvidia drivers, you'll also needa patched vdpau-va-driver ([[edit]] this patch no longer supports VP9, even if your graphics support it, so you must use the h264ify extension in all cases - see below). You can get it from here(you'll also need libvdpau1 from hereas it's a dependency for vdpau-va-driver) for Debian / Ubuntu / Linux Mint / Pop!_OS, etc. The Ubuntu 20.04 package from there also works on Ubuntu 20.10 and newer. If you want to see the patches used by this package, download the .debian.tar.gz archive (from the same link as above) and look inside the "patches" folder. In case these DEBs don't work on Debian (I did not try it), use the these links for vdpau-va-driver (orig.tar.gz | debian.tar.xz)and libvdpau (orig.tar.gz | debian.tar.xz)to download the .orig.tar.gz and .debian.tar.xz archives, and build the DEB package on your system. Also install libva-drm2 and libva-x11-2: sudo apt install libva-drm2 libva-x11-2

Why the non-free versions of the intel-media-va-driver and i965-va-driver? In theory this should work with the free version (?), but in my test on a laptop with Intel Gen 10, hardware-accelerated video decoding only worked with the intel-media-va-driver-non-free driver, and not intel-media-va-driver (I'm not sure about the i965 driver, but I assumed it might be similar). There's also someone else here, saying this got it working for them.

3. Only needed for graphics card that don't support VP9 hardware video decoding: install the h264ify browser extension.

If your graphics card doesn't support VP9 hardware video decoding, install theh264ifybrowser extension (or enhanced-h264ify- some users say this works for them while the original extension doesn't; for me it's the other way around) and make sure it's enabled for VP9.

[[Edit]] Nvidia users: the patched vdpau-va-driver mentioned above no longer hardware accelerates VP9 in Chromium-based browser. So you must use the h264ify extension and avoid VP9 in order to get hardware-accelerated video decode.

If you still don't see MojoVideoDecoder in the chrome://media-internals tab (see below in the section for how to check if hardware-accelerated video decoding is enabled and actually used by the browser), try to restart the web browser after installing this extension. I've seen cases where this was needed, and some in which it wasn't required.

4. Launch the web browser using the --use-gl=desktopand flag to enable VA-API hardware acceleration. [Edit] With browsers based on Chromium 91 and newer, you'll also need to launch it with the --enable-features=VaapiVideoDecoder flag. [[Another edit]] Now it seems for most, also adding the --disable-features=UseChromeOSDirectVideoDecoder flag is also needed.

To be able to use VA-API for video decoding you'll need to launch the web browser, be it Chromium, Google Chrome, Brave, Opera or Vivaldi, using the following command line flags: --use-gl=desktop,--enable-features=VaapiVideoDecoder and --disable-features=UseChromeOSDirectVideoDecoder.

E.g. to launch Google Chrome using these flags:

google-chrome-stable --use-gl=desktop --enable-features=VaapiVideoDecoder --disable-features=UseChromeOSDirectVideoDecoder

Launch Brave using this:

brave-browser --use-gl=desktop --enable-features=VaapiVideoDecoder --disable-features=UseChromeOSDirectVideoDecoder

And so on.

To make this change permanent, copy the browser .desktop file from /usr/share/applications to ~/.local/share/applications (if this folder doesn't exist, create it). By copying the file here, we're making sure it won't be overwritten by an update. Then, open the .desktop file (e.g. brave-browser.desktop, brave-browser-beta.desktop, google-chrome.desktop, etc.) from this ~/.local/share/applications location, with a text editor. In this file, search for the line starting with Exec=, and change the executable to include --use-gl=desktop--enable-features=VaapiVideoDecoder --disable-features=UseChromeOSDirectVideoDecoder. E.g. for Brave: Exec=/usr/bin/brave-browser-stable --enable-features=VaapiVideoDecoder --disable-features=UseChromeOSDirectVideoDecoder, or for Google Chrome: Exec=/usr/bin/google-chrome-stable --enable-features=VaapiVideoDecoder --disable-features=UseChromeOSDirectVideoDecoder %U

Important note: If you see a completely white video image when launching the browser with --use-gl=desktop, check chrome://flags and make sure that Vulkan is not enabled there. Having Vulkan enabled and launching the browser using the --use-gl=desktop option will cause this to happen.

Another note, this time for Opera users: if after using the h264ify extension, you can no longer play videos on YouTube and other such websites, see the solutions from here to enable h264 support in Opera (note that if the web browser you're using is Opera Beta, the folder must be /opera-beta).

That's it.


How to check if hardware-accelerated video decoding is enabled and working in any Chromium-based web browser

Now let's check and see if the web browser is using hardware-accelerated video decoding.

First let's check if the browser supports hardware-accelerated video. Do this by opening a new tab and visiting chrome://gpu. On this page you should see "Video Decode: Hardware accelerated" (in green, like here):

How To Enable Hardware Accelerated Video Decode In Google Chrome, Brave, Vivaldi And Opera Browsers On Debian, Ubuntu Or Linux Mint (2)

This means that your web browser now supports hardware-accelerated video decoding. But is it able to actually hardware decode video? Let's check that too, by opening a YouTube video, then press Ctrl + Shift + i to open the Chrome DevTools. From the 3 vertical dots menu, click on More tools -> Media. Then click on the video title in the left-hand side panel of DevTools (Players section), and look in the Video Decoder section of the Media tab from Chrome DevTools:

How To Enable Hardware Accelerated Video Decode In Google Chrome, Brave, Vivaldi And Opera Browsers On Debian, Ubuntu Or Linux Mint (3)

If it says the decoder name is VideoDecode Accelerator or, I've also seen this as VDAVideoDecoder (previously it was MojoVideoDecoder, and before that it was GpuVideoDecoder, so if you get any of those and you're using an older browser version, that's ok, you have hardware acceleration), and Hardware decoder is true, then you're using hardware-accelerated video decoding. If it says FFmpegVideoDecoder, VpxVideoDecoder or Dav1dVideoDecoder (and in this case, the Hardware decoder should say false), your web browser is not using hardware-accelerated video decoding.

FAQs

How do I enable video hardware acceleration in Chrome Linux? ›

If you're looking to enable—or re-enable—hardware acceleration, head back to chrome://settings/system and toggle “Use hardware acceleration when available” setting to the “On” position. Then, click “Relaunch” to apply the change.

How do I enable GPU acceleration in Chrome Ubuntu? ›

The first step is to input the chrome:/flags into the Chrome's URL bar. As seen in the following image, the flag page opens. Seek the Override software rendering list that employs the search bar. Now, we can check if the acceleration is enabled successfully by visiting the chrome://gpu page.

How do I enable hardware acceleration in Linux? ›

mpv has good hardware acceleration support, although it is not enabled by default. To enable it, use the --hwdec command line switch. It can also be made the default by adding a line like “hwdec” to the mpv configuration file (e.g., $HOME/. config/mpv/mpv.

How do I force hardware acceleration in chrome Linux? ›

To force acceleration, enter chrome://flags in the search bar. Under Override software rendering list, set to Enabled, then select Relaunch. You can check whether hardware acceleration is turned on in Chrome by typing chrome://gpu into the address bar at the top of the browser.

How do I enable hardware acceleration in Firefox Linux? ›

How to enable hardware video acceleration in Firefox on Linux
  1. Open the Firefox preferences page by typing about:config in the address bar. Accept the warning about potential risks, and proceed. ...
  2. Search for the following preference. media.ffmpeg.vaapi.enabled.
  3. The option's value is set to False by default.
Feb 11, 2022

Should I turn on hardware acceleration opera? ›

If you use a computer that's not very powerful, you might choose to disable hardware acceleration. Uncheck Use hardware acceleration when available under the System heading and Opera won't use the capacity of your graphics card for loading content faster.

Should I enable hardware acceleration in Firefox? ›

Use hardware acceleration when available: This setting allows Firefox to use your computer's graphics processor, if possible, instead of the main processor, to display graphics-heavy web content such as videos or games. This frees up resources on your computer so it can run other applications, like Firefox, faster.

How do I enable hardware acceleration in BIOS? ›

Simply access your BIOS (Settings -> Update and Security -> Recovery. Under the Advanced Startup section press 'Restart Now' and your pc will restart. The above screen should appear, press Troubleshoot -> Advanced Options -> UEFI Firmware Settings -> Restart.

Does Firefox Linux have hardware acceleration? ›

Firefox on Fedora supports hardware acceleration on Linux so let's look how to configure it and diagnose potential issues.

How do I enable GPU acceleration in Linux? ›

Enable GPU Acceleration in Linux on Chromebooks
  1. Open the Chrome browser and move to the Chrome Flags page. ...
  2. After that, search for “Crostini GPU Support” and enable it from the drop-down menu. ...
  3. After the reboot, open the Linux Terminal and run the below command to update the packages and dependencies.
Jul 23, 2021

How do I enable GPU performance? ›

GPU Performance settings

To access the following GPU options, go to Edit > Preferences > Performance. GPU Performance: Enable or disable GPU Performance feature.

How do I enable Force GPU rendering? ›

On your device, go to Settings and tap Developer Options. In the Monitoring section, select Profile GPU Rendering or Profile HWUI rendering, depending on the version of Android running on the device. In the Profile GPU Rendering dialog, choose On screen as bars to overlay the graphs on the screen of your device.

How do I enable high-performance GPU? ›

Change your default GPU to a high-performance graphics card:
  1. Right-click anywhere on your desktop.
  2. Click NVIDIA Control Panel.
  3. On the left side, select Manage 3D Settings.
  4. Select the Global Settings tab.
  5. Change the preferred graphics processor to "High-performance NVIDIA processor."
Oct 27, 2021

What does enable hardware decoder mean? ›

Hardware decoding provides better decoding performance and lower CPU usage when you play high definition videos during live view or playback. Tap More > Settings to enter the Settings page, and then enable the function. Note: The function is available only when the phone OS is iOS 8.0 or later version.

What is Hardware-accelerated video decode? ›

Hardware video acceleration makes it possible for the video card to decode/encode video, thus offloading the CPU and saving power.

How do I force hardware acceleration? ›

From the upper-right of your Chrome browser, click the three dots icon. Select Settings. Click Advanced and select System. Enable Use hardware acceleration when available.

Should I enable use hardware acceleration in chrome? ›

Is Hardware Acceleration Good or Bad? Hardware acceleration is good because it boosts performance for certain tasks. But sometimes, it may cause issues such as freezing or crashing in Google Chrome or other browsers, forcing you to disable the feature to fix the issue.

How do I enable hardware acceleration in Opera? ›

Opera. Select Opera --> Preferences... or go to about:config to open the browser settings. Expand the Advanced options and select Browser. Go to the System section and ensure that Use hardware acceleration when available is enabled.

Why is my hardware acceleration not working chrome? ›

If hardware acceleration is disabled even after you overrode the system flags, then the problem may not be in the Chrome's software. Instead, you should try and update your video drivers or check if the graphics card has physical issues.

How do I enable hardware video decode in Firefox Ubuntu? ›

Tutorial: How to enable hardware video acceleration on Firefox and Chromium based browsers
  1. type about:config in the address bar.
  2. in the search bar type gfx. webrender. all and set it to true.
  3. in the search bar type media. ffmpeg. vaapi. enabled and set it to true.
Sep 12, 2022

How can I tell if hardware acceleration is enabled? ›

Press the Windows Key + S, type in, and click on Graphics Settings. Click on Change default graphic settings. Toggle Hardware-accelerated GPU scheduling on or off.

Is turning hardware acceleration good? ›

In general you should always enable hardware acceleration as it will result in better performance of your application. This will usually be a higher frame rate (the number of images displayed per second), and the higher the frame rate the smoother the animation.

Does disabling hardware acceleration improve performance? ›

If your computer has slow response times for Microsoft Office or web browsers, disabling hardware acceleration may speed up your system.

How do I enable hardware decode in Firefox? ›

Go to General. Scroll down and go to Performance. Uncheck the box next to Use recommended performance settings. To enable hardware acceleration, tick the box next to Use hardware acceleration when available.

Should I turn on hardware acceleration on Android? ›

Hardware acceleration is enabled by default if your Target API level is >=14, but can also be explicitly enabled. If your application uses only standard views and Drawable s, turning it on globally should not cause any adverse drawing effects.

How to enable hardware virtualization in BIOS? ›

How to Enable Virtualization in BIOS?
  1. Reboot the computer.
  2. While the system is restarting from a black screen, enter BIOS by pressing the hotkey. ...
  3. Navigate to Advanced Tab and press Enter to continue.
  4. Select Virtualization and Enable.
  5. Save changes and reboot the computer.
Feb 10, 2023

Why is hardware acceleration not available? ›

When hardware acceleration is not working on your PC, or if you encounter a similar error message as shown below in a game or any other program, you should install a new driver for your graphics card or sound card, in other words, update your graphics card or sound card driver.

How do I enable virtualization in Ryzen BIOS? ›

Enabling AMD Virtualization Technology
  1. From the System Utilities screen, select System Configuration > BIOS/Platform Configuration (RBSU) > Virtualization Options > AMD Virtualization Technology.
  2. Select one of the following: Enabled. Disabled.
  3. Save your setting.

How do I enable hardware acceleration in Ubuntu? ›

Installing and using Chromium browser with VA-API support on Ubuntu or Linux Mint
  1. Add the Chromium with VA-API support PPA. ...
  2. Pin the PPA with a priority of 1001. ...
  3. Install Chromium Browser from the Saiarcot895 (VA-API) PPA: ...
  4. Install the VA-API driver. ...
  5. Enable the Hardware-accelerated video option in Chromium.
Jan 11, 2023

How to enable AMD GPU in Ubuntu? ›

Installing the AMDGPU-PRO Driver
  1. Run the following in terminal: sudo apt-get update. sudo apt-get upgrade. sudo apt-get dist-upgrade. vsudo reboot.
  2. Once the file is downloaded, run the following in terminal: cd ~Downloads/ tar -jxvf amdgpu-pro* cd amdgpu-pro* ./amdgpu-pro-install --compute.
Nov 10, 2021

Does Linux support hardware acceleration? ›

Starting from version 2.5, HDX RTME supports hardware acceleration for video compression on Linux thin clients or fat clients with AMD GPU. Specifically, for video encoding RTME uses VCE 2.0 or higher.

How do you unlock GPU performance? ›

From the NVIDIA Control Panel, navigate to Developer->Manage GPU Performance Counters. Select Allow access to GPU performance counters to all users, then click Apply.

Should I enable GPU acceleration? ›

GPU acceleration is essential because it allows computers to speed up processes that work similarly to graphical processing. Acceleration boosts the speed of execution for complex computational problems that can be broken down into similar, parallel operations.

How can I force integrated graphics? ›

Click the Program Settings tab. Select the program you want to choose a graphics card for from the drop-down list. Select the preferred graphics processor in the drop-down list. If you want to use the integrated graphics card, select Integrated Graphics.

What is hardware accelerated rendering developer options? ›

Hardware-accelerated rendering options provide ways to optimize your app for its target hardware platforms by leveraging hardware-based options such as the GPU, hardware layers, and multisample anti-aliasing (MSAA). Tap Simulate color space to change the color scheme of the entire device UI.

What is enable GPU acceleration? ›

Media Server can use a graphics card (GPU) to perform some processing tasks. Using a GPU rather than the CPU can significantly increase the speed of training and analysis tasks that use Convolutional Neural Networks. Tasks that benefit from a GPU are: Image classification.

How do I access my AMD graphics card settings? ›

This can be done in any of the following ways:
  1. Right click on your desktop and select AMD Radeon Settings.
  2. Click on the Radeon Settings icon in the System Tray.
  3. Select AMD Radeon Settings from the Programs menu.

How do I enable hardware acceleration on Google? ›

From the upper-right of your Chrome browser, click the three dots icon. Select Settings. Click Advanced and select System. Enable Use hardware acceleration when available.

How do I enable hardware acceleration in browser settings for Google? ›

Enable Browser Hardware Acceleration for Virtual Background
  1. Click the Options icon (three vertical dots) at the top-right corner of the browser window, then click Settings.
  2. Scroll down to the bottom of the settings page then click Advanced.
  3. Under System, click the toggle switch for Use hardware acceleration when available.

How do I enable encoding in Chrome? ›

Google Chrome
  1. Click the menu icon. on the browser toolbar.
  2. Select More tools, then View Source.

How do I enable hardware acceleration in opera? ›

Opera. Select Opera --> Preferences... or go to about:config to open the browser settings. Expand the Advanced options and select Browser. Go to the System section and ensure that Use hardware acceleration when available is enabled.

Does Firefox have hardware acceleration? ›

Use hardware acceleration when available: This setting allows Firefox to use your computer's graphics processor, if possible, instead of the main processor, to display graphics-heavy web content such as videos or games. This frees up resources on your computer so it can run other applications, like Firefox, faster.

How do I enable GPU acceleration in BIOS? ›

Enabling Hardware Virtualization
  1. Reboot your Computer and Press the BIOS Key. ...
  2. Locate the section for CPU configuration. ...
  3. Find the Settings for Virtualization. ...
  4. Select the Option for Enabling Virtualization. ...
  5. Save the Changes You Have Made. ...
  6. Exit Your BIOS and Reboot Your Computer.
Jan 8, 2021

Why is my hardware acceleration not working Chrome? ›

If hardware acceleration is disabled even after you overrode the system flags, then the problem may not be in the Chrome's software. Instead, you should try and update your video drivers or check if the graphics card has physical issues.

How do I fix hardware acceleration is either disabled or not supported by my video card? ›

Hardware Acceleration is either disabled or not supported by video card driver
  1. Choose Start > Control Panel.
  2. Double click Personalization and select Display Settings.
  3. Click Advanced Settings.
  4. Click Change Settings on the Troubleshooting tab.
  5. Move the Hardware Acceleration slider to Enable.
Jun 14, 2010

Should I enable hardware acceleration in Opera? ›

If you use a computer that's not very powerful, you might choose to disable hardware acceleration. Uncheck Use hardware acceleration when available under the System heading and Opera won't use the capacity of your graphics card for loading content faster.

How do you fix encoding issues? ›

You can fix most encoding issues with three steps:
  1. Discover which encoding your string is actually in. This sounds easy. ...
  2. Decide which encoding you want the string to be. This one's easy. ...
  3. Re-encode your string from the encoding in step 1 to the encoding in step 2. You can do this with the encode method.

References

Top Articles
Latest Posts
Article information

Author: Ms. Lucile Johns

Last Updated: 14/11/2023

Views: 6067

Rating: 4 / 5 (61 voted)

Reviews: 84% of readers found this page helpful

Author information

Name: Ms. Lucile Johns

Birthday: 1999-11-16

Address: Suite 237 56046 Walsh Coves, West Enid, VT 46557

Phone: +59115435987187

Job: Education Supervisor

Hobby: Genealogy, Stone skipping, Skydiving, Nordic skating, Couponing, Coloring, Gardening

Introduction: My name is Ms. Lucile Johns, I am a successful, friendly, friendly, homely, adventurous, handsome, delightful person who loves writing and wants to share my knowledge and understanding with you.