fix: harden greeter DRM device wait
Ultraworked with [Sisyphus](https://github.com/code-yeongyu/oh-my-openagent) Co-authored-by: Sisyphus <clio-agent@sisyphuslabs.ai>
This commit is contained in:
@@ -92,11 +92,15 @@ if ! command -v redbear-compositor >/dev/null 2>&1; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# pcid-spawner is intentionally async in Red Bear OS, so service ordering only guarantees that
|
# pcid-spawner is intentionally async in Red Bear OS, so service ordering only guarantees that
|
||||||
# spawning has started. The compositor wrapper still has to wait for the actual DRM node.
|
# spawning has started. Wait for the DRM scheme root first, then the selected card node.
|
||||||
desired_drm_devices="${KWIN_DRM_DEVICES:-/scheme/drm/card0}"
|
if [ -n "${KWIN_DRM_DEVICES:-}" ]; then
|
||||||
|
desired_drm_devices="/scheme/drm:${KWIN_DRM_DEVICES}"
|
||||||
|
else
|
||||||
|
desired_drm_devices="/scheme/drm:/scheme/drm/card0"
|
||||||
|
fi
|
||||||
|
|
||||||
if wait_for_drm_devices "$desired_drm_devices"; then
|
if wait_for_drm_devices "$desired_drm_devices"; then
|
||||||
export KWIN_DRM_DEVICES="$desired_drm_devices"
|
export KWIN_DRM_DEVICES="${KWIN_DRM_DEVICES:-/scheme/drm/card0}"
|
||||||
echo "redbear-greeter-compositor: using DRM compositor backend (KWIN_DRM_DEVICES=${KWIN_DRM_DEVICES})" >&2
|
echo "redbear-greeter-compositor: using DRM compositor backend (KWIN_DRM_DEVICES=${KWIN_DRM_DEVICES})" >&2
|
||||||
exec redbear-compositor --drm
|
exec redbear-compositor --drm
|
||||||
else
|
else
|
||||||
|
|||||||
Reference in New Issue
Block a user