[make-initrd] [PATCH 1/2] plymouth: fix plymouth showing when drm is not ready yet

Антон Мидюков antohami at basealt.ru
Tue Apr 23 14:35:06 MSK 2024


23.04.2024 18:20, Alexey Gladkov пишет:
> On Tue, Apr 23, 2024 at 12:51:37PM +0700, antohami at basealt.ru wrote:
>> 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
> 
> Хоть подход не нравится, но я смирился, что фича plymouth это чёрная дыра.
> 
> У меня другой вопрос раз мы смотрим на dracut.
> 
> Не стоит ли также скопировать у них код по вычислению tty вместо
> хардкода  --tty=/dev/tty1 ?
> 
> https://github.com/dracutdevs/dracut/blob/master/modules.d/50plymouth/plymouth-pretrigger.sh#L19-L21
> 

Не знаю. Что это нам даст?

-- 
С уважением, Антон Мидюков <antohami at basealt.ru>



More information about the Make-initrd mailing list