feat(Manager): add suspend/wake hook methods to handle reconnecting Deck target device #228
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This change adds new
HookSleep
andHookWake
dbus methods that can be called by a systemd unit on suspend/resume to allow InputPlumber to prepare for sleep/wake. It also includes the latest version of thevirtual-usb
crate which contains a fix where the read/write threads of the virtual usb device would fail to stop, leaving a dangling virtual usb device.This change seems to be required due to the appearance that the virtual usb kernel driver currently does not support suspend:
https://github.com/torvalds/linux/blob/master/drivers/usb/usbip/vhci_hcd.c#L1260
In order for this feature to work, users will need to ensure the suspend systemd unit is also enabled for InputPlumber:
sudo systemctl enable inputplumber-suspend
Fixes #165