Screen recording fails on hybrid Intel+NVIDIA systems due to missing VAAPI drivers – should be detected automatically
When trying to use screen recording on a fresh Omarchy installation, the recording failed silently — no video file was saved. After checking the logs, I found the following message:
gsr_get_supported_video_codecs_vaapi: vaInitialize failed
This error means VAAPI wasn’t initialized correctly because the proper driver was missing. And according to assada's comment, the solution depends on the GPU vendor:
For anyone getting
gsr_get_supported_video_codecs_vaapi: vaInitialize failedthis means vaapi isn’t properly set up.AMD:
sudo pacman -S libva-mesa-driver mesa-vdpauIntel:sudo pacman -S intel-media-driverNVIDIA:sudo pacman -S libva-nvidia-driver
Originally posted by @assada in #2628
My laptop has both an Intel integrated GPU and an NVIDIA GPU. Even after installing libva-nvidia-driver, the issue persisted — it was only resolved after I also installed the Intel VAAPI driver (intel-media-driver).
So, the root cause seems to be that VAAPI tries to initialize the first available driver (often the wrong one) in hybrid systems. Without both drivers installed, it fails silently.
Expected behavior:
Omarchy (or the underlying recording component) should detect when VAAPI initialization fails and show a clear message explaining the issue.
Ideally, it could suggest which driver to install based on GPU detection (via lspci or similar).
Why this matters:
While not a core bug in Omarchy itself, this issue can affect many users — especially those on laptops with hybrid GPUs — right after a clean install. Improving the detection or error message would greatly improve UX and prevent confusion.
Possible solution
A simple way to improve UX could be to add a small VAAPI check in the screen recording script before starting the recorder:
check_vaapi() {
if ! vainfo >/dev/null 2>&1; then
gpu=$(lspci | grep -E "VGA|3D" | awk -F: '{print $3}' | tr -d ' ')
msg="VAAPI initialization failed. Please install the appropriate driver:\n"
msg+="\nAMD: sudo pacman -S libva-mesa-driver mesa-vdpau"
msg+="\nIntel: sudo pacman -S intel-media-driver"
msg+="\nNVIDIA: sudo pacman -S libva-nvidia-driver"
msg+="\n\nDetected GPU: ${gpu:-unknown}"
notify-send "Screen recording error" "$msg" -u critical -t 10000
exit 1
fi
}
This would prevent the silent failure and guide the user to install the correct driver automatically.
Wouldn't it be better if vaapi drivers were installed automatically when omarchy is installed? it would benefit more applications. It would allow browsers and video players to also use the gpu video encoding unit, which would allow for better performance (allow to play higher resolution videos on weaker hardware), less system lag when playing a video and lower power usage when playing a video.
omarchy should also use the -fallback-cpu-encoding yes option that I just added which makes it use cpu encoding if gpu encoding is not possible. Very old intel iGPUs dont support hardware video encoding. Some relatively modern amd/nvidia gpus dont support it either (cheaper variants of gpus where they reduce cost by removing the video encoding unit).
Thanks for expanding on that, @dec05eba. Installing VAAPI drivers automatically during the Omarchy setup process (via the bootable installer) is indeed a very interesting proposal, especially since it could prevent post-install failures like the one I encountered and benefit other GPU-accelerated applications system-wide.
To help move the discussion forward, here’s a quick breakdown of the trade-offs between both approaches:
| Aspect | Automatic VAAPI driver installation during setup | VAAPI detection + user guidance during runtime |
|---|---|---|
| User experience | Smoother first-run experience; no manual fixes required. | Slightly less convenient; user must install missing driver manually. |
| System safety & control | Requires elevated privileges and modifies base system packages — safer only if done inside the controlled setup environment. | Fully non-intrusive; respects user control and existing driver setup. |
| Maintenance overhead | Needs to track GPU→driver mappings and handle edge cases (hybrid GPUs, renamed packages, obsolete hardware). | Minimal; maintenance limited to script logic and user instructions. |
| Portability | Limited to the installer’s target distro (Arch-based). | Works across environments, even after installation. |
| Failure behavior | Combined with -fallback-cpu-encoding yes, ensures recording always works. | Still works with fallback, but depends on user resolving VAAPI setup. |
| CPU fallback impact | Guarantees functionality, but can cause high CPU usage, thermal throttling, or reduced battery life on weaker hardware. | Same trade-off applies if fallback is enabled globally; must be clearly indicated to users. Ideally with a clear notification like: “Hardware acceleration unavailable — falling back to CPU encoding.”. |
From a practical standpoint, both directions can coexist:
- The setup process could install the most common VAAPI drivers based on GPU detection.
- The runtime script could still perform VAAPI checks and notify the user if hardware acceleration isn’t available — falling back to CPU encoding when needed.
- That approach would cover both first-time users and edge cases where hardware or drivers change later.
I still don’t have full visibility into Omarchy’s installation flow or the reasons why certain drivers aren’t preinstalled, so it’d be great to hear from the maintainers whether this aligns with the system’s design philosophy.
I concur, installing the package for intel worked 🥇
I think both this and the Vulkan driver install (#2321) could benefit for a post-install solution. I mean, it'd be great to have a way to fix those issues in order to harden an omarchy system
Just tagging in to confirm that this was my issue too on MSI GL63 and was resolved by installing Intel drivers manually.
I can confirm that in a Dell Precision laptop workstation the same applies, and is solved by installing Intel drivers manually.
Live encode on the #2706 machine after installing libva-intel-driver (Haswell 8086:0416 + GTX 970M, Omarchy 4.0.1-1).
omarchy screenrecord --fullscreen with OMARCHY_SCREENRECORD_DEBUG=true captured eDP-1 via kms. Log:
gsr info: using h264 encoder because a codec was not specified
[h264_vaapi @ ...] ignoring invalid SAR: 0/0
gsr info: update fps: 61, damage fps: 61
No vaInitialize failed, no NVENC 13.1 mismatch, no CPU fallback. Output is H.264 High 1920×1080 @ 60 fps (~2.8 Mb/s).
That is Intel i965 VAAPI on /dev/dri/renderD129. NVENC still cannot open on 580.xx (#7640); gsr picked VAAPI first on this hybrid so recording starts. Packaged 4.0.1 still misses this iGPU (lspci name has no "HD Graphics"); #8514 is the install/migration path.
- atavacron, Grok 4.6 (high)
Still true on Omarchy 4.0.2-1. With libva-intel-driver present, omarchy screenrecord --fullscreen of eDP-1 now completes: gsr 6.0.1 picks h264_vaapi on Intel renderD129 (8086:0416), 1920x1080@60, no vaInitialize failed. Full debug log is on #7640.
Stock 4.0.2 still has no PCI-id VAAPI detector, so a fresh install of this machine would still miss i965. That remains #8514.
- atavacron, Grok 4.6 (high)
In my case installing VAAPI drivers manually didn't help, because the problem is a different one.
Setup: XMG notebook in dGPU-only (MUX) mode. The internal panel (eDP-1) is wired to the NVIDIA dGPU (card1). The USB-C/DP-Alt ports are still routed through the AMD iGPU (card0). HDMI and mini-DP go through the NVIDIA card, so recording works there. With an external monitor on USB-C (DP-3 on card0), screen recording fails silently: pick a region or monitor, nothing happens, no notification.
Root cause: gpu-screen-recorder's KMS capture only enumerates the connectors of the DRM card its EGL device runs on. Hyprland renders on NVIDIA, so gsr picks card1 and simply doesn't see DP-3:
$ gpu-screen-recorder --list-monitors
eDP-1|2560x1600
$ gpu-screen-recorder -w DP-3 ...
gsr error: display "DP-3" not found, expected one of: "screen" "eDP-1"
gsr exits before writing a frame, omarchy-capture-screenrecording waits for a file that never appears and exits without any message. OMARCHY_SCREENRECORD_USE_PORTAL=true doesn't help either: PipeWire negotiates the stream but gsr never receives frames (the DMA-BUF import failure the script comment already mentions).
gsr's README documents this: you can only record with the GPU that drives the monitor, and for hybrid laptops you're supposed to launch it with prime-run / DRI_PRIME. So the fix is to point gsr's EGL at the card that actually owns the target connector.
Verified working: with Mesa EGL + DRI_PRIME set to the AMD PCI address, gsr sees DP-3 and records it via VAAPI:
__EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json \
DRI_PRIME=pci-0000_07_00_0 \
LIBVA_DRIVER_NAME=radeonsi \
gpu-screen-recorder -w DP-3 -s 0x0 -k auto -f 60 -fm cfr -o test.mp4
Monitor and region capture on DP-3 work (h264_vaapi), eDP-1 keeps working without the env (h264_nvenc).
Workaround until it's fixed in Omarchy: a wrapper that picks the card per target. It parses -w <monitor|WxH+X+Y>, resolves a region to its monitor via hyprctl monitors -j, looks up the connector's card in /sys/class/drm/card*-<name>/device/device, and only sets the env when that card's driver isn't nvidia. It execs the real binary as gpu-screen-recorder so Omarchy's pkill -f "^gpu-screen-recorder" still stops it.
#!/bin/bash
# /usr/local/bin/gpu-screen-recorder -- shadows /usr/bin (Hyprland's PATH has /usr/local/bin first)
target=""
for ((i = 1; i <= $#; i++)); do
if [[ ${!i} == -w ]]; then
j=$((i + 1))
target=${!j}
break
fi
done
monitor=$target
if [[ $target =~ ^([0-9]+)x([0-9]+)\+(-?[0-9]+)\+(-?[0-9]+)$ ]]; then
monitor=$(hyprctl monitors -j | jq -r --argjson px "${BASH_REMATCH[3]}" --argjson py "${BASH_REMATCH[4]}" '
.[] | (.width / .scale | floor) as $w | (.height / .scale | floor) as $h
| (if .transform == 1 or .transform == 3 then {w: $h, h: $w} else {w: $w, h: $h} end) as $g
| select($px >= .x and $px < .x + $g.w and $py >= .y and $py < .y + $g.h) | .name' | head -1)
fi
if [[ -n $monitor ]]; then
device=$(readlink -f /sys/class/drm/card*-"$monitor"/device/device 2>/dev/null | head -1)
if [[ -n $device && $(basename "$(readlink -f "$device/driver")") != nvidia ]]; then
pci=$(basename "$device")
export __EGL_VENDOR_LIBRARY_FILENAMES=/usr/share/glvnd/egl_vendor.d/50_mesa.json
export DRI_PRIME="pci-${pci//[:.]/_}"
export LIBVA_DRIVER_NAME=radeonsi # amdgpu only; Intel would need iHD
fi
fi
exec -a gpu-screen-recorder /usr/bin/gpu-screen-recorder "$@"
Tested end to end through omarchy-capture-screenrecording (menu, Alt+Print, --fullscreen, --stop-recording) on both monitors.
Suggestion for Omarchy: do this card lookup inside omarchy-capture-screenrecording after `select_otification when gsr exits without producing a file. Right now the failure is completely silent.
@KadirBalku that's no longer necessary in gpu screen recorder 6.1.0. It now lists all monitors and automatically chooses the gpu associated with the monitor you choose
@dec05eba Sorry for bothering then. Confirmed, 6.0.1 here, Arch extra got 6.1.0 on Sep 2. Will retest after upgrade.
I checked this against quattro at 902fd8aeb. Nothing was run on a worker, because this depends on the hardware. Codex Medium reviewed it separately and agreed with each point below; it has not been shown to be independent of this review.
- Driver selection is still name-based on
quattro.install/hardware/intel/video-acceleration.shmatches thelspciname. An iGPU named "4th Gen Core Processor Integrated Graphics Controller", like the Haswell8086:0416above, gets no VAAPI package. Sandy Bridge, Ivy Bridge and Haswell parts named "HD Graphics" getintel-media-driver, which only supports Broadwell and newer. NVIDIA being present does not skip the Intel step (install/hardware/all.sh), so on hybrids that do match, the Intel driver is installed. - Recording no longer has to fail when VAAPI is missing. Since 3.2.0,
bin/omarchy-capture-screenrecordingpasses-fallback-cpu-encoding yes, as @dec05eba suggested, so gpu-screen-recorder should encode on the CPU instead. - When gpu-screen-recorder exits before writing a file, it is still silent. The script stops waiting and shows nothing. Its stderr goes to
/dev/nullunlessOMARCHY_SCREENRECORD_DEBUG=true. - The multi-GPU monitor case from @KadirBalku is the one @dec05eba says gpu-screen-recorder 6.1.0 fixes upstream. It was not retested here.
#8514 fixes the driver-selection part. It picks the Intel package by PCI device ID rather than by name, and it adds a migration for existing installs. It is linked to close this issue and is being reviewed as its own pull request. It does not add the notification this issue asks for when recording fails to start. If that should be tracked separately once #8514 lands, the maintainer will decide.
This is waiting on the maintainer.
@KadirBalku, this is about the multi-GPU monitor case from your comment above; the VAAPI driver selection this issue is about is separate and tracked in #8514.
On Wayland, gpu-screen-recorder 6.1.0 and later look for the chosen monitor on every supported GPU and capture on the GPU it is connected to (upstream commit e4cf94f). The wrong GPU is what produces display "…" not found, expected one of: "screen" "eDP-1" and gsr_capture_kms_start: failed to find monitor by name for an external monitor wired to the other GPU, so this should fix it, though a driver that fails to initialise on that GPU could still stop it. Omarchy installs gpu-screen-recorder from Arch's extra through its own mirror snapshots, with no override in the Omarchy package repository, and every channel now serves a fixed version: 6.1.4 on stable and rc, 6.1.7 on edge.
Please update with omarchy-update, remove the /usr/local/bin/gpu-screen-recorder wrapper so the test measures gpu-screen-recorder itself, try recording DP-3 again, and reply here with the result. If it still fails, please include the gsr error line, or run OMARCHY_SCREENRECORD_DEBUG=true omarchy-capture-screenrecording and attach $XDG_RUNTIME_DIR/omarchy-screenrecord.log.
The DRI_PRIME / prime-run workaround is no longer needed, and no longer works: since 6.1.0, gpu-screen-recorder clears DRI_PRIME and the prime-run variables itself at startup, with a warning in its log, and picks the GPU from the monitor instead.
Claude Opus 5.5 checked which version each channel serves against the repository databases the mirrors publish, and read the gpu-screen-recorder source at 6.0.2, 6.1.0 and 6.1.4. Codex Medium reviewed the same sources as a second opinion and agreed with the claims as written here; its independence is not guaranteed. Nothing was run on hybrid-GPU hardware, so your result is the real test.
Closing: gpu-screen-recorder 6.1.0 and later record a monitor through the GPU it is connected to, which should fix recording an external monitor on a hybrid-GPU laptop, and every Omarchy channel now ships 6.1.4 or newer. If it still fails for you after omarchy-update, please open a new issue with the gpu-screen-recorder error line (or $XDG_RUNTIME_DIR/omarchy-screenrecord.log from OMARCHY_SCREENRECORD_DEBUG=true omarchy-capture-screenrecording), or a pull request if you have a fix. The VAAPI driver choice this issue opened with is a separate fix, in #8514.