hello, i am hoping for some help with a bizarre situation i am having difficulty troubleshooting on my own.
I have a PC with no PS inputs, only USB, so i use a usb keyboard with a sys-usb qube that autostarts on boot.
Today i was locked out of my system because my USB keyboard stopped working at the qubes login screen (after typing in disk encryption password). I press keys but nothing happens. The typing cursor also appeared to be frozen (it doesn’t blink once per second like usual). This started happening following a system crash which occurred because i connected my graphics card device to a qube, not understanding this would cause my OS to crash. The qube i connected the graphics card to is NOT autostart.
I followed this guide by adding qubes.skip_autostart to my grub boot options. This allows my keyboard to work for inputting the login password, but the keyboard stops working after login.
I also heard i should try disabling USB hiding by removing rd.qubes.hide_all_usb from grub options, but i did not find this option in my grub editing view.
One more thing. After logging in (with qubes.skip_autostart), i have a cron script i wrote which attempts to start sys-usb if it isnt already started, once per minute. I wrote this a while ago as a safety in case sys-usb crashes. Whenever this cron runs, i see an error message notification pop up:
Qube sys-usb has failed to start: logical volume “vm-sys-usb-private-snap” already exists in volume group “qubes_dom0”
I would ideally like to be able to avoid having to do a fresh install as i would lose work made since my last backup. Is there any way to salvage this installation?
I guess this causes your keyboard to stop working after logging in.
Try to mask the cron service so it won’t stat your script by adding this kernel command line argument in grub:
I have a different problem then. The cronjob isnt an actual cronjob. It is a userspace systemd service running in dom0. So i guess i could use the same tactic to mask it, but i don’t remember the name of the systemd service. I think it was something like “sys_usb_ensure.service” but i don’t remember for certain.
Is there a way to disable all user level systemd services in grub?
Partial success! I now have keyboard access once more. I’m trying to delete the vm-sys-usb-private-snap volume so sys-usb can start again, but i get these errors.
$ sudo lvremove /dev/qubes_dom0/vm-sys-usb-private-snap
Can't create snapshot vm-workspace-private-snap as vm-workspace-private is not suspended
Failed to suspend qubes_dom0/vm-pool with queued messages
Failed to update pool qubes_dom0/vm-pool.
I suspect this may be because i need to run this command on a live rescue OS rather than running it on qubes. Will try that next
That did the trick. I guess qubes didnt like me trying to delete a volume it thought was in active use.
Here’s the whole fix procedure:
on a separate computer, burn a debian installation image to a USB drive
on the affected PC, reboot and use BIOS to boot from the USB drive
open “rescue mode” on the live USB installer
decrypt the qubes encrypted partition with LUKS (the debian rescue image prompted me automatically to do this)
run sudo lvremove /dev/qubes_dom0/vm-sys-usb-private-snap
reboot
In theory i didn’t even need to do the qubes.skip_autostart or muck with systemd at all, as removing this logical volume is what allowed the sys-usb qube to finally start.
Seems like this is something that qubes should be able to handle automatically on boot, no?