qubes-issues
qubes-issues copied to clipboard
qubes-dist-upgrade cannot be completed if all VMs shut down and USB keyboard in use
Qubes OS release
4.1
Brief summary
I guess this is a user error, but if I have a USB VM, I choose to shut down all VMs when prompted, and I have a USB keyboard, and I don't pass -y, qubes-dist-upgrade can't complete, because it waits for me to press y but I can't because the USB VM has shut down.
Steps to reproduce
- qubes-dist-upgrade -t -k
- qubes-dist-upgrade -r -k
- qubes-dist-upgrade -s -k
Expected behavior
Should get warning about USB keyboards and USB VMs before asking if I want to shut down all VMs. Or maybe USB VM should be excluded/excludable.
Actual behavior
No warning message
Tasks
- [ ] Change
--keep-runninghandling to exclude listed VMs from shutting down in all stages - currently it doesn't work in stage 3 - [ ] Automatically collect VMs used for input devices (see comment below), inform the user about that, and add an option to disable this feature
- [ ] While at it, fix qubes and fedora version in help message
There is a --keep-running option, but I don't think it applies to all stages. But also, checking for USB keyboard and showing a warning (if not excluding USB VM(s) automatically) makes much sense.
Checking if USB keyboard (or mouse) is used can be done by looking at xinput command - devices from sys-usb will have sys-usb: prefix. In fact, a better option would be to look at all xinput devices with some colon-separated prefix and consider those VMs (if such prefix matches any existing VM) to be automatically excluded. Device connected via USB VM cannot fake this prefix, and device connected to dom0 directly is unlikely to match any existing VM (and even if it does, the impact would be minimal).
Checking if USB keyboard (or mouse) is used can be done by looking at
xinputcommand - devices from sys-usb will havesys-usb:prefix. In fact, a better option would be to look at all xinput devices with some colon-separated prefix and consider those VMs (if such prefix matches any existing VM) to be automatically excluded. Device connected via USB VM cannot fake this prefix, and device connected to dom0 directly is unlikely to match any existing VM (and even if it does, the impact would be minimal).
It looks like we don't have xinput available by default on R4.2 so we might need to take care of that on the next iteration of the tool for 4.2 -> 4.3.
It looks like we don't have
xinputavailable by default on R4.2 so we might need to take care of that on the next iteration of the tool for 4.2 -> 4.3.
Add it as a dependency for the qubes-dist-upgrade package?
It looks like we don't have
xinputavailable by default on R4.2 so we might need to take care of that on the next iteration of the tool for 4.2 -> 4.3.Add it as a dependency for the qubes-dist-upgrade package?
There is libinput binary that is already present in dom0 and it can be used instead of xinput:
libinput list-devices
Automated announcement from builder-github
The component dist-upgrade (including package qubes-dist-upgrade-4.1.6-1.fc32) has been pushed to the r4.1 testing repository for dom0.
To test this update, please install it with the following command:
sudo qubes-dom0-update --enablerepo=qubes-dom0-current-testing
Automated announcement from builder-github
The component dist-upgrade (including package qubes-dist-upgrade-4.1.6-1.fc32) has been pushed to the r4.1 stable repository for dom0.
To install this update, please use the standard update command:
sudo qubes-dom0-update
Or update dom0 via Qubes Manager.