No Mouse/Keyboard Access At Login Screen

Finally managed to lock myself out of Qubes.

Decided to add a second monitor. I use a KVM switch to switch between my PC and a work laptop. The second monitor is connected directly to the PC for the time being. After connecting the second monitor, I had trouble booting into Qubes at all; probably because I disconnected the power temporarily (always have boot problems after disconnecting/reconnecting). Finally figured out it was because Secure Boot was somehow re-enabled. I can now get to the login screen, but I lose keyboard and mouse access; which I had set dom0 to automatically allow. I have disk encryption enabled and I have no problem using the keyboard there, so I’m assuming dom0 revoked those permissions, but I’m stumped on why.

You can try to boot with USB qube disabled to fix your problems in dom0:

Okay, so that got me in. I checked:

/etc/qubes-rpc/policy/qubes.InputMouse

which read

sys-usb dom0 allow
sys-usb dom0 ask,default_target=dom0
$anyvm $anyvm deny

AND

/etc/qubes-rpc/policy/qubes.InputKeyboard

which read

sys-usb dom0 allow, user=root
$anyvm $anyvm deny

I removed the $anyvm $anyvm deny, , user=root, and sys-usb dom0 ask,default_target=dom0 lines as I never added them. This did not help as I still lose keyboard/mouse access at login without the GRUB edit.

One thing I did notice however is that none of the SYS vms autostart once I make it in. Is that due to the GRUB edit?

Repeat the step you run before, and after login run this qubesctl state.sls qvm.usb-keyboard

Didn’t work.

Only changes were that usbcore.authorized_default=0 was added to the end of the line specified in the GRUB edit file and the keyboard/mouse policy files were screwed up again.

(EDIT) IOMMU became disabled. That was the problem. Figured it out by trying to start sys-usb from the terminal. How that happened I don’t know. I just attached a freaking monitor.