# Keyboard Not Working



## misfitxnet (May 21, 2009)

Hello
I have a newly installed FreeBSD on my external HD.
When I boot up, I can key through the Boot Loader, and the prompt to launch FreeBSD and then the prompt to boot in Default mode. FreeBSD boots fine, but when I get to the login prompt I cannot login because there is no reponse from the keyboard.


----------



## MG (May 21, 2009)

What sort of keyboard do you have?
Is it compiled in your kernel?


----------



## misfitxnet (May 21, 2009)

It is a USB Dell keyboard, with USB working in the kernal


----------



## MG (May 21, 2009)

Your kernel might need usb, uhci, ehci and ukbd for an  USB-keyboard.
Since your keyboard is not working after startup the only thing you can do is load/unload kernel modules from the bootloader prompt.
maybe there's a problem with acpi or some other device. try unload some modules if possible.


----------



## SirDice (May 22, 2009)

Try to play with the "Legacy USB" (or something similar) settings in the BIOS. Most BIOSs have a setting that allow a non-usb OS to use a USB keyboard. 

My logitech G15 works in the bootloader but not in the menu so I can't boot to single usermode with it. But once fbsd is fully loaded I can use it. Haven't figured that one out yet.


----------



## narcolepsy (Dec 17, 2009)

I'm having some problems with this too at the moment, i thought by enabling legacy mode in my BIOS everything was fine, but I couldnt boot from a USB drive because of this. Now that I have legacy mode switched off I cannot get my mouse/keyboard working in the console, and the USB mouse looks like it has no power (no light on the bottom)

If anyone has any tips/tricks to get round this they would be muchly appreciated.

Cheers


----------



## maulana23 (Aug 6, 2010)

i'm also experiencing the same problem,..

the different is whenever i have put 
	
	



```
apache22_enable="YES"
```
 in the rc.conf, which means it's trying to start the apache server (although it failed to start), and once it stopped to authenticate the users on the GDM screen, my keyboard seems to fail. However when I comment out the 
	
	



```
apache22_enable="YES"
```
 my keyboard is okay.

i'm using freebsd version 8, lenovo T61 laptop and onboard keyboard.

please assist me, i'm still new to freebsd environment.

thank you.


----------



## ssssantossss (Dec 24, 2010)

Does somebody know how to resolve this issue? I have the same problem in a Dell server. The USB keyboard is Dell too (I don't think that this is relevant, but anything that helps is OK).

I can't login directly in the server, but I can do it in remote with SSH. The problem is that I need to do some maintenance work and I need direct access...

By the way, the FreeBSD version is 7.0. I could assure that in the begining the keyboard was working fine, I don't know what happen in the meantime til now...


----------



## wblock@ (Dec 24, 2010)

Sometimes a USB keyboard not working is due to "USB Legacy Support" being enabled in the BIOS.  Otherwise, try keeping the keyboard disconnected until after the system has finished booting.


----------



## alexmerritt (Jan 9, 2011)

I've had my keyboard stop working at random times, too. Random chance, I noticed that the PrintScreen button on my keyboard switched from ttyy8 to tty1, iterating all the way through to ttys8 again each time I hit it. But once I hit it the first time, the keyboard started working again.

I have FreeBSD 8.1 RELEASE and use a Microsoft Natural Keyboard Elite, which has a PS/2 connector (I attached it to my computer using a PS/2 to USB adapter). I am pretty sure I have the legacy USB thing enabled in the BIOS.


----------



## alexmerritt (Jan 9, 2011)

I forgot to add (if this helps anything):


```
[root@spock ~]# kbdcontrol -i
kbdcontrol: unable to obtain keyboard information: Inappropriate ioctl for device
[root@spock ~]# kbdcontrol -d
kbdcontrol: getting keymap: Inappropriate ioctl for device
[root@spock ~]# ls /dev
acd0		devctl		mixer0		ttyv6
acpi		devstat		mixer1		ttyv7
ad10		dgdb		mixer2		ttyv8
ad12		dsp0.0		nfslock		ttyv9
ad14		dsp1.0		null		ttyva
ad4		dsp2.0		nvidia0		ttyvb
ad4s1		fd		nvidiactl	ttyvc
ad4s1a		fido		pci		ttyvd
ad4s1b		fw0		ppi0		ttyve
ad4s1d		fw0.0		ptmx		ttyvf
ad4s1e		fwmem0		pts		ufsid
ad4s1f		fwmem0.0	random		ugen0.1
ad6		geom.ctl	sndstat		ugen0.2
ad8		io		stderr		ugen0.3
ata		kbd0		stdin		ugen1.1
atkbd0		kbd1		stdout		ugen1.2
audit		kbd2		sysmouse	ukbd0
bpf		kbdmux0		ttyu0		ums0
bpf0		klog		ttyu0.init	urandom
console		kmem		ttyu0.lock	usb
consolectl	log		ttyv0		usbctl
ctty		lpt0		ttyv1		xpt0
cuau0		lpt0.ctl	ttyv2		zero
cuau0.init	mdctl		ttyv3		zfs
cuau0.lock	mem		ttyv4
dcons		midistat	ttyv5
```

Both before and after hitting the print screen button kbdcontrol showed the same message.


----------



## ssssantossss (Jan 9, 2011)

well, to fix this we have to "recompile" the kernel. The driver was the problem.


----------



## oobayly (Jan 28, 2011)

I had this problem on a server with an Intel S5500BC motherboard. Basically, the BIOS provided a virtual USB keyboard which was detected as /dev/ukbd0

Similar to other users, the keyboard worked until the login prompt was displayed, it took me a while to realise (far longer than it should have) that there were two ukbd devices, as the USB keybaord was always called ukbd1.

After a quick Google, I came across devd.conf, and had a quick look, and was about to add my own rule when I thought to search for keyboard and found the existing attach rule. The default is to match ukbd0, and use that, so I've modified mine

/etc/devd.conf

```
# When a USB keyboard arrives, attach it as the console keyboard.
# This is modified as the BIOS provides ukbd0
attach 100 {
        device-name "ukbd1";
        action "/etc/rc.d/syscons setkeyboard /dev/ukbd1";
};
detach 100 {
        device-name "ukbd1";
        action "/etc/rc.d/syscons setkeyboard /dev/ukbd0";
};
```

As I've removed the atkbd drivers, I tell it to default to the virtual keyboard. Obviously I could have rebooted and disabled the virtual keyboard in the BIOS, but I like my uptime & besides I learnt something today.


----------



## YuryG (Aug 25, 2020)

SirDice said:


> Try to play with the "Legacy USB" (or something similar) settings in the BIOS. Most BIOSs have a setting that allow a non-usb OS to use a USB keyboard.p
> 
> My logitech G15 works in the bootloader but not in the menu so I can't boot to single usermode with it. But once fbsd is fully loaded I can use it. Haven't figured that one out yet.


I have this problem now. USB keyboard do not work in FreeBSD bootloader, but works in BIOS and after boot. Any resolution?
I cannot even bootup, since it stalls during OS choice menu.
UPD. Occurs I have to turn Legacy USB support ON in BIOS for loader to understand USB keyboard. What a strange behaviour.


----------



## SirDice (Aug 25, 2020)

YuryG said:


> Any resolution?


I posted that 11 years ago. Have replaced the keyboard several times after that. Also replaced that machine, both keyboard and machine are probably in some landfill now.


----------



## YuryG (Aug 25, 2020)

SirDice said:


> I posted that 11 years ago. Have replaced the keyboard several times after that. Never had a problem with the newer keyboards.


Yes, I saw the dates. Not found more recent posts on the topic. My FreeBSD Boot Loader dated approximately the same time as the post.
All the time used PS/2 keyboard, but in 12 (or  due to its age) it started to hang unresponsive during work. So, had to plug the new USB one, and came to the problem with bootloader.


----------



## SirDice (Aug 25, 2020)

It's usually the BIOS that's at fault here. Especially with these older machines. I have since bought an USB keyboard that has a PS/2 converter, so I can use it with PS/2 directly. Specifically for situations like this. Not all keyboards are able to do this though.

It's this one, if you're interested: https://www.coolermaster.com/catalog/peripheral/keyboards/quick-fire-rapid/


----------

