OPINIONATED OMARCHY
TROUBLESHOOTING CORPUS
790
RECORDS
790
AUDITED
0
UNCHECKED
2388
SOURCES
LIVE
gpu-drivers medium occasional DISPUTE

Fix 'vaInitialize failed' in screen recording and hardware video decode

omarchyarchendeavouroscachyosmanjarointelamdnvidiawaylandhyprlandlaptopdesktop
CORRECTED An auditor found the fix wrong or incomplete and rewrote it.
AUDIT NOTE

Checked on this Omarchy 4.0.2-1 workstation (kernel 7.1.9, mesa 1:26.2.1-1, nvidia-utils 610.57.04-1, gpu-screen-recorder 6.0.1-1) and against the two cited sources and the upstream tree at tag v4.0.3. What held: the symptom string is real, strings /usr/bin/gpu-screen-recorder on this machine contains gsr_get_supported_video_codecs_vaapi: vaInitialize failed verbatim. Issue 2706 is open and genuinely supports the symptom and the hybrid cause, and its most recent comment is a Haswell 8086:0416 machine on Omarchy 4.0.1-1 fixed by installing libva-intel-driver by hand. The Arch wiki supports the Intel generation split at Broadwell, the iHD, i965 and radeonsi values and vainfo --display drm. I confirmed here that mesa owns /usr/lib/dri/radeonsi_drv_video.so and that libva-utils is not installed by Omarchy, so the vainfo step is genuinely needed.

Four things were wrong for Omarchy 4. First, ~/.config/hypr/envs.conf does not exist and nothing in /usr/share/omarchy reads it, confirmed by grep -rn envs.conf /usr/share/omarchy returning nothing and by this machine's ~/.config/hypr/ holding only Lua files. That is the Omarchy 3 path. Second, the claim that setting NVD_BACKEND is "what Omarchy's installer does" is false on Omarchy 4. I read /usr/share/omarchy/install/hardware/nvidia.sh here and at tag v4.0.3: it sets no environment at all and carries the comment Per-session Hyprland NVIDIA env vars are handled by default/hypr/nvidia.lua, and that Lua file sets NVD_BACKEND and LIBVA_DRIVER_NAME itself. The cited master URL does resolve and does contain the envs.conf writing code, which is why the claim was true when written, so I kept that source and labelled it as the Omarchy 3 branch instead of removing it. Third, the package list is mostly noise on Omarchy 4 and omits what Omarchy actually installs: video-acceleration.sh installs intel-media-driver libvpl vpl-gpu-rt, which the record never mentions, and linux-firmware-intel is a dependency of linux-firmware on this machine (Required By: linux-firmware), so installing it is a no-op rather than a step. Fourth, the symptom is stale: omarchy-capture-screenrecording line 191 passes -fallback-cpu-encoding yes and sends stderr to /dev/null unless OMARCHY_SCREENRECORD_DEBUG=true, so "no file at all" and "running the recorder from a terminal shows" are both Omarchy 3 behaviour.

I rewrote danger because it blamed the user for forcing LIBVA_DRIVER_NAME=nvidia, which on Omarchy 4.0.1 and later is what Omarchy does by default on any Turing-or-newer machine. Overlap with neighbouring records: screenrecord-nvenc-api-13-1-required-pascal-580xx covers the NVENC API 13.1 mismatch on Pascal, which is the encoder failing to open with the driver present, a different failure from VA-API never initialising, so the line between them is driver-missing versus codec-open-refused and I left that record's territory alone. The hybrid-laptop environment case belongs to nvidia-env-forced-on-igpu-primary-hybrid-laptop and I point at it rather than duplicating it.

I dropped frequency from very-common to occasional, because Omarchy 4's installer now covers Intel Broadwell and newer, AMD through mesa and NVIDIA, leaving only the Haswell-era name-match gap and the wrong-driver case. Not exercised: I did not start a screen recording, did not run vainfo (libva-utils is not installed and I have no sudo), and this workstation is NVIDIA-only, so I could not test the hybrid path or the Haswell name-match failure on real hardware. The Haswell gap is read from the shipped script plus the issue reporter's confirmation, not reproduced here.

The cause above was rewritten on 2026-09-11 to match this note; the fix was corrected by the audit itself.
RISK

On Omarchy 4.0.1 and later you do not have to force LIBVA_DRIVER_NAME=nvidia to hit the hybrid-laptop trap, because Omarchy sets it for you. /usr/share/omarchy/default/hypr/nvidia.lua sets it on any machine carrying a Turing or newer NVIDIA card, whether or not that card renders or scans out anything, and default/hypr/autostart.lua exports it session-wide. On a hybrid laptop whose panel runs on the Intel or AMD iGPU that routes every VA-API client through the NVIDIA card and corrupts browser video, and it also costs you the iGPU's hardware encode, because libva-nvidia-driver is an NVDEC decode adapter. Set the driver of the GPU that actually renders the session, not the one that merely exists. The full diagnosis, including how to tell which render node the compositor holds, is the record nvidia-env-forced-on-igpu-primary-hybrid-laptop. The Arch wiki adds a separate warning that libva-nvidia-driver with default settings can draw more power than CPU decoding.

Symptom

Hardware video playback falls back to software, or a screen recording comes out CPU-encoded with dropped frames and high CPU use. vainfo errors with:


libva: /usr/lib/dri/<driver>_drv_video.so init failed

On Omarchy the recorder's own stderr is hidden unless you turn logging on. With OMARCHY_SCREENRECORD_DEBUG=true set, /tmp/omarchy-screenrecord.log shows:


gsr_get_supported_video_codecs_vaapi: vaInitialize failed

On Omarchy 3 this produced no file at all. On Omarchy 4 omarchy-capture-screenrecording passes -fallback-cpu-encoding yes to gpu-screen-recorder, so a VA-API failure usually yields a software-encoded file rather than nothing.

Cause

No usable VA-API driver is installed for the GPU that is actually driving the display, or the wrong one is being picked. On hybrid Intel plus NVIDIA laptops VA-API tries the first device it finds, and if only one vendor's driver is installed initialisation fails.

On Omarchy 4 the plain missing-driver case is mostly closed, because install/hardware/intel/video-acceleration.sh and install/hardware/nvidia.sh install the driver by detected hardware at install time. Two gaps remain. Those scripts run only during installation and omarchy update does not re-run them, so a GPU added later is not covered. And the Intel name match in video-acceleration.sh tests for hd graphics, uhd graphics, xe, iris, arc and panther lake, which the Haswell and Ivy Bridge generations do not match, so those machines finish an install with no VA-API driver.

The wrong-driver case is now the more common one on Omarchy 4, and it is usually not the user's doing. See the danger below.

Fix

**On Omarchy 4, find out what is already installed before installing anything.** Omarchy's installer picks VA-API drivers by hardware, so on most machines the driver is already there and a missing driver is not your problem:


pacman -Q intel-media-driver libva-intel-driver libva-nvidia-driver mesa 2>&1
ls /usr/lib/dri/*_drv_video.so

/usr/share/omarchy/install/hardware/intel/video-acceleration.sh installs intel-media-driver libvpl vpl-gpu-rt when the Intel GPU name matches hd graphics, uhd graphics, xe, iris, arc or panther lake, and libva-intel-driver when it matches gma. /usr/share/omarchy/install/hardware/nvidia.sh installs libva-nvidia-driver on GSP-capable cards. mesa supplies radeonsi_drv_video.so for AMD and is always present.

**Two Omarchy 4 gaps leave a machine with no driver.** Both scripts run only at install time and omarchy update never re-runs them. And the Intel name match misses the Haswell and Ivy Bridge generations, whose lspci name is 4th Gen Core Processor Integrated Graphics Controller with no hd graphics in it, so those machines get nothing. That is the case reported on omarchy#2706 from a Haswell 8086:0416 laptop running Omarchy 4.0.1-1, fixed by installing libva-intel-driver by hand.

Get vainfo, which Omarchy does not ship:


sudo pacman -S --needed libva-utils
vainfo

Then install the driver for your hardware. On a hybrid machine install both vendors' drivers:


# Intel Broadwell (2014) and newer, including Arc:
sudo pacman -S --needed intel-media-driver libvpl vpl-gpu-rt
# Intel GMA 4500 (2008) through Coffee Lake, and the Haswell generation above:
sudo pacman -S --needed libva-intel-driver
# AMD: VA-API comes from mesa (radeonsi), which is already installed
pacman -Q mesa
# NVIDIA proprietary (NVDEC through VA-API):
sudo pacman -S --needed libva-nvidia-driver

linux-firmware-intel is a dependency of linux-firmware, so it is already installed on any Arch or Omarchy machine. Check rather than install it:


pacman -Q linux-firmware-intel

None of these commands is blocked by Omarchy's ALPM guard, which aborts only a transaction carrying both -S and -u. Never write pacman -Sy libva-utils, which is a partial upgrade.

**Pinning the driver, if autodetection picks the wrong one.** LIBVA_DRIVER_NAME values are iHD for intel-media-driver, i965 for libva-intel-driver, radeonsi for AMD and nvidia for libva-nvidia-driver.

On **Omarchy 4** there is no ~/.config/hypr/envs.conf. That file was the Omarchy 3 location and nothing on Omarchy 4 reads it. ~/.config/hypr/envs.lua is not read either. Put the override in ~/.config/hypr/hyprland.lua, **below** the require("default.hypr.omarchy") line, so it loads after Omarchy's defaults and wins:


-- ~/.config/hypr/hyprland.lua, below require("default.hypr.omarchy")
hl.env("LIBVA_DRIVER_NAME", "iHD")

Then log out and back in. hyprctl reload alone is not enough, because default/hypr/autostart.lua runs systemctl --user import-environment at session start and apps launched through systemd user scopes keep the old value.

On **plain Arch** with a hyprland.conf, use the old syntax:


env = LIBVA_DRIVER_NAME,iHD

**On NVIDIA, Omarchy 4 already sets the environment and you should not repeat it.** /usr/share/omarchy/install/hardware/nvidia.sh sets no environment variables at all and says so in a comment. /usr/share/omarchy/default/hypr/nvidia.lua sets NVD_BACKEND=direct, LIBVA_DRIVER_NAME=nvidia and __GLX_VENDOR_LIBRARY_NAME=nvidia on Turing and newer, and NVD_BACKEND=egl on Maxwell, Pascal and Volta. Omarchy 3 wrote those same values into ~/.config/hypr/envs.conf from the installer, which is where the older advice comes from.

If vainfo cannot connect at all on a headless or secondary GPU, force the DRM display:


vainfo --display drm

**To see why an Omarchy recording failed**, the wrapper sends gpu-screen-recorder stderr to /dev/null unless you ask for it:


OMARCHY_SCREENRECORD_DEBUG=true omarchy-capture-screenrecording --fullscreen
cat /tmp/omarchy-screenrecord.log

Verify

vainfo lists profiles and entrypoints with no init failed line. ls /usr/lib/dri/*_drv_video.so shows the driver you expect. Start a recording, then confirm a file appears in ~/Videos and that /tmp/omarchy-screenrecord.log under OMARCHY_SCREENRECORD_DEBUG=true names a hardware encoder such as h264_vaapi rather than falling back to the CPU. nvtop or intel_gpu_top shows the DEC or ENC engine above zero during playback.

Sources

vaapi-init-failed-screen-recording