Save 10%Pay yearly on any plan. 6% half-yearly, 3% quarterly. Help centreWhatsAppTelegram TeamsOpen a ticket

How to Enable GPU Acceleration in Linux for Video, Browsers and Apps

Turn on hardware acceleration in Linux step by step: check the driver, then video players, Firefox, Chrome, OBS Studio and Blender, with a test for each.

3 min readBy Shailabh

Reviewed by the AmazingRDP technical team

Enabling GPU acceleration in Linux

No graphics card in your machine? A GPU dedicated server gives you one in the datacentre. See GPU Dedicated Servers from $109.99

With GPU acceleration, the graphics card decodes video, draws web pages and renders scenes, and the processor is left free. On Linux it is often switched off by default or missing one package. Work through the steps in order: every later step depends on the driver in step 1.

1. Check the driver first

lspci -k | grep -EA3 'VGA|3D|Display'

Under your card, the line Kernel driver in use should name a real driver: i915 or xe (Intel), amdgpu (AMD), nvidia (NVIDIA's own driver). Intel and AMD drivers come with the system. For NVIDIA on Ubuntu, install the recommended driver and restart:

sudo ubuntu-drivers install

More ways to inspect the card are in how to check GPU information in Linux.

2. Check video decoding support

Linux has two interfaces for hardware video decoding: VA-API (Intel, AMD) and VDPAU / NVDEC (NVIDIA).

Intel and AMD:

sudo apt install vainfo
vainfo

A list of profiles such as VAProfileH264High and VAProfileHEVCMain means decoding is available for those formats. If vainfo reports an error, install the driver package: intel-media-va-driver for Intel, mesa-va-drivers for AMD.

NVIDIA:

sudo apt install vdpauinfo
vdpauinfo

3. Video players

mpv:

mpv --hwdec=auto video.mp4

While it plays, press i. The line "Hardware decoding" names the method in use. To make it permanent, put hwdec=auto into ~/.config/mpv/mpv.conf.

VLC: open Tools, Preferences, Input / Codecs, and set Hardware-accelerated decoding to Automatic.

4. Firefox

  1. Open Settings, scroll to Performance, and make sure Use hardware acceleration when available is ticked (untick "Use recommended performance settings" to see it).
  2. Open about:support and look at the Graphics section. "Compositing: WebRender" means pages are drawn by the graphics card; "WebRender (Software)" means they are not.
  3. For video decoding, open about:config and set media.ffmpeg.vaapi.enabled to true if it is not already. On NVIDIA this also needs the separate nvidia-vaapi-driver package.

5. Chrome and Chromium

  1. Open Settings, System, and switch on Use graphics acceleration when available. Restart the browser.
  2. Open chrome://gpu. The list at the top shows each feature as "Hardware accelerated", "Software only" or "Disabled".

If your card is on Chrome's block list, the flag Override software rendering list on chrome://flags forces acceleration on; use it only if the browser stays stable. Hardware video decoding on Linux has needed extra start-up flags whose names changed from version to version, so check the "Video Decode" line on chrome://gpu after each update and do not rely on an old flag from a guide.

6. Apps

OBS Studio: open Settings, Output, and choose the hardware encoder under Encoder: NVENC for NVIDIA, VAAPI for Intel and AMD. If no hardware encoder is listed, the driver from step 1 or the VA-API package from step 2 is missing.

Blender: open Edit, Preferences, System. Under Cycles Render Devices choose OptiX or CUDA (NVIDIA), HIP (AMD) or oneAPI (Intel) and tick your card. Then set Device to GPU Compute in the scene's render settings.

FFmpeg: list the hardware methods your build supports with ffmpeg -hwaccels. See installing and using FFmpeg in Python.

7. Confirm that the card is working

Start a video or a render and watch the card:

nvidia-smi
sudo intel_gpu_top
sudo radeontop

One line per brand: NVIDIA, Intel, AMD. If the load stays at zero while the processor is busy, acceleration is not in use.

When it does not work

  • The renderer is "llvmpipe". The system draws with the processor; the graphics driver is not loaded. Back to step 1.
  • A virtual machine or VPS. There is no physical card to use. Acceleration needs real hardware, for example a GPU dedicated server.
  • Crashes or flicker after switching it on. Switch the setting off again in that one program; an older card or driver may not handle it.
  • Only some videos are accelerated. The card decodes only the formats in the vainfo list. Newer formats such as AV1 need a recent card.

Questions

How do I know if GPU acceleration is working in Linux?

Watch the card with nvidia-smi, intel_gpu_top or radeontop while a video plays. In browsers, check chrome://gpu or about:support.

What is the difference between VA-API and VDPAU?

Both let programs decode video on the graphics card. VA-API is used by Intel and AMD drivers; VDPAU comes from NVIDIA.

Does GPU acceleration work on a VPS?

No. A normal VPS has no physical graphics card. You need a machine with a real card.

Why does my browser say "Software only"?

The graphics driver is missing, the setting is switched off, or the card is on the browser's block list.