Make-initrd development discussion
 help / color / mirror / Atom feed
* [make-initrd] [PATCH 0/2] Fix show plymouth
@ 2024-04-23  5:51 antohami
  2024-04-23  5:51 ` [make-initrd] [PATCH 1/2] plymouth: fix plymouth showing when drm is not ready yet antohami
  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
  0 siblings, 2 replies; 8+ messages in thread
From: antohami @ 2024-04-23  5:51 UTC (permalink / raw)
  To: make-initrd

From: Anton Midyukov <antohami@altlinux.org>

Исправление для бага https://bugzilla.altlinux.org/50076
Из-за simpledrm мы не дожидаемся инициализации видеокарты,
поэтому лучше инициализировать через триггеры udev,
как это сделано в dracut.

А когда мы используем параметр загрузки quiet у нас появляется ошибка от udev,
что нельзя изменить уровень логирования. Эту ошибку видно только в plymouth,
пока не начался показ splash. То есть её видно только там, где долго
инициализируется видеокарта. Думаю, что стоит просто не показывать эту ошибку.

Anton Midyukov (2):
  plymouth: fix plymouth showing when drm is not ready yet
  udev: do not show the error that it is impossible to set the log level

 data/etc/rc.d/init.d/udev                       |  4 ++--
 features/plymouth/data/etc/rc.d/init.d/plymouth | 13 +++++++++++--
 2 files changed, 13 insertions(+), 4 deletions(-)

-- 
2.42.1



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [make-initrd] [PATCH 1/2] plymouth: fix plymouth showing when drm is not ready yet
  2024-04-23  5:51 [make-initrd] [PATCH 0/2] Fix show plymouth antohami
@ 2024-04-23  5:51 ` antohami
  2024-04-23 11:20   ` 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
  1 sibling, 1 reply; 8+ messages in thread
From: antohami @ 2024-04-23  5:51 UTC (permalink / raw)
  To: make-initrd

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



^ permalink raw reply	[flat|nested] 8+ messages in thread

* [make-initrd] [PATCH 2/2] udev: do not show the error that it is impossible to set the log level
  2024-04-23  5:51 [make-initrd] [PATCH 0/2] Fix show plymouth antohami
  2024-04-23  5:51 ` [make-initrd] [PATCH 1/2] plymouth: fix plymouth showing when drm is not ready yet antohami
@ 2024-04-23  5:51 ` antohami
  1 sibling, 0 replies; 8+ messages in thread
From: antohami @ 2024-04-23  5:51 UTC (permalink / raw)
  To: make-initrd

From: Anton Midyukov <antohami@altlinux.org>

When a log level is specified in the cmdline kernel (the quiet or log_level
parameter), udev cannot override it and throws an error.

Signed-off-by: Anton Midyukov <antohami@altlinux.org>
---
 data/etc/rc.d/init.d/udev | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/data/etc/rc.d/init.d/udev b/data/etc/rc.d/init.d/udev
index 6102fe4e..67427de1 100755
--- a/data/etc/rc.d/init.d/udev
+++ b/data/etc/rc.d/init.d/udev
@@ -44,8 +44,8 @@ start() {
 	[ "$RETVAL" = 0 ] ||
 		return $RETVAL
 
-	udevadm control --log-priority=info
-	[ -z "${DEBUG-}" ] || udevadm control --log-priority=debug
+	udevadm control --log-priority=info 2>/dev/null
+	[ -z "${DEBUG-}" ] || udevadm control --log-priority=debug 2>/dev/null
 
 	udevadm control --property=STARTUP=1
 	udevadm control --reload >/dev/null 2>&1 ||:
-- 
2.42.1



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [make-initrd] [PATCH 1/2] plymouth: fix plymouth showing when drm is not ready yet
  2024-04-23  5:51 ` [make-initrd] [PATCH 1/2] plymouth: fix plymouth showing when drm is not ready yet antohami
@ 2024-04-23 11:20   ` Alexey Gladkov
  2024-04-23 11:35     ` Антон Мидюков
  0 siblings, 1 reply; 8+ messages in thread
From: Alexey Gladkov @ 2024-04-23 11:20 UTC (permalink / raw)
  To: make-initrd

On Tue, Apr 23, 2024 at 12:51:37PM +0700, antohami@basealt.ru wrote:
> 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

Хоть подход не нравится, но я смирился, что фича plymouth это чёрная дыра.

У меня другой вопрос раз мы смотрим на dracut.

Не стоит ли также скопировать у них код по вычислению tty вместо
хардкода  --tty=/dev/tty1 ?

https://github.com/dracutdevs/dracut/blob/master/modules.d/50plymouth/plymouth-pretrigger.sh#L19-L21

-- 
Rgrds, legion



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [make-initrd] [PATCH 1/2] plymouth: fix plymouth showing when drm is not ready yet
  2024-04-23 11:20   ` Alexey Gladkov
@ 2024-04-23 11:35     ` Антон Мидюков
  2024-04-23 11:53       ` Alexey Gladkov
  0 siblings, 1 reply; 8+ messages in thread
From: Антон Мидюков @ 2024-04-23 11:35 UTC (permalink / raw)
  To: make-initrd

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

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

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



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [make-initrd] [PATCH 1/2] plymouth: fix plymouth showing when drm is not ready yet
  2024-04-23 11:35     ` Антон Мидюков
@ 2024-04-23 11:53       ` Alexey Gladkov
  2024-04-26  7:20         ` Антон Мидюков
  0 siblings, 1 reply; 8+ messages in thread
From: Alexey Gladkov @ 2024-04-23 11:53 UTC (permalink / raw)
  To: make-initrd

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

Отсутствие хардкода. Но раз ты не знаешь, то вопрос снимается.

-- 
Rgrds, legion



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [make-initrd] [PATCH 1/2] plymouth: fix plymouth showing when drm is not ready yet
  2024-04-23 11:53       ` Alexey Gladkov
@ 2024-04-26  7:20         ` Антон Мидюков
  2024-04-27 14:07           ` Alexey Gladkov
  0 siblings, 1 reply; 8+ messages in thread
From: Антон Мидюков @ 2024-04-26  7:20 UTC (permalink / raw)
  To: make-initrd

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

Патчи будут приняты или требуется сделать по-другому?

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



^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: [make-initrd] [PATCH 1/2] plymouth: fix plymouth showing when drm is not ready yet
  2024-04-26  7:20         ` Антон Мидюков
@ 2024-04-27 14:07           ` Alexey Gladkov
  0 siblings, 0 replies; 8+ messages in thread
From: Alexey Gladkov @ 2024-04-27 14:07 UTC (permalink / raw)
  To: make-initrd

On Fri, Apr 26, 2024 at 02:20:31PM +0700, Антон Мидюков wrote:
> >>> Хоть подход не нравится, но я смирился, что фича plymouth это чёрная дыра.
> >>>
> >>> У меня другой вопрос раз мы смотрим на dracut.
> >>>
> >>> Не стоит ли также скопировать у них код по вычислению tty вместо
> >>> хардкода  --tty=/dev/tty1 ?
> >>>
> >>> https://github.com/dracutdevs/dracut/blob/master/modules.d/50plymouth/plymouth-pretrigger.sh#L19-L21
> >>>
> >>
> >> Не знаю. Что это нам даст?
> > 
> > Отсутствие хардкода. Но раз ты не знаешь, то вопрос снимается.
> > 
> 
> Патчи будут приняты или требуется сделать по-другому?

Я забрал изменения как они есть.

-- 
Rgrds, legion



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2024-04-27 14:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-04-23  5:51 [make-initrd] [PATCH 0/2] Fix show plymouth antohami
2024-04-23  5:51 ` [make-initrd] [PATCH 1/2] plymouth: fix plymouth showing when drm is not ready yet antohami
2024-04-23 11:20   ` 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-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

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