Skip to content

frontend: Name the cause and the fix when a VA-API encoder is missing - #1872

Merged
zackees merged 2 commits into
masterfrom
fix/1862-vaapi-missing-cause
Oct 23, 2026
Merged

zackees merged 2 commits into
masterfrom
fix/1862-vaapi-missing-cause

Conversation

@zackees

@zackees zackees commented Oct 23, 2026 •

Copy link
Copy Markdown
Member

Fixes #1862 (part of #1866).

The Missing Encoders dialog now names why a VA-API encoder is missing and how to fix it. These are the support rounds from #1720, now done by OBS:

Cause Message
no /dev/dri/renderD* check the GPU kernel driver, or choose another encoder
only NVIDIA render devices use NVENC
render device not openable sudo usermod -aG render,video $USER, then log in again
no VA-API driver for the vendor sudo apt install intel-media-va-driver-non-free / mesa-va-drivers, or the dnf/pacman equivalent; the package name on other distros
driver present the existing "cannot encode this format, run vainfo"

A VAAPI: warning in the log records the same cause. A build without obs-qsv11 (the AppImage) now says to choose another encoder for Streaming and Recording; #1720's last warning was the recording encoder.

Design. A Qt-free profile_vaapi_diagnose() next to #1841's profile_missing_encoder_reason(). It reads the host through an injected table (read_file, exists, can_open_rw), with plain stdio in production. There is no libva in the frontend and no new host code or OS headers.

RED 50b0008: a stub always returning NO_ENCODE. The new cases fail at the first one (test_vaapi_no_render_node: 4 != 0).
GREEN 941bc35: all 14 test_profile_activate cases pass.

CI cost. The seven new cases go into the existing test_profile_activate binary, use fakes only (no fixture dirs, no permissions), and run in microseconds. No new executable or lane.

Local evidence. ./unittest's Tier 2 lane currently fails to link libobs.so.30 itself on this host (unrelated to this change), so I ran the cases through a scratch harness that includes the real test file: RED fails as above, GREEN prints all cases passing. The diagnosis on this machine's real host (two NVIDIA GPUs, RTX 3060 + RTX 2080 Ti) returns cause=NVIDIA device=/dev/dri/renderD128 vendor=0x10de, which is correct. I haven't run the dialog itself in the app; CI's Qt lane builds the frontend.

Tiers: Tier 1/3 don't apply (new frontend C, no Rust or C original); Tier 2 is the cmocka cases above.

profile_vaapi_diagnose() is a stub that always answers NO_ENCODE, so the
new test_profile_activate cases for no render node, NVIDIA only, no
render-group access and a missing driver (with each distribution's
install command) fail.

Refs #1862
…missing

profile_vaapi_diagnose() walks /dev/dri/renderD128-135, skips NVIDIA
devices, checks that the user can open the device and that a VA-API
driver for the GPU vendor is installed, and picks the install command
from /etc/os-release. The Missing Encoders dialog shows that cause and
its fix, and logs it as a VAAPI: line. A build without obs-qsv11 says
to choose another encoder for Streaming and Recording.

Fixes #1862
@zackees
zackees marked this pull request as ready for review October 23, 2026 03:11
@zackees
zackees added this pull request to the merge queue Oct 23, 2026
Merged via the queue into master with commit 0e733c1 Oct 23, 2026
30 checks passed
@zackees
zackees deleted the fix/1862-vaapi-missing-cause branch October 23, 2026 03:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

frontend, appimage: Tell the user how to fix a missing VA-API encoder (driver not installed, no render group, no encode entrypoint)

1 participant