From owner-freebsd-current@freebsd.org Sun Mar 14 09:42:18 2021 Return-Path: Delivered-To: freebsd-current@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 1E6C4579D9E for ; Sun, 14 Mar 2021 09:42:18 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from relay12.mail.gandi.net (relay12.mail.gandi.net [217.70.178.232]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4Dyvj54HJ8z3KD2 for ; Sun, 14 Mar 2021 09:42:17 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from [192.168.0.88] (unknown [195.64.148.76]) (Authenticated sender: andriy.gapon@uabsd.com) by relay12.mail.gandi.net (Postfix) with ESMTPSA id B38E5200009; Sun, 14 Mar 2021 09:42:14 +0000 (UTC) Subject: Re: console: no USB keyboard! To: "Hartmann, O." , FreeBSD CURRENT References: <20210313200117.46db6706@hermann.fritz.box> From: Andriy Gapon Message-ID: <7719f608-f277-5ba9-903d-9da463b4c921@FreeBSD.org> Date: Sun, 14 Mar 2021 11:42:13 +0200 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:78.0) Gecko/20100101 Firefox/78.0 Thunderbird/78.8.0 MIME-Version: 1.0 In-Reply-To: <20210313200117.46db6706@hermann.fritz.box> Content-Type: text/plain; charset=windows-1252 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Rspamd-Queue-Id: 4Dyvj54HJ8z3KD2 X-Spamd-Bar: / Authentication-Results: mx1.freebsd.org; none X-Spamd-Result: default: False [0.00 / 15.00]; local_wl_from(0.00)[FreeBSD.org]; ASN(0.00)[asn:29169, ipnet:217.70.176.0/20, country:FR] X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Mar 2021 09:42:18 -0000 On 13/03/2021 21:01, Hartmann, O. wrote: > Running 14-CURRENT on several boxes (i.e. FreeBSD 14.0-CURRENT #49 > main-n245422-cecfaf9bede9: Fri Mar 12 16:08:09 CET 2021 amd64) with custom and/or GENERIC > kernel and USB-only equipment (mouse if available, keyboard). > In multiuser mode, there is no problem using the USB keyboard. On single user console > (for maintenance purposes), no USB keyboard is available. The same is true while booting > and the rc scripts are worked on. Usually, one can hit the enter key and inserts a > newline, this doesn't work anymore until the box is completely up! > > I do not know when this problem as been introduced, the very same config is used since > 13-CURRENT in its earlier time and has been modified accordingly, but I can't see obvios > changes which would explain the wrecked behaviour now. > > I got aware of this problem, when a small mistake in /etc/fstab rendered a box > unbootable, I had to head for the datacenter and wasn't even capable of interrupting the > stuck system. Checking on other boxes running recent 14-CURRENT revealed the same problem. > > The interesting part is, that as long as those boxes are with the loader present (all > boxes are UEFI booting!), the USB keyboard works as expected and I'm able to select > kernel/kernel.old and so on. > > How to fix this? Can't help with fixing the problem, but here's some info. When you are at the loader prompt, BIOS provides emulation of a standard / legacy keyboard for the USB keyboard. That's why loader can work even though it doesn't know much about USB. When a FreeBSD driver for the USB controller takes over then the BIOS emulation stops. Until a FreeBSD peripheral driver like ukbd attaches, it's not possible to use the keyboad, unfortunately. You can check your dmesg to see when that happens. Personally, I try to avoid "legacy free" solutions and always have a PS/2 keyboard (even if it's a really a USB one using PS/2 <-> USB adapter). Of course, it would be great to reduce the dead window for USB keyboards and I think that it is doable. -- Andriy Gapon