Sane YouTube FPS on FireFox on OpenBSD

One thing I really want to be able to do is to load YouTube and put it in background as my work music. On OpenBSD the playback performance is a meh. Espically on Chromium. Opening a 720p 60FPS YouTube video yeilds ~10% frame drop in YouTube stats. Beyond that, the actual rendering rate feels more like 15 FPS. I tried different flags in Chromium but nothing seemed to boost it back to 60FPS. I turned back to Firefox and it was better then Chromium immediately. At ~5% frame drop and a much better real rendering rate.

And so I looked into about:support and about:config and to figure out how can I make GPU acceleration work. FireFox GPU acceleration works on Linux. And OpenBSD borrows Linux's display stack and uses the same X11 architecture. There's hope that I can make it work.

Messing around with flags does work! This probably weakens some security. But heck. It's still much better and what I got on Linux. Now the support page shows I'm using GPU. Just a screenshot to prove it works:

Firefox showing GPU working!
Image: Firefox showing GPU working!

To be specific, I changed the following flags:

gfx.webgpu.force-enabled                       : true
gfx.webrender.compositor.force-enabled         : true
gfx.x11-egl.force-enabled                      : true
layers.acceleration.force-enabled              : true
gfx.webrender.all                              : true

After these changes. Scrolling on comlicated pages become much more responsive (almost as smooth as on Linux!). And YouTube playback now is almost perfect.

OpenBSD playing YouTube video at 60FPS with almost no frame drop.
Image: OpenBSD playing YouTube video at 60FPS with almost no frame drop.

Author's profile. Photo taken in VRChat by my friend Tast+
Martin Chang
Systems software, HPC, GPGPU and AI. I mostly write stupid C++ code. Sometimes does AI research. Chronic VRChat addict

I run TLGS, a major search engine on Gemini. Used by Buran by default.

  • marty1885 \at
  • Matrix:
  • Jami: a72b62ac04a958ca57739247aa1ed4fe0d11d2df