Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
From e910fc1dda09b916e190f5f8645abae5b6ebfda3 Mon Sep 17 00:00:00 2001
From: superturtlee <160681686+superturtlee@users.noreply.github.com>
Date: Mon, 6 Jul 2026 09:56:24 +0800
Subject: [PATCH] xwayland: support kgsl dmabuf v3 fallback paths

Allow glamor to initialize with linux-dmabuf v3 when wl_drm and dmabuf
feedback are unavailable, fall back to a configurable GBM render node, and
handle implicit or bogus linear modifiers used by kgsl/freedreno stacks.

Based-on-patch: https://github.com/superturtlee/anland/blob/1.11/producers/kde/ubuntu2604/xwayland.patch

Co-authored-by: lfdevs <lfdevs@lfdevs.com>
---
hw/xwayland/xwayland-glamor-gbm.c | 65 ++++++++++++++++++++++---------
hw/xwayland/xwayland-glamor.c | 9 +++++
2 files changed, 56 insertions(+), 18 deletions(-)

diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
index 05668b8e9..5ce344b3c 100644
--- a/hw/xwayland/xwayland-glamor-gbm.c
+++ b/hw/xwayland/xwayland-glamor-gbm.c
@@ -33,6 +33,7 @@
#include <fcntl.h>
#include <errno.h>
#include <poll.h>
+#include <stdlib.h>
#ifdef DRI3
#include <sys/eventfd.h>
#endif /* DRI3 */
@@ -590,8 +591,17 @@ xwl_glamor_pixmap_get_wl_buffer(PixmapPtr pixmap)
return NULL;
}

+ /* An implicit-modifier buffer (DRM_FORMAT_MOD_INVALID) is never listed in
+ * the compositor's advertised modifier set, so the regular support check
+ * fails. On the kgsl/turnip stack - where the buffer is allocated on the
+ * display node but composited by turnip - that left both the dmabuf and
+ * the (absent) wl_drm path unusable, so no wl_buffer was created and the
+ * X11 window stayed black. Per the linux-dmabuf protocol, INVALID means
+ * "let the compositor infer the layout", so submit it through the dmabuf
+ * path directly instead of rejecting it. */
if (xwl_screen->dmabuf &&
- xwl_glamor_is_modifier_supported(xwl_screen, format, modifier)) {
+ (modifier == DRM_FORMAT_MOD_INVALID ||
+ xwl_glamor_is_modifier_supported(xwl_screen, format, modifier))) {
struct zwp_linux_buffer_params_v1 *params;

params = zwp_linux_dmabuf_v1_create_params(xwl_screen->dmabuf);
@@ -773,6 +783,15 @@ glamor_pixmap_from_fds(ScreenPtr screen, CARD8 num_fds, const int *fds,
strides[0] < width * bpp / 8)
goto error;

+ /* Some freedreno/kgsl mesa builds (the on-device dev tree) rewrite a
+ * LINEAR modifier (0) to a bogus 1274 (0x4FA) in the loader_dri3
+ * pixmap_from_buffers path. 1274 is not a valid DRM modifier, so the
+ * gbm_bo_import() below rejects it and the X11 GL client gets BadAlloc
+ * (dri3_alloc_render_buffer -> pixmap_from_buffer[s] failed -> segfault).
+ * The buffer is really linear, so map the bogus value back to LINEAR. */
+ if (modifier == 1274ULL)
+ modifier = DRM_FORMAT_MOD_LINEAR;
+
if (xwl_gbm->dmabuf_capable && modifier != DRM_FORMAT_MOD_INVALID) {
#ifdef GBM_BO_WITH_MODIFIERS
struct gbm_import_fd_modifier_data data;
@@ -1665,27 +1684,37 @@ static Bool
xwl_glamor_gbm_init_main_dev(struct xwl_screen *xwl_screen)
{
struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
- drmDevice *main_dev;
-
- while (!xwl_screen->default_feedback.feedback_done) {
- if (wl_display_dispatch(xwl_screen->display) < 0) {
- ErrorF("Failed to dispatch Wayland display\n");
- return FALSE;
+ drmDevice *main_dev = NULL;
+
+ /* linux-dmabuf feedback (and thus a main device) only exists from protocol
+ * version 4. On the kgsl/turnip stack the compositor only speaks v3, so
+ * there is no feedback to wait for - skip the wait and go straight to the
+ * fallback render node below instead of blocking forever on feedback_done. */
+ if (xwl_screen->dmabuf_protocol_version >= 4) {
+ while (!xwl_screen->default_feedback.feedback_done) {
+ if (wl_display_dispatch(xwl_screen->display) < 0) {
+ ErrorF("Failed to dispatch Wayland display\n");
+ return FALSE;
+ }
}
+ main_dev = xwl_screen->default_feedback.main_dev;
}

- main_dev = xwl_screen->default_feedback.main_dev;
- if (!main_dev) {
- ErrorF("No main linux-dmabuf device advertised by compositor\n");
- return FALSE;
- }
-
- if (!(main_dev->available_nodes & (1 << DRM_NODE_RENDER))) {
- ErrorF("Main linux-dmabuf device has no render node\n");
- return FALSE;
+ /* On the kgsl-backed turnip stack the compositor advertises no usable DRM
+ * render node (the GPU is exposed through kgsl, not a standard DRM node),
+ * so main_dev is NULL or render-node-less. Rather than dereferencing NULL
+ * (-> crash) or bailing out, fall back to a default render node, which the
+ * patched freedreno mesa redirects to /dev/kgsl-3d0 for native GL. */
+ if (!main_dev || !(main_dev->available_nodes & (1 << DRM_NODE_RENDER))) {
+ const char *fallback = getenv("XWAYLAND_GBM_DEVICE");
+ if (!fallback)
+ fallback = "/dev/dri/renderD128";
+ ErrorF("No usable linux-dmabuf main device, falling back to %s\n",
+ fallback);
+ xwl_gbm->device_name = strdup(fallback);
+ } else {
+ xwl_gbm->device_name = strdup(main_dev->nodes[DRM_NODE_RENDER]);
}
-
- xwl_gbm->device_name = strdup(main_dev->nodes[DRM_NODE_RENDER]);
if (!xwl_gbm->device_name) {
return FALSE;
}
diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
index 88ced5da0..35d1e0391 100644
--- a/hw/xwayland/xwayland-glamor.c
+++ b/hw/xwayland/xwayland-glamor.c
@@ -123,6 +123,15 @@ xwl_glamor_has_wl_interfaces(struct xwl_screen *xwl_screen)
{
if (!xwl_glamor_has_wl_drm(xwl_screen) &&
xwl_screen->dmabuf_protocol_version < 4) {
+ /* No wl_drm and no linux-dmabuf feedback (v4). On the kgsl/turnip stack
+ * the compositor exposes neither (the GPU lives behind /dev/kgsl-3d0,
+ * not a DRM render node, so there is no main device to advertise), but
+ * it does speak linux-dmabuf v3. We can still bring glamor up by opening
+ * a fallback render node directly (see xwl_glamor_gbm_init_main_dev) and
+ * submitting buffers over dmabuf v3, so keep glamor available as long as
+ * v3 is present. */
+ if (xwl_screen->dmabuf_protocol_version >= 3)
+ return TRUE;
LogMessageVerb(X_INFO, 3, "glamor: 'wl_drm' not supported and linux-dmabuf v4 not supported\n");
return FALSE;
}
--
2.47.3

Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
enhance(x11/xwayland): support kgsl dmabuf v3 fallback paths, surfaceless glamor and DRI3 rendering by lfdevs · Pull Request #13 · lfdevs/termux-packages · GitHub
Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
From e910fc1dda09b916e190f5f8645abae5b6ebfda3 Mon Sep 17 00:00:00 2001
From: superturtlee <160681686+superturtlee@users.noreply.github.com>
Date: Mon, 6 Jul 2026 09:56:24 +0800
Subject: [PATCH] xwayland: support kgsl dmabuf v3 fallback paths

Allow glamor to initialize with linux-dmabuf v3 when wl_drm and dmabuf
feedback are unavailable, fall back to a configurable GBM render node, and
handle implicit or bogus linear modifiers used by kgsl/freedreno stacks.

Based-on-patch: https://github.com/superturtlee/anland/blob/1.11/producers/kde/ubuntu2604/xwayland.patch

Co-authored-by: lfdevs <lfdevs@lfdevs.com>
---
hw/xwayland/xwayland-glamor-gbm.c | 65 ++++++++++++++++++++++---------
hw/xwayland/xwayland-glamor.c | 9 +++++
2 files changed, 56 insertions(+), 18 deletions(-)

diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
index 05668b8e9..5ce344b3c 100644
--- a/hw/xwayland/xwayland-glamor-gbm.c
+++ b/hw/xwayland/xwayland-glamor-gbm.c
@@ -33,6 +33,7 @@
#include <fcntl.h>
#include <errno.h>
#include <poll.h>
+#include <stdlib.h>
#ifdef DRI3
#include <sys/eventfd.h>
#endif /* DRI3 */
@@ -590,8 +591,17 @@ xwl_glamor_pixmap_get_wl_buffer(PixmapPtr pixmap)
return NULL;
}

+ /* An implicit-modifier buffer (DRM_FORMAT_MOD_INVALID) is never listed in
+ * the compositor's advertised modifier set, so the regular support check
+ * fails. On the kgsl/turnip stack - where the buffer is allocated on the
+ * display node but composited by turnip - that left both the dmabuf and
+ * the (absent) wl_drm path unusable, so no wl_buffer was created and the
+ * X11 window stayed black. Per the linux-dmabuf protocol, INVALID means
+ * "let the compositor infer the layout", so submit it through the dmabuf
+ * path directly instead of rejecting it. */
if (xwl_screen->dmabuf &&
- xwl_glamor_is_modifier_supported(xwl_screen, format, modifier)) {
+ (modifier == DRM_FORMAT_MOD_INVALID ||
+ xwl_glamor_is_modifier_supported(xwl_screen, format, modifier))) {
struct zwp_linux_buffer_params_v1 *params;

params = zwp_linux_dmabuf_v1_create_params(xwl_screen->dmabuf);
@@ -773,6 +783,15 @@ glamor_pixmap_from_fds(ScreenPtr screen, CARD8 num_fds, const int *fds,
strides[0] < width * bpp / 8)
goto error;

+ /* Some freedreno/kgsl mesa builds (the on-device dev tree) rewrite a
+ * LINEAR modifier (0) to a bogus 1274 (0x4FA) in the loader_dri3
+ * pixmap_from_buffers path. 1274 is not a valid DRM modifier, so the
+ * gbm_bo_import() below rejects it and the X11 GL client gets BadAlloc
+ * (dri3_alloc_render_buffer -> pixmap_from_buffer[s] failed -> segfault).
+ * The buffer is really linear, so map the bogus value back to LINEAR. */
+ if (modifier == 1274ULL)
+ modifier = DRM_FORMAT_MOD_LINEAR;
+
if (xwl_gbm->dmabuf_capable && modifier != DRM_FORMAT_MOD_INVALID) {
#ifdef GBM_BO_WITH_MODIFIERS
struct gbm_import_fd_modifier_data data;
@@ -1665,27 +1684,37 @@ static Bool
xwl_glamor_gbm_init_main_dev(struct xwl_screen *xwl_screen)
{
struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
- drmDevice *main_dev;
-
- while (!xwl_screen->default_feedback.feedback_done) {
- if (wl_display_dispatch(xwl_screen->display) < 0) {
- ErrorF("Failed to dispatch Wayland display\n");
- return FALSE;
+ drmDevice *main_dev = NULL;
+
+ /* linux-dmabuf feedback (and thus a main device) only exists from protocol
+ * version 4. On the kgsl/turnip stack the compositor only speaks v3, so
+ * there is no feedback to wait for - skip the wait and go straight to the
+ * fallback render node below instead of blocking forever on feedback_done. */
+ if (xwl_screen->dmabuf_protocol_version >= 4) {
+ while (!xwl_screen->default_feedback.feedback_done) {
+ if (wl_display_dispatch(xwl_screen->display) < 0) {
+ ErrorF("Failed to dispatch Wayland display\n");
+ return FALSE;
+ }
}
+ main_dev = xwl_screen->default_feedback.main_dev;
}

- main_dev = xwl_screen->default_feedback.main_dev;
- if (!main_dev) {
- ErrorF("No main linux-dmabuf device advertised by compositor\n");
- return FALSE;
- }
-
- if (!(main_dev->available_nodes & (1 << DRM_NODE_RENDER))) {
- ErrorF("Main linux-dmabuf device has no render node\n");
- return FALSE;
+ /* On the kgsl-backed turnip stack the compositor advertises no usable DRM
+ * render node (the GPU is exposed through kgsl, not a standard DRM node),
+ * so main_dev is NULL or render-node-less. Rather than dereferencing NULL
+ * (-> crash) or bailing out, fall back to a default render node, which the
+ * patched freedreno mesa redirects to /dev/kgsl-3d0 for native GL. */
+ if (!main_dev || !(main_dev->available_nodes & (1 << DRM_NODE_RENDER))) {
+ const char *fallback = getenv("XWAYLAND_GBM_DEVICE");
+ if (!fallback)
+ fallback = "/dev/dri/renderD128";
+ ErrorF("No usable linux-dmabuf main device, falling back to %s\n",
+ fallback);
+ xwl_gbm->device_name = strdup(fallback);
+ } else {
+ xwl_gbm->device_name = strdup(main_dev->nodes[DRM_NODE_RENDER]);
}
-
- xwl_gbm->device_name = strdup(main_dev->nodes[DRM_NODE_RENDER]);
if (!xwl_gbm->device_name) {
return FALSE;
}
diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
index 88ced5da0..35d1e0391 100644
--- a/hw/xwayland/xwayland-glamor.c
+++ b/hw/xwayland/xwayland-glamor.c
@@ -123,6 +123,15 @@ xwl_glamor_has_wl_interfaces(struct xwl_screen *xwl_screen)
{
if (!xwl_glamor_has_wl_drm(xwl_screen) &&
xwl_screen->dmabuf_protocol_version < 4) {
+ /* No wl_drm and no linux-dmabuf feedback (v4). On the kgsl/turnip stack
+ * the compositor exposes neither (the GPU lives behind /dev/kgsl-3d0,
+ * not a DRM render node, so there is no main device to advertise), but
+ * it does speak linux-dmabuf v3. We can still bring glamor up by opening
+ * a fallback render node directly (see xwl_glamor_gbm_init_main_dev) and
+ * submitting buffers over dmabuf v3, so keep glamor available as long as
+ * v3 is present. */
+ if (xwl_screen->dmabuf_protocol_version >= 3)
+ return TRUE;
LogMessageVerb(X_INFO, 3, "glamor: 'wl_drm' not supported and linux-dmabuf v4 not supported\n");
return FALSE;
}
--
2.47.3

Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' enhance(x11/xwayland): support kgsl dmabuf v3 fallback paths, surfaceless glamor and DRI3 rendering by lfdevs · Pull Request #13 · lfdevs/termux-packages · GitHub
Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
From e910fc1dda09b916e190f5f8645abae5b6ebfda3 Mon Sep 17 00:00:00 2001
From: superturtlee <160681686+superturtlee@users.noreply.github.com>
Date: Mon, 6 Jul 2026 09:56:24 +0800
Subject: [PATCH] xwayland: support kgsl dmabuf v3 fallback paths

Allow glamor to initialize with linux-dmabuf v3 when wl_drm and dmabuf
feedback are unavailable, fall back to a configurable GBM render node, and
handle implicit or bogus linear modifiers used by kgsl/freedreno stacks.

Based-on-patch: https://github.com/superturtlee/anland/blob/1.11/producers/kde/ubuntu2604/xwayland.patch

Co-authored-by: lfdevs <lfdevs@lfdevs.com>
---
hw/xwayland/xwayland-glamor-gbm.c | 65 ++++++++++++++++++++++---------
hw/xwayland/xwayland-glamor.c | 9 +++++
2 files changed, 56 insertions(+), 18 deletions(-)

diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
index 05668b8e9..5ce344b3c 100644
--- a/hw/xwayland/xwayland-glamor-gbm.c
+++ b/hw/xwayland/xwayland-glamor-gbm.c
@@ -33,6 +33,7 @@
#include <fcntl.h>
#include <errno.h>
#include <poll.h>
+#include <stdlib.h>
#ifdef DRI3
#include <sys/eventfd.h>
#endif /* DRI3 */
@@ -590,8 +591,17 @@ xwl_glamor_pixmap_get_wl_buffer(PixmapPtr pixmap)
return NULL;
}

+ /* An implicit-modifier buffer (DRM_FORMAT_MOD_INVALID) is never listed in
+ * the compositor's advertised modifier set, so the regular support check
+ * fails. On the kgsl/turnip stack - where the buffer is allocated on the
+ * display node but composited by turnip - that left both the dmabuf and
+ * the (absent) wl_drm path unusable, so no wl_buffer was created and the
+ * X11 window stayed black. Per the linux-dmabuf protocol, INVALID means
+ * "let the compositor infer the layout", so submit it through the dmabuf
+ * path directly instead of rejecting it. */
if (xwl_screen->dmabuf &&
- xwl_glamor_is_modifier_supported(xwl_screen, format, modifier)) {
+ (modifier == DRM_FORMAT_MOD_INVALID ||
+ xwl_glamor_is_modifier_supported(xwl_screen, format, modifier))) {
struct zwp_linux_buffer_params_v1 *params;

params = zwp_linux_dmabuf_v1_create_params(xwl_screen->dmabuf);
@@ -773,6 +783,15 @@ glamor_pixmap_from_fds(ScreenPtr screen, CARD8 num_fds, const int *fds,
strides[0] < width * bpp / 8)
goto error;

+ /* Some freedreno/kgsl mesa builds (the on-device dev tree) rewrite a
+ * LINEAR modifier (0) to a bogus 1274 (0x4FA) in the loader_dri3
+ * pixmap_from_buffers path. 1274 is not a valid DRM modifier, so the
+ * gbm_bo_import() below rejects it and the X11 GL client gets BadAlloc
+ * (dri3_alloc_render_buffer -> pixmap_from_buffer[s] failed -> segfault).
+ * The buffer is really linear, so map the bogus value back to LINEAR. */
+ if (modifier == 1274ULL)
+ modifier = DRM_FORMAT_MOD_LINEAR;
+
if (xwl_gbm->dmabuf_capable && modifier != DRM_FORMAT_MOD_INVALID) {
#ifdef GBM_BO_WITH_MODIFIERS
struct gbm_import_fd_modifier_data data;
@@ -1665,27 +1684,37 @@ static Bool
xwl_glamor_gbm_init_main_dev(struct xwl_screen *xwl_screen)
{
struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
- drmDevice *main_dev;
-
- while (!xwl_screen->default_feedback.feedback_done) {
- if (wl_display_dispatch(xwl_screen->display) < 0) {
- ErrorF("Failed to dispatch Wayland display\n");
- return FALSE;
+ drmDevice *main_dev = NULL;
+
+ /* linux-dmabuf feedback (and thus a main device) only exists from protocol
+ * version 4. On the kgsl/turnip stack the compositor only speaks v3, so
+ * there is no feedback to wait for - skip the wait and go straight to the
+ * fallback render node below instead of blocking forever on feedback_done. */
+ if (xwl_screen->dmabuf_protocol_version >= 4) {
+ while (!xwl_screen->default_feedback.feedback_done) {
+ if (wl_display_dispatch(xwl_screen->display) < 0) {
+ ErrorF("Failed to dispatch Wayland display\n");
+ return FALSE;
+ }
}
+ main_dev = xwl_screen->default_feedback.main_dev;
}

- main_dev = xwl_screen->default_feedback.main_dev;
- if (!main_dev) {
- ErrorF("No main linux-dmabuf device advertised by compositor\n");
- return FALSE;
- }
-
- if (!(main_dev->available_nodes & (1 << DRM_NODE_RENDER))) {
- ErrorF("Main linux-dmabuf device has no render node\n");
- return FALSE;
+ /* On the kgsl-backed turnip stack the compositor advertises no usable DRM
+ * render node (the GPU is exposed through kgsl, not a standard DRM node),
+ * so main_dev is NULL or render-node-less. Rather than dereferencing NULL
+ * (-> crash) or bailing out, fall back to a default render node, which the
+ * patched freedreno mesa redirects to /dev/kgsl-3d0 for native GL. */
+ if (!main_dev || !(main_dev->available_nodes & (1 << DRM_NODE_RENDER))) {
+ const char *fallback = getenv("XWAYLAND_GBM_DEVICE");
+ if (!fallback)
+ fallback = "/dev/dri/renderD128";
+ ErrorF("No usable linux-dmabuf main device, falling back to %s\n",
+ fallback);
+ xwl_gbm->device_name = strdup(fallback);
+ } else {
+ xwl_gbm->device_name = strdup(main_dev->nodes[DRM_NODE_RENDER]);
}
-
- xwl_gbm->device_name = strdup(main_dev->nodes[DRM_NODE_RENDER]);
if (!xwl_gbm->device_name) {
return FALSE;
}
diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
index 88ced5da0..35d1e0391 100644
--- a/hw/xwayland/xwayland-glamor.c
+++ b/hw/xwayland/xwayland-glamor.c
@@ -123,6 +123,15 @@ xwl_glamor_has_wl_interfaces(struct xwl_screen *xwl_screen)
{
if (!xwl_glamor_has_wl_drm(xwl_screen) &&
xwl_screen->dmabuf_protocol_version < 4) {
+ /* No wl_drm and no linux-dmabuf feedback (v4). On the kgsl/turnip stack
+ * the compositor exposes neither (the GPU lives behind /dev/kgsl-3d0,
+ * not a DRM render node, so there is no main device to advertise), but
+ * it does speak linux-dmabuf v3. We can still bring glamor up by opening
+ * a fallback render node directly (see xwl_glamor_gbm_init_main_dev) and
+ * submitting buffers over dmabuf v3, so keep glamor available as long as
+ * v3 is present. */
+ if (xwl_screen->dmabuf_protocol_version >= 3)
+ return TRUE;
LogMessageVerb(X_INFO, 3, "glamor: 'wl_drm' not supported and linux-dmabuf v4 not supported\n");
return FALSE;
}
--
2.47.3

Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' enhance(x11/xwayland): support kgsl dmabuf v3 fallback paths, surfaceless glamor and DRI3 rendering by lfdevs · Pull Request #13 · lfdevs/termux-packages · GitHub
Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
From e910fc1dda09b916e190f5f8645abae5b6ebfda3 Mon Sep 17 00:00:00 2001
From: superturtlee <160681686+superturtlee@users.noreply.github.com>
Date: Mon, 6 Jul 2026 09:56:24 +0800
Subject: [PATCH] xwayland: support kgsl dmabuf v3 fallback paths

Allow glamor to initialize with linux-dmabuf v3 when wl_drm and dmabuf
feedback are unavailable, fall back to a configurable GBM render node, and
handle implicit or bogus linear modifiers used by kgsl/freedreno stacks.

Based-on-patch: https://github.com/superturtlee/anland/blob/1.11/producers/kde/ubuntu2604/xwayland.patch

Co-authored-by: lfdevs <lfdevs@lfdevs.com>
---
hw/xwayland/xwayland-glamor-gbm.c | 65 ++++++++++++++++++++++---------
hw/xwayland/xwayland-glamor.c | 9 +++++
2 files changed, 56 insertions(+), 18 deletions(-)

diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
index 05668b8e9..5ce344b3c 100644
--- a/hw/xwayland/xwayland-glamor-gbm.c
+++ b/hw/xwayland/xwayland-glamor-gbm.c
@@ -33,6 +33,7 @@
#include <fcntl.h>
#include <errno.h>
#include <poll.h>
+#include <stdlib.h>
#ifdef DRI3
#include <sys/eventfd.h>
#endif /* DRI3 */
@@ -590,8 +591,17 @@ xwl_glamor_pixmap_get_wl_buffer(PixmapPtr pixmap)
return NULL;
}

+ /* An implicit-modifier buffer (DRM_FORMAT_MOD_INVALID) is never listed in
+ * the compositor's advertised modifier set, so the regular support check
+ * fails. On the kgsl/turnip stack - where the buffer is allocated on the
+ * display node but composited by turnip - that left both the dmabuf and
+ * the (absent) wl_drm path unusable, so no wl_buffer was created and the
+ * X11 window stayed black. Per the linux-dmabuf protocol, INVALID means
+ * "let the compositor infer the layout", so submit it through the dmabuf
+ * path directly instead of rejecting it. */
if (xwl_screen->dmabuf &&
- xwl_glamor_is_modifier_supported(xwl_screen, format, modifier)) {
+ (modifier == DRM_FORMAT_MOD_INVALID ||
+ xwl_glamor_is_modifier_supported(xwl_screen, format, modifier))) {
struct zwp_linux_buffer_params_v1 *params;

params = zwp_linux_dmabuf_v1_create_params(xwl_screen->dmabuf);
@@ -773,6 +783,15 @@ glamor_pixmap_from_fds(ScreenPtr screen, CARD8 num_fds, const int *fds,
strides[0] < width * bpp / 8)
goto error;

+ /* Some freedreno/kgsl mesa builds (the on-device dev tree) rewrite a
+ * LINEAR modifier (0) to a bogus 1274 (0x4FA) in the loader_dri3
+ * pixmap_from_buffers path. 1274 is not a valid DRM modifier, so the
+ * gbm_bo_import() below rejects it and the X11 GL client gets BadAlloc
+ * (dri3_alloc_render_buffer -> pixmap_from_buffer[s] failed -> segfault).
+ * The buffer is really linear, so map the bogus value back to LINEAR. */
+ if (modifier == 1274ULL)
+ modifier = DRM_FORMAT_MOD_LINEAR;
+
if (xwl_gbm->dmabuf_capable && modifier != DRM_FORMAT_MOD_INVALID) {
#ifdef GBM_BO_WITH_MODIFIERS
struct gbm_import_fd_modifier_data data;
@@ -1665,27 +1684,37 @@ static Bool
xwl_glamor_gbm_init_main_dev(struct xwl_screen *xwl_screen)
{
struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
- drmDevice *main_dev;
-
- while (!xwl_screen->default_feedback.feedback_done) {
- if (wl_display_dispatch(xwl_screen->display) < 0) {
- ErrorF("Failed to dispatch Wayland display\n");
- return FALSE;
+ drmDevice *main_dev = NULL;
+
+ /* linux-dmabuf feedback (and thus a main device) only exists from protocol
+ * version 4. On the kgsl/turnip stack the compositor only speaks v3, so
+ * there is no feedback to wait for - skip the wait and go straight to the
+ * fallback render node below instead of blocking forever on feedback_done. */
+ if (xwl_screen->dmabuf_protocol_version >= 4) {
+ while (!xwl_screen->default_feedback.feedback_done) {
+ if (wl_display_dispatch(xwl_screen->display) < 0) {
+ ErrorF("Failed to dispatch Wayland display\n");
+ return FALSE;
+ }
}
+ main_dev = xwl_screen->default_feedback.main_dev;
}

- main_dev = xwl_screen->default_feedback.main_dev;
- if (!main_dev) {
- ErrorF("No main linux-dmabuf device advertised by compositor\n");
- return FALSE;
- }
-
- if (!(main_dev->available_nodes & (1 << DRM_NODE_RENDER))) {
- ErrorF("Main linux-dmabuf device has no render node\n");
- return FALSE;
+ /* On the kgsl-backed turnip stack the compositor advertises no usable DRM
+ * render node (the GPU is exposed through kgsl, not a standard DRM node),
+ * so main_dev is NULL or render-node-less. Rather than dereferencing NULL
+ * (-> crash) or bailing out, fall back to a default render node, which the
+ * patched freedreno mesa redirects to /dev/kgsl-3d0 for native GL. */
+ if (!main_dev || !(main_dev->available_nodes & (1 << DRM_NODE_RENDER))) {
+ const char *fallback = getenv("XWAYLAND_GBM_DEVICE");
+ if (!fallback)
+ fallback = "/dev/dri/renderD128";
+ ErrorF("No usable linux-dmabuf main device, falling back to %s\n",
+ fallback);
+ xwl_gbm->device_name = strdup(fallback);
+ } else {
+ xwl_gbm->device_name = strdup(main_dev->nodes[DRM_NODE_RENDER]);
}
-
- xwl_gbm->device_name = strdup(main_dev->nodes[DRM_NODE_RENDER]);
if (!xwl_gbm->device_name) {
return FALSE;
}
diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
index 88ced5da0..35d1e0391 100644
--- a/hw/xwayland/xwayland-glamor.c
+++ b/hw/xwayland/xwayland-glamor.c
@@ -123,6 +123,15 @@ xwl_glamor_has_wl_interfaces(struct xwl_screen *xwl_screen)
{
if (!xwl_glamor_has_wl_drm(xwl_screen) &&
xwl_screen->dmabuf_protocol_version < 4) {
+ /* No wl_drm and no linux-dmabuf feedback (v4). On the kgsl/turnip stack
+ * the compositor exposes neither (the GPU lives behind /dev/kgsl-3d0,
+ * not a DRM render node, so there is no main device to advertise), but
+ * it does speak linux-dmabuf v3. We can still bring glamor up by opening
+ * a fallback render node directly (see xwl_glamor_gbm_init_main_dev) and
+ * submitting buffers over dmabuf v3, so keep glamor available as long as
+ * v3 is present. */
+ if (xwl_screen->dmabuf_protocol_version >= 3)
+ return TRUE;
LogMessageVerb(X_INFO, 3, "glamor: 'wl_drm' not supported and linux-dmabuf v4 not supported\n");
return FALSE;
}
--
2.47.3

Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' enhance(x11/xwayland): support kgsl dmabuf v3 fallback paths, surfaceless glamor and DRI3 rendering by lfdevs · Pull Request #13 · lfdevs/termux-packages · GitHub
Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
From e910fc1dda09b916e190f5f8645abae5b6ebfda3 Mon Sep 17 00:00:00 2001
From: superturtlee <160681686+superturtlee@users.noreply.github.com>
Date: Mon, 6 Jul 2026 09:56:24 +0800
Subject: [PATCH] xwayland: support kgsl dmabuf v3 fallback paths

Allow glamor to initialize with linux-dmabuf v3 when wl_drm and dmabuf
feedback are unavailable, fall back to a configurable GBM render node, and
handle implicit or bogus linear modifiers used by kgsl/freedreno stacks.

Based-on-patch: https://github.com/superturtlee/anland/blob/1.11/producers/kde/ubuntu2604/xwayland.patch

Co-authored-by: lfdevs <lfdevs@lfdevs.com>
---
hw/xwayland/xwayland-glamor-gbm.c | 65 ++++++++++++++++++++++---------
hw/xwayland/xwayland-glamor.c | 9 +++++
2 files changed, 56 insertions(+), 18 deletions(-)

diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
index 05668b8e9..5ce344b3c 100644
--- a/hw/xwayland/xwayland-glamor-gbm.c
+++ b/hw/xwayland/xwayland-glamor-gbm.c
@@ -33,6 +33,7 @@
#include <fcntl.h>
#include <errno.h>
#include <poll.h>
+#include <stdlib.h>
#ifdef DRI3
#include <sys/eventfd.h>
#endif /* DRI3 */
@@ -590,8 +591,17 @@ xwl_glamor_pixmap_get_wl_buffer(PixmapPtr pixmap)
return NULL;
}

+ /* An implicit-modifier buffer (DRM_FORMAT_MOD_INVALID) is never listed in
+ * the compositor's advertised modifier set, so the regular support check
+ * fails. On the kgsl/turnip stack - where the buffer is allocated on the
+ * display node but composited by turnip - that left both the dmabuf and
+ * the (absent) wl_drm path unusable, so no wl_buffer was created and the
+ * X11 window stayed black. Per the linux-dmabuf protocol, INVALID means
+ * "let the compositor infer the layout", so submit it through the dmabuf
+ * path directly instead of rejecting it. */
if (xwl_screen->dmabuf &&
- xwl_glamor_is_modifier_supported(xwl_screen, format, modifier)) {
+ (modifier == DRM_FORMAT_MOD_INVALID ||
+ xwl_glamor_is_modifier_supported(xwl_screen, format, modifier))) {
struct zwp_linux_buffer_params_v1 *params;

params = zwp_linux_dmabuf_v1_create_params(xwl_screen->dmabuf);
@@ -773,6 +783,15 @@ glamor_pixmap_from_fds(ScreenPtr screen, CARD8 num_fds, const int *fds,
strides[0] < width * bpp / 8)
goto error;

+ /* Some freedreno/kgsl mesa builds (the on-device dev tree) rewrite a
+ * LINEAR modifier (0) to a bogus 1274 (0x4FA) in the loader_dri3
+ * pixmap_from_buffers path. 1274 is not a valid DRM modifier, so the
+ * gbm_bo_import() below rejects it and the X11 GL client gets BadAlloc
+ * (dri3_alloc_render_buffer -> pixmap_from_buffer[s] failed -> segfault).
+ * The buffer is really linear, so map the bogus value back to LINEAR. */
+ if (modifier == 1274ULL)
+ modifier = DRM_FORMAT_MOD_LINEAR;
+
if (xwl_gbm->dmabuf_capable && modifier != DRM_FORMAT_MOD_INVALID) {
#ifdef GBM_BO_WITH_MODIFIERS
struct gbm_import_fd_modifier_data data;
@@ -1665,27 +1684,37 @@ static Bool
xwl_glamor_gbm_init_main_dev(struct xwl_screen *xwl_screen)
{
struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
- drmDevice *main_dev;
-
- while (!xwl_screen->default_feedback.feedback_done) {
- if (wl_display_dispatch(xwl_screen->display) < 0) {
- ErrorF("Failed to dispatch Wayland display\n");
- return FALSE;
+ drmDevice *main_dev = NULL;
+
+ /* linux-dmabuf feedback (and thus a main device) only exists from protocol
+ * version 4. On the kgsl/turnip stack the compositor only speaks v3, so
+ * there is no feedback to wait for - skip the wait and go straight to the
+ * fallback render node below instead of blocking forever on feedback_done. */
+ if (xwl_screen->dmabuf_protocol_version >= 4) {
+ while (!xwl_screen->default_feedback.feedback_done) {
+ if (wl_display_dispatch(xwl_screen->display) < 0) {
+ ErrorF("Failed to dispatch Wayland display\n");
+ return FALSE;
+ }
}
+ main_dev = xwl_screen->default_feedback.main_dev;
}

- main_dev = xwl_screen->default_feedback.main_dev;
- if (!main_dev) {
- ErrorF("No main linux-dmabuf device advertised by compositor\n");
- return FALSE;
- }
-
- if (!(main_dev->available_nodes & (1 << DRM_NODE_RENDER))) {
- ErrorF("Main linux-dmabuf device has no render node\n");
- return FALSE;
+ /* On the kgsl-backed turnip stack the compositor advertises no usable DRM
+ * render node (the GPU is exposed through kgsl, not a standard DRM node),
+ * so main_dev is NULL or render-node-less. Rather than dereferencing NULL
+ * (-> crash) or bailing out, fall back to a default render node, which the
+ * patched freedreno mesa redirects to /dev/kgsl-3d0 for native GL. */
+ if (!main_dev || !(main_dev->available_nodes & (1 << DRM_NODE_RENDER))) {
+ const char *fallback = getenv("XWAYLAND_GBM_DEVICE");
+ if (!fallback)
+ fallback = "/dev/dri/renderD128";
+ ErrorF("No usable linux-dmabuf main device, falling back to %s\n",
+ fallback);
+ xwl_gbm->device_name = strdup(fallback);
+ } else {
+ xwl_gbm->device_name = strdup(main_dev->nodes[DRM_NODE_RENDER]);
}
-
- xwl_gbm->device_name = strdup(main_dev->nodes[DRM_NODE_RENDER]);
if (!xwl_gbm->device_name) {
return FALSE;
}
diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
index 88ced5da0..35d1e0391 100644
--- a/hw/xwayland/xwayland-glamor.c
+++ b/hw/xwayland/xwayland-glamor.c
@@ -123,6 +123,15 @@ xwl_glamor_has_wl_interfaces(struct xwl_screen *xwl_screen)
{
if (!xwl_glamor_has_wl_drm(xwl_screen) &&
xwl_screen->dmabuf_protocol_version < 4) {
+ /* No wl_drm and no linux-dmabuf feedback (v4). On the kgsl/turnip stack
+ * the compositor exposes neither (the GPU lives behind /dev/kgsl-3d0,
+ * not a DRM render node, so there is no main device to advertise), but
+ * it does speak linux-dmabuf v3. We can still bring glamor up by opening
+ * a fallback render node directly (see xwl_glamor_gbm_init_main_dev) and
+ * submitting buffers over dmabuf v3, so keep glamor available as long as
+ * v3 is present. */
+ if (xwl_screen->dmabuf_protocol_version >= 3)
+ return TRUE;
LogMessageVerb(X_INFO, 3, "glamor: 'wl_drm' not supported and linux-dmabuf v4 not supported\n");
return FALSE;
}
--
2.47.3

Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' enhance(x11/xwayland): support kgsl dmabuf v3 fallback paths, surfaceless glamor and DRI3 rendering by lfdevs · Pull Request #13 · lfdevs/termux-packages · GitHub
Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
From e910fc1dda09b916e190f5f8645abae5b6ebfda3 Mon Sep 17 00:00:00 2001
From: superturtlee <160681686+superturtlee@users.noreply.github.com>
Date: Mon, 6 Jul 2026 09:56:24 +0800
Subject: [PATCH] xwayland: support kgsl dmabuf v3 fallback paths

Allow glamor to initialize with linux-dmabuf v3 when wl_drm and dmabuf
feedback are unavailable, fall back to a configurable GBM render node, and
handle implicit or bogus linear modifiers used by kgsl/freedreno stacks.

Based-on-patch: https://github.com/superturtlee/anland/blob/1.11/producers/kde/ubuntu2604/xwayland.patch

Co-authored-by: lfdevs <lfdevs@lfdevs.com>
---
hw/xwayland/xwayland-glamor-gbm.c | 65 ++++++++++++++++++++++---------
hw/xwayland/xwayland-glamor.c | 9 +++++
2 files changed, 56 insertions(+), 18 deletions(-)

diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
index 05668b8e9..5ce344b3c 100644
--- a/hw/xwayland/xwayland-glamor-gbm.c
+++ b/hw/xwayland/xwayland-glamor-gbm.c
@@ -33,6 +33,7 @@
#include <fcntl.h>
#include <errno.h>
#include <poll.h>
+#include <stdlib.h>
#ifdef DRI3
#include <sys/eventfd.h>
#endif /* DRI3 */
@@ -590,8 +591,17 @@ xwl_glamor_pixmap_get_wl_buffer(PixmapPtr pixmap)
return NULL;
}

+ /* An implicit-modifier buffer (DRM_FORMAT_MOD_INVALID) is never listed in
+ * the compositor's advertised modifier set, so the regular support check
+ * fails. On the kgsl/turnip stack - where the buffer is allocated on the
+ * display node but composited by turnip - that left both the dmabuf and
+ * the (absent) wl_drm path unusable, so no wl_buffer was created and the
+ * X11 window stayed black. Per the linux-dmabuf protocol, INVALID means
+ * "let the compositor infer the layout", so submit it through the dmabuf
+ * path directly instead of rejecting it. */
if (xwl_screen->dmabuf &&
- xwl_glamor_is_modifier_supported(xwl_screen, format, modifier)) {
+ (modifier == DRM_FORMAT_MOD_INVALID ||
+ xwl_glamor_is_modifier_supported(xwl_screen, format, modifier))) {
struct zwp_linux_buffer_params_v1 *params;

params = zwp_linux_dmabuf_v1_create_params(xwl_screen->dmabuf);
@@ -773,6 +783,15 @@ glamor_pixmap_from_fds(ScreenPtr screen, CARD8 num_fds, const int *fds,
strides[0] < width * bpp / 8)
goto error;

+ /* Some freedreno/kgsl mesa builds (the on-device dev tree) rewrite a
+ * LINEAR modifier (0) to a bogus 1274 (0x4FA) in the loader_dri3
+ * pixmap_from_buffers path. 1274 is not a valid DRM modifier, so the
+ * gbm_bo_import() below rejects it and the X11 GL client gets BadAlloc
+ * (dri3_alloc_render_buffer -> pixmap_from_buffer[s] failed -> segfault).
+ * The buffer is really linear, so map the bogus value back to LINEAR. */
+ if (modifier == 1274ULL)
+ modifier = DRM_FORMAT_MOD_LINEAR;
+
if (xwl_gbm->dmabuf_capable && modifier != DRM_FORMAT_MOD_INVALID) {
#ifdef GBM_BO_WITH_MODIFIERS
struct gbm_import_fd_modifier_data data;
@@ -1665,27 +1684,37 @@ static Bool
xwl_glamor_gbm_init_main_dev(struct xwl_screen *xwl_screen)
{
struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
- drmDevice *main_dev;
-
- while (!xwl_screen->default_feedback.feedback_done) {
- if (wl_display_dispatch(xwl_screen->display) < 0) {
- ErrorF("Failed to dispatch Wayland display\n");
- return FALSE;
+ drmDevice *main_dev = NULL;
+
+ /* linux-dmabuf feedback (and thus a main device) only exists from protocol
+ * version 4. On the kgsl/turnip stack the compositor only speaks v3, so
+ * there is no feedback to wait for - skip the wait and go straight to the
+ * fallback render node below instead of blocking forever on feedback_done. */
+ if (xwl_screen->dmabuf_protocol_version >= 4) {
+ while (!xwl_screen->default_feedback.feedback_done) {
+ if (wl_display_dispatch(xwl_screen->display) < 0) {
+ ErrorF("Failed to dispatch Wayland display\n");
+ return FALSE;
+ }
}
+ main_dev = xwl_screen->default_feedback.main_dev;
}

- main_dev = xwl_screen->default_feedback.main_dev;
- if (!main_dev) {
- ErrorF("No main linux-dmabuf device advertised by compositor\n");
- return FALSE;
- }
-
- if (!(main_dev->available_nodes & (1 << DRM_NODE_RENDER))) {
- ErrorF("Main linux-dmabuf device has no render node\n");
- return FALSE;
+ /* On the kgsl-backed turnip stack the compositor advertises no usable DRM
+ * render node (the GPU is exposed through kgsl, not a standard DRM node),
+ * so main_dev is NULL or render-node-less. Rather than dereferencing NULL
+ * (-> crash) or bailing out, fall back to a default render node, which the
+ * patched freedreno mesa redirects to /dev/kgsl-3d0 for native GL. */
+ if (!main_dev || !(main_dev->available_nodes & (1 << DRM_NODE_RENDER))) {
+ const char *fallback = getenv("XWAYLAND_GBM_DEVICE");
+ if (!fallback)
+ fallback = "/dev/dri/renderD128";
+ ErrorF("No usable linux-dmabuf main device, falling back to %s\n",
+ fallback);
+ xwl_gbm->device_name = strdup(fallback);
+ } else {
+ xwl_gbm->device_name = strdup(main_dev->nodes[DRM_NODE_RENDER]);
}
-
- xwl_gbm->device_name = strdup(main_dev->nodes[DRM_NODE_RENDER]);
if (!xwl_gbm->device_name) {
return FALSE;
}
diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
index 88ced5da0..35d1e0391 100644
--- a/hw/xwayland/xwayland-glamor.c
+++ b/hw/xwayland/xwayland-glamor.c
@@ -123,6 +123,15 @@ xwl_glamor_has_wl_interfaces(struct xwl_screen *xwl_screen)
{
if (!xwl_glamor_has_wl_drm(xwl_screen) &&
xwl_screen->dmabuf_protocol_version < 4) {
+ /* No wl_drm and no linux-dmabuf feedback (v4). On the kgsl/turnip stack
+ * the compositor exposes neither (the GPU lives behind /dev/kgsl-3d0,
+ * not a DRM render node, so there is no main device to advertise), but
+ * it does speak linux-dmabuf v3. We can still bring glamor up by opening
+ * a fallback render node directly (see xwl_glamor_gbm_init_main_dev) and
+ * submitting buffers over dmabuf v3, so keep glamor available as long as
+ * v3 is present. */
+ if (xwl_screen->dmabuf_protocol_version >= 3)
+ return TRUE;
LogMessageVerb(X_INFO, 3, "glamor: 'wl_drm' not supported and linux-dmabuf v4 not supported\n");
return FALSE;
}
--
2.47.3

Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' enhance(x11/xwayland): support kgsl dmabuf v3 fallback paths, surfaceless glamor and DRI3 rendering by lfdevs · Pull Request #13 · lfdevs/termux-packages · GitHub
Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
From e910fc1dda09b916e190f5f8645abae5b6ebfda3 Mon Sep 17 00:00:00 2001
From: superturtlee <160681686+superturtlee@users.noreply.github.com>
Date: Mon, 6 Jul 2026 09:56:24 +0800
Subject: [PATCH] xwayland: support kgsl dmabuf v3 fallback paths

Allow glamor to initialize with linux-dmabuf v3 when wl_drm and dmabuf
feedback are unavailable, fall back to a configurable GBM render node, and
handle implicit or bogus linear modifiers used by kgsl/freedreno stacks.

Based-on-patch: https://github.com/superturtlee/anland/blob/1.11/producers/kde/ubuntu2604/xwayland.patch

Co-authored-by: lfdevs <lfdevs@lfdevs.com>
---
hw/xwayland/xwayland-glamor-gbm.c | 65 ++++++++++++++++++++++---------
hw/xwayland/xwayland-glamor.c | 9 +++++
2 files changed, 56 insertions(+), 18 deletions(-)

diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
index 05668b8e9..5ce344b3c 100644
--- a/hw/xwayland/xwayland-glamor-gbm.c
+++ b/hw/xwayland/xwayland-glamor-gbm.c
@@ -33,6 +33,7 @@
#include <fcntl.h>
#include <errno.h>
#include <poll.h>
+#include <stdlib.h>
#ifdef DRI3
#include <sys/eventfd.h>
#endif /* DRI3 */
@@ -590,8 +591,17 @@ xwl_glamor_pixmap_get_wl_buffer(PixmapPtr pixmap)
return NULL;
}

+ /* An implicit-modifier buffer (DRM_FORMAT_MOD_INVALID) is never listed in
+ * the compositor's advertised modifier set, so the regular support check
+ * fails. On the kgsl/turnip stack - where the buffer is allocated on the
+ * display node but composited by turnip - that left both the dmabuf and
+ * the (absent) wl_drm path unusable, so no wl_buffer was created and the
+ * X11 window stayed black. Per the linux-dmabuf protocol, INVALID means
+ * "let the compositor infer the layout", so submit it through the dmabuf
+ * path directly instead of rejecting it. */
if (xwl_screen->dmabuf &&
- xwl_glamor_is_modifier_supported(xwl_screen, format, modifier)) {
+ (modifier == DRM_FORMAT_MOD_INVALID ||
+ xwl_glamor_is_modifier_supported(xwl_screen, format, modifier))) {
struct zwp_linux_buffer_params_v1 *params;

params = zwp_linux_dmabuf_v1_create_params(xwl_screen->dmabuf);
@@ -773,6 +783,15 @@ glamor_pixmap_from_fds(ScreenPtr screen, CARD8 num_fds, const int *fds,
strides[0] < width * bpp / 8)
goto error;

+ /* Some freedreno/kgsl mesa builds (the on-device dev tree) rewrite a
+ * LINEAR modifier (0) to a bogus 1274 (0x4FA) in the loader_dri3
+ * pixmap_from_buffers path. 1274 is not a valid DRM modifier, so the
+ * gbm_bo_import() below rejects it and the X11 GL client gets BadAlloc
+ * (dri3_alloc_render_buffer -> pixmap_from_buffer[s] failed -> segfault).
+ * The buffer is really linear, so map the bogus value back to LINEAR. */
+ if (modifier == 1274ULL)
+ modifier = DRM_FORMAT_MOD_LINEAR;
+
if (xwl_gbm->dmabuf_capable && modifier != DRM_FORMAT_MOD_INVALID) {
#ifdef GBM_BO_WITH_MODIFIERS
struct gbm_import_fd_modifier_data data;
@@ -1665,27 +1684,37 @@ static Bool
xwl_glamor_gbm_init_main_dev(struct xwl_screen *xwl_screen)
{
struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
- drmDevice *main_dev;
-
- while (!xwl_screen->default_feedback.feedback_done) {
- if (wl_display_dispatch(xwl_screen->display) < 0) {
- ErrorF("Failed to dispatch Wayland display\n");
- return FALSE;
+ drmDevice *main_dev = NULL;
+
+ /* linux-dmabuf feedback (and thus a main device) only exists from protocol
+ * version 4. On the kgsl/turnip stack the compositor only speaks v3, so
+ * there is no feedback to wait for - skip the wait and go straight to the
+ * fallback render node below instead of blocking forever on feedback_done. */
+ if (xwl_screen->dmabuf_protocol_version >= 4) {
+ while (!xwl_screen->default_feedback.feedback_done) {
+ if (wl_display_dispatch(xwl_screen->display) < 0) {
+ ErrorF("Failed to dispatch Wayland display\n");
+ return FALSE;
+ }
}
+ main_dev = xwl_screen->default_feedback.main_dev;
}

- main_dev = xwl_screen->default_feedback.main_dev;
- if (!main_dev) {
- ErrorF("No main linux-dmabuf device advertised by compositor\n");
- return FALSE;
- }
-
- if (!(main_dev->available_nodes & (1 << DRM_NODE_RENDER))) {
- ErrorF("Main linux-dmabuf device has no render node\n");
- return FALSE;
+ /* On the kgsl-backed turnip stack the compositor advertises no usable DRM
+ * render node (the GPU is exposed through kgsl, not a standard DRM node),
+ * so main_dev is NULL or render-node-less. Rather than dereferencing NULL
+ * (-> crash) or bailing out, fall back to a default render node, which the
+ * patched freedreno mesa redirects to /dev/kgsl-3d0 for native GL. */
+ if (!main_dev || !(main_dev->available_nodes & (1 << DRM_NODE_RENDER))) {
+ const char *fallback = getenv("XWAYLAND_GBM_DEVICE");
+ if (!fallback)
+ fallback = "/dev/dri/renderD128";
+ ErrorF("No usable linux-dmabuf main device, falling back to %s\n",
+ fallback);
+ xwl_gbm->device_name = strdup(fallback);
+ } else {
+ xwl_gbm->device_name = strdup(main_dev->nodes[DRM_NODE_RENDER]);
}
-
- xwl_gbm->device_name = strdup(main_dev->nodes[DRM_NODE_RENDER]);
if (!xwl_gbm->device_name) {
return FALSE;
}
diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
index 88ced5da0..35d1e0391 100644
--- a/hw/xwayland/xwayland-glamor.c
+++ b/hw/xwayland/xwayland-glamor.c
@@ -123,6 +123,15 @@ xwl_glamor_has_wl_interfaces(struct xwl_screen *xwl_screen)
{
if (!xwl_glamor_has_wl_drm(xwl_screen) &&
xwl_screen->dmabuf_protocol_version < 4) {
+ /* No wl_drm and no linux-dmabuf feedback (v4). On the kgsl/turnip stack
+ * the compositor exposes neither (the GPU lives behind /dev/kgsl-3d0,
+ * not a DRM render node, so there is no main device to advertise), but
+ * it does speak linux-dmabuf v3. We can still bring glamor up by opening
+ * a fallback render node directly (see xwl_glamor_gbm_init_main_dev) and
+ * submitting buffers over dmabuf v3, so keep glamor available as long as
+ * v3 is present. */
+ if (xwl_screen->dmabuf_protocol_version >= 3)
+ return TRUE;
LogMessageVerb(X_INFO, 3, "glamor: 'wl_drm' not supported and linux-dmabuf v4 not supported\n");
return FALSE;
}
--
2.47.3

Loading
, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); enhance(x11/xwayland): support kgsl dmabuf v3 fallback paths, surfaceless glamor and DRI3 rendering by lfdevs · Pull Request #13 · lfdevs/termux-packages · GitHub
Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
From e910fc1dda09b916e190f5f8645abae5b6ebfda3 Mon Sep 17 00:00:00 2001
From: superturtlee <160681686+superturtlee@users.noreply.github.com>
Date: Mon, 6 Jul 2026 09:56:24 +0800
Subject: [PATCH] xwayland: support kgsl dmabuf v3 fallback paths

Allow glamor to initialize with linux-dmabuf v3 when wl_drm and dmabuf
feedback are unavailable, fall back to a configurable GBM render node, and
handle implicit or bogus linear modifiers used by kgsl/freedreno stacks.

Based-on-patch: https://github.com/superturtlee/anland/blob/1.11/producers/kde/ubuntu2604/xwayland.patch

Co-authored-by: lfdevs <lfdevs@lfdevs.com>
---
hw/xwayland/xwayland-glamor-gbm.c | 65 ++++++++++++++++++++++---------
hw/xwayland/xwayland-glamor.c | 9 +++++
2 files changed, 56 insertions(+), 18 deletions(-)

diff --git a/hw/xwayland/xwayland-glamor-gbm.c b/hw/xwayland/xwayland-glamor-gbm.c
index 05668b8e9..5ce344b3c 100644
--- a/hw/xwayland/xwayland-glamor-gbm.c
+++ b/hw/xwayland/xwayland-glamor-gbm.c
@@ -33,6 +33,7 @@
#include <fcntl.h>
#include <errno.h>
#include <poll.h>
+#include <stdlib.h>
#ifdef DRI3
#include <sys/eventfd.h>
#endif /* DRI3 */
@@ -590,8 +591,17 @@ xwl_glamor_pixmap_get_wl_buffer(PixmapPtr pixmap)
return NULL;
}

+ /* An implicit-modifier buffer (DRM_FORMAT_MOD_INVALID) is never listed in
+ * the compositor's advertised modifier set, so the regular support check
+ * fails. On the kgsl/turnip stack - where the buffer is allocated on the
+ * display node but composited by turnip - that left both the dmabuf and
+ * the (absent) wl_drm path unusable, so no wl_buffer was created and the
+ * X11 window stayed black. Per the linux-dmabuf protocol, INVALID means
+ * "let the compositor infer the layout", so submit it through the dmabuf
+ * path directly instead of rejecting it. */
if (xwl_screen->dmabuf &&
- xwl_glamor_is_modifier_supported(xwl_screen, format, modifier)) {
+ (modifier == DRM_FORMAT_MOD_INVALID ||
+ xwl_glamor_is_modifier_supported(xwl_screen, format, modifier))) {
struct zwp_linux_buffer_params_v1 *params;

params = zwp_linux_dmabuf_v1_create_params(xwl_screen->dmabuf);
@@ -773,6 +783,15 @@ glamor_pixmap_from_fds(ScreenPtr screen, CARD8 num_fds, const int *fds,
strides[0] < width * bpp / 8)
goto error;

+ /* Some freedreno/kgsl mesa builds (the on-device dev tree) rewrite a
+ * LINEAR modifier (0) to a bogus 1274 (0x4FA) in the loader_dri3
+ * pixmap_from_buffers path. 1274 is not a valid DRM modifier, so the
+ * gbm_bo_import() below rejects it and the X11 GL client gets BadAlloc
+ * (dri3_alloc_render_buffer -> pixmap_from_buffer[s] failed -> segfault).
+ * The buffer is really linear, so map the bogus value back to LINEAR. */
+ if (modifier == 1274ULL)
+ modifier = DRM_FORMAT_MOD_LINEAR;
+
if (xwl_gbm->dmabuf_capable && modifier != DRM_FORMAT_MOD_INVALID) {
#ifdef GBM_BO_WITH_MODIFIERS
struct gbm_import_fd_modifier_data data;
@@ -1665,27 +1684,37 @@ static Bool
xwl_glamor_gbm_init_main_dev(struct xwl_screen *xwl_screen)
{
struct xwl_gbm_private *xwl_gbm = xwl_gbm_get(xwl_screen);
- drmDevice *main_dev;
-
- while (!xwl_screen->default_feedback.feedback_done) {
- if (wl_display_dispatch(xwl_screen->display) < 0) {
- ErrorF("Failed to dispatch Wayland display\n");
- return FALSE;
+ drmDevice *main_dev = NULL;
+
+ /* linux-dmabuf feedback (and thus a main device) only exists from protocol
+ * version 4. On the kgsl/turnip stack the compositor only speaks v3, so
+ * there is no feedback to wait for - skip the wait and go straight to the
+ * fallback render node below instead of blocking forever on feedback_done. */
+ if (xwl_screen->dmabuf_protocol_version >= 4) {
+ while (!xwl_screen->default_feedback.feedback_done) {
+ if (wl_display_dispatch(xwl_screen->display) < 0) {
+ ErrorF("Failed to dispatch Wayland display\n");
+ return FALSE;
+ }
}
+ main_dev = xwl_screen->default_feedback.main_dev;
}

- main_dev = xwl_screen->default_feedback.main_dev;
- if (!main_dev) {
- ErrorF("No main linux-dmabuf device advertised by compositor\n");
- return FALSE;
- }
-
- if (!(main_dev->available_nodes & (1 << DRM_NODE_RENDER))) {
- ErrorF("Main linux-dmabuf device has no render node\n");
- return FALSE;
+ /* On the kgsl-backed turnip stack the compositor advertises no usable DRM
+ * render node (the GPU is exposed through kgsl, not a standard DRM node),
+ * so main_dev is NULL or render-node-less. Rather than dereferencing NULL
+ * (-> crash) or bailing out, fall back to a default render node, which the
+ * patched freedreno mesa redirects to /dev/kgsl-3d0 for native GL. */
+ if (!main_dev || !(main_dev->available_nodes & (1 << DRM_NODE_RENDER))) {
+ const char *fallback = getenv("XWAYLAND_GBM_DEVICE");
+ if (!fallback)
+ fallback = "/dev/dri/renderD128";
+ ErrorF("No usable linux-dmabuf main device, falling back to %s\n",
+ fallback);
+ xwl_gbm->device_name = strdup(fallback);
+ } else {
+ xwl_gbm->device_name = strdup(main_dev->nodes[DRM_NODE_RENDER]);
}
-
- xwl_gbm->device_name = strdup(main_dev->nodes[DRM_NODE_RENDER]);
if (!xwl_gbm->device_name) {
return FALSE;
}
diff --git a/hw/xwayland/xwayland-glamor.c b/hw/xwayland/xwayland-glamor.c
index 88ced5da0..35d1e0391 100644
--- a/hw/xwayland/xwayland-glamor.c
+++ b/hw/xwayland/xwayland-glamor.c
@@ -123,6 +123,15 @@ xwl_glamor_has_wl_interfaces(struct xwl_screen *xwl_screen)
{
if (!xwl_glamor_has_wl_drm(xwl_screen) &&
xwl_screen->dmabuf_protocol_version < 4) {
+ /* No wl_drm and no linux-dmabuf feedback (v4). On the kgsl/turnip stack
+ * the compositor exposes neither (the GPU lives behind /dev/kgsl-3d0,
+ * not a DRM render node, so there is no main device to advertise), but
+ * it does speak linux-dmabuf v3. We can still bring glamor up by opening
+ * a fallback render node directly (see xwl_glamor_gbm_init_main_dev) and
+ * submitting buffers over dmabuf v3, so keep glamor available as long as
+ * v3 is present. */
+ if (xwl_screen->dmabuf_protocol_version >= 3)
+ return TRUE;
LogMessageVerb(X_INFO, 3, "glamor: 'wl_drm' not supported and linux-dmabuf v4 not supported\n");
return FALSE;
}
--
2.47.3

Loading