# Using a USB keyboard for installation



## Quixadhal (Dec 13, 2015)

So, I have this old Dell Dimension 8250 (2.4GHz P4, 768M RAM) that I wanted to install FreeBSD 10.2 on to see how well it might work as a desktop.  I got the thing setup and put my old USB keyboard and mouse on it (Logitech G510).

I enabled USB emulation in the BIOS, figuring it would be needed for the USB keyboard to work prior to having the system fully booted.  No issues there.  It works fine in the BIOS, and it works fine at the boot loader.  However, once the kernel boots, it stop working, making installation impossible.

So, I rebooted and disabled that option in the BIOS.  This time, the keyboard works in the BIOS itself, but not at the boot loader (as expected).  However, after the kernel boots, it *STILL* doesn't work, again making installation impossible.

While I could probably poke around my basement and find some antique PS2 keyboard, I'd really prefer to find a way to have USB work properly for this.  I don't like using software which requires me to swap hardware when I want to reinstall or upgrade things, because at some point down the road, I may not have the "alternate, install only" hardware bits anymore.

Are there any boot parameters I can enter (with USB emulation enabled) at the boot loader screen to try and force it to recognize the USB keyboard?  I could at least write that on the computer's case with a sharpie. 

Thanks for reading guys.


----------



## Juha Nurmela (Dec 13, 2015)

Have you tried unplugging and replugging the keyboard? Sorry, if you have 

`usbconfig` and `tail /var/log/messages` should show that keyboard was recognized by kernel and devd(8).

Installation. I'm an idiot

Juha


----------



## Quixadhal (Dec 18, 2015)

Yeah, it seems that FreeBSD requires, and continues to require, an old PS2 keyboard to perform a fresh install on at least some hardware.  I wish there were some option to allow the kernel to try to find a USB keyboard *FIRST*, so it would be enumerated as the console keyboard before the PS2 port (which may or may not have a working keyboard attached).  Looking through previous postings on the topic, this has been an issue since 2011 (at least), and the "answer" seems to always be... go find an old PS2 keyboard.

This works for me, for now.  I can almost guarantee the next time I end up moving, it will be unlikely I'll remember that I need to keep at least one old keyboard for this purpose, and new keyboards don't even come with a PS2 connector anymore.  They've gone the way of the floppy disk, and IDE drives.  *chuckle*


----------



## Juha Nurmela (Dec 19, 2015)

Have you tried `set hint.atkbdc.0.disabled="1"` in loader prompt? I don't have USB clavier at the moment to try it myself.

Juha


----------



## UnixRocks (Dec 25, 2015)

FWIW, I have installed FreeBSD 10.2-RELEASE at work on systems that only have USB attached keyboards and no PS/2 ports available. Including two Intel NUCs. All I can say is it worked for me with zero tweaking of BIOS or any loader prompt changes. If I _had_ needed a PS/2 keyboard on a system with a PS/2 port I would have tried my PS/2 <> USB adapter before trying to hunt down a keyboard with a PS/2 connector.

That said, I did notice that on my new-ish corporate desktop PC with UEFI I just built that the FreeBSD 10.2 UEFI boot loader command line, available before the kernel boots, does *not* like my USB attached keyboard. If I try to type "?" to get help, pressing Shift+? inserts "M?" and gives an error that the command was not found. I intend to look for a bug report about that after I get back to work next week.


----------



## leebrown66 (Dec 25, 2015)

Quixadhal said:


> on at least some hardware


I think that's the key here.  
I too recently installed 10.1-RELENG on a dell 1850 which is almost 10 years old.  I didn't plug in the USB keyboard until after the boot loader prompt was up and it worked OK.  
Booting off a USB stick, while possible, requires some jiggery-pokery to get right though.


----------



## UnixRocks (Dec 26, 2015)

Heh, yes I got that "... on at least some hardware ..." was the point. *My* point was suggesting to acquire a PS/2 <> USB keyboard adapter. Like this one for example: http://www.newegg.com/Product/Product.aspx?Item=9SIA6J32665993


----------



## leebrown66 (Dec 26, 2015)

UnixRocks said:


> Heh, yes I got that "... on at least some hardware ..." was the point. *My* point was suggesting to acquire a PS/2 <> USB keyboard adapter.


I guess it's a bit sad to admit I have enough PS/2 keyboards, I've got the other gender of adapter and often struggle to find a USB keyboard.  Nice tagline BTW "systemd..." that made my day, thanks


----------



## Atsuri (Dec 31, 2015)

I am a bit surprised by problems with USB keyboards . I am also rocking FreeBSD 10.2 (STABLE) on a custom box with Core 2 Duo E6850 and until recently I have been using an HP USB keyboard. I switched to an old IBM PS/2 keyboard, because I like its feel much better. Both work perfectly fine and to my surprise FreeBSD was able to recognize the keyboard even after finishing all of the boot procedures.

I am suspecting some sort of random configuration error somewhere. Mind setting USB emulation to 'OFF' and trying again?


----------



## leebrown66 (Dec 31, 2015)

I do have one system on which USB is just plain flakey.  It'll boot fine, but after I launch Xfce4, both keyboard and mouse randomly just don't work and it requires flicking the power button to cleanly shutdown).  I've always suspected it's a dell weirdism because I cannot use an external SATA dock unless I plug in a 1->4 port USB multiplier before it.  As it's the only machine I've experienced this on (and it's my workstation), I just wrote it off to weird dell hardware (Precision T3400).

It is a custom kernel, but it's the same custom kernel my servers run which don't experience any issues.


----------



## Atsuri (Jan 1, 2016)

leebrown66 said:


> I do have one system on which USB is just plain flakey.  It'll boot fine, but after I launch Xfce4, both keyboard and mouse randomly just don't work and it requires flicking the power button to cleanly shutdown).(...)



To me this sounds like a possible X11 misconfiguration, since everything works directly after booting and messes up once you launch Xfce4 as you said . It could also be a weird behavior of Dell hardware, who knows..


----------



## leebrown66 (Jan 2, 2016)

Atsuri said:


> To me this sounds like a possible X11 misconfiguration, since everything works directly after booting and messes up once you launch Xfce4 as you said . It could also be a weird behavior of Dell hardware, who knows..


Unfortunately it's not that easy.  The dock doesn't work regardless of X11 involvement, however it does work fine on other hardware.  I have not had to touch the X11 config at all and if the mouse/kbd do work (which is about 80% of the time), I just don't power down my workstation!


----------



## ExtraTemp (Jun 20, 2020)

This still doesn't work


----------

