From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on sa.local.altlinux.org X-Spam-Level: X-Spam-Status: No, score=-4.3 required=5.0 tests=ALL_TRUSTED,BAYES_00, RP_MATCHES_RCVD autolearn=unavailable autolearn_force=no version=3.4.1 From: antohami@basealt.ru To: make-initrd@lists.altlinux.org Date: Tue, 23 Apr 2024 12:51:37 +0700 Message-ID: X-Mailer: git-send-email 2.42.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [make-initrd] [PATCH 1/2] plymouth: fix plymouth showing when drm is not ready yet X-BeenThere: make-initrd@lists.altlinux.org X-Mailman-Version: 2.1.12 Precedence: list Reply-To: make-initrd@lists.altlinux.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 23 Apr 2024 05:52:07 -0000 Archived-At: List-Archive: From: Anton Midyukov 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 --- 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