USB keyboard won't work, FreeBSD and BIOS

When I booted FreeBSD my USB keyboard wouldn't work. Num Lock light was on and wouldn't respond to Num Lock toggle presses. Unplugging and plugging the USB keyboard back just produced the same situation, Num Lock diode stuck in on mode, nothing working. So I stopped using FreeBSD as my desktop for now until I figure this out.

So, when I use Linux, I used to get weird USB keyboard issues too. I disabled a second keyboard interface (it has a weird second interface for the extra functions, I don't understand why it has to be a separate interface, suspicious to me) using udevadm.

But I also noticed there's something weird going on between BIOS using my USB keyboard at boot and later FreeBSD (or Linux) taking over and working the USB keyboard. For example, I do not get any issues as of yet if I unplug the USB keyboard during BIOS time during boot, and only plug it in after Linux kernel takes over. And you know, BIOS has some rudimentary USB functionality for peripherals - it can work with the USB keyboard.

So I wonder how clean is the USB device transition between BIOS and FreeBSD? I know you switch into protective mode, but what happens to USB devices identified by BIOS and are already plugged in when FreeBSD kernel get the handoff. I would assume it doesn't power cycle the USB devices? Or maybe it does? There's something bad going on, and I'm just trying to troubleshoot it. It would be disheartening if FreeBSD users would be locked out of their installations via a malfunctioning kernel/USB keyboard situation.
 
When I booted FreeBSD my USB keyboard wouldn't work. Num Lock light was on and wouldn't respond to Num Lock toggle presses. Unplugging and plugging the USB keyboard back just produced the same situation, Num Lock diode stuck in on mode, nothing working. So I stopped using FreeBSD as my desktop for now until I figure this out.

So, when I use Linux, I used to get weird USB keyboard issues too. I disabled a second keyboard interface (it has a weird second interface for the extra functions, I don't understand why it has to be a separate interface, suspicious to me) using udevadm.

But I also noticed there's something weird going on between BIOS using my USB keyboard at boot and later FreeBSD (or Linux) taking over and working the USB keyboard. For example, I do not get any issues as of yet if I unplug the USB keyboard during BIOS time during boot, and only plug it in after Linux kernel takes over. And you know, BIOS has some rudimentary USB functionality for peripherals - it can work with the USB keyboard.

So I wonder how clean is the USB device transition between BIOS and FreeBSD? I know you switch into protective mode, but what happens to USB devices identified by BIOS and are already plugged in when FreeBSD kernel get the handoff. I would assume it doesn't power cycle the USB devices? Or maybe it does? There's something bad going on, and I'm just trying to troubleshoot it. It would be disheartening if FreeBSD users would be locked out of their installations via a malfunctioning kernel/USB keyboard situation.
Trying using all the back panel USB ports. I had a similar error with a mouse, and changing ports fixed my problem.
 
just to be sure: how old is that hardware?

If those are USB1.0/1.1 connectors on the board, most current hardware won't work, as pretty much every controller used in peripherals nowadays is at least USB2/EHCI and might also have higher power requirements. If It's USB3 periphery it even uses a different encoding than USB1/2.
Also USB keyboards in ancient BIOS were always a PITA - some of those borked systems even crashed/reset if you unplugged the keyboard.
 
my USB keyboard
Which one?
Even some branded keyboards (for example Cherry and Glorious) have problems if being used on hubs without dedicated power supply.

USB1.0/1.1
OT: Forcing modern hardware to use USB 1.1 by using old pre-USB-2 hubs has actually some advantage: With good cables, USB 1.1 can support distances longer than 12m. So these old hubs still have good uses, as keyboards and mice are happy with USB 1.1. This makes it easy to connect computers in other rooms without having to throw away these old hubs and cables.

And yes, on vintage (32-bit) computers PS/2 is strongly recommended over USB...
 
just to be sure: how old is that hardware?

If those are USB1.0/1.1 connectors on the board, most current hardware won't work, as pretty much every controller used in peripherals nowadays is at least USB2/EHCI and might also have higher power requirements. If It's USB3 periphery it even uses a different encoding than USB1/2.
Also USB keyboards in ancient BIOS were always a PITA - some of those borked systems even crashed/reset if you unplugged the keyboard.
Laptop has an internal USB3 controller. (I keep it off in BIOS, just use usb2.0 for most things). The USB keyboard bought last year, is USB2.

I assume if the issue were power requirements, the USB keyboard would not work at all. It worked with FreeBSD for a few days and reboots. Then not. The keyboard works on a hardened Linux.

What's PITA?
 
I have Corsair K70 MK2 - it has USB pass trough. Sometimes it does not powers on when OS boots ( Linux/FreeBSD) - sometimes it disconnects midway of booting and i have to unplug-plug back in.
When my BIOS boots - i believe it shows multiple keyboards, mouses and usb hubs .. so im sure this is something to do with actual keyboards and controllers inside. Corsair K100 had same issues.
Logitech G915 TKL had no issues like this, even multimedia buttons worked in mpv...
I whish keyboard manufacturers started to take a look what they do and what they build and provide open source drivers and software :D
Even numlock must be pressed to enable it but when windows boots - numlock works.
P
 
I have Corsair K70 MK2 - it has USB pass trough. Sometimes it does not powers on when OS boots ( Linux/FreeBSD) - sometimes it disconnects midway of booting and i have to unplug-plug back in.
With my CORSAIR K70 keyboard (years ago) and current HARPOON RGB PRO mouse on Linux, I had similar stuff happen at random (sometimes both would boot fine, sometimes mouse would delay boot and then not end up available, etc).

ckb-next (CORSAIR RGB software for Linux like iCUE; similar to OpenRGB) has a USB quirks generator: https://github.com/ckb-next/ckb-next/wiki/Troubleshooting#usbcore-quirks

I forget what gn means (something about descriptors and delay) but those are the quirks it adds to CORSAIR stuff for usbcore on Linux. Out of dozens of reboots with FreeBSD 14.1 I only had my mouse act odd on a single reboot (Linux is usually 1-every-10 without my mouse behind a USB-C hub).
I whish keyboard manufacturers started to take a look what they do and what they build and provide open source drivers and software :D
I got a Hi75 mech keyboard and I like it has multiple RGB light profiles on the board itself! Hated messing with iCUE and even ckb-next just to have a simple fading RGB color shift profile.

QMK firmware for keyboard is also pretty awesome! If I buy a keyboard, it'd better support or have that, or at the very least have RGB light profiles without needing OS software.
When I booted FreeBSD my USB keyboard wouldn't work
Have you messed with loading different USB drivers in loader.conf?

hw.usb.usbhid.enable="1" (afaik) is the latest/modern USB driver stack and needs specified in loader.conf (with 14.1).
 
Which version, exactly?
I have to add that there's something fishy happening with the USB keyboard on Linux on this machine as well. It's not the same as on FreeBSD, I can actually manage to use the keyboard on Linux, but I have to unplug it at some point during the booting process for it to work later. The keyboard was working fine before too. It could be something hardware on the keyboard, but the fact that it's producing different behaviors on different OSs points to something else being the culprit. [It works normal on Windows]
 
… on Linux, … I have to unplug it at some point during the booting process for it to work later. …

Not to hijack this topic … sometimes, for me, it's like FreeBSD can't use – at boot time – any combination of a USB keyboard with an external USB hub, if some combination of other devices is present. I noticed this very recently after increasing the number of memory sticks that I use for L2ARC from two, up to three.
 
Not to hijack this topic … sometimes, for me, it's like FreeBSD can't use – at boot time – any combination of a USB keyboard with an external USB hub, if some combination of other devices is present. I noticed this very recently after increasing the number of memory sticks that I use for L2ARC from two, up to three.
At boot time...not sure if you mean preboot, during boot, post boot?
 
Back
Top