-
Notifications
You must be signed in to change notification settings - Fork 30
core3ext: reattach assigned USB devices on resume from suspend #51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
5e0bc9b to
9890f83
Compare
|
Ignore my original change, I'd incorrectly written this to use |
|
Shouldn't this take some lock or something to avoid parallel double-attach in the non-S0ix case? IIUC there you'll see re-enumeration of devices too, which will trigger attaching them too - and that might happen concurrently with |
9890f83 to
c1226c2
Compare
Yeah, you're right. I've added a dict of per-VM async locks that are taken on entry to the |
35981c4 to
c643e60
Compare
This patch ensures USB devices are reattached on resume, which is necessary for S0ix since we don't detach the USB controller drivers and hence the udev rules aren't retriggered automatically.
|
@marmarek anything blocking this from being merged? |
|
Test need an update: https://openqa.qubes-os.org/tests/158669#step/TC_30_USBProxy_core3/1 |
OpenQA test summaryComplete test suite and dependencies: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025111405-4.3&flavor=pull-requests Test run included the following:
Upload failures
New failures, excluding unstableCompared to: https://openqa.qubes-os.org/tests/overview?distri=qubesos&version=4.3&build=2025081011-4.3&flavor=update
Failed tests27 failures
Fixed failuresCompared to: https://openqa.qubes-os.org/tests/149225#dependencies 78 fixed
Unstable testsPerformance TestsPerformance degradation:18 performance degradations
Remaining performance tests:161 tests
|
This patch ensures USB devices are reattached on resume, which is necessary for S0ix since we don't detach the USB controller drivers and hence the udev rules aren't retriggered automatically. I've relocated the attachment logic into
_auto_attach_devices, which is now shared between the domain-start and domain-resumed handlers.I've also added a new event, domain-resumed, in core-admin to support this since domain-unpaused isn't sufficient for our needs. That PR can be found here and is a dependency for this change: QubesOS/qubes-core-admin#725