FreeBSD 15.1-p3 + HP KB-0316 = “NumLock” aka freeze system tool

1. Boot from the USB flash drive (version 15.1).
2. Reach the Beastie menu with the system boot options.
3. Press the Space bar to pause the menu and prevent the automatic boot sequence from starting.
4. Press the NumLock key on the keyboard (a 2007–2010 model HP KB-0316 PS/2) to enable the numeric keypad.
Press it again to disable it. If you do this 20–30 times, everything works fine.

1. Boot from the "booting USB flash drive" (version 15.1).
2. Reach the Beastie menu with the system boot options.
3. Enter the installer—the first screen is the "Welcome to FreeBSD!" greeting.
4. Press the NumLock key on the same keyboard to enable the numeric keypad.
Press it again to disable it. If you do this 10–15 times, everything "freezes." The keyboard becomes unresponsive, and the PC can only be turned off using the hardware power button.

If you perform the same actions on an already installed system, the only difference is that you log in as root and enter the password. If you are lucky and the keyboard doesn't hang immediately, you can trigger the "freeze" by repeatedly toggling NumLock.
Sometimes the keyboard freezes right at the login prompt! That’s how it happens!
This doesn't happen consistently; you might work in X for half an hour with no issues.
This doesn't happen on Windows or Linux. Verified through testing.

I thought my A4 wireless mouse might be the culprit. It wasn't. I disconnected the wireless receiver, but the problem persisted.
I connected a standard USB mouse, but nothing changed.

Conclusion: toggling via NumLock works correctly only in the "beastie" menu.
I can't even imagine which module is interacting incorrectly with the keyboard module during startup.
How can I detect a conflict between the keyboard driver and another driver or loaded module?
 
No module is active because the entire kernel isn't even loaded at this point (that's what loader(8)/loader.efi(8) does)
Exactly! When we're just looking at the boot menu, everything is clearly clean and working fine—the keyboard responds as expected. But things go wrong even in safe mode. It’s a problem during installation, too—right at the "Welcome to FreeBSD" screen. I noticed this issue with versions 13 and 14. It didn't bother me much back then, though, because I had a mini USB keyboard handy. So, there you have it: this glitch plagues versions 13, 14, and 15.
Oh! It turns out the party is just getting started for me. To "freeze" the keyboard or the system, you have to press the Scroll Lock key in exactly the same way.
I booted with these parameters:
Code:
ACPI - on
Safe Mode - on
Single Mode - on
Verbose - on
That didn't help.

I disabled the UEFI Fast Boot option—this turns off Num Lock. I tried toggling Num Lock on and off in the UEFI settings, but that didn't help either.
 
I found the same keyboard HP KB-0316 (PS/2) and test it on supermicro server and it's working. I'm unable to reproduce the issue. You can test it on another computer with PS2 port or use a USB keyboard.

kbd1 at kbdmux0
kbd0 at atkbd0
atkbdc0: <Keyboard controller (i8042)> port 0x60, 0x64 irq 1 on acpi0
atkbd0: <AT Keyboard> irq1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]

Note:
this is from FreeBSD-15.1-RELEASE-amd64-mini-memstick.img
 
I found the same keyboard HP KB-0316 (PS/2) and test it on supermicro server and it's working.
Thanks. I see. Yes, I bought an HP ProLiant DL320 G5 server and this keyboard. It works perfectly in OpenBSD, so that’s not the issue. There are some interesting write-ups out there, but I doubt this keyboard will work properly under FreeBSD 15.1. The processes involved here are very sporadic.
Code:
I'm trying to install FreeBSD on an old ThinkPad G40. For some reason, the keyboard will not work properly once the system is booted up. I can enter text just fine at the bootloader prompt (thankfully, since this system suffers from this bug), but once the system is actually booted, I only get random letters instead of what I actually typed, forcing me to use an external USB keyboard. This doesn't happen on OpenBSD or on Linux.
It’s a G40. I’m fairly sure the keyboard is PS/2 internally. Again, works perfectly at the bootloader but once the system loads it’s unusable.
The bootloader is (I'd assume) just talking to the keyboard through the BIOS. Once the kernel boots, the OS talks to the keyboard controller directly. So it makes sense that it might work with the former but not the latter.
Yes, it does have a PS/2 port, and an external PS/2 keyboard has the same issue on FreeBSD, but not on Linux (testing through a Debian install USB then dropping to its text shell, since I don't have Linux installed on here anymore, though I have no reason to believe it wouldn't work on an installed system). USB keyboards work just fine both on Linux and FreeBSD. The keyboard is indeed the standard US layout, and my issue is at the FreeBSD login text prompt.
 
Back
Top