#!/bin/sh | |
# | |
# This script should prevent the following suspend errors | |
# which freezes the Dell Inspiron laptop. | |
# | |
# Put it in /usr/lib/systemd/system-sleep/xhci.sh | |
# | |
# The PCI 00:14.0 device is the usb xhci controller. | |
# | |
# kernel: [67445.560610] pci_pm_suspend(): hcd_pci_suspend+0x0/0x30 returns -16 | |
# kernel: [67445.560619] dpm_run_callback(): pci_pm_suspend+0x0/0x150 returns -16 | |
# kernel: [67445.560624] PM: Device 0000:00:14.0 failed to suspend async: error -16 | |
# kernel: [67445.886961] PM: Some devices failed to suspend, or early wake event detected | |
if [ "${1}" == "pre" ]; then | |
# Do the thing you want before suspend here, e.g.: | |
echo "Disable broken xhci module before suspending at $(date)..." > /tmp/systemd_suspend_test | |
grep XHC.*enable /proc/acpi/wakeup && echo XHC > /proc/acpi/wakeup | |
elif [ "${1}" == "post" ]; then | |
# Do the thing you want after resume here, e.g.: | |
echo "Enable broken xhci module at wakeup from $(date)" >> /tmp/systemd_suspend_test | |
grep XHC.*disable /proc/acpi/wakeup && echo XHC > /proc/acpi/wakeup | |
fi |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Thank you! This solved my systemd suspend problems with my System76 Oryx Pro running Arch Linux. I too had log entries with
(Trying to add as many keywords as possible to help future searchers. |
This comment has been minimized.
This comment has been minimized.
Same problem on dell XPS 13, ubuntu 18.10, thanks a lot ! |
This comment has been minimized.
This comment has been minimized.
Solved (random) immediate wake-up after suspend on dell XPS 13, ubuntu 18.10, thank you The edit of your script posted here https://askubuntu.com/questions/1089067/wakes-from-suspend-immediately-when-bluetooth-device-disconnected/1092933 solved both problems for me. |
This comment has been minimized.
This comment has been minimized.
It fixed my Thinkpad P52 on Fedora 30 too. Thanks a lot! |
This comment has been minimized.
This comment has been minimized.
Who knows why some machines have trouble with this and some don't? |
This comment has been minimized.
This comment has been minimized.
Thanks, it fixed suspending on P51s with Manjaro KDE (5.6.16) |
This comment has been minimized.
This comment has been minimized.
i think it fixed my problem on a Thinkpad X1 Carbon 6 Gen . tried upgrading ubuntu 19.10 to 20.04 and also installing bios updates to fix it, to no avail. my symptoms were that suspend seemed to sometimes work fine, sometimes seem to work but fail to resume, and sometimes it looked like it would suspend, but i would end up with a blinking red dot in the thinkpad logo. |
This comment has been minimized.
This comment has been minimized.
Seems to have fixed similar symptoms on my Thinkpad X390. Thanks for sharing. |
This comment has been minimized.
Thanks for creating this gist. When I shut my laptop lid, my system would suspend. However, sometimes it would not resume and I would be forced to press and hold the power button to shut it off. With this script, I no longer have the issue.