Make-initrd development discussion
 help / color / mirror / Atom feed
From: antohami@basealt.ru
To: make-initrd@lists.altlinux.org
Subject: [make-initrd] [PATCH 1/2] plymouth: fix plymouth showing when drm is not ready yet
Date: Tue, 23 Apr 2024 12:51:37 +0700
Message-ID: <eaf1f5ac7a292cc54a49f518e1033ef1179e67ce.1713850713.git.antohami@altlinux.org> (raw)
In-Reply-To: <cover.1713850713.git.antohami@altlinux.org>

From: Anton Midyukov <antohami@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@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



  reply	other threads:[~2024-04-23  5:51 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-23  5:51 [make-initrd] [PATCH 0/2] Fix show plymouth antohami
2024-04-23  5:51 ` antohami [this message]
2024-04-23 11:20   ` [make-initrd] [PATCH 1/2] plymouth: fix plymouth showing when drm is not ready yet Alexey Gladkov
2024-04-23 11:35     ` Антон Мидюков
2024-04-23 11:53       ` Alexey Gladkov
2024-04-26  7:20         ` Антон Мидюков
2024-04-27 14:07           ` Alexey Gladkov
2024-05-15 15:06             ` Антон Мидюков
2024-05-15 16:50               ` Alexey Gladkov
2024-04-23  5:51 ` [make-initrd] [PATCH 2/2] udev: do not show the error that it is impossible to set the log level antohami

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=eaf1f5ac7a292cc54a49f518e1033ef1179e67ce.1713850713.git.antohami@altlinux.org \
    --to=antohami@basealt.ru \
    --cc=make-initrd@lists.altlinux.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

Make-initrd development discussion

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/make-initrd/0 make-initrd/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 make-initrd make-initrd/ http://lore.altlinux.org/make-initrd \
		make-initrd@lists.altlinux.org make-initrd@lists.altlinux.ru make-initrd@lists.altlinux.com
	public-inbox-index make-initrd

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.make-initrd


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git