ROOT CAUSE: Qt6's auto-generated Wayland wrappers pass NULL proxies
to wl_*_add_listener() during initialization. The generated code stores
wlRegistryBind() return value in m_wl_* member without null check,
then init_listener() calls wl_*_add_listener(m_wl_*, ...) which
page-faults at null+8 (write to proxy->object.implementation).
FIX (kded6): wrapper script renames libqwayland.so to .disabled
before launching kded6.real. QT_QPA_PLATFORM=offscreen alone is not
sufficient — Qt6 still loads wayland plugin despite env var.
FIX (libwayland): null guards in redox.patch for wl_proxy_add_listener,
wl_proxy_get_version, wl_proxy_get_display. Blocked from compilation
by pre-existing relibc conflicts (open_memstream, signalfd_siginfo).
FIX (Qt6 wrappers): regex-based null guard insertion proven in concept.
Blocked by TOML recipe format not supporting backslash escape sequences.
Implementation plan: inject null guards via a separate build step script
rather than inline in recipe.toml.
- Restored wayland-libwayland-v1.24.0-patched.tar.gz from sources/
to replace corrupted source with stray + characters from failed patch
- Force-rebuilt kf6-kded6 (deleted pkgar) so #ifdef Q_OS_REDOX guard
is compiled in — kded6 now uses offscreen QPA on Redox
- wl_proxy_add_listener: return -1 on NULL proxy (was page fault at null+8)
- wl_proxy_get_version: return 0 on NULL proxy
- wl_proxy_get_display: return NULL on NULL proxy
- All keep fprintf diagnostics for caller identification
This is the definitive fix for the Qt6 Wayland crash. Instead of
page-faulting at proxy->object.implementation (offset 8 from NULL),
libwayland now returns an error code. Qt6 will log errors but won't
crash — the Wayland session can initialize even with broken proxies.
- libwayland: fprintf+abort if wl_proxy_add_listener called with NULL proxy.
Prints caller address via __builtin_return_address(0) to identify
which Qt6 function passes the null proxy.
- compositor: eprintln each wl_registry_bind to show which globals
Qt6 binds before crashing.
- Next boot will definitively identify the crash source.
- get_data_device: stores wl_data_device in client object map
- get_subsurface: stores wl_subsurface in client object map
- data_device/subsurface requests accepted silently (Qt6 needs
these proxies to exist for initialization even though we don't
implement clipboard or subsurface compositing yet)
Instrumentation confirmed: setupConnection() completes with valid
registry=0x44f230. Crash is in Qt6 global binding path during
forceRoundTrip(), not in compositor protocol handling.
Scheme files on Redox don't support try_clone(). Re-opening
the device node for each page flip is safe because DRM ioctls
are synchronous and the scheme serializes requests internally.
The compositor is single-threaded — Mutex guards exist only for
Rust borrow-safety. Raw pointers from Vec::as_mut_ptr() remain
valid after guard drop because no concurrent mutation is possible.
- Add drm_backend module with full KMS initialization:
DRM_IOCTL_MODE_GETCONNECTOR → CREATE_DUMB → MAP_DUMB →
ADDFB → SETCRTC → PAGE_FLIP
- I/O uses standard write+read on /scheme/drm/card0 (no libredox dep)
- Double-buffered with AtomicUsize-based flip
- DRM output preferred; falls back to VESA framebuffer
- composite_buffer integrated: writes to DRM back buffer, page-flips
- Cross-referenced with Linux drm_mode.h ioctl numbers
- Remove xkb_context_new on Redox (eliminates crash vector)
Consolidate the active desktop path around redbear-full while landing the greeter/session stack and the runtime fixes needed to keep Wayland and KWin bring-up moving forward.
Derivative of Redox OS (https://www.redox-os.org) adding:
- AMD GPU driver (amdgpu) via LinuxKPI compat layer
- ext4 filesystem support (ext4d scheme daemon)
- ACPI fixes for AMD bare metal (x2APIC, DMAR, IVRS, MCFG)
- Custom branding (hostname, os-release, boot identity)
Build system is full upstream Redox with RBOS overlay in local/.
Patches for kernel, base, and relibc are symlinked from local/patches/
and protected from make clean/distclean. Custom recipes live in
local/recipes/ with symlinks into the recipes/ search path.
Build: make all CONFIG_NAME=redbear-full
Sync: ./local/scripts/sync-upstream.sh