From 1a34ee3ae1049c1761c1539d15feef0a0a88bdf6 Mon Sep 17 00:00:00 2001 From: Luke Curley Date: Thu, 5 Nov 2026 12:48:38 -0800 Subject: [PATCH] quest: plan a single Vulkan loader and the X11 GPU path on NVIDIA Co-Authored-By: Claude Opus 5.5 --- quest/m0/README.md | 2 ++ quest/m0/cef-vulkan-loader.md | 25 +++++++++++++++++++++++++ quest/m0/cef-x11-nvidia.md | 26 ++++++++++++++++++++++++++ 3 files changed, 53 insertions(+) create mode 100644 quest/m0/cef-vulkan-loader.md create mode 100644 quest/m0/cef-x11-nvidia.md diff --git a/quest/m0/README.md b/quest/m0/README.md index e13ffb5d..a1a4bac5 100644 --- a/quest/m0/README.md +++ b/quest/m0/README.md @@ -101,6 +101,8 @@ repository. - [Web studio](/quest/m0/web.md) - the full studio in wasm on WebGPU and WebCodecs, served from this repository - [Virtual camera](/quest/m0/vcam/README.md) - the program or a published scene exposed as a system camera on Linux, Windows, and macOS - [Browser sources on the GPU under Mesa](/quest/m0/cef-headless.md) - shared-texture pages paint on Intel and AMD under Wayland, and a page that cannot paint fails loudly +- [One Vulkan loader for the studio and CEF](/quest/m0/cef-vulkan-loader.md) - NixOS builds and tests find the GPU without VK_DRIVER_FILES +- [Browser sources on the GPU under X11 on NVIDIA](/quest/m0/cef-x11-nvidia.md) - the X11 GPU path paints on NVIDIA, or falls back to the CPU path loudly - [Signing identities are available](/quest/m0/signing.md) - the Apple and Windows code-signing credentials packaging and the macOS camera need - [Packaging](/quest/m0/packaging.md) - signed installers for macOS and Windows and a Flatpak for Linux - [The persistable portal restore token is pinned](/quest/m0/pin-portal-token.md) - moq-video's restore token, for Wayland sources diff --git a/quest/m0/cef-vulkan-loader.md b/quest/m0/cef-vulkan-loader.md new file mode 100644 index 00000000..d5d4ab61 --- /dev/null +++ b/quest/m0/cef-vulkan-loader.md @@ -0,0 +1,25 @@ +# [S] One Vulkan loader for the studio and CEF + +## Goal + +On NixOS, `cargo run`, `cargo nextest` and an installed studio find the GPU +through the system Vulkan loader, with no `VK_DRIVER_FILES` or +`LD_LIBRARY_PATH` set, because the build no longer ships CEF's bundled +`libvulkan.so.1` beside the binaries. + +## Plan + +From [moq-dev/studio#59](https://github.com/moq-dev/studio/pull/59), picked +2026-11-05 (maintainer, /quest-plan), m0 by the rule that fixes join m0. + +- ✅ **Stop copying CEF's `libvulkan.so.1`** into the target directory, so + the studio and CEF's GPU process both load the system loader. Rejected: + exporting `VK_DRIVER_FILES` from the dev shell, which fixes development but + not a packaged build. +- Today the copy in `target/debug` loads first, finds no NixOS drivers, and + wgpu gets no adapter. The `render-sw` recipe in the `justfile` works around it + by exporting `LD_LIBRARY_PATH` and `VK_DRIVER_FILES`. Drop the workaround if it + is no longer needed for the software driver. +- Verify on NixOS (`ssh nixos`) that CEF's GPU path (Wayland, shared + textures) and its SwiftShader CPU path still start, that WebGL still draws, + and that the GPU tests find an adapter under plain `cargo nextest`. diff --git a/quest/m0/cef-x11-nvidia.md b/quest/m0/cef-x11-nvidia.md new file mode 100644 index 00000000..d38080dd --- /dev/null +++ b/quest/m0/cef-x11-nvidia.md @@ -0,0 +1,26 @@ +# [S] Browser sources on the GPU under X11 on NVIDIA + +## Goal + +On an NVIDIA GPU in an X11 or XWayland session, browser sources paint on +the GPU path. If the studio cannot give CEF a GBM device, it detects that at +startup and takes the CPU path with a note in Health, rather than leaving +pages stuck in Starting. + +## Plan + +From [moq-dev/studio#59](https://github.com/moq-dev/studio/pull/59), picked +2026-11-05 (maintainer, /quest-plan), m0 by the rule that fixes join m0. + +- On nixos (RTX 3070 Ti, NVIDIA 580), the GPU path under X11 never paints: + CEF's GPU process logs "Can't create buffer -- gbm device is missing". + Wayland sessions avoid it since #59, but X11-only sessions still hit it. +- First find why. Likely suspects: the NVIDIA GBM backend + (`nvidia-drm_gbm.so`) is not on CEF's search path (`GBM_BACKENDS_PATH`), or + `nvidia-drm` modeset is off. Fix it if the studio can, for example by + passing the backend path to the helper or packaging it. +- Otherwise fail loud: probe for a GBM device when the helper starts, and if + there is none, take the CPU path and say why in Health and the Sources panel. + Fail on an observed probe result, never on a timeout. +- Verify on nixos under X11 (XWayland) and record how in the PR; no CI job + has a GPU.