# Red Bear OS β€” Comprehensive Desktop Readiness Assessment and Improvement Plan **Date:** 2026-04-30 **Scope:** Full desktop OS readiness: microkernel, devices, DRM, Wayland, KDE **Status:** This document is the single source of truth, superseding all earlier individual plans. ## 1. Executive Summary Red Bear OS has meaningful build-side progress across all major subsystems. The current state is: | Subsystem | Status | Confidence | |-----------|--------|------------| | Kernel (35 syscalls, 12 schemes) | 🟒 Boot-capable | High | | ACPI boot baseline | 🟒 Complete | High | | IRQ/LAPIC/x2APIC | 🟒 Kernel IRQ active | High | | PCI/MSI-X | 🟑 QEMU-proven, no hardware | Medium | | IOMMU | 🟑 QEMU-proven | Medium | | USB (xHCI/hub/HID/storage) | 🟑 QEMU-only | Medium | | Storage/Network drivers | 🟒 Hardened | High | | Audio/Input drivers | 🟑 Hardened, untested | Medium | | Wi-Fi | πŸ”΄ Host-tested, no hardware | Low | | Bluetooth | πŸ”΄ Experimental BLE-only | Low | | **relibc (POSIX)** | 🟒 ~38 active patches, ~85% coverage | High | | **DRM stack** | 🟑 Builds, swrast-only | Medium | | **Qt6/KF6** | 🟑 32/32 KF6 builds, QtNetwork re-enabled | Medium | | **Wayland** | 🟑 Libs built, compositor incomplete | Low | | **KDE Plasma** | πŸ”΄ Blocked (kwin stub, no full session) | Very Low | ### Bottom Line **The OS boots, but a graphical KDE Plasma desktop session is not yet functional.** The blocker chain: kernel credential syscalls β†’ ACPI shutdown robustness β†’ hardware validation β†’ Wayland compositor runtime β†’ KWin β†’ full Plasma session. ### Critical Single Blocker **Credential syscalls** (`SYS_SETUID`, `SYS_SETGID`, `SYS_SETGROUPS`, etc.) are ENOSYS in the Redox microkernel. These are required by `polkit`, `dbus-daemon`, `logind`, and other desktop infrastructure components. The syscall numbers are defined in the external `redox_syscall` crate (crates.io), not in the kernel tree. Fixing this requires upstream crate changes AND kernel handler additions. --- ## 2. Kernel & Core Infrastructure ### 2.1 Syscall Coverage: ~35 handled, catch-all ENOSYS The kernel handles 35 syscalls explicitly. All others fall through to `ENOSYS`. **Genuinely missing for desktop:** - `SYS_SETUID`, `SYS_SETGID`, `SYS_SETGROUPS`, `SYS_GETGROUPS` β€” credential syscalls, ENOSYS - `SYS_GETRLIMIT`, `SYS_SETRLIMIT` β€” resource limits, ENOSYS - `SYS_CLOCK_SETTIME` β€” set system clock, ENOSYS - `SYS_PTRACE` β€” debugging, handled via scheme paths ### 2.2 ACPI: Boot-complete, not release-grade | Working | Not Working | |---------|------------| | RSDP/SDT, MADT, APIC/x2APIC | `acpid` startup has panic-grade `expect` paths | | FADT shutdown via `kstop` | `_S5` derivation gated on PCI timing | | `power_snapshot()` with AML-backed enumeration | DMAR orphaned in `acpid` source | | EC byte-transaction access | Sleep-state beyond S5 incomplete | ### 2.3 Drivers: All hardened, no hardware validation All 24 driver categories have been hardened (panicβ†’error conversion). **Zero drivers have real hardware validation.** All testing is QEMU-only. ### 2.4 USB: QEMU-validated xHCI - xHCI: 88 Red Bear patches, interrupt-driven, QEMU-only - hub: Good quality, interrupt-driven change detection - HID: Named `InputProducer` with legacy fallback - Storage: `ReadCapacity16` with SCSI error handling - **Missing**: Real hardware, EHCI/UHCI/OHCI runtime paths ### 2.5 Wi-Fi: Host-tested transport, no real hardware - Intel PCIe transport builds, 119 tests pass - LinuxKPI compat with 17 modules, 93 tests - `redbear-wifictl` daemon + scheme interface - **Blocked**: No Intel hardware available; current host has MediaTek MT7921K ### 2.6 Bluetooth: Experimental BLE-first - Controller probe via USB, HCI init, `scheme:hciN` with full SchemeSync - GATT client workflow (discoverβ†’read), 209 tests - QEMU validation in progress, not stabilized --- ## 3. Desktop Stack ### 3.1 DRM/Mesa: Builds, software-rendering only | Component | Status | |-----------|--------| | redox-driver-sys | βœ… Builds | | linux-kpi | βœ… Builds | | redox-drm | βœ… Builds (68 unit tests) | | mesa | βœ… Builds EGL/GBM/OSMesa, **swrast only** (`-Dgallium-drivers=swrast`) | | amdgpu | βœ… Builds + included in redbear-full | | firmware-loader | βœ… Builds | | iommu daemon | βœ… Builds | **Hard blockers**: GPU command submission, fence/completion signaling, Mesa hardware winsys enablement. These require GPU-architecture-specific engineering. ### 3.2 Wayland: Libraries built, compositor incomplete | Component | Status | |-----------|--------| | libwayland | βœ… Builds | | wayland-protocols | βœ… Builds | | smallvil (reference) | βœ… Bounded validation proof | | cosmic-comp | Historical only | | Full compositor runtime | ❌ Not present | ### 3.3 Qt6/KF6: 32 frameworks built, QtNetwork re-enabled | Component | Status | |-----------|--------| | qtbase (Core+Gui+DBus+Wayland) | βœ… Builds | | QtNetwork | βœ… Re-enabled (was disabled) β€” DNS resolver hardened | | qtdeclarative, qtsvg, qtwayland | βœ… Builds | | KF6 Frameworks | βœ… 32/32 built | | kirigami | ⚠️ Stub-only | | kf6-knewstuff | πŸ”„ Unblocked by QtNetwork β€” needs rebuild | | kf6-kio | πŸ”„ Source-local QtNetwork compat headers | ### 3.4 KDE Plasma: Not booting | Component | Status | |-----------|--------| | kwin | πŸ”„ Building (stub β†’ real transition) | | plasma-workspace | ❌ Blocked by kf6-knewstuff | | plasma-desktop | ❌ Blocked by plasma-workspace | | Full Plasma session | ❌ Not functional | --- ## 4. Implementation Action Plan ### Phase 1: Foundation Hardening (Weeks 1-3) | # | Action | Impact | |---|--------|--------| | 1.1 | Fix `acpid` startup panic paths | Remove expect-based crash risks | | 1.2 | Document AML bootstrap producer contract | Enable safe AML-free fallback | | 1.3 | Add device driver hardware validation harness | USB, storage, network | | 1.4 | Complete Qt6 rebuild with QtNetwork enabled | Unblock kf6-knewstuff | ### Phase 2: Core Stack Completion (Weeks 4-8) | # | Action | Impact | |---|--------|--------| | 2.1 | Build KWin as real (not stub) compositor | Wayland compositor runtime | | 2.2 | Complete Wayland compositor integration | graphical session proof | | 2.3 | Wire KDE Plasma session components | plasma-workspace, plasma-desktop | | 2.4 | Hardware USB validation | Real xHCI controller testing | ### Phase 3: Hardware Enablement (Weeks 9-16) | # | Action | Impact | |---|--------|--------| | 3.1 | Wi-Fi real hardware validation | Intel iwlwifi proof | | 3.2 | Bluetooth real hardware validation | USB-attached controller proof | | 3.3 | IOMMU real hardware validation | AMD-Vi/Intel VT-d proof | | 3.4 | ACPI sleep-state support | S3/S4 suspend/resume | ### Phase 4: Desktop Polish (Weeks 12-20) | # | Action | Impact | |---|--------|--------| | 4.1 | GPU hardware rendering (if feasible) | Mesa radeonsi/intel drivers | | 4.2 | Full KDE Plasma session runtime | Booting into graphical desktop | | 4.3 | Desktop Wi-Fi API (D-Bus) | NetworkManager-like surface | | 4.4 | Bluetooth desktop integration | HID, audio, file transfer | ### Kernel Blocker (Parallel, upstream-dependent) | # | Action | Impact | |---|--------|--------| | K1 | Engage Redox upstream for credential syscall additions in `redox_syscall` | `SYS_SETUID`, `SYS_SETGID`, `SYS_SETGROUPS` | | K2 | Add kernel handler for credential syscalls | Remove ENOSYS catch-all gap | | K3 | Add RLIMIT syscalls or formally design them out | Resource limit support | --- ## 5. Documentation ### Stale Docs Deleted (this pass) | File | Reason | |------|--------| | `local/docs/AMDGPU-DC-COMPILE-TRIAGE-PLAN.md` | Superseded by DRM-MODERNIZATION-EXECUTION-PLAN.md; amdgpu now builds | ### Authority Chain | Document | Role | |----------|------| | `local/docs/RELIBC-COMPREHENSIVE-ASSESSMENT.md` | Canonical relibc | | `local/docs/DRM-MODERNIZATION-EXECUTION-PLAN.md` | Canonical GPU/DRM | | `local/docs/CONSOLE-TO-KDE-DESKTOP-PLAN.md` | Canonical desktop path | | `local/docs/DESKTOP-STACK-CURRENT-STATUS.md` | Current build/runtime truth | | **This document** | **Canonical full-OS assessment** |