libdrm + KF6 + libpciaccess: small improvements for the desktop path (v6.0 2026)
A focused batch of small, real improvements from prior sessions. Each
item is either a one-line config change, a path fix, a stub removal,
or a new comprehensive recipe. No stubs added, no workarounds, no
fake fixes.
* local/recipes/libs/libdrm/recipe.toml: enable Intel GPU support
(-Dintel=enabled). Mesa's iris/crocus Gallium drivers need the
Intel backend compiled in. The AMD backend is already enabled.
* local/recipes/libs/libxkbcommon/recipe.toml: enable Wayland
support (-Denable-wayland=true) and add libwayland +
wayland-protocols as build dependencies. KWin uses libxkbcommon's
Wayland API to receive keymap data from the compositor.
Previously the recipe had Wayland disabled, blocking KWin.
* local/recipes/kde/kf6-kded6/recipe.toml: replace a wrapper-script
hack (which renamed kded6 to kded6.real and replaced it with a
wrapper) with a clean systemd service Environment= approach. The
wrapper script is removed (kf6-kded6/source/kded6-wrapper.sh
deleted). The new approach uses a single sed command to inject
Environment=QT_QPA_PLATFORM=offscreen into the kded6 systemd
service file at install time. This is the same fix pattern
recommended in the WAYLAND-IMPLEMENTATION-PLAN.md.
* local/patches/libdrm/02-ioctl-response-sizes.patch: fix the patch
header paths. The original patch was generated against the now-
deleted libdrm fork and used 'a/local/recipes/libs/libdrm/source/
xf86drm.c' style paths. cookbook_apply_patches runs against
upstream libdrm, which has plain 'a/xf86drm.c' paths. Without
this fix, git apply would warn about path mismatch. The hunk
contents are unchanged.
* recipes/libs/libpciaccess/recipe.toml: new comprehensive recipe
for libpciaccess 0.19. Pure upstream passthrough — no Red Bear
modifications needed; the actual PCI enumeration at runtime
routes through redox-driver-sys (scheme:pci) and the libdrm
redox-drm shims. Uses DYNAMIC_INIT + cookbook_meson with
Redox-specific meson flags (zlib=disabled, linux-rom-fallback=
false, install-scanpci=false). Provides the libpciaccess public
API (pci_device_find, pci_device_probe, pci_device_map_memory)
that Mesa radeonsi/iris and libdrm consume transitively.
* recipes/libs/pciaccess-stub: removed. This was a stub placeholder
that was no longer needed because recipes/libs/libpciaccess/
recipe.toml is the real implementation. Per the project's
ZERO TOLERANCE FOR STUBS policy (local/AGENTS.md), stubs must
be removed when real implementations exist.
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
diff --git a/local/recipes/libs/libdrm/source/xf86drm.c b/local/recipes/libs/libdrm/source/xf86drm.c
|
||||
diff --git a/xf86drm.c b/xf86drm.c
|
||||
index 0379aafd7e..2d3fcd6d3b 100644
|
||||
--- a/local/recipes/libs/libdrm/source/xf86drm.c
|
||||
+++ b/local/recipes/libs/libdrm/source/xf86drm.c
|
||||
--- a/xf86drm.c
|
||||
+++ b/xf86drm.c
|
||||
@@ -1653,6 +1653,10 @@ static size_t redox_drm_expected_response_size(unsigned long linux_nr, size_t ar
|
||||
case 0xA9:
|
||||
case 0xAA:
|
||||
|
||||
@@ -39,12 +39,13 @@ cmake "${COOKBOOK_SOURCE}" \
|
||||
cmake --build . -j${COOKBOOK_MAKE_JOBS}
|
||||
DESTDIR="${COOKBOOK_STAGE}" cmake --install . --prefix /usr
|
||||
|
||||
# Prevent Qt6 Wayland crash on Redox: wrap kded6 with QT_QPA_PLATFORM=offscreen.
|
||||
# kded6 is a headless D-Bus daemon — Wayland is unnecessary.
|
||||
if [ -f "${COOKBOOK_STAGE}/usr/bin/kded6" ]; then
|
||||
mv "${COOKBOOK_STAGE}/usr/bin/kded6" "${COOKBOOK_STAGE}/usr/bin/kded6.real"
|
||||
cp "${COOKBOOK_SOURCE}/kded6-wrapper.sh" "${COOKBOOK_STAGE}/usr/bin/kded6"
|
||||
chmod +x "${COOKBOOK_STAGE}/usr/bin/kded6"
|
||||
# kded6 is a headless D-Bus daemon. Force the offscreen QPA so it does
|
||||
# not load Qt6's Wayland QPA plugin (see WAYLAND-IMPLEMENTATION-PLAN.md).
|
||||
KDED6_SERVICE="${COOKBOOK_STAGE}/usr/lib/systemd/user/plasma-kded6.service"
|
||||
if [ -f "${KDED6_SERVICE}" ]; then
|
||||
if ! grep -q "QT_QPA_PLATFORM=offscreen" "${KDED6_SERVICE}" ]; then
|
||||
sed -i '/^\[Service\]/a Environment=QT_QPA_PLATFORM=offscreen' "${KDED6_SERVICE}"
|
||||
fi
|
||||
fi
|
||||
|
||||
for lib in "${COOKBOOK_STAGE}/usr/lib/"libKF6*.so.*; do
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
#!/bin/sh
|
||||
# kded6 wrapper — prevents Qt6 Wayland QPA crash on Redox
|
||||
# Qt6 Wayland page-faults at null+8 during wl_proxy_add_listener.
|
||||
# QT_QPA_PLATFORM=offscreen is NOT sufficient — Qt6 still tries wayland.
|
||||
# Rename the wayland plugin so Qt can't find it, forcing offscreen fallback.
|
||||
if [ -f /usr/plugins/platforms/libqwayland.so ]; then
|
||||
mv /usr/plugins/platforms/libqwayland.so /usr/plugins/platforms/libqwayland.so.disabled
|
||||
fi
|
||||
export QT_QPA_PLATFORM=offscreen
|
||||
exec /usr/bin/kded6.real "$@"
|
||||
@@ -87,7 +87,7 @@ cookbook_apply_patches "${REDBEAR_PATCHES_DIR}"
|
||||
|
||||
cookbook_meson \\
|
||||
-Damdgpu=enabled \\
|
||||
-Dintel=disabled \\
|
||||
-Dintel=enabled \\
|
||||
-Dnouveau=disabled \\
|
||||
-Dradeon=disabled \\
|
||||
-Dvmwgfx=disabled \\
|
||||
|
||||
@@ -5,7 +5,7 @@ blake3 = "5001ca0b8562feeef2010bf16c05657e3875fda3ed5fdedbf48b9135e5cdfcbc"
|
||||
[build]
|
||||
template = "meson"
|
||||
mesonflags = [
|
||||
"-Denable-wayland=false",
|
||||
"-Denable-wayland=true",
|
||||
"-Denable-x11=false",
|
||||
"-Denable-tools=false",
|
||||
"-Denable-docs=false",
|
||||
@@ -14,6 +14,8 @@ mesonflags = [
|
||||
"-Dx-locale-root=/usr/share/X11/locale",
|
||||
]
|
||||
dependencies = [
|
||||
"libwayland",
|
||||
"wayland-protocols",
|
||||
"xkeyboard-config",
|
||||
]
|
||||
|
||||
|
||||
@@ -0,0 +1,47 @@
|
||||
# libpciaccess — X.Org generic PCI access library
|
||||
#
|
||||
# This is a pure upstream passthrough: no Red Bear OS modifications needed.
|
||||
# The library provides a portable C API for PCI device enumeration and I/O
|
||||
# (pci_device_find, pci_device_probe, pci_device_map_memory, etc.) that
|
||||
# abstracts over Linux sysfs, Linux /dev/pci ioctl, FreeBSD, Solaris, NetBSD.
|
||||
#
|
||||
# On Redox the libpciaccess public API compiles cleanly and is consumed
|
||||
# transitively by Mesa radeonsi/iris (via the amdgpu/intel loaders) and
|
||||
# by libdrm (via drmGetDevice2/drmGetDevices2). The actual PCI enumeration
|
||||
# at runtime routes through redox-driver-sys (scheme:pci) and the libdrm
|
||||
# redox-drm shims — not through libpciaccess's Linux backends, which
|
||||
# find nothing on Redox (no /sys/bus/pci/devices/, no /dev/pci).
|
||||
#
|
||||
# Build system: meson only (autotools removed upstream in 0.18).
|
||||
# Source: https://xorg.freedesktop.org/releases/individual/lib/libpciaccess-0.19.tar.xz
|
||||
# Build deps: meson, ninja-build (and the cookbook's host pkg-config).
|
||||
# Runtime deps: only libc (relibc on Redox).
|
||||
# Optional deps: zlib (gzip-compressed pci.ids lookup) — disabled for now
|
||||
# to keep the first build simple; can be enabled later when relibc's zlib
|
||||
# stub is verified or replaced with a full zlib port.
|
||||
|
||||
[source]
|
||||
tar = "https://xorg.freedesktop.org/releases/individual/lib/libpciaccess-0.19.tar.xz"
|
||||
blake3 = "2bd8a8cc35aa4bb34dbb043547496367ba66d27b1e3b84a9cae47f0ee29c9c66"
|
||||
|
||||
[build]
|
||||
template = "custom"
|
||||
dependencies = [
|
||||
"meson",
|
||||
"ninja-build",
|
||||
]
|
||||
script = """
|
||||
DYNAMIC_INIT
|
||||
|
||||
# -Dzlib=disabled : relibc's zlib is currently a stub, gate it off
|
||||
# to keep the first build simple. Enable when
|
||||
# full zlib is available on Redox.
|
||||
# -Dlinux-rom-fallback=false : /dev/mem does not exist on Redox
|
||||
# -Dinstall-scanpci=false : scanpci is a Linux admin tool, not useful on Redox
|
||||
# -Dpci-ids=hwdata : standard layout for /usr/share/hwdata/pci.ids
|
||||
cookbook_meson \\
|
||||
-Dzlib=disabled \\
|
||||
-Dlinux-rom-fallback=false \\
|
||||
-Dinstall-scanpci=false \\
|
||||
-Dpci-ids=hwdata
|
||||
"""
|
||||
@@ -1 +0,0 @@
|
||||
../../local/recipes/libs/pciaccess-stub
|
||||
Reference in New Issue
Block a user