Repository navigation
build-aux: AppRun points libxkbcommon at the host's keyboard data (#2437) - #2439
Merged
Merged
Conversation
The bundled libxkbcommon looks only in /usr/share/X11/xkb, which NixOS does not have, and Qt's Wayland plugin crashed without an xkb context. On this NixOS host the nixos and none cases fail: expected set:/etc/X11/xkb, obs has unset. Refs #2437
When XKB_CONFIG_ROOT is unset and /usr/share/X11/xkb is missing, AppRun sets it to /etc/X11/xkb or /run/current-system/sw/share/X11/xkb, the first that exists. On NixOS Wayland the bundled libxkbcommon found no keyboard data and Qt's Wayland plugin crashed in xkb_keymap_new. Refs #2437
zackees
enabled auto-merge
October 26, 2026 02:55
This was referenced Oct 26, 2026
rdoupe
pushed a commit
to rdoupe/obs-studio
that referenced
this pull request
Oct 26, 2026
appimage-run, or directly through nix-ld with hardware.graphics and Wayland in nix-ld's libraries. The driver libraries and keyboard data need no setup since obs-rust#2436 and obs-rust#2439. Refs obs-rust#891
rdoupe
pushed a commit
to rdoupe/obs-studio
that referenced
this pull request
Oct 26, 2026
obs-rust#2439's (obs-rust#2441) obs-rust#2438 and obs-rust#2439 fixed obs-rust#2437 independently and merged a minute apart. Master had two XKB_CONFIG_ROOT blocks in AppRun, two features ledger lines, and two checks in test-apprun-driver-env.sh. The user case preset the variable twice with different values, so one check always failed: FAIL [user] XKB_CONFIG_ROOT: expected set:/user/selected/XKB_CONFIG_ROOT, obs has set:/user/selected/xkb This reverts obs-rust#2438 (6eeb47d). obs-rust#2439's code, check and ledger line stay.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refs #2437
Cause
The bundled libxkbcommon looks for keyboard data only in its compiled default,
/usr/share/X11/xkb. NixOS keeps the data at/etc/X11/xkband doesn't setXKB_CONFIG_ROOT. On a NixOS KDE Wayland session, Qt loggedfailed to create xkb contextand then crashed inxkb_keymap_new(backtrace on #2437).Fix
AppRun sets
XKB_CONFIG_ROOTwhen the variable is unset and/usr/share/X11/xkbis missing. It uses the first of/etc/X11/xkband/run/current-system/sw/share/X11/xkbthat exists. A user's value, and any host with the standard directory, are left alone.Tests
test-apprun-driver-env.shchecksXKB_CONFIG_ROOTin each namespace case. The expectation follows the host: only a host without/usr/share/X11/xkbshould get the variable. On a NixOS host, before the fix:FAIL [nixos] XKB_CONFIG_ROOT: expected set:/etc/X11/xkb, obs has unset, and the same fornone. On Ubuntu CI the check passes either way, since the standard directory exists there.xkbcommon: ERROR: failed to add default include path /usr/share/X11/xkbandqt.qpa.wayland: failed to create xkb context.Platform: Wayland.Not verified: headless weston sends no keyboard keymap, so the crash itself (in
xkb_keymap_new) isn't reached there. Checking that needs a Wayland session with a keyboard, which is why this says Refs.