Skip to content

Instantly share code, notes, and snippets.

@derry-github
derry-github / system-sleep-fix-usb3.sh
Last active June 14, 2024 07:24 — forked from ioggstream/system-sleep-xhci.sh
Shell脚本, 用于修复archlinux中由于usb3导致的挂起黑屏问题
#!/bin/sh
#
# 此脚本修复archlinux中由于usb3导致的挂起黑屏问题
#
# 1. put in /lib/systemd/system-sleep/system-sleep-fix-usb3.sh
# 2. chmod a+x /lib/systemd/system-sleep/system-sleep-fix-usb3.sh
if [ "${1}" == "pre" ]; then
# Do the thing you want before suspend here, e.g.:
echo "Unload xhci_pci module before suspending at $(date)..." > /tmp/systemd_suspend_test