External keyboard not working at full disk encryption screen

Hi,

I have a laptop with qubes. All is working fine, qubes latest version.

I recently purchased an Onlykey and wanted to store my luks disk encryption password on it. Unfortunately the disk encryption input screen does not accept external keyboards! Onlykey shows up as an external keyboard to the laptop and it works just fine in qubes but it types nothing at the disk encryption screen.
Also tried with an external keyboard but same issue.

Is there a setting somewhere to enable usb keyboards at disk encryption screen?

Thanks

I’ve the same issue but I think it’s a feature, not a bug

I don’t really see why it isn’t allowed at the disk encryption screen. After logging into qubes you can set it to not allow usb keyboards without your explicit permission.

I think by default QubesOS does not allow USB connections, so rather than disallowing USB keyboards after logging in, you have to log in to allow them to connect from sys-usb to dom0.

However I could be wrong here

3 Likes

It is a security feature rather than a bug. Because it is trivial (and easy) to place an evil USB keyboard sniffing device between your USB-Keyboard and the USB-Controller and steal your disc encryption credentials.

New user here. Long time fan, first time caller

Is there a workaround that doesnt involve reflashing the entire OS?

Running a PC that only uses USB peripherals, I am altogether locked out of Qubes, unless I can configure the system to read my keyboard & unlock the disk

Edit: as per the docs, it seems I have built a system so secure that its intended administrator cannot access it. I will be reinstalling & attempting to properly configure USB qube from install

Edit2: this does not appear to be a straightforward config issue. It does appear related to this documented issue; despite configuring sys-usb & enabling ā€˜Automatically Accept USB Keyboard’ through the install wizard, USB keyboard is not recognized when the system is rebooted, once sys-usb qube is configured. I am unable to decrypt the drive & access the system. I will work through the more esoteric fixes & report findings here.

You can:

1 Like

Saw this mentioned here. Didn’t think it was applicable, as it’s detailed under the ā€˜manual config’ section, written as if to address users who could not automatically create the USB qube via install wizard

Regardless, this will be my next test, once OS is re-re-reinstalled

Update

The official documentation I linked earlier is outdated. The policy is no longer saved at /etc/qubes-rpc/policy/qubes.InputKeyboard. As per this discussion, it’s now stored at /etc/qubes/policy.d/50-config-input.policy

It ultimately made no difference, as this policy already enabled USB passthrough to dom0:
qubes.InputKeyboard * sys-usb dom0 allow

Likewise, the boot parameters at /etc/default/grub do not contain rd.qubes.hide_all_usb at all. It does contain the usbcore.authorized_default=0 flag introduced in 4.1, but I’m under the impression this should still work in 4.2.4 & should not interfere with my device

My new working theory is some kind of USB controller mismatch. I plan to down three beers and take another crack at it

They do in /boot/

Take a look at USBGuard (in dom0) and see what the logs are showing. It starts at boot and only allows input devices to work before the system is decrypted. If your keyboard is not recognized as an input device for some reason, USBGuard would not allow it, which would explain why you can’t use it.

Hi clammy

The policy won’t change much wrt. the disk encryption screen – since sys-usb isn’t started yet.

If you press e when you see the GRUB menu (at boot), you should be able to edit the options GRUB defines for the kernel. A few lines down, you should see rd.qubes.hide_all_usb – if you remove that option, you should be able to use a USB keyboard for the password for the disk encryption password.

Note that this is a temporal change - but it should allow you access to try and work out what should be different.

:slight_smile:

2 Likes

All, thanks for the help! Let nobody say the Qubes community isn’t welcoming to newcomers

Accessing boot parameters by @ChrisA 's direction, to my surprise, I did NOT find rd.qubes.hide_all_usb in the file… This did not seem to be the cause

However, for a test I did remove usbcore.authorized_default=0 - this resolved the issue, I could now unlock LUKS with my USB keyboard

This suggests to me that either A) my keyboard is not being read as an input device for some reason, or B) there is an issue with my USB controllers

At any rate, this issue is resolved - I can log into Qubes. I hope this report helps some future traveller. Thanks again!

1 Like