[make-initrd] [PATCH 1/2] plymouth: fix plymouth showing when drm is not ready yet
antohami at basealt.ru
antohami at basealt.ru
Tue Apr 23 08:51:37 MSK 2024
From: Anton Midyukov <antohami at altlinux.org>
Fix waiting for a real video card when simpledrm is available.
card0 will disappear when the DRM module of the real video card is
loaded. Because of this, by the time Plymouth was shown, simpledrm
was no longer there, and there was no real video card yet.
Instead of waiting for devices to appear, is proposed to launch
triggers for subsystems, as is uses in dracut.
Signed-off-by: Anton Midyukov <antohami at altlinux.org>
---
features/plymouth/data/etc/rc.d/init.d/plymouth | 13 +++++++++++--
1 file changed, 11 insertions(+), 2 deletions(-)
diff --git a/features/plymouth/data/etc/rc.d/init.d/plymouth b/features/plymouth/data/etc/rc.d/init.d/plymouth
index 20d64011..27d91876 100755
--- a/features/plymouth/data/etc/rc.d/init.d/plymouth
+++ b/features/plymouth/data/etc/rc.d/init.d/plymouth
@@ -19,8 +19,17 @@ start() {
[ -z "${NOSPLASH-}" ] && [ -z "${RDSHELL-}" ] ||
return 0
- udevadm settle --timeout=30 --exit-if-exists=/sys/class/drm/card0/dev
- udevadm settle --timeout=30 --exit-if-exists=/sys/class/graphics/fb0/dev
+ # first trigger graphics subsystem
+ udevadm trigger --action=add --attr-match=class=0x030000 > /dev/null 2>&1
+ # first trigger graphics and tty subsystem
+ udevadm trigger --action=add \
+ --subsystem-match=graphics \
+ --subsystem-match=drm \
+ --subsystem-match=tty \
+ --subsystem-match=acpi \
+ > /dev/null 2>&1
+
+ udevadm settle --timeout=60 2>&1
local pidfile=/run/plymouth/pid
--
2.42.1
More information about the Make-initrd
mailing list