Bug#868352: linux: Please enable USB_SERIAL_CONSOLE

2022-06-10 Thread Diederik de Haas
On Wednesday, 28 July 2021 10:02:47 CEST Michael Stapelberg wrote:
> Ben Hutchings  writes:
> > On Fri, 2017-07-14 at 20:34 +0200, Sascha Silbe wrote:
> >> Source: linux
> >> Version: 4.11.6-1
> >> 
> >> on some amd64 systems no native or PCI(e) serial ports are available
> >> resp. possible. USB serial adapters are the only option to get a
> >> serial console for debugging boot problems in this case.
> > 
> > I think this case is too unusual to make it worth building in all the
> > USB stuff needed to make this work on all x86 systems.
> 
> I’d like to respectfully ask you to reconsider this position.
> 
> Over the years, more and more mainboards have dropped all support for
> any onboard serial ports. Using a USB serial console is nowadays often
> the only option for getting boot messages to another computer.
> 
> To make the USB console work, I had to build my own Debian kernel with
> the following options changed:
> 
> CONFIG_USB=y
> CONFIG_USB_SERIAL=y
> CONFIG_USB_SERIAL_CONSOLE=y
> 
> Given Debian’s popularity for server scenarios, I think we should make
> troubleshooting easier and have USB serial consoles just work.
> 
> Could you please enable CONFIG_USB_SERIAL_CONSOLE=y?

$ grep -E "(CONFIG_USB|CONFIG_USB_SERIAL|CONFIG_USB_SERIAL_CONSOLE)=" 
/boot/config-5.18.0-1-amd64 
CONFIG_USB=m
CONFIG_USB_SERIAL=m

In drivers/usb/serial/Kconfig at config USB_SERIAL_CONSOLE, I see this:
depends on USB_SERIAL=y

Can you check whether the following kernel config works?
CONFIG_USB=m
CONFIG_USB_SERIAL=y
CONFIG_USB_SERIAL_CONSOLE=y

Preferably only make the changes on the amd64 config, thus not globally.
F.e. on my RPi and Rock64 (arm), I don't need USB_SERIAL_CONSOLE to have
a working serial console (connected to the GPIO pins).

usbserial.ko is 135K on my 5.18.0-1-amd64 kernel, so that's another aspect
that needs to be evaluated.

Note that I'm only trying to find the smallest change possible. I don't know
whether these changes have other 'side affects'. I also have no idea whether
it will change anything wrt being considered.
IOW: you may be wasting your time.

But I do see most/all peripherals disappearing, except USB and the 'wontfix'
decision was from almost 5 years ago. USB serial consoles tend to be rather
cheap and it (therefor) may also result in better bug reports on the kernel.

Cheers,
  Diederik

signature.asc
Description: This is a digitally signed message part.


Bug#868352: linux: Please enable USB_SERIAL_CONSOLE

2021-07-28 Thread Michael Stapelberg
Hi Ben,

Ben Hutchings  writes:
> On Fri, 2017-07-14 at 20:34 +0200, Sascha Silbe wrote:
>> Source: linux
>> Version: 4.11.6-1
>> Severity: normal
>> 
>> Dear Maintainer,
>> 
>> on some amd64 systems no native or PCI(e) serial ports are available
>> resp. possible. USB serial adapters are the only option to get a
>> serial console for debugging boot problems in this case. Unfortunately
>> the Debian amd64 kernels are built with USB_SERIAL_CONSOLE unset
>> (because USB_SERIAL is not built-in) so even that option isn't
>> available. When the BIOS text mode isn't working (e.g. high-res
>> monitor with a BIOS that only supports up to FullHD) one is left
>> without any working console device.
> [...]
>
> I think this case is too unusual to make it worth building in all the
> USB stuff needed to make this work on all x86 systems.

I’d like to respectfully ask you to reconsider this position.

Over the years, more and more mainboards have dropped all support for
any onboard serial ports. Using a USB serial console is nowadays often
the only option for getting boot messages to another computer.

I ran into this issue yesterday using an AsRock B550 Taichi mainboard,
which has no serial headers.

To make the USB console work, I had to build my own Debian kernel with
the following options changed:

CONFIG_USB=y
CONFIG_USB_SERIAL=y
CONFIG_USB_SERIAL_CONSOLE=y

This is very tedious, partly because a build takes 42 minutes even on my
latest-gen Ryzen CPU, and also because I don’t want to maintain a custom
kernel build indefinitely.

I don’t think this is a niche use case, at least not among users of
serial consoles: other users of Debian and Ubuntu are running into this
issue, too, see for example:

https://unix.stackexchange.com/q/425280/181634
https://askubuntu.com/q/1269623

Notably, both Fedora and Arch Linux (the 2 other distributions I can
quickly check) ship their default kernel with
CONFIG_USB_SERIAL_CONSOLE=y:

--- /tmp/config-debian  2021-07-27 23:29:22.648166910 +0200
+++ /tmp/config-fedora  2021-07-27 23:29:12.734958768 +0200
@@ -1,4 +1,5 @@
-CONFIG_USB_SERIAL=m
+CONFIG_USB_SERIAL=y
+CONFIG_USB_SERIAL_CONSOLE=y
 CONFIG_USB_SERIAL_GENERIC=y
 CONFIG_USB_SERIAL_SIMPLE=m
 CONFIG_USB_SERIAL_AIRCABLE=m
@@ -16,7 +17,7 @@

So Debian seems like the odd one out. Given Debian’s popularity for
server scenarios, I think we should make troubleshooting easier and have
USB serial consoles just work.

Could you please enable CONFIG_USB_SERIAL_CONSOLE=y?

Thank you!

-- 
Best regards,
Michael



Bug#868352: linux: Please enable USB_SERIAL_CONSOLE

2017-07-16 Thread Ben Hutchings
Control: severity -1 wishlist
Control: tag -1 wontfix

On Fri, 2017-07-14 at 20:34 +0200, Sascha Silbe wrote:
> Source: linux
> Version: 4.11.6-1
> Severity: normal
> 
> Dear Maintainer,
> 
> on some amd64 systems no native or PCI(e) serial ports are available
> resp. possible. USB serial adapters are the only option to get a
> serial console for debugging boot problems in this case. Unfortunately
> the Debian amd64 kernels are built with USB_SERIAL_CONSOLE unset
> (because USB_SERIAL is not built-in) so even that option isn't
> available. When the BIOS text mode isn't working (e.g. high-res
> monitor with a BIOS that only supports up to FullHD) one is left
> without any working console device.
[...]

I think this case is too unusual to make it worth building in all the
USB stuff needed to make this work on all x86 systems.

Ben.

-- 
Ben Hutchings
If the facts do not conform to your theory, they must be disposed of.



signature.asc
Description: This is a digitally signed message part


Bug#868352: linux: Please enable USB_SERIAL_CONSOLE

2017-07-14 Thread Sascha Silbe
Source: linux
Version: 4.11.6-1
Severity: normal

Dear Maintainer,

on some amd64 systems no native or PCI(e) serial ports are available
resp. possible. USB serial adapters are the only option to get a
serial console for debugging boot problems in this case. Unfortunately
the Debian amd64 kernels are built with USB_SERIAL_CONSOLE unset
(because USB_SERIAL is not built-in) so even that option isn't
available. When the BIOS text mode isn't working (e.g. high-res
monitor with a BIOS that only supports up to FullHD) one is left
without any working console device.

So please enable USB_SERIAL_CONSOLE (requires USB_SERIAL=y) for future
kernels and consider setting one of the USB serial adapter drivers to
built-in as well so that it's available before module loading. But
even just USB_SERIAL_CONSOLE alone (with all USB serial drivers as
modules) is likely better than the current situation; AFAICT the USB
serial console should get activated as soon the the USB serial driver
is loaded (haven't tested it, though).

Sascha

-- System Information:
Debian Release: 8.8
  APT prefers oldstable
  APT policy: (990, 'oldstable'), (500, 'oldstable-updates'), (100, 'stable'), 
(1, 'experimental')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 4.9.0-0.bpo.2-amd64 (SMP w/4 CPU cores)
Locale: LANG=en_GB, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)