Re: [PATCH] drm/panic: depends on !VT_CONSOLE

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday, June 13, 2024 11:40:16 AM EDT Jocelyn Falempe wrote:
> The race condition between fbcon and drm_panic can only occurs if
> VT_CONSOLE is set. So update drm_panic dependency accordingly.
> This will make it easier for Linux distributions to enable drm_panic
> by disabling VT_CONSOLE, and keeping fbcon terminal.
> The only drawback is that fbcon won't display the boot kmsg, so it
> should rely on userspace to do that.
> At least plymouth already handle this case with
> https://gitlab.freedesktop.org/plymouth/plymouth/-/merge_requests/224
Hi

An FYI, seeing this and https://fedoraproject.org/wiki/Changes/EnableDrmPanic ,
there is a slight issue with CONFIG_VT_CONSOLE=n in relation to systemd that
was recently discovered outside of virt-manager VMs, (or computers that have no
devices connected to the first serial port)

This was seen on a full CONFIG_VT=n kernel, but it also happens on kernels
with just CONFIG_VT_CONSOLE disabled.

When /dev/console is /dev/ttyS0 (as that is the new default without the VT
console, and /dev/ttyS0 is not connected to anything, isatty()'s TCGETS ioctl
on /dev/console results in an input output error, causing isatty() to return
false. Because of this, systemd's status logging then rejects /dev/console as
not being a terminal device, and rejects writing status output to it, resulting
in a decrease of verbosity available to Plymouth.

It at first did not show up in my testing, because all my virt-manager and qemu
VMs had serial devices attached, which would cause isatty() to return true on 
/dev/ttyS0 backed /dev/console, but now I have raised this with linux-serial.

Thanks
> 
> Suggested-by: Daniel Vetter <daniel.vetter@xxxxxxxx>
> Signed-off-by: Jocelyn Falempe <jfalempe@xxxxxxxxxx>
> ---
>  drivers/gpu/drm/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> index a9df94291622..f5c989aed7e9 100644
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -107,7 +107,7 @@ config DRM_KMS_HELPER
>  
>  config DRM_PANIC
>  	bool "Display a user-friendly message when a kernel panic occurs"
> -	depends on DRM && !FRAMEBUFFER_CONSOLE
> +	depends on DRM && !(FRAMEBUFFER_CONSOLE && VT_CONSOLE)
>  	select DRM_KMS_HELPER
>  	select FONT_SUPPORT
>  	help
> 
> base-commit: 2bae076f3e35234e42bd7c90acd8caae8368ba90
> 







[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux