Skip to content

Why My PC Fans Go Crazy While Watching YouTube

A few days ago, I was just sitting there, enjoying a 4K video on YouTube, when my PC fans suddenly kicked into high gear.

3 min read
LibreWolf
Firefox
NVIDIA
WebGL
Linux
CachyOS
Hardware Acceleration
VA-API
Arch Linux
RTX 5070 Ti

A few days ago, I was just sitting there, enjoying a 4K video on YouTube, when my PC fans suddenly kicked into high gear. It felt wrong. Watching a video shouldn't make the system struggle like that. I checked CoolerControl and realized my CPU was working overtime, even though I have an RTX 5070 Ti that should be handling this without breaking a sweat.

The problem was that my GPU was basically just sitting there being decorative. The video was being decoded by the CPU (software decoding) instead of the graphics card.

I went straight to about:support in LibreWolf to check the Graphics section. The results were pretty disappointing. Even though WebRender was active, hardware video decoding was effectively non-existent. My browser was essentially running in software mode, despite the powerful hardware sitting under the hood.

It turns out getting hardware acceleration to work in Firefox-based browsers on Linux, especially with NVIDIA, isn't as simple as flipping a single toggle in the settings. There’s a whole chain of processes that has to work perfectly. If one link breaks, the browser quietly falls back to software mode without any warning.

The main issue is that NVIDIA doesn't provide a native VA-API driver. Since Firefox and LibreWolf rely heavily on VA-API for video decoding on Linux, I had to bridge that gap using the libva-nvidia-driver available in the CachyOS repositories.

But just installing the driver wasn't enough. I also had to wrestle with environment variables. I had to set specific system variables before launching the browser, like LIBVA_DRIVER_NAME=nvidia and NVD_BACKEND=direct. I even had to disable the RDD (Remote Data Decoder) sandbox in Firefox via MOZ_DISABLE_RDD_SANDBOX=1 just so it could access VA-API without being blocked by its own internal security.

If these variables aren't set correctly, the browser fails to find the driver and defaults back to the CPU. There’s no error message; it just runs inefficiently.

The whole process was a bit tedious because I had to tweak system-level configurations (via a systemd user service) to ensure those variables are loaded every time the browser opens. But once everything was synced up, it finally felt right. My CPU stayed quiet, and my GPU actually started doing its job.

Of course, things don't always work perfectly out of the box, especially when you're navigating the Linux ecosystem with NVIDIA hardware. Sometimes you just have to fight through the configuration to get the experience you want.

Cheers.