Rocky/RHEL Linux Performance & Power Optimization Series — Part 2 of 4

Enable Intel VA-API Hardware Acceleration in Firefox on Rocky/RHEL Linux

Diagnose a failing vainfo test, install the correct Intel Media Driver, and configure Firefox for hardware video decoding on Rocky Linux 9 Ice Lake graphics.

Guide details:
  • Audience: Linux laptop users, students, and administrators on Rocky/RHEL Linux 9.x
  • Difficulty: Beginner–Intermediate
  • Time: About 20–30 minutes hands-on
  • Reboot: Not required for any step in this guide
What you will learn:
  • The difference between OpenGL acceleration and VA-API video decoding
  • Why the legacy i965 driver fails on newer Intel GPU generations
  • How to locate and install the correct Intel Media Driver (iHD)
  • How to verify VA-API with vainfo and configure Firefox to use it
  • How to steer YouTube toward a hardware-decodable codec
Prerequisites:
  • Rocky/RHEL Linux 9.x with an account that has sudo access
  • An Intel integrated GPU (this guide was validated on Ice Lake/Gen11 graphics)
  • Firefox installed, and the RPM Fusion Nonfree repositories available
  • Completion of Part 1: Battery Life Optimization is recommended but not required

Introduction

Modern web browsers can offload video decoding from the CPU to the GPU, a feature known as hardware video acceleration. On a laptop, this reduces CPU usage, lowers temperatures, decreases fan noise, and improves battery life during video playback — all things this series has been working toward since Part 1.

During the optimization of the same Intel Ice Lake laptop running Rocky Linux 9.8 with Xfce, OpenGL acceleration worked correctly out of the box, but hardware video decoding did not. This guide documents that troubleshooting process end to end: from a failing vainfo test to a fully working Firefox hardware decoding pipeline, including the YouTube codec quirk that undoes the fix if left unaddressed.

Why Hardware Video Decoding Matters

Without hardware acceleration, the CPU decodes every video frame in software. Streaming high-resolution video can noticeably increase CPU utilization, battery drain, and system temperature — especially on a dual-core, thermally limited laptop CPU. When VA-API is working correctly, the Intel GPU performs most of the decoding work for supported codecs such as H.264, VP9, and HEVC, freeing the CPU for everything else.

Decoding path Typical effect
Software decoding (CPU) Higher CPU usage, more heat, more fan noise, faster battery drain
Hardware decoding (GPU via VA-API) Lower CPU usage, cooler system, quieter fans, better battery life

Before You Begin

Test Platform

Component Details
Laptop Intel Ice Lake laptop
CPU Intel Core i3-1005G1 (10th Gen Ice Lake)
Graphics Intel UHD / Iris Plus G1 (Gen11)
OS Rocky Linux 9.8, Xfce desktop
Browser Firefox ESR 140
Graphics stack Mesa 25.x, Intel i915 kernel driver

Important warnings

Note: The correct VA-API driver depends on your Intel GPU generation. This guide's driver choice (iHD) applies to Gen9 and newer graphics, including Ice Lake. Older Intel GPUs may still require the legacy i965 driver.
Caution: Installing packages from the RPM Fusion Nonfree repository requires that repository to be enabled first. Only enable repositories you trust.

Step 1: Verify Basic Graphics Acceleration

Before troubleshooting VA-API, confirm that OpenGL acceleration itself is working:

glxinfo -B

What it does: Reports whether direct rendering is available and which renderer Mesa is using. Expected output: Direct rendering: Yes, an Intel renderer string, and Accelerated: Yes. Reboot required: No. Risk: None — read-only diagnostic.

Next, confirm the kernel graphics driver is loaded:

lspci -k | grep -A3 VGA

The important line to look for is:

Kernel driver in use: i915

In the validation environment, both checks passed — OpenGL acceleration and the i915 kernel driver were functioning correctly. That confirmed the graphics hardware itself was healthy, and any remaining problem would be specific to video decoding.

Step 2: Test VA-API and Identify the Failure

Test the Video Acceleration API directly:

vainfo

What it does: Attempts to initialize a VA-API driver and list supported codec profiles. Expected output on a working system: Driver name, VA-API version, and a list of supported profiles. Reboot required: No. Risk: None.

In the validation environment, this command failed instead of listing codecs. The system searched for both iHD_drv_video.so and i965_drv_video.so, but neither driver initialized successfully — indicating that the graphics hardware was working, but no compatible video acceleration driver was actually installed.

Checking installed packages

rpm -qa | grep -E 'mesa|libva|intel'

What it does: Lists installed packages matching the graphics stack. Expected output: Mesa libraries, libva, and possibly intel-mediasdk. Reboot required: No. Risk: None.

This confirmed Mesa, libva, and intel-mediasdk were present, but the required Intel Media Driver file was still missing from the driver directory.

Key lesson: Working 3D acceleration does not guarantee hardware video decoding. OpenGL and VA-API are handled by different driver components, and one working does not imply the other does.

Step 3: Why the Legacy i965 Driver Was Not Enough

The first troubleshooting attempt installed the legacy Intel VA-API package:

sudo dnf install libva-intel-driver

This successfully installed i965_drv_video.so. Testing again:

LIBVA_DRIVER_NAME=i965 vainfo

Initialization still failed. What it does: Forces vainfo to load the i965 driver specifically. Expected output on compatible hardware: Codec profile list. Reboot required: No. Risk: Low.

The reason is architectural: the legacy i965 driver supports older Intel GPU generations, while the validation system's Ice Lake (Gen11) GPU requires the newer Intel Media Driver (iHD). Installing the wrong driver family can still leave hardware decoding unavailable even though the install itself succeeds without error.

Driver GPU generations Package
i965 (legacy) Older Intel GPUs, pre-Gen9 libva-intel-driver
iHD (modern) Gen9 and newer, including Ice Lake intel-media-driver

Step 4: Finding the Correct Driver

Searching the default repositories initially produced confusing results — the legacy libva-intel-driver package was visible, but the modern Intel Media Driver was not, because the RPM Fusion Nonfree updates repository was disabled. After enabling that repository, the search succeeded:

dnf search intel-media-driver

The package listing confirmed it would provide /usr/lib64/dri/iHD_drv_video.so — the file the earlier vainfo attempt had been unable to find.

Tip: If dnf search intel-media-driver returns nothing, check whether the RPM Fusion Nonfree repositories are enabled before assuming the package does not exist for your release.

Step 5: Install the Intel Media Driver

sudo dnf install intel-media-driver

What it does: Installs the modern Intel iHD VA-API implementation required for Gen9+ and Ice Lake graphics, distinct from the older i965 driver. Expected output: Successful transaction summary. Reboot required: No. Risk: Low.

Verify the driver file now exists:

ls -l /usr/lib64/dri/iHD_drv_video.so

The file should be present after installation.

Step 6: Verify VA-API

LIBVA_DRIVER_NAME=iHD vainfo

What it does: Forces vainfo to initialize the iHD driver and list supported codec profiles. Expected output: Intel iHD driver name, VA-API version, and supported profiles — no initialization errors. Reboot required: No. Risk: None.

In the validation environment, this produced a successful result listing typical Ice Lake codec support:

Codec Typical iHD support on Ice Lake
H.264 Supported
MPEG-2 Supported
VP8 Supported
VP9 Supported
HEVC (H.265) Supported
JPEG Supported
AV1 Not supported (decoded in software)

A successful vainfo test like this is one of the strongest indicators that hardware video decoding is correctly configured at the system level.

Step 7: Configure Firefox

Open about:support and check the following items:

Item in about:support Expected value
Compositing WebRender
Hardware Video Decoding Available

Next, open about:config, accept the risk warning, and confirm these preferences are enabled:

media.ffmpeg.vaapi.enabled = true
media.hardware-video-decoding.enabled = true
media.rdd-ffmpeg.enabled = true

What it does: Allows Firefox's media pipeline to use VA-API for supported codecs instead of decoding in software. Expected output: All three preferences show true; about:support reports Hardware Video Decoding as Available after a restart. Reboot required: No — restarting Firefox is enough. Risk: Low.

Important: Restart Firefox after changing about:config values. Preferences take effect on the next launch, not immediately.

Step 8: Fixing YouTube Codec Selection

Even with VA-API fully working, YouTube frequently selected the AV1 codec during testing. AV1 offers excellent compression efficiency, but the Intel Core i3-1005G1 has no dedicated AV1 hardware decoder — so Firefox fell back to decoding AV1 on the CPU, silently undoing the benefit of the VA-API setup for that site.

Installing the Firefox extension enhanced-h264ify solved this. Recommended configuration:

Option Setting
Block AV1 Enabled
Block VP9 Disabled
Block VP8 Disabled
Block H.264 Disabled

Blocking only AV1 lets YouTube fall back to VP9, which the Intel GPU can decode through VA-API. For most other streaming services, codec selection is controlled by the site itself — if it serves H.264, VP9, or HEVC, the Intel GPU can usually decode it through the pipeline configured in this guide.

Tip: Use YouTube's "Stats for Nerds" panel (right-click the video) to confirm which codec is actually playing before assuming hardware decoding is or is not active.

Observed Benefits

After completing this configuration, the changes were measurable rather than anecdotal:

  • Firefox reported Hardware Video Decoding as Available in about:support.
  • Supported videos used GPU decoding instead of software decoding.
  • CPU usage during streaming decreased noticeably.
  • Laptop temperatures remained lower during extended playback.
  • Fan noise reduced during video-heavy sessions.
  • Battery life improved while watching online video, complementing the gains from Part 1 of this series.
Key takeaways:
  • OpenGL acceleration and VA-API are separate technologies — verify both independently.
  • Match the VA-API driver to your GPU generation: iHD for Gen9+/Ice Lake, i965 for older hardware.
  • The Intel Media Driver often lives behind the RPM Fusion Nonfree repository, not the default repos.
  • A clean vainfo result is the strongest signal that hardware decoding is correctly configured.
  • Codec selection at the website level, such as YouTube defaulting to AV1, can silently defeat a correct VA-API setup.

Conclusion

Hardware video acceleration depends on several components working together: the kernel graphics driver, Mesa libraries, the correct Intel VA-API driver, and browser support. A single missing or mismatched component — in this case, the absence of the iHD driver — can prevent the entire pipeline from functioning even when everything else looks correct.

By installing the modern Intel Media Driver, verifying VA-API with vainfo, and configuring both Firefox and YouTube's codec selection, this Rocky Linux laptop achieved reliable hardware decoding for H.264, VP9, and HEVC content — a cooler, quieter system with lower CPU usage and better battery life during multimedia playback. Part 3 of this series continues with a PowerTOP deep dive to measure and extend these gains further.

Verify Changes

Run through each check below to confirm the full hardware decoding pipeline is working.

1. OpenGL acceleration

glxinfo -B

Expected: Direct rendering: Yes and an Intel renderer with Accelerated: Yes.

2. VA-API working

LIBVA_DRIVER_NAME=iHD vainfo

Expected: Intel iHD driver name, VA-API version, and a list of supported codec profiles with no initialization errors.

3. intel-media-driver installed

rpm -q intel-media-driver
ls -l /usr/lib64/dri/iHD_drv_video.so

Expected: Package listed as installed, and the driver file present on disk.

4. Firefox about:support

Open about:support and confirm Hardware Video Decoding: Available.

5. Video playback

Play a VP9 or H.264 video and check YouTube's "Stats for Nerds" panel, or your distro's system monitor, to confirm CPU usage stays low relative to a software-decoded baseline.

Check Command Expected result
OpenGL acceleration glxinfo -B Accelerated: Yes
Kernel graphics driver lspci -k | grep -A3 VGA Kernel driver in use: i915
VA-API driver LIBVA_DRIVER_NAME=iHD vainfo Codec profile list, no errors
Driver package rpm -q intel-media-driver Package name and version returned
Firefox hardware decoding about:support Hardware Video Decoding: Available

Troubleshooting

Problem Likely cause Solution
vainfo fails with initialization errors No compatible VA-API driver installed for your GPU generation Identify your Intel GPU generation and install intel-media-driver (Gen9+) or libva-intel-driver (older)
i965 driver installed but vainfo still fails GPU is Gen9 or newer and needs the iHD driver instead Install intel-media-driver and test with LIBVA_DRIVER_NAME=iHD vainfo
dnf search intel-media-driver returns nothing RPM Fusion Nonfree updates repository is disabled Enable the RPM Fusion Nonfree repository, then search again
Firefox still shows software decoding after driver install about:config preferences not enabled, or Firefox not restarted Verify the three media.* preferences and fully restart Firefox
High CPU usage during YouTube playback despite working VA-API YouTube served AV1, which has no hardware decoder on this CPU Install enhanced-h264ify and enable Block AV1 only
Video tearing or a black video window GPU acceleration conflict in Firefox Temporarily disable hardware acceleration in Firefox settings to confirm, then re-enable and retest
Driver file missing after install Wrong package installed, or installation did not complete Re-run sudo dnf install intel-media-driver and re-check /usr/lib64/dri/iHD_drv_video.so

Frequently Asked Questions

Why does OpenGL acceleration work but VA-API still fails?

OpenGL 3D acceleration and VA-API video decoding are separate technologies handled by different driver components. A working glxinfo result only confirms the kernel graphics driver and Mesa are functioning, not that a video acceleration driver is installed.

What is the difference between the i965 and iHD VA-API drivers?

i965 is the legacy Intel VA-API driver for older GPU generations. iHD is the modern Intel Media Driver required for Gen9 and newer hardware, including Ice Lake. Installing i965 on newer hardware will not fix a failing vainfo test.

Why was intel-media-driver missing from the default search results?

The package lives in the RPM Fusion Nonfree updates repository. If that repository is not enabled, dnf search will not find intel-media-driver even though the legacy libva-intel-driver package remains visible.

How do I confirm VA-API is working after installing intel-media-driver?

Run LIBVA_DRIVER_NAME=iHD vainfo. A successful result lists the Intel iHD driver, the VA-API version, and supported codec profiles instead of returning initialization errors.

Which Firefox about:config settings enable hardware video decoding?

Confirm media.ffmpeg.vaapi.enabled, media.hardware-video-decoding.enabled, and media.rdd-ffmpeg.enabled are all set to true, then restart Firefox and check about:support for Hardware Video Decoding: Available.

Why does YouTube use software decoding even with VA-API working?

YouTube frequently selects the AV1 codec, and many Intel CPUs, including Ice Lake models like the Core i3-1005G1, have no dedicated AV1 hardware decoder. Firefox then falls back to decoding AV1 on the CPU.

How can I force YouTube to use a hardware-decodable codec?

Install the enhanced-h264ify Firefox extension and enable only the Block AV1 option, leaving VP9 and H.264 unblocked. YouTube then serves VP9 or H.264, which the Intel GPU can decode through VA-API.

What codecs does the Intel iHD driver typically support?

On Ice Lake-class Intel graphics, vainfo output through the iHD driver typically lists H.264, MPEG-2, VP8, VP9, HEVC (H.265), and JPEG profiles.

Do I need to reboot after installing intel-media-driver?

No reboot is required. Installing the package and restarting Firefox is enough for both vainfo and the browser to detect the new driver.

Does hardware video decoding actually improve battery life?

Yes. Offloading decoding to the GPU lowers CPU usage during playback, which reduces heat and fan activity and typically extends battery runtime during video-heavy sessions compared with software decoding.

References

Official documentation used while preparing this guide: Rocky Linux Docs · RHEL 9 Docs · Intel Media Driver (iHD) · VA-API (freedesktop.org) · RPM Fusion · Firefox Hardware Acceleration

Learning Path

This article is part of the Rocky/RHEL Linux Performance & Power Optimization Series, a 4-part learning path. Start from the beginning or browse every part here.

View Complete Learning Path →

Back to Articles