Patched KWin compositor for CIX Sky1 systems (Radxa Orion O6 and compatible boards).
KWin's DRM backend assumes a single GPU holds DRM master cleanly from startup. On Sky1 boards, this assumption breaks in two ways:
-
SDDM fd inheritance: When SDDM hands off to KWin, inherited file descriptors from the display manager still hold DRM master on secondary GPU devices. KWin's
TakeDevicecall returns EBUSY and the 5-second blocking retry loop fails, leaving the GPU permanently unavailable. -
fbcon VT theft during hotplug: When a display is connected (e.g. USB-C DP), the kernel's fbcon subsystem creates a framebuffer on the new connector and steals the VT from KWin. KWin loses DRM master, its modeset fails with EACCES, and the hotplug event is silently dropped with no recovery path.
These issues compound on Sky1 because the system has multiple DRM devices (the CIX display controller, the Mali GPU render node, and sky1-drm) and USB-C DisplayPort hotplug is a primary use case.
Upstream KWin (6.5.4) has no handling for either scenario. Our patches add the missing recovery mechanisms.
Based on KDE KWin 6.5.4 (Debian 4:6.5.4-3), with 6 functional patches:
| Patch | Description |
|---|---|
| Backport power mode fix | Cherry-pick upstream fix for freeze before entering power save (BUG 513151) |
| Deferred GPU retry | Replace blocking 5s EBUSY retry with async 1s timer; keep secondary GPUs even with no initial outputs |
| Close inherited DRM fds | On EBUSY from TakeDevice, scan /proc/self/fd for inherited fds matching the device rdev, close them, then retry |
| Robust hotplug during master loss | Preserve m_forceModeset on EACCES, queue hotplug events for inactive GPUs, retry modeset with backoff |
| VT reclaim on master loss | When fbcon steals the VT during hotplug, request VT back via switchTo() instead of blind retry — logind sends ResumeDevice which restores DRM master |
| Udev hotplug VT reclaim | Request VT reclaim from the udev change handler when session is inactive after hotplug |
Pre-built packages are available from the Sky1 Linux APT repository:
# Add repository (if not already configured)
wget -qO- https://sky1-linux.github.io/apt/key.gpg | sudo tee /usr/share/keyrings/sky1-linux.asc > /dev/null
echo "deb [signed-by=/usr/share/keyrings/sky1-linux.asc] https://sky1-linux.github.io/apt sid main" | sudo tee /etc/apt/sources.list.d/sky1-linux.list
# Install (replaces Debian's kwin packages)
sudo apt update
sudo apt install kwin-wayland kwin-commonThe packages use the same version scheme as Debian (4:6.5.4-3+sky1.N) and will be preferred over unpatched Debian packages via APT pin priority.
# Install build dependencies
sudo apt build-dep kwin
# Build
dpkg-buildpackage -us -uc -b -j$(nproc)
# Packages are created in the parent directory
ls ../*.debThese fixes are specific to the multi-GPU + fbcon interaction pattern seen on Sky1 hardware. The VT reclaim approach (requesting our VT back instead of blind retry) may be applicable upstream, but the inherited fd cleanup is a workaround for SDDM's session handoff behavior that may need a different solution in the general case.
We track Debian's KWin packaging and will rebase when Debian updates to a newer KDE Plasma release.
- linux — Kernel with Sky1 DRM/display driver patches
- sky1-image-build — Disk image and ISO build system
- apt — APT repository
GPL-2.0-or-later (same as upstream KWin)