From c80fd95ce7b6fd56a0c50cba7f9f027a644cfefa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Berkay=20K=C3=B6sebay?= Date: Sun, 22 Nov 2026 01:36:40 +0100 Subject: [PATCH 1/3] Login session: no direct scan-out on the GPU desktop The GPU has no display outputs, so Labwc renders on the GPU and shows its output on the display's card (simpledrm). wlroots still tried to scan out a fullscreen client's GPU buffer directly on that card: AddFB2 failed, the buffer was poisoned, and on the iPod touch 6 the GPU-drawn shell then never appeared. With WLR_SCENE_DISABLE_DIRECT_SCANOUT=1 whenever the display is a separate card, Labwc always composites and the shell shows on the GPU. Tested on an iPod touch 6: shell visible, drawn by Qt Quick on the GPU. Assisted-by: LLM --- CHANGELOG.md | 3 +++ desktop/configuration/login-session | 7 ++++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 93431c3..fc1d167 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -15,6 +15,9 @@ is missing or empty. ### Desktop +- On the GPU desktop, the shell no longer stays invisible on a device whose + screen is driven by simpledrm. Labwc used to try to show it straight from + the GPU's buffer, which simpledrm cannot take, and now always composites it. - Every iPad, iPhone and iPod touch screen now starts at the size it has under iOS. Before, only the iPad 6, iPad 7 and iPhone 7 did; on the others, such as the iPod touch 6, everything was drawn at half size. diff --git a/desktop/configuration/login-session b/desktop/configuration/login-session index 8661ddb..4c42f5a 100644 --- a/desktop/configuration/login-session +++ b/desktop/configuration/login-session @@ -50,7 +50,12 @@ if [[ -n $gpu ]]; then done gpu_desktop=(WLR_RENDERER=gles2 "WLR_RENDER_DRM_DEVICE=/dev/dri/${gpu##*/}" MESA_LOADER_DRIVER_OVERRIDE=zink PVR_I_WANT_A_BROKEN_VULKAN_DRIVER=1) - if [[ -n $display ]]; then gpu_desktop+=("WLR_DRM_DEVICES=$display"); fi + # The display's card cannot scan out a buffer the GPU drew (simpledrm takes + # no dma-buf), so wlroots' direct scan-out of a fullscreen client fails, and + # on simpledrm that client was then never shown: always composite. + if [[ -n $display ]]; then + gpu_desktop+=("WLR_DRM_DEVICES=$display" WLR_SCENE_DISABLE_DIRECT_SCANOUT=1) + fi if [[ ! -e /usr/share/vulkan/icd.d/powervr_mesa_icd.json ]]; then gpu_verdict='software desktop: this image has no Vulkan driver for the GPU' elif [[ -z $display || ! -x $gpu_probe ]]; then From a7bd9bed521be5906e36c45106d5ec5260569cbf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Berkay=20K=C3=B6sebay?= Date: Sun, 22 Nov 2026 13:46:43 +0100 Subject: [PATCH 2/3] Login session: turn direct scan-out off on simpledrm only A display driver that imports the GPU's buffers (on the iPod touch 6, the A8's display pipe scanning out through its display DART) can scan out a client directly, so keep wlroots' direct scan-out there. It stays off when the display card is simpledrm, which takes no dma-buf. Tested on an iPod touch 6 with the A8 display pipe driver: labwc's GPU buffers are imported by the display card and scanned out, and the shell shows. Assisted-by: LLM --- desktop/configuration/login-session | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/desktop/configuration/login-session b/desktop/configuration/login-session index 4c42f5a..13ab699 100644 --- a/desktop/configuration/login-session +++ b/desktop/configuration/login-session @@ -50,11 +50,16 @@ if [[ -n $gpu ]]; then done gpu_desktop=(WLR_RENDERER=gles2 "WLR_RENDER_DRM_DEVICE=/dev/dri/${gpu##*/}" MESA_LOADER_DRIVER_OVERRIDE=zink PVR_I_WANT_A_BROKEN_VULKAN_DRIVER=1) - # The display's card cannot scan out a buffer the GPU drew (simpledrm takes - # no dma-buf), so wlroots' direct scan-out of a fullscreen client fails, and - # on simpledrm that client was then never shown: always composite. if [[ -n $display ]]; then - gpu_desktop+=("WLR_DRM_DEVICES=$display" WLR_SCENE_DISABLE_DIRECT_SCANOUT=1) + gpu_desktop+=("WLR_DRM_DEVICES=$display") + # simpledrm cannot scan out a buffer the GPU drew (it takes no dma-buf), so + # wlroots' direct scan-out of a fullscreen client fails, and that client + # was then never shown: always composite there. A display driver that + # imports the GPU's buffers keeps direct scan-out. + display_driver=$(basename "$(readlink -f "/sys/class/drm/${display##*/}/device/driver")") + if [[ $display_driver == simple-framebuffer || $display_driver == simpledrm ]]; then + gpu_desktop+=(WLR_SCENE_DISABLE_DIRECT_SCANOUT=1) + fi fi if [[ ! -e /usr/share/vulkan/icd.d/powervr_mesa_icd.json ]]; then gpu_verdict='software desktop: this image has no Vulkan driver for the GPU' From fa3d013910914bc4083bc6e82f089439969d42bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Berkay=20K=C3=B6sebay?= Date: Sun, 22 Nov 2026 13:55:38 +0100 Subject: [PATCH 3/3] Changelog: direct scan-out stays on outside simpledrm Assisted-by: LLM --- CHANGELOG.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index fc1d167..bbbcf51 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,7 +17,8 @@ is missing or empty. - On the GPU desktop, the shell no longer stays invisible on a device whose screen is driven by simpledrm. Labwc used to try to show it straight from - the GPU's buffer, which simpledrm cannot take, and now always composites it. + the GPU's buffer, which simpledrm cannot take, and now composites it there. + A display driver that takes the GPU's buffers keeps showing them directly. - Every iPad, iPhone and iPod touch screen now starts at the size it has under iOS. Before, only the iPad 6, iPad 7 and iPhone 7 did; on the others, such as the iPod touch 6, everything was drawn at half size.