Fix USB autosuspend causing peripheral disconnection issues (#906)

* Fix USB autosuspend causing peripheral disconnection issues

Add configuration to disable USB autosuspend by setting usbcore.autosuspend=-1
in modprobe.d configuration. This prevents USB devices from being automatically
suspended which can cause keyboards, mice, and other peripherals to disconnect
unexpectedly.

* Add migration to apply autosuspend to existing systems

---------

Co-authored-by: David Heinemeier Hansson <david@hey.com>
This commit is contained in:
jw 2025-08-22 07:14:46 -05:00 committed by GitHub
parent 1942ac68dc
commit 16b0919418
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 10 additions and 0 deletions

View File

@ -45,6 +45,7 @@ source $OMARCHY_INSTALL/config/detect-keyboard-layout.sh
source $OMARCHY_INSTALL/config/fix-fkeys.sh
source $OMARCHY_INSTALL/config/network.sh
source $OMARCHY_INSTALL/config/power.sh
source $OMARCHY_INSTALL/config/usb-autosuspend.sh
source $OMARCHY_INSTALL/config/timezones.sh
source $OMARCHY_INSTALL/config/login.sh
source $OMARCHY_INSTALL/config/nvidia.sh

View File

@ -0,0 +1,6 @@
#!/bin/bash
# Disable USB autosuspend to prevent peripheral disconnection issues
if [[ ! -f /etc/modprobe.d/disable-usb-autosuspend.conf ]]; then
echo "options usbcore autosuspend=-1" | sudo tee /etc/modprobe.d/disable-usb-autosuspend.conf
fi

3
migrations/1755494432.sh Normal file
View File

@ -0,0 +1,3 @@
echo "Disable USB autosuspend"
$OMARCHY_PATH/install/config/usb-autosuspend.sh