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=ham autolearn_force=no version=3.4.1 Message-ID: Date: Tue, 23 Apr 2024 18:35:06 +0700 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird To: make-initrd@lists.altlinux.org References: Content-Language: ru From: =?UTF-8?B?0JDQvdGC0L7QvSDQnNC40LTRjtC60L7Qsg==?= In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: Re: [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 11:35:10 -0000 Archived-At: List-Archive: 23.04.2024 18:20, Alexey Gladkov пишет: > On Tue, Apr 23, 2024 at 12:51:37PM +0700, antohami@basealt.ru wrote: >> 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 > > Хоть подход не нравится, но я смирился, что фича plymouth это чёрная дыра. > > У меня другой вопрос раз мы смотрим на dracut. > > Не стоит ли также скопировать у них код по вычислению tty вместо > хардкода --tty=/dev/tty1 ? > > https://github.com/dracutdevs/dracut/blob/master/modules.d/50plymouth/plymouth-pretrigger.sh#L19-L21 > Не знаю. Что это нам даст? -- С уважением, Антон Мидюков