ShriHax | Blogs

Home / Blogs / Hybrid GPU

Fixing Laggy YouTube on a Hybrid-GPU Laptop

Aug 31, 2026 · linux, Hyprland, browsers, VA-API


Summary: fixed laggy/freezing YouTube playback (especially fullscreen) on a hybrid-GPU laptop by enabling hardware video decoding on the Intel iGPU — the GPU that actually drives the display — instead of the NVIDIA GPU the defaults were routing decode to.

Root cause

The laptop has two GPUs:

Omarchy's default NVIDIA config unconditionally sets LIBVA_DRIVER_NAME=nvidia and __GLX_VENDOR_LIBRARY_NAME=nvidia, so browsers tried to decode video through NVIDIA's VA-API path even though NVIDIA isn't drawing to the screen. On top of that:

Net effect: the browser was software-decoding video AND software-compositing the UI. Barely noticeable windowed; fullscreen forced a full-screen software surface every frame — severe lag.

1. Installed the Intel VA-API driver

sudo pacman -S --needed intel-media-driver libva-utils

Verify with LIBVA_DRIVER_NAME=iHD vainfo — confirms H264, HEVC, VP9 and AV1 hardware decode on the Intel iGPU.

2. Overrode the NVIDIA env (user config, not system files)

In ~/.config/hypr/monitors.lua, after the defaults load (last call wins). /usr/share/omarchy/ stays untouched:

hl.env("LIBVA_DRIVER_NAME", "iHD")
hl.env("__GLX_VENDOR_LIBRARY_NAME", "mesa")

3. Added VA-API flags to the browsers

New ~/.config/brave-flags.conf (same flags appended to ~/.config/chromium-flags.conf):

--ozone-platform=wayland
--ozone-platform-hint=wayland
--enable-features=VaapiVideoDecoder,VaapiVideoEncoder
--disable-features=UseChromeOSDirectVideoDecoder
--disable-features=Vp9kSVCHWDecoding
--enable-gpu-rasterization

4. Restored the monitor to 144 Hz

hl.monitor({ output = "eDP-1", mode = "1920x1080@144", position = "0x0", scale = omarchy_monitor_scale })

Validation

Notes

Revert

# monitors.lua: delete the two hl.env lines + the explicit 144Hz line
# brave-flags.conf / chromium-flags.conf: remove the VA-API flags
# optionally: sudo pacman -R intel-media-driver libva-utils  (harmless to keep)
hyprctl reload

← Back to Blogs · Home


↑ Back to Top