Keyboard not responding at login box (since yesterday)

Dear community

I am running Qubes 4.3.0 and update all Qubes daily.

I just tried to start Qubes, entered my passphrase and discovered that after booting the keyboard is not functional. The cursor blinks for a few seconds in the password field and then becomes static. I cannot enter anything at all.

I have no idea what changed. The last thing I did yesterday was watching a movie in a Qube and then clicked on “shut down Qubes”.

I restarted multiple times and connected the keyboard plug to different USB ports, without success. I had only freshly installed Qubes OS like 2 weeks ago.

I had used the standard installation and only unchecked “create personal, vault, …” during the final setup. Everything else was unchanged.

I am neither a Linux nor a Qubes expert. I find it strange that the keyboard works when entering the passphrase but is then not available when I want to enter my user password field.

:frowning:

Hello,
I encountered the same issue. What I did to fix it was based on here.
https://doc.qubes-os.org/en/latest/user/advanced-topics/usb-qubes.html

Following subsection called “Manual setup for USB keyboards,” I created the new file /etc/qubes-rpc/policy/qubes.InputKeyboard and wrote what the documentation says to, namely ‘sys-usb dom0 allow’. Then I rebooted and it worked.

Note the part in the docs about what you don’t want to do since it will disable USB keyboard for the lockscreen. That was not in my config file, in fact my config file for InputKeyboard did not exist. So I’m not sure why it stopped working (similar to you, it was working before, and then stopped for no apparent reason).

I hope this helps.

1 Like

I forgot to mention but maybe you know already, according to:
https://doc.qubes-os.org/en/latest/user/troubleshooting/autostart-troubleshooting.html,
you can add qubes.skip_autostart to GRUB command line in order to use keyboard temporarily to fix this.

I have an issue after updating to 4.3 that sounds similar, but might not have the same cause.

Since 4.3, I have no problem using the keyboard to decrypt the drive, but when the login screen comes up not the keyboard, or mouse are working.
After waiting for over a minute or two it all starts working again.

@linuxfan Can you use the keyboard for the decryption password? Did you wait for a minute, or two at the login screen to see if the keyboard comes back?

I think for some reason the sys-usb is last one to boot up in the chain. I’m not sure how to deal with that.

@Privacc

I have looked around, and it seems indeed that is caused by sys-usb being slow to boot. I believe it is simply because there are many other qubes all being started at once.

Two things I can think of to fix this:

First, you can disable auto start of other qubes such as networking and firewall, and then launch those qubes once you log into your desktop, either manually or by a script.

Second you can try configuring the systemd service that starts the USB qube (qubes-vm@sys-usb.service) to run before any of the other qubes. I have not tried this but I think it should work.

I’m trying to configuring the systemd service and I created /etc/systemd/system/qubes-vm@sys-usb.service.d/10-sys-usb-noot.conf,

[Unit]
Before=qubes-vm@.service
Before=qubes-start.service
Before=multi-user.target

However, the Before=qubes-vm@.service dependency is dropped for some reason.
Now in the login screen, the laptop keyboard and mouse pad work, but not the external peripherals, which i actually use to enter the credentials.

Some progress, but not a solution.

Having same issue on my workstation…very peculliar…tought is a bug or a crash, powered of,power on.
Encryption works but login, nope…
Help ??

Can you share some more info?

Like, did this happen during normal use, or after an update, or maybe you were setting up sys-gui( -gpu ).
Are you just not able to use the keyboard, or mouse, or both? do external ones work?
Have you waited for at least a couple of minutes on the login screen to check if the keyboard starts working (like in my case)?

Press ESC after you unlock the drive to check for error messages.

@Privacc
Since you say that now the laptop builtin keyboard works, I assume the builtin keyboard is a USB keyboard, but that you also have an external USB keyboard? If correct, it could be the keyboards are connected via different USB interfaces, so what you could do is to allow the second interface to connect to dom0. See:
https://doc.qubes-os.org/en/latest/user/advanced-topics/usb-qubes.html#qubes-4-1-how-to-enable-a-usb-keyboard-on-a-separate-usb-controller

  1. Find the controller used for input devices.
  2. Open the file /etc/default/grub in dom0.
  3. Find the line that begins with GRUB_CMDLINE_LINUX.
  4. Add usbcore.authorized_default=0 and rd.qubes.dom0_usb=<BDF> to that line, where <BDF> is the USB controller identifier.
  5. Save and close the file.
  6. Run the command grub2-mkconfig -o /boot/grub2/grub.cfg
  7. Reboot.
  8. Proceed with creating a USB qube normally. The selected USB controller will remain in dom0.

This should work even though you have already created a USB qube. No need to make another one.

Please note, to my understanding this will pass the raw USB controller straight into dom0, which I personally would not do. So maybe there is a better way to do this? Perhaps try checking your “Qubes OS Global Config” and see if USB keyboard is even enabled? (Although if the builtin keyboard is USB then it should already be(?))

Side thought, I realize creating multiple sys-usb qubes may be possible, and may even be desired. One USB qube is more “trusted” than the others and only has the USB interface that the keyboard is plugged in to, while the other USB qube has the different USB interfaces which are used for more dangerous things like flash drives etc. This way a flash drive cannot compromise the qube used for the keyboard. Futhermore there is low risk of a bug or a user mistake enabling a flash drive to be passed through to dom0, as the keyboard qube is the only qube that can pass through to dom0, and the qube used for the flash drive would never be used to pass anything through to dom0. (This is only speculation, I am not truly certain it would work, nor am I certain I understand it correctly, but at least partially.)

Ok.sorry for delay.

PC starts fine.
Entering the encryption password fine
Once im been prompted to enter login,keyboard lost…i have caps,num lock active, on/off.Mouse moves ok.

Pressed ESC,lots of log lines,all green ,no errors or red lines.

Cant recreate usb as i have no access to dom0.

Left it running for longer,hoping USB will restart.

Help,appreciated… :frowning:

Sorry for the late response.

Yes, I have an external USB keyboard and USB keyboard is enabled in Global Config.
The laptop keyboard works because is on a PCI. After entering the decryption password, the keyboard is passed from dom0 to sys-usb. Because sys-usb takes so long to boot, the keyboards isn’t available until it starts up.
It takes too long to attach those damn PCIs on the qube!

Your solution should work, I didn’t try it, but then I’m keeping the keyboard in dom0, not sys-usb. It seems more like a workaround, than a solution and it’s a security risk. Plus I have a configuration to switch keyboard languages that’d break if i do that.
Creating a second sys-usb, seems like extra overhead, that might also be delayed at startup.

So I just live with it now and wait an extra 40sec at the login screen.
Never had that problem before, I’m not sure why it’s happening with 4.3. Maybe the Qubes loading screen should extend until all qubes boot up and not just drop you on the login screen prematurely.

I’m assuming that waiting for a couple of minutes didn’t work.

Like I mentioned above, after you enter the decryption password the keyboard is passed to sys-usb. If your sys-usb has a problem, then you don’t have a keyboard.

I think @username2 's solution might work temporarily for you.
If you are not on a laptop (build-in keyboard should still work), you can do an one time edit to the grub to not autostart your qubes on that bootup.
Which means sys-usb is not going to take keyboard from dom0 and you’ll be able to login and fix sys-usb.

Press e when the grub screen shows up on boot (cmd line windows with white frame). This will allow you to change boot parameters (for that boot only, everything is reverted back on the next boot).
I’m not sure about the command, but look it up and type in the grub.
Sorry, can’t remember the details, but a little research will get you there.

Hope this helps.

Ok.
I followed the E command line instructions,added the extra line.
Ive managed to get keyboard working and i am login succesfully.

In the GlobalConfig,i have no USB as all are not found error state.

If i restart,ill lose the keyboard,i guess.

LE
Ive started the USB qube.
It took a while…lost keyboard,lost mouse.
Then,lots of warning top right…
Got keyboard and mouse back

Went in the Global Config and…keyboard was…disabled !! Setup on “enable” and restarting now…
Arghhh

Sounds like progress to me… I guess USB wasn’t activated in Global Config then.
Now USB should be booting up and you should have keyboard access on the login screen.
Although, you might have the same issue as I do and have to wait a minute or two at the login screen for sys-usb to boot up.

1 Like