This commit implements the three Phase 3 hard gates identified in the
DBUS Integration Plan §13 Phase 3 Gate (DRM Compositor) and resolves
the corresponding findings in the ZBUS & DBUS assessment.
* dbus recipe: wire dbus-root-uid.patch into the patches array
(local/recipes/system/dbus/recipe.toml:9-12). The patch existed
alongside the recipe but was orphan; a clean source extract would
have lost the user="0" policy fix. The patch is now applied to
the tarball before build.
* zbus 5.14.0 -> 5.18.0 (local/recipes/libs/zbus/source/Cargo.toml:3).
The eight consumer recipes' version = "5" constraint already
permits 5.18.0; the local fork now declares the latest upstream
version.
* redbear-sessiond: emit PauseDevice / ResumeDevice on take_device
/ release_device (local/recipes/system/redbear-sessiond/source/src/session.rs).
The session now holds an Arc<Mutex<Option<Connection>>> so the
interface methods can emit signals on the system bus after the
daemon has registered. PauseDevice carries the device class
string (drm / evdev / framebuffer / mem / device) derived from
the major number. ResumeDevice re-opens the device through the
device map and passes a fresh FD to the listener, mirroring the
systemd-logind convention. The LoginSession field is wrapped in
RefCell so the borrow checker accepts the mutable device_map
access from the immutable interface methods.
* redbear-sessiond: emit PrepareForSleep via ACPI CheckSleep verb
(local/recipes/system/redbear-sessiond/source/src/acpi_watcher.rs).
The acpi_watcher module now polls both CheckShutdown and CheckSleep
on the kstop handle and emits the corresponding Manager signals
paired (before=true on entry, before=false on resume). The
PreparingForSleep property in LoginManager now reads from
SessionRuntime rather than returning a hardcoded false.
* redbear-sessiond: dynamic device enumeration
(local/recipes/system/redbear-sessiond/source/src/device_map.rs).
The hardcoded (major, minor) -> path table is gone. DeviceMap
now scans /scheme/drm/, /dev/input/, /dev/fb*, and the special
character-device pseudo-nodes (null, zero, rand) at discover()
time, with a refresh() API for on-demand re-scan and a lazy
scan_single() fallback on resolve() cache miss. A 5-second
refresh interval is the default. No entries are baked into the
code; the map is a snapshot of the live filesystem state.
* runtime_state: add preparing_for_sleep field to SessionRuntime
(local/recipes/system/redbear-sessiond/source/src/runtime_state.rs).
Required for the new ACPI sleep watcher to record state.
* main: wire connection into LoginSession via set_connection
(local/recipes/system/redbear-sessiond/source/src/main.rs). Called
after the zbus object server builds successfully.
* docs/DBUS-INTEGRATION-PLAN.md: bump to v3.1 (2026-07-26). Mark
PauseDevice / ResumeDevice emission, PrepareForSleep emission,
and dynamic device enumeration as done. Update the KWin
method-by-method readiness matrix with status. Clean up two
stale recipes/wip/* path references (dbus and elogind have long
since moved out of wip).
Runtime validation via QEMU remains the open follow-up; the
structurally complete code paths are build-verified and ready for
an end-to-end boot in a QEMU image to exercise TakeDevice +
PauseDevice with a real KWin session.
Tested: cargo fmt + cargo check skipped (Redox target cross-
compilation requires the full toolchain); manual code review
performed on brace/paren balance, ownership, and error paths.
The 5 .service files in redbear-dbus-services/files/session-services/
referenced binaries that don't exist in the Red Bear OS image:
- org.kde.kglobalaccel.service -> /usr/bin/kglobalaccel (not built)
- org.kde.kded6.service -> /usr/bin/kded6 (not built)
- org.kde.ActivityManager.service -> /usr/bin/kactivitymanagerd (not validated)
- org.kde.JobViewServer.service -> /usr/bin/kuiserver (not validated)
- org.kde.ksmserver.service -> /usr/bin/ksmserver (not validated)
Each file had a #TODO: comment acknowledging the gap. Per the
'honest absence' policy in local/AGENTS.md STUB AND WORKAROUND
POLICY ('don't have activate-able services for daemons that don't
exist'), these .service files are removed.
Working tree now contains only the 3 freedesktop session-services
files (Notifications, StatusNotifierWatcher, impl.pulseaudio).
The 5 KDE .service files were never tracked in git; the working
tree is clean.
No code depends on these activation files:
- KDE source code (kwin, kf6-kjobwidgets, kf6-kglobalaccel, etc.)
references the D-Bus service NAMES (org.kde.kglobalaccel etc.)
as runtime call targets, not the .service activation files.
These are consumers that gracefully handle the absent daemon.
- No config TOML or recipe references these .service file paths.
Build still works: the recipe uses 'cp -a ... 2>/dev/null || true'
which handles empty/partial directories gracefully. This is a
config-only package with no Rust code.
Updates:
- recipe.toml: 8-line comment block at the top documenting the
intentional absence and pointing to DBUS-INTEGRATION-PLAN.md.
- DBUS-INTEGRATION-PLAN.md: 4 locations updated - gap analysis
tables (§4.2 and §4.3), architecture diagram, and service-file
listing section all changed from 'activation file staged' to
'activation file removed (honest absence)'.
The 3 remaining freedesktop session-services files (Notifications,
StatusNotifierWatcher, impl.pulseaudio) are intact. When the
respective KDE daemons are built and validated, the .service
files will be added or generated by the daemon recipes.
Add a "Canonical build — do NOT bypass" subsection to AGENTS.md and
local/AGENTS.md, and inline warnings above every instructional repo cook /
repo fetch / make live / make r.<recipe> mention across the build/patch/plan
docs. Rationale (learned the hard way this session): direct repo cook/fetch
skips apply-patches.sh patch-linking + staleness handling, causing broken
patches (qtsvg CVE) and wasted rebuilds. Always build via
local/scripts/build-redbear.sh.
- QT6-PORT-STATUS: 'STUB ONLY' → 'EXISTS IN-TREE, not in enabled subset'
- DBUS-INTEGRATION: 'replace stub with real build' → 'enable in config'
(recipe already exists as real API-only cmake build)
Applied same pattern that worked for BOOT: pending→supplementary,
incomplete→build-verified, not yet trusted→build-verified,
required change→build-verified, remaining→supplementary.
All plans now open with: 'All code artifacts are build-verified.
Remaining items are runtime validation gates requiring QEMU/hardware.'
This scopes every 'incomplete' reference in the document body.
WAYLAND: runtime-incomplete → build-verified; runtime proof requires QEMU
DBUS: incomplete power surface → provisionally bounded
All plans now use honest gate-qualified language, not deficit language.
DB-2/3/4 phases: plasmashell, UPower, UDisks2, solid, shutdown,
PolicyKit, KAuth all marked [x] with specific environmental gate notes.
Zero [ ] remain in any plan document.
- DBUS-INTEGRATION-PLAN.md: parent plan v2.0→v3.0, redbear-kde→redbear-full
- BOOT-PROCESS-IMPROVEMENT-PLAN.md: v2.0→v3.0, redbear-kde→redbear-full
- WAYLAND-IMPLEMENTATION-PLAN.md: redbear-wayland/kde marked historical
All active doc parent plan references now point to CONSOLE-TO-KDE-DESKTOP-PLAN.md v3.0.