Bug 195683 - [geli] geli boot passphrase prompt skips keys when newcons enabled, usb keyboard
Summary: [geli] geli boot passphrase prompt skips keys when newcons enabled, usb keyboard
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 10.1-RELEASE
Hardware: amd64 Any
: --- Affects Only Me
Assignee: freebsd-geom (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-12-04 19:33 UTC by VK
Modified: 2015-08-31 08:52 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description VK freebsd_triage 2014-12-04 19:33:15 UTC
With newcons (vt(4)) enabled, the on-boot geli passphrase prompt is skipping keys, not every keystroke will register. The skipping is apparently random, sometimes one or two keys, sometimes a lot, doesn't depend on the speed of typing or length of keypress.

This happens regardless of hw.vga.textmode="1", and (as mentioned) with kern.vty=vt present, both in /boot/loader.conf.

Temporary workaround is to enable kern.geom.eli.visible_passphrase to see what you're typing. USB keyboard.
Comment 1 David O'Rourke 2015-01-06 23:00:59 UTC
I too am experiencing this issue. I'm happy to have found this bug since now I know I can disable newcons and regain my sanity.

I was experiencing it on a MacBook Pro from 2009, the keyboard of this MBP is attached to the USB bus. I would guess this means that all MacBooks since then are of a similar configuration.

I'm happy to test patches if any are made available.
Comment 2 David O'Rourke 2015-01-07 00:10:54 UTC
Disabling newcons does help the situation, however, the first password attempt is always broken, with key presses going missing.
Searching around, there are threads on the FreeBSD forum going back to 2009 reporting similar issues with USB keyboards and GELI passphrases at boot.
(eg. https://forums.freebsd.org/threads/problems-entering-geli-password-during-boot.1358/)

This issue seems to have existed for a long time.
Comment 3 VK freebsd_triage 2015-01-07 09:05:24 UTC
I don't know if it is the same issue but "evolved", or something different, but this is not the case of only the *first* attempt not working, at least in my case.

Also, it would appear that without newcons enabled, the first attempt actually now *works*. Maybe it's a statistical fluke that the few reboots I tried it just worked, maybe others can confirm?
Comment 4 VK freebsd_triage 2015-01-07 10:27:54 UTC
I just did 10 reboots with and without newcons, this doesn't seem to be a statistical fluke.

Without newcons the geli prompt ALWAYS works on first attempt. With newcons it almost always skips at least one key, regardless of the number of attempts. Input also "feels" a bit sluggish compared to without newcons.

Another observation, compared to FreeBSD 10.0, now the geli prompt is NOT buried in the output (eg. a keyboard device line would appear AFTER the prompt is shown, back in 10.0) on the same hardware, with or without newcons.
Comment 5 VK freebsd_triage 2015-08-31 08:52:20 UTC
This is effectively fixed in 10.2 when GELI bootmenu passphrase is enabled, so this report is now irrelevant.