Re: Example context needing use of hw.usb.usbhid.enable=0 : serial console keyboard input under Parallels (aarch64) [reproduces again]

From: Mark Millard <marklmi_at_yahoo.com>
Date: Wed, 13 Aug 2025 04:59:19 UTC
Jordan Gordeev <jgopensource_at_proton.me> wrote on
Date: Tue, 12 Aug 2025 20:27:47 UTC :

> On Monday, 11 August 2025 at 03:31, Mark Millard <marklmi@yahoo.com> wrote:
> > 
> > After the updates I'm back to the "serial console"
> > is not getting/taking keyboard input (without
> > hw.usb.usbhid.enable=0 involved).
> > 
> Serial console is typically understood to mean a console over a serial link like RS-232. If you end up reporting this bug to the bug database, using confusing terminology should be avoided.

"Text console"? Some other suggestion to avoid misleading? It is not emulating any general graphics console as far as I can tell.

I'll note clicking in that window captures the mouse/cursor and stops displaying it until Ctrl+Alt are both pressed at the same time "too free the cursor", as it says. 

> > # dmesg -a | grep -e eybo -e kbd
> > hkbd0: <Parallels Virtual Keyboard> on hidbus2
> > hkbd1: <Parallels Virtual Keyboard> on hidbus3
> 
> The hkbd(4) driver detects the keyboard and attaches successfully. Adding the following to /boot/loader.conf will enable debug output from the driver:
> hw.hid.hkbd.debug="100"

Added for now.

> Please provide the output if you can't analyze it yourself. Initial output from device probing and output when pressing keys are both relevant.

dmsg -a output capture differences from different boots follow.

In the below "-" is for failing (default ...usbhid.ignored) and "+" is for working ( ...usbhid.ignored=0 ).

 diff -u ~/kbd_debug_input_usbhid_ignored_default_just_boot.txt ~/kbd_debug_input_usbhid_ignored_0_just_boot.txt
--- /root/kbd_debug_input_usbhid_ignored_default_just_boot.txt	2025-08-12 21:24:22.316440000 -0700
+++ /root/kbd_debug_input_usbhid_ignored_0_just_boot.txt	2025-08-12 21:29:58.256311000 -0700
@@ -112,31 +112,21 @@
 usbus1: 5.0Gbps Super Speed USB v3.0
 Trying to mount root from ufs:/dev/gpt/PBaseUFS [rw,noatime]...
 ugen0.1: <Intel EHCI root HUB> at usbus0
-uhub0 on usbus0
-uhub0: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
 ugen1.1: <(0x1033) XHCI root HUB> at usbus1
+uhub0 on usbus0
 uhub1 on usbus1
 uhub1: <(0x1033) XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus1
+uhub0: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus0
 uhub1: 14 ports with 14 removable, self powered
 Root mount waiting for: usbus0 usbus1 CAM
 ugen1.2: <Parallels Virtual Mouse> at usbus1
-usbhid0 on uhub1
-usbhid0: <Parallels Virtual Mouse, class 0/0, rev 3.00/1.00, addr 1> on usbus1
-hidbus0: <HID bus> on usbhid0
-usbhid1 on uhub1
-usbhid1: <Parallels Virtual Mouse, class 0/0, rev 3.00/1.00, addr 1> on usbus1
-hidbus1: <HID bus> on usbhid1
 ugen1.3: <Parallels Virtual Keyboard> at usbus1
-usbhid2 on uhub1
-usbhid2: <Parallels Virtual Keyboard, class 0/0, rev 3.00/1.10, addr 2> on usbus1
-hidbus2: <HID bus> on usbhid2
-hkbd0: <Parallels Virtual Keyboard> on hidbus2
-kbd1 at hkbd0
-usbhid3 on uhub1
-usbhid3: <Parallels Virtual Keyboard, class 0/0, rev 3.00/1.10, addr 2> on usbus1
-hidbus3: <HID bus> on usbhid3
-hkbd1: <Parallels Virtual Keyboard> on hidbus3
-kbd2 at hkbd1
+ukbd0 on uhub1
+ukbd0: <Parallels Virtual Keyboard, class 0/0, rev 3.00/1.10, addr 2> on usbus1
+kbd1 at ukbd0
+ukbd1 on uhub1
+ukbd1: <Parallels Virtual Keyboard, class 0/0, rev 3.00/1.10, addr 2> on usbus1
+kbd2 at ukbd1
 Root mount waiting for: usbus0 CAM
 Root mount waiting for: usbus0 CAM
 Root mount waiting for: usbus0 CAM
@@ -162,15 +152,7 @@
 /dev/gpt/PBaseUFS: FILE SYSTEM CLEAN; SKIPPING CHECKS
 /dev/gpt/PBaseUFS: clean, 251237746 free (1281490 frags, 31244532 blocks, 0.4% fragmentation)
 Mounting local filesystems:.
-Autoloading module: hcons
-Autoloading module: hms
-Autoloading module: hsctrl
 Autoloading module: virtio_balloon
-hms0: <Parallels Virtual Mouse Tablet> on hidbus0
-hms0: 8 buttons and [XYWH] coordinates ID=1
-hms1: <Parallels Virtual Mouse> on hidbus1
-hms1: 8 buttons and [XYWH] coordinates ID=2
-hcons0: <Parallels Virtual Keyboard Consumer Control> on hidbus3
 vtballoon0: <VirtIO Balloon Adapter> on virtio_mmio0
 ELF ldconfig path: /lib /usr/lib /usr/lib/compat /usr/local/lib /usr/local/lib/compat/pkg /usr/local/lib/compat/pkg /usr/local/lib/e2fsprogs /usr/local/lib/gcc15 /usr/local/lib/perl5/5.40/mach/CORE /usr/local/llvm21/lib /usr/local/llvm21/lib/aarch64-portbld-freebsd15.0
 Setting up harvesting: RANDOMDEV,[CALLOUT],[UMA],[FS_ATIME],SWI,INTERRUPT,NET_NG,[NET_ETHER],NET_TUN,MOUSE,KEYBOARD,ATTACH,CACHED
@@ -195,6 +177,14 @@
 	status: active
 	nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
 Starting devd.
+Autoloading module: uhid
+Autoloading module: usbhid
+Autoloading module: wmt
+uhid0 on uhub1
+uhid0: <Parallels Virtual Mouse, class 0/0, rev 3.00/1.00, addr 1> on usbus1
+uhid1 on uhub1
+uhid1: <Parallels Virtual Mouse, class 0/0, rev 3.00/1.00, addr 1> on usbus1
+Autoloading module: usbhid
 Starting dhclient.
 DHCPREQUEST on vtnet0 to 255.255.255.255 port 67
 DHCPACK from 192.168.1.1
@@ -231,4 +221,4 @@
 Starting cron.
 Starting background file system checks in 60 seconds.
 
-Wed Aug 13 04:22:20 PDT 2025
+Wed Aug 13 04:27:53 PDT 2025


# diff -u ~/kbd_debug_input_usbhid_ignored_default_just_boot.txt ~/kbd_debug_input_usbhid_ignored_default_just_boot_and_typing.txt 
# 
(So: no difference by then typing at the login prompt.)

Note: below, "+" is what is extra after typing at the login prompt. There are no "-" diff lines.

# diff -u ~/kbd_debug_input_usbhid_ignored_0_just_boot.txt ~/kbd_debug_input_usbhid_ignored_0_boot_and_typing.txt 
--- /root/kbd_debug_input_usbhid_ignored_0_just_boot.txt	2025-08-12 21:29:58.256311000 -0700
+++ /root/kbd_debug_input_usbhid_ignored_0_boot_and_typing.txt	2025-08-12 21:39:54.548822000 -0700
@@ -222,3 +222,4 @@
 Starting background file system checks in 60 seconds.
 
 Wed Aug 13 04:27:53 PDT 2025
+Aug 12 21:39:18 aarch64-main-pbase login[2693]: ROOT LOGIN (root) ON ttyv0

(So: Just shows the evidence of the login from the typing at the prompt working.)


> > # usbconfig -l
> > ugen1.3: <Virtual Keyboard PARALLELS> at usbus1, cfg=0 md=HOST spd=SUPER (5.0Gbps) pwr=ON (0mA)
> > 
> 
> The keyboard seems to be attached to the XHCI USB controller (USB 3.0). If Parallels offers such a choice, as an experiment try to force it to use the EHCI USB controller (USB 2.0) instead.

I'm not aware of a configuration control over such a binding in parallels.

> If you have the dmesg output from when the keyboard worked, you can compare to dmesg when the keyboard doesn't work.

I tried both ways with debugging enabled. See the diff's provided earlier.

> Also, when the keyboard doesn't work does the mouse work?

This is not a graphics window context. Clicking in that window captures the mouse/cursor and stops displaying it until Ctrl+Alt are both pressed at the same time "too free the cursor", as it says.

So I'm not sure how to answer your question here. The capture and free sequences still capture and free, either way.

===
Mark Millard
marklmi at yahoo.com