I don’t want the modem to ever sleep or disconnect. What would be a good set of udev rules for this? I want to seet high priority, and if there is a disconnection of the modem, I want the system to attempt reconnection without me having to use the kill switch.
You can do things like this (as root)
echo 5000 > /sys/devices/platform/soc@0/38200000.usb/xhci-hcd.4.auto/usb1/1-1/1-1.2/power/autosuspend_delay_ms
or maybe
echo "on" > /sys/bus/usb/devices/1-1.2/power/control
See discussion here:
Tie it to a chair facing bright lights and loud music?
(We have ways of making it talk.)
Not even music, just a single monotonous tone, a flat mid-high pitch…
5000ms is just 5 seconds… And what about the power management being on? I’ll look at it.
Autosuspend delay of 5000 ms is good
if you really want it to never suspend at all, then I guess you can set an even larger value.
Set to 10,000ms, we will see how that behaves
Update, setting it to 72-hours worked like a dream thus far.
What, no cigarette burns?
A few caveas, rebooting, using the kill switch, or restarting the Phosh session will reset the changes made. It is likely a good idea to script it so that upon modem disconnection (via kill switch) the command is re-ran. It could also be done during boot/login…