I was trying to set the ability of my USB Devices to wake my laptop from suspend.
I actually figured out how to do it (echo enabled > /sys/bus/usb/devices/3-2.1/power/wakeup, this device is my USB Hub). It worked nicely until I restared my laptop. I then checked the state of this device, and he goes from “enabled” to “disabled”. I’m not sure it’s because I did reboot, or because I unplugged my laptop…
How could I keep the state of my device persistent ?
Thanks for the help.
Then activate the service with sudo systemctl enable --now wakeup-events
Note that, if the state of wakeup events is already as you want in the session where you enable the service, you should omit --now, otherwise the script will revert the event states (for that session only).