Cannot use keyboard in qube

Hi,

I have a problem with keyboard. I’ve created new standalone machine based on Debian and when I attach keyboard to it, I can use it. But when I attach keyboard in the same way to other qubes, created by me from my template or even default disposable ones, I can attach but I cannot use them (I can’t type and I still need to use keyboard built in my laptop).

I have two keyboards, one USB and one PS/2 that I attach to USB via adapter (which, surprisingly, is called 13ba_Barcode_Reader) because my laptop doesn’t have PS/2 ports.

Any help appreciated.

Thank you

Please read this: USB Qubes | Qubes OS

You probably already have a USB qube, so the simply issuing

sudo qubesctl state.sls qvm.usb-keyboard

in dom0 should do the trick. But again, read the whole page, try to
understand it and the security implications and ask here for clarification.

Cheers,
/Sven

1 Like

Thanks! I’ve decided to execute this one:

sys-usb dom0 ask,default_target=dom0

because I don’t want to enable keyboard during boot. And I understand that I shouldn’t have any USB devices connected to my machine when I input LUKS passphrase.

Is it good idea to do the same but with mouse, i.e. the same line added but to qubes.InputMouse? I have PS/2 keyboard & mouse and one PS/2 to USB adapter to which I can plug both keyboard and mouse.

Do you have any idea why it is recognized as barcode reader (13ba_Barcode_Reader) rather than adapter?

And by the way, is there any way to automatically disable external keyboard when the screen is locked? Would it improve security?

1 Like

sys-usb dom0 ask,default_target=dom0

That’s what I do.

Is it good idea to do the same but with mouse,

I have that on ‘ask’ too.

i.e. the same line added but to qubes.InputMouse?

Yep.

I have PS/2 keyboard & mouse and one PS/2 to USB adapter to which I
can plug both keyboard and mouse.

Well the policy will capture all the things plugged in via USB. So if
you have a laptop and the build in keyboard and mouse show up as PS/2
they won’t be affected (just work). But the PS/2 to USB stuff will be.

Do you have any idea why it is recognized as barcode reader
(13ba_Barcode_Reader) rather than adapter?

I doubt that is your keyboard. Do you have a USB RFID Card Reader? When
I search for “13ba_Barcode_Reader” I get this:

https://www.aliexpress.com/i/32983005201.html

And by the way, is there any way to automatically disable external
keyboard when the screen is locked?

I don’t see a way to disable just the keyboard, but of course you could
shutdown your entire sys-usb when the screen locks and restart it when
the screen gets unlocked. Check out the --watch parameter of
xscreensaver. The BLANK and UNBLANK events.

https://www.jwz.org/xscreensaver/man3.html

Would it improve security?

I think so. I’ve put this on my todo list. The only problem I see is
that doing this would also disrupt a backup to an external USB drive.
Gotta think about it a bit more, but I like the idea.