Bug 279953 - If both usbhid entries used in /boot/loader.conf, keyboard gets frozen when booted in single user mode
Summary: If both usbhid entries used in /boot/loader.conf, keyboard gets frozen when b...
Status: Closed Works As Intended
Alias: None
Product: Base System
Classification: Unclassified
Component: usb (show other bugs)
Version: 14.1-RELEASE
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-usb (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-06-24 17:32 UTC by Yusuf Yaman
Modified: 2024-07-01 10:31 UTC (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yusuf Yaman 2024-06-24 17:32:02 UTC
Hi. I had these entries in /boot/loader.conf:

usbhid_load="YES"
hw.usb.usbhid.enable="1"

Using both of them at the same time causes keyboard to froze when booted in single-user mode. If you only use hw.usb.usbhid.enable="1", keyboard's multimedia keys keep working and keyboard doesn't freeze. I think that usbhid_load is totally useless here and causes issues.
Comment 1 Yusuf Yaman 2024-06-24 17:55:06 UTC
I wanted to test the issue more and used hw.usb.usbhid.enable="1" variable in /etc/sysctl.conf instead of in /boot/loader.conf and freezing issue didn't occur.

Now my /boot/loader.conf has this:

usbhid_load="YES"

and my /etc/sysctl.conf has this:

hw.usb.usbhid.enable=1


usbhid's man page says that the hw.usb.usbhid.enable variable can be used either in /boot/loader.conf or in /etc/sysctl.conf but using it in /boot/loader.conf causes freezing issue.
Comment 2 Warner Losh freebsd_committer freebsd_triage 2024-06-28 17:59:07 UTC
Cc'd Manu to look at. He can rope more people in.
Comment 3 Emmanuel Vadot freebsd_committer freebsd_triage 2024-07-01 07:55:40 UTC
This is expected.

With usbhid loaded and the sysctl set to 1 the ukbd(4) driver will have no chance to attach and GENERIC doesn't have hkbd(4).
Which is one of the reason I did https://reviews.freebsd.org/D45658

Until then you can add hkbd_load="YES" to loader.conf to "fix" this issue.
Comment 4 Yusuf Yaman 2024-07-01 10:31:21 UTC
> Until then you can add hkbd_load="YES" to loader.conf to "fix" this issue.

Thanks, I removed sysctl variable and used both entries about usbhid in /boot/loader.conf and added hkbd_load="YES" to /boot/loader.conf and it didn't freeze.

Have a good one.