NetBSD Problem Report #57109

From www@netbsd.org  Sun Dec 11 14:13:00 2022
Return-Path: <www@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits))
	(Client CN "mail.NetBSD.org", Issuer "mail.NetBSD.org CA" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id C2D091A921F
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 11 Dec 2022 14:13:00 +0000 (UTC)
Message-Id: <20221211141259.222181A9239@mollari.NetBSD.org>
Date: Sun, 11 Dec 2022 14:12:59 +0000 (UTC)
From: cryintothebluesky@gmail.com
Reply-To: cryintothebluesky@gmail.com
To: gnats-bugs@NetBSD.org
Subject: Mechanical USB keyboard often fails to configure on Raspberry Pi 4
X-Send-Pr-Version: www-1.0

>Number:         57109
>Category:       port-arm
>Synopsis:       Mechanical USB keyboard often fails to configure on Raspberry Pi 4
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-arm-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Dec 11 14:15:02 +0000 2022
>Last-Modified:  Mon Dec 12 10:35:01 +0000 2022
>Originator:     Sad Clouds
>Release:        NetBSD 9.99.108
>Organization:
>Environment:
NetBSD rp4 9.99.108 NetBSD 9.99.108 (GENERIC64)
>Description:
Filco mechanical USB keyboard often fails to configure correctly. The issue occurs intermittently in UEFI (keyboard does not respond) and when booted into NetBSD:

[   612.176994] uhub2: autoconfiguration error: device problem, disabling port 4

Unplugging and plugging it again several times, sometimes resolves the issue and configures keyboard correctly:

[   674.127974] uhidev2 at uhub2 port 4 configuration 1 interface 0
[   674.127974] uhidev2: vendor 04d9 (0x04d9) product 4545 (0x4545), rev 1.10/1.05, addr 4, iclass 3/1
[   674.137974] ukbd1 at uhidev2
[   674.137974] wskbd1 at ukbd1 mux 1
[   674.137974] wskbd1: connecting to wsdisplay0
[   674.137974] uhidev3 at uhub2 port 4 configuration 1 interface 1
[   674.137974] uhidev3: vendor 04d9 (0x04d9) product 4545 (0x4545), rev 1.10/1.05, addr 4, iclass 3/1
[   674.177975] uhidev3: 2 report ids
[   674.177975] uhid4 at uhidev3 reportid 1: input=6, output=0, feature=0
[   674.177975] uhid5 at uhidev3 reportid 2: input=1, output=0, feature=0

Same hardware and keyboard running Debian 11 Linux never had such issues.

Another USB keyboard seems to work correctly and has the following much simpler messages when attaching:

[   550.756019] uhidev2 at uhub2 port 4 configuration 1 interface 0
[   550.756019] uhidev2: vendor 04d9 (0x04d9) product 1504 (0x1504), rev 1.10/1.60, addr 4, iclass 3/1
[   550.776020] ukbd1 at uhidev2
[   550.776020] wskbd1 at ukbd1 mux 1
[   550.776020] wskbd1: connecting to wsdisplay0


>How-To-Repeat:

>Fix:

>Audit-Trail:
From: mlelstv@serpens.de (Michael van Elst)
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-arm/57109: Mechanical USB keyboard often fails to configure on Raspberry Pi 4
Date: Sun, 11 Dec 2022 15:43:15 -0000 (UTC)

 cryintothebluesky@gmail.com writes:

 >Filco mechanical USB keyboard often fails to configure correctly. The issue occurs intermittently in UEFI (keyboard does not respond) and when booted into NetBSD:
 >[   612.176994] uhub2: autoconfiguration error: device problem, disabling port 4
 >Unplugging and plugging it again several times, sometimes resolves the issue and configures keyboard correctly:


 The first thing to check would be the USB power. While this is way more
 robust than with the first RPI variants, you still need to have a
 power supply that can feed RPI and anything connected.

 N.B. the Cherry keyboard here doesn't make any problems.

From: Sad Clouds <cryintothebluesky@gmail.com>
To: gnats-bugs@netbsd.org
Cc: mlelstv@serpens.de (Michael van Elst), port-arm-maintainer@netbsd.org,
 gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: port-arm/57109: Mechanical USB keyboard often fails to
 configure on Raspberry Pi 4
Date: Sun, 11 Dec 2022 19:39:16 +0000

 On Sun, 11 Dec 2022 15:45:01 +0000 (UTC)
 mlelstv@serpens.de (Michael van Elst) wrote:

 >  The first thing to check would be the USB power. While this is way more
 >  robust than with the first RPI variants, you still need to have a
 >  power supply that can feed RPI and anything connected.

 This is the same power supply, keyboard and RPi hardware that I was
 using with Debian Linux a few days ago and did not have any issues
 there. The power supply is Argon V2, rated at 5.25V and 3.5A. Sometimes
 keyboard is unresponsive during UEFI boot, before NetBSD kernel is
 loaded, sometimes it works during UEFI boot, but when booted to NetBSD
 it becomes unresponsive. I wonder if this is something to do with UEFI
 initialization of USB devices. I'm using the latest V1.33 from
 https://github.com/pftf/RPi4/releases

From: Michael van Elst <mlelstv@serpens.de>
To: Sad Clouds <cryintothebluesky@gmail.com>
Cc: gnats-bugs@netbsd.org, port-arm-maintainer@netbsd.org,
	gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: port-arm/57109: Mechanical USB keyboard often fails to configure
 on Raspberry Pi 4
Date: Sun, 11 Dec 2022 22:46:15 +0100

 On Sun, Dec 11, 2022 at 07:39:16PM +0000, Sad Clouds wrote:
 > This is the same power supply, keyboard and RPi hardware that I was
 > using with Debian Linux a few days ago and did not have any issues
 > there. The power supply is Argon V2, rated at 5.25V and 3.5A.

 Sounds splendid.

 > Sometimes
 > keyboard is unresponsive during UEFI boot, before NetBSD kernel is
 > loaded,

 Hmm, no UEFI here, but there are Linux variants that also use UEFI
 like Ubuntu and should be affected if it were a genuine UEFI problem.

 Apparently FreeBSD had an issue with USB keyboards that were related
 to the RPI firmware.

 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253981

 I'm using Firmware from Aug 3 2021


 Greetings,
 -- 
                                 Michael van Elst
 Internet: mlelstv@serpens.de
                                 "A potential Snark may lurk in every tree."

From: Sad Clouds <cryintothebluesky@gmail.com>
To: gnats-bugs@netbsd.org
Cc: Michael van Elst <mlelstv@serpens.de>, port-arm-maintainer@netbsd.org,
 gnats-admin@netbsd.org, netbsd-bugs@netbsd.org
Subject: Re: port-arm/57109: Mechanical USB keyboard often fails to
 configure on Raspberry Pi 4
Date: Mon, 12 Dec 2022 10:30:06 +0000

 Tried older UEFI V1.29 from August 2021 and the same issue persists.
 Once booted into NetBSD, unplugging and plugging keyboard several times
 manages to attach it correctly. This seems to be the best workaround
 for the current bug. Not sure if this is NetBSD issue, since it also
 occurs during UEFI boot screen.

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.47 2022/09/11 19:34:41 kim Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2022 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.