Repository navigation
Description
Hex report with the full repro and logs: anomalyco/hex#982
What happens
On Ubuntu 26.04 (GNOME, Wayland) with an NVIDIA RTX 5090 driving the displays and an AMD Radeon iGPU (Ryzen 9 9950X) also present, Hex 3.2.0 (.deb) starts, but its Rune app panics as soon as the HUD overlay is created (at launch, or at the first dictation):
ERROR hex::app_paths: panic: panicked at wgpu-30.0.1/src/backend/wgpu_core.rs:3981:18:
wgpu error: Validation Error
In Surface::configure
Invalid surface
ERROR hex::linux::app: the Hex window failed; Hex keeps running without it
WARN hex::linux::rune_hud: HUD unavailable: Rune could not open the overlay (no reason given); dictation still works
Dictation keeps working, but the Settings window dies (or never opens) and there is no HUD. hex status shows Recording HUD unavailable: the overlay could not open (no reason given).
Cause
- GNOME has no layer-shell, so the HUD is an override-redirect ARGB X11 window on XWayland (
platform/x11/xwayland.rs). gpu::pickcorrectly picks the compositor's GPU (NVIDIA,0000:01:00.0).- NVIDIA's Vulkan driver reports only
OPAQUEcomposite alpha for that X11 surface, sorender::translucency::preferlooks for another adapter that claims a translucent mode. RADV (the AMD iGPU) reportsPRE_MULTIPLIED | INHERITandis_surface_supported= true, so the overlay moves to the iGPU, even though the sort prefers the compositor's device. - RADV can't create a swapchain on an XWayland that NVIDIA drives:
vkCreateSwapchainKHRreturnsVK_ERROR_INITIALIZATION_FAILED. wgpu-hal maps that toSurfaceError::Lost, and wgpu-core toConfigureSurfaceError::InvalidSurface. wgpu's default uncaptured-error handler panics, and the panic takes the whole Rune app down with it.
I reproduced step 4 outside Hex with a small C program. It creates the same depth-32 override-redirect window on XWayland and calls vkCreateSwapchainKHR:
- NVIDIA: caps
alpha=0x1(opaque only), swapchainVK_SUCCESS - RADV: caps
alpha=0xa(premultiplied | inherit), swapchain-3(VK_ERROR_INITIALIZATION_FAILED)
Confirmation in the running app:
VK_LOADER_DRIVERS_DISABLE=*radeon*→ no panicWGPU_ADAPTER_NAME=nvidia(pins the pick, sopreferis skipped) → no panic at launch; the first HUD show works (but see the second crash below)DISPLAY=(no XWayland) → no panic, no HUD
Second crash once the first is avoided: Cannot get non-existent resource BufferId(3,1)
With the overlay pinned to NVIDIA (WGPU_ADAPTER_NAME=nvidia), the HUD shows once. The next time it shows, the app panics in wgpu-core-30.0.1/src/storage.rs:143 with Cannot get non-existent resource BufferId(3,1).
- NVIDIA's surface never
servesa translucent overlay, soOverlay::attachmakes a newGpu(instance + device) on every show (theNonebranch). - It keeps
self.rendererfrom the previous show and only callsrebuild_renderer(set_format/set_srgb_blend), so the renderer's buffers belong to the old device's hub. - Hex's
HudCompositor(src/rune_hud.rs) caches itsPainter(uniform buffers, bind group, pipeline) keyed only on the target format, so it has the same problem.
So the workaround stops the window from dying at launch, but the HUD still can't be shown twice.
Workaround
# ~/.config/systemd/user/hex.service.d/workaround-hybrid-gpu.conf
[Service]
Environment=WGPU_ADAPTER_NAME=nvidiathen systemctl --user daemon-reload && systemctl --user restart hex.
Proposed fix (Rune)
translucency::prefer: when the compositor named its GPU, don't consider adapters on other GPUs (the rulegpu/pick.rsalready states: only the compositor's GPU's buffers can be shown). The overlay draws opaque on the compositor's GPU instead of failing.Overlay::attach: configure the surface inside a validation error scope, andfail()the overlay on error instead of letting wgpu's default handler panic the app.Overlay::attach: when it makes a newGpu, drop the old renderer so it is rebuilt (with the atlases) on the new device. Document onCompositor::renderthatf.devicecan change between frames.
Proposed fix (Hex)
HudCompositor: rebuild thePainterwhenf.devicechanges, not only when the format does.
Environment
- Hex 3.2.0 (
hex_3.2.0-1_amd64.deb), Rune pinf5def6d, wgpu 30.0.1 - Ubuntu 26.04.1, kernel 7.0.0-42, GNOME (Mutter, experimental
scale-monitor-framebuffer,xwayland-native-scaling), Wayland + XWayland - NVIDIA GeForce RTX 5090, driver 595.58.03 (displays on this card); AMD Radeon iGPU (RADV, Mesa 26.0.8)
Activity
thdxr commentedon Nov 2, 2026
fixed in 53c0c9a on dev (hex picked it up in anomalyco/hex#986). thanks for the write-up.
— from 𝕺𝖕𝖊𝖓𝕮𝖔𝖉𝖊