anki icon indicating copy to clipboard operation
anki copied to clipboard

QtWebEngine 6.11 GBM/X11Pixmap path fails on older AMD Oland GPU; disabling GBM fixes it

Open gokaybiz opened this issue 4 months ago • 3 comments

Summary

Anki 26.08 fails to render QtWebEngine content when using an older AMD Radeon GPU under X11.

The same machine and GPU worked correctly with Anki 25.09 (no driver update in-between these versions).

The failure disappears when disabling QtWebEngine GBM support:

QTWEBENGINE_FORCE_USE_GBM=0 anki

With this workaround, QtWebEngine reports:

GBM support is force disabled.
GBM is not supported with the current configuration. Fallback to Vulkan rendering in Chromium.

Using GBM: no
Native Buffer Supported: no
Native Pixmap Support Type: None

This suggests that the new GBM/native-pixmap compositor path doesn't work correctly on some older GPUs, like mine :))

Hardware / software:

Anki: 26.08
OS: Debian 12
Kernel: 6.13.1
Qt: 6.11.0
PyQt: 6.11.0
QtWebEngine: 6.11.0
GPU:
AMD Radeon R7 M350 (AMD FirePro W4190M [2GB GDDR5])
Oland / RadeonSI
Mesa Version:
25.0.7-2~bpo12+1
Display server:
X11

GPU works normally in other applications.

Symptoms

Launching Anki normally produces:

OzoneImageBacking::ProduceSkiaGanesh failed to create GL representation

SharedImageManager::ProduceSkia:
Trying to produce a Skia representation from an incompatible backing

RasterDecoderImpl: Context lost during MakeCurrent

QtWebEngine reports:

Compositor Type: Native
QPA Platform Plugin: xcb
Skia Graphics Context Type: GaneshGL
Native Buffer Supported: yes
Native Pixmap Support Type: X11Pixmap
Native Skia Output Device: OpenGL

The failure happens when Chromium tries to use the X11Pixmap/native buffer path.

Possible fixes?

Could Anki:

  • Detect GPUs where GBM/native pixmap import is unreliable and automatically fall back?
  • Provide a supported runtime option to disable GBM/native buffers?
  • Improve the compatibility path for older GPUs (for example AMD Oland/GCN 1.x)?

Older GPUs may still support OpenGL/Vulkan correctly but they fail the newer zero-copy/native-buffer compositor path I guess.

gokaybiz avatar Aug 03 '26 14:08 gokaybiz

Indeed. Radeon RX 460 w/ mesa 26.1.5:

Qt warning: GBM: Buffer creation failed with the following parameters:
   Device:    /dev/dri/renderD128 
   Format:    DRM_FORMAT_ARGB8888 
   Size:      1280x512 
   Flags:     GBM_BO_USE_RENDERING | GBM_BO_USE_SCANOUT (0x5) 
   Modifiers: DRM_FORMAT_MOD_LINEAR 
Qt warning: Failed to create GBM buffer for GLX. 
Qt fatal: Failed to create GBM buffer. NativePixmap allocation failed. 

kiefernforst avatar Aug 03 '26 22:08 kiefernforst

I’m seeing similar rendering issues with the official Anki 26.09.3 Linux aarch64 build on a Surface Laptop 7 (Adreno X1-85). I’m running Ubuntu 26.04.1, Mesa 26.0.8 and Qt/QtWebEngine 6.11.2 under XWayland. This reproduces with a fresh profile and no add-ons. Parts of the interface are missing, with colored stripes and triangles appearing across the window. QTWEBENGINE_FORCE_USE_GBM=0 anki fixes the rendering here too; the log confirms a fallback to Vulkan. Software rendering and native Wayland also work. I can also reproduce similar artifacts in a small standalone PyQt6 QWebEngineView example without importing Anki. Disabling GBM fixes that example as well. Not sure if it’s the same underlying issue, but Adreno appears to be affected too. Attached are unedited widget captures with the default settings and with GBM disabled.

Image Image

fQwQf avatar Oct 16 '26 03:10 fQwQf

I think I'm having the same issue with GPU: AMD Radeon RX 580 Series

Starting Anki 26.09.3...
2026-10-28 22:18:46,985:INFO:aqt.mediasrv: Serving on http://127.0.0.1:33601
Starting main loop...
Qt warning: GBM: Buffer creation failed with the following parameters:
   Device:    /dev/dri/renderD128
   Format:    DRM_FORMAT_ARGB8888
   Size:      1280x768
   Flags:     GBM_BO_USE_RENDERING | GBM_BO_USE_SCANOUT (0x5)
   Modifiers: DRM_FORMAT_MOD_LINEAR
Qt warning: Failed to create GBM buffer for GLX.
Qt fatal: Failed to create GBM buffer. NativePixmap allocation failed.

I get a blank window (other than headers) that crashes after a few seconds

Image

I also am able to launch with QTWEBENGINE_FORCE_USE_GBM=0 anki

IamSmeagol avatar Oct 29 '26 02:10 IamSmeagol