The Cookie Machine - Click here to drag window

DUMMY TEXT - Real text set in assets/js/theCookieMachine.js

If you can read me, I'm broken!

Views: 8,269β€…    Votes:  4β€…
Tag : suspend  
Link: πŸ” See Original Answer on Ask Ubuntu ⧉ πŸ”—

URL: https://askubuntu.com/q/1050596
Title: How to debug suspend?
ID: /2018/06/29/How-to-debug-suspend_
Created: June 29, 2018    Edited:  June 12, 2020
Upload: September 15, 2024    Layout:  post
TOC: false    Navigation:  false    Copy to clipboard:  false


The symptoms:


My go to site for many Linux problems is Arch Linux. Here is what is posted about suspend/resume problems similar to yours:

Instantaneous wakeups from suspend

For some Intel Haswell systems with the LynxPoint and LynxPoint-LP chipset, instantaneous wakeups after suspend are reported. They are linked to erroneous BIOS ACPI implementations and how the xhci_hcd module interprets it during boot. As a work-around reported affected systems are added to a blacklist (named XHCI_SPURIOUS_WAKEUP) by the kernel case-by-case.[2]

Instantaneous resume may happen, for example, if a USB device is plugged during suspend and ACPI wakeup triggers are enabled. A viable work-around for such a system, if it is not on the blacklist yet, is to disable the wakeup triggers. An example to disable wakeup through USB is described as follows.[3]

To view the current configuration:

$ cat /proc/acpi/wakeup

Device  S-state   Status   Sysfs node
...
EHC1      S3    *enabled  pci:0000:00:1d.0
EHC2      S3    *enabled  pci:0000:00:1a.0
XHC       S3    *enabled  pci:0000:00:14.0

…

The relevant devices are EHC1, EHC2 and XHC (for USB 3.0). To toggle their state you have to echo the device name to the file as root.

# echo EHC1 > /proc/acpi/wakeup
# echo EHC2 > /proc/acpi/wakeup
# echo XHC > /proc/acpi/wakeup

This should result in suspension working again. However, this settings are only temporary and would have to be set at every reboot. To automate this take a look at systemd#Writing unit files. See BBS thread for a possible solution and more information.


The entire Arch Linux article above on Suspend/Resume is a great reference for many areas:

1 Low level interfaces
    1.1 kernel (swsusp)
    1.2 uswsusp
2 High level interfaces
    2.1 systemd
3 Hibernation
    3.1 About swap partition/file size
    3.2 Required kernel parameters
        3.2.1 Hibernation into swap file
    3.3 Configure the initramfs
4 Troubleshooting
    4.1 ACPI_OS_NAME
    4.2 VAIO Users
    4.3 Suspend/hibernate doesn't work, or not consistently
    4.4 Wake-on-LAN
    4.5 Instantaneous wakeups from suspend
⇧ External hard drive keeps powering down How to reassign touchpad buttons to keyboard?  β‡©