usb keyboard dying at loader prompt

Peter Wemm peter at wemm.org
Tue Nov 11 10:55:47 PST 2008


On Tue, Nov 11, 2008 at 5:14 AM, Andriy Gapon <avg at icyb.net.ua> wrote:
> on 08/11/2008 14:31 Volker said the following:
>> Andriy,
>>
>> On 12/23/-58 20:59, Andriy Gapon wrote:
>>> I have a quite strange problem.
>>> This is with 7-BETA amd64.
>>
>> Did it work with earlier versions?
>
> Can't say, this is a new machine, FreeBSD took its virginity :-)
>
>>> All of USB is out of kernel and is loaded via modules.
>>> BIOS has "Legacy USB" enabled.
>>> I have only a USB keyboard, no PS/2 port.
>>
>> Can you check BIOS settings for EHCI handover?
>
> No such settings.
>
>> If the BIOS does not have handover enabled, it may disable legacy
>> support after a timeout, which is often bad. IMO this is the same with
>> booting off USB drives but every BIOS handles that different.
>
> This doesn't seem to be the case. The behavior is quite random,
> sometimes I can work at loader prompt for may minutes, sometimes
> keyboard is dead after a few seconds.
> Also, I think USB keyboard is handled by UHCI, not EHCI in my case, but
> I am not sure if this matters. My guess is that Legacy support should
> work until OS explicitly takes over by using special procedure (this
> should be done for UHCI as well).
>
> BTW, it seems that our UHCI take-over code is far more simple than what
> MS described here:
> http://www.microsoft.com/whdc/archive/usbhost.mspx#EQHAC
>
> Anyway, this happens after loader is done.
>
>>> The keyboard works file in BIOS and for selecting boot device in boot0
>>> menu. It also works in loader menu. If in the menu I select to go to
>>> loader prompt then it works for about 5 seconds and then "dies" - no
>>> reaction to key presses, no led change, nothing.
>>> I haven't actually verified if the keyboard would still work if I stayed
>>> in loader menu for longer than ~10 seconds.
>>>
>>> This doesn't happen if USB is built into kernel.
>>
>> That sound strange. I have no idea why that might work (or I'm totally
>> wrong with my handover theory).
>
> I was incorrect about the above, I have already seen it happening both ways.
>
>>> Weird...
>>
>> Yes, sounds like or it's probably easily explainable ;)
>
>
> --
> Andriy Gapon
> _______________________________________________
> freebsd-stable at freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-stable
> To unsubscribe, send any mail to "freebsd-stable-unsubscribe at freebsd.org"
>


Some bioses have a list of MBR partition id's and use that to
determine what to do with the USB keyboard.  One of my ol older amd64
motherboards worked but would always disable the usb keyboard right as
loader started.  I discovered the following:
* If I put the freebsd bootblocks and loader on a floppy drive (no
MBR), then the bios did not turn off the keyboard.  It always
continued to work for loader.
* If i hacked the boot bootblocks and loader and kernel to recognize
different MBR slice id nubmers as "ours", then changing the freebsd
MBR to be "msdos" or "linux" also worked for that BIOS.  It would no
longer turn off the USB keyboard.  I don't recall which Id number I
used instead of 165 - it was about 4 years ago.
* There were other consequences of using the partition ID hack - I
think I remember it turning off the apic for msdos mode.

Your problems may be different, but mine were caused by a BIOS
whitelist of MBR partition id's.  What a stupid problem.  On that
motherboard I ended up taking the path of least resistance and using
the PS/2 adapter plug on the keyboard.
-- 
Peter Wemm - peter at wemm.org; peter at FreeBSD.org; peter at yahoo-inc.com; KI6FJV
"All of this is for nothing if we don't go to the stars" - JMS/B5
"If Java had true garbage collection, most programs would delete
themselves upon execution." -- Robert Sewell


More information about the freebsd-stable mailing list