This sounds weird, but when I started Qubes OS today, my USB devices didn’t work. The sys-usb just vanished … Qubes manager doesn’t show it, qvm-ls doesn’t list it, Auto Attach Settingsreport sys-usb is missing.
I had a dom0 update recently, so that’s my guess on what happened. Something must have gone wrong there.
Can anyone tell me, how to find out what happened and restore the sys-usb?
I will be providing a fix for this today. Your sys-usb probably fail during the startup procedure. You can recreated it with something like qubesctl state.apply qvm.sys-usb (untested), but if it fails on start, it will be deleted again until the fix lands on the repos.
Just logged in to report the same issue. I recovered by sudo cp /var/lib/qubes/backup/qubes-<latest>.xml /var/lib/qubes/backup/qubes.xml sudo mkdir /var/lib/qubes/appvms/sys-usb
But would love to hear how that might be problematic/what else I should do.
It is good to look at the store to see the sys-usb properties and features, for after you recreate the qube, but copying the old store might change other settings also.
My thinking was that since the backup was from the preceding shutdown and the failure was on boot, nothing substantial should have changed. Did I miss something?
I don’t know, the store is always backed up on every instance of self.app.save you find in the qubes module. Should be “okaysh” if you didn’t do changes between those things happening.
I have started my Qubes on Saturday and updated it afterward. Qubes is on since then and everything seems to work. Should I not turn it off until update or what? Never experienced the bug though.
Only named disposables will be deleted if it fails on the startup procedure, this could be for a variety of reasons, but as they don’t hold data, only qube configuration, you could store the output of this somewhere:
for qube in $(qvm-ls --raw-list --no-spinner --class DispVM --prefs=auto_cleanup=False); do echo $qube; qvm-prefs $qube; qvm-features $qube; qvm-tags $qube; printf '\n\n\n'; done
So you know how to revert to a known good state. Also another option is looking at the store.
I have no idea who you were responding to, but meanwhile I have restarted Qubes and had no issues. Everything is updated to the latest versions, even using testing repos…
I don’t know where else to put it, but it’s linked to the chosen answer. When I run the qubesctl command, it turns on disposable-preload in salt. For my own setup I turn it off.
My computer cannot preload disposables well, so it ends up killing them. This means creation and boot times for disposables gets longer and clunkier for me, and keeps messing with sys-usb. So whenever I turn Qubes on, the bug erases sys-usb, as it never succeeds to load. It wasn’t the case before the bug. Before it, it was one of the qubes that always loaded right when the system booted.
So now each time I turn on qubes I must always recreate sys-usb, and must suffer a needless dependency on preloading disposables in salt. I then must manually turn on sys-usb.
Why is the salt state for sys-usb depend on disposable-preload? I see no reason a named disposable, and a system named disposable at that, should depend on preloading unnamed disposables in salt policies.
Also, this sys-usb bug messes with qubes policies. When looking at Qubes OS Global Config, the USB Devices section writes “No USB qubes found.” This us even after I use the qubesctl command to recreate sys-usb. After I do that and close and open the config GUI a few times, only then does the system recognize the newly generated sys-usb.
Needless to say, I’m lucky my setup doesn’t need USB keyboard or mouse. For anyone who depends on either this bug is a stopper, especially if they’re like me and preloaded disposables creates more friction than is solves.