You are not logged in.

#1 2016-10-02 15:21:19

branthebuilder
Member
Registered: 2016-10-01
Posts: 65

[SOLVED] Suspend Error

Searched and didn't find my precise issue.  New install using Nvidia driver.

Issue: Suspend is either automatically woken or freezes system requiring hard reboot/power off-on

I think the relevant error from dmesg is here:

[  653.580613] PM: Syncing filesystems ... done.
[  653.602435] PM: Preparing system for sleep (mem)
[  654.077085] Freezing user space processes ... (elapsed 0.001 seconds) done.
[  654.078332] Double checking all user space processes after OOM killer disable... (elapsed 0.000 seconds) 
[  654.078401] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[  654.079794] PM: Suspending system (mem)
[  654.079815] Suspending console(s) (use no_console_suspend to debug)
[  654.080356] sd 3:0:0:0: [sda] Synchronizing SCSI cache
[  654.080660] serial 00:04: disabled
[  654.082341] AMD-Vi: Event logged [IO_PAGE_FAULT device=02:00.0 domain=0x0004 address=0x0000000000000000 flags=0x0000]
[  654.102136] xhci_hcd 0000:02:00.0: WARN: xHC save state timeout
[  654.102246] sd 3:0:0:0: [sda] Stopping disk
[  654.102320] suspend_common(): xhci_pci_suspend+0x0/0xc0 [xhci_pci] returns -110
[  654.102326] pci_pm_suspend(): hcd_pci_suspend+0x0/0x30 [usbcore] returns -110
[  654.102331] dpm_run_callback(): pci_pm_suspend+0x0/0x150 returns -110
[  654.102334] PM: Device 0000:02:00.0 failed to suspend async: error -110
[  654.478290] PM: Some devices failed to suspend, or early wake event detected
[  654.479074] serial 00:04: activated
[  654.479082] rtc_cmos 00:06: System wakeup disabled by ACPI
[  654.498115] sd 3:0:0:0: [sda] Starting disk

I am not sure what to do with that error -110 or what device 02:00.0 is.  Suggestions?

Last edited by branthebuilder (2016-10-07 13:29:30)

Offline

#2 2016-10-03 00:38:08

branthebuilder
Member
Registered: 2016-10-01
Posts: 65

Re: [SOLVED] Suspend Error

From what I can tell, this is a problem with a USB port.  I do not have any devices connected except keyboard and mouse via USB.  I have disabled every entry in /proc/acpi/wakeup except for PWRB and get the same automatic resumption from suspend (usually cycling twice) and the occasional freeze on suspend.  I have disabled pm_async which has had no effect.  Still waiting for any suggestions.

EDIT to add that after reading a lot of old threads about xhci kernel module being to blame, I tried both the lts and zen kernels and have the same issue.

Last edited by branthebuilder (2016-10-03 04:39:21)

Offline

#3 2016-10-03 06:31:04

seth
Member
Registered: 2012-09-03
Posts: 49,992

Offline

#4 2016-10-03 13:53:46

branthebuilder
Member
Registered: 2016-10-01
Posts: 65

Re: [SOLVED] Suspend Error

I had already addressed the issue raised in the first link when I pointed out I had disabled everything but the powerbutton in /proc/acpi/wakeup.  The script in the other link seems like a kludgy workaround. Since this xhci bug seems to have been around since 2010, I am still wondering if there is another solution.

Last edited by branthebuilder (2016-10-03 13:54:20)

Offline

#5 2016-10-06 04:57:47

branthebuilder
Member
Registered: 2016-10-01
Posts: 65

Re: [SOLVED] Suspend Error

So I tried every solution posted in that bug tracker thread.  No joy.  Thought the problem may have been that all the scripts/configs in that thread used just "xhci" instead of the full module name "xhci_hcd".  Tried changing all instances to that with no joy.  If I manually do modprobe -r xhci_hcd xhci_pci and then suspend, it's golden. But how do I actually get that to automate?

Offline

#6 2016-10-06 05:12:23

branthebuilder
Member
Registered: 2016-10-01
Posts: 65

Re: [SOLVED] Suspend Error

Got a possible solution from here:
https://bbs.archlinux.org/viewtopic.php?id=170321
Made two simple scripts one that simply does modprobe -r xhci_pci xhci_hcd
and another that does modprobe xhci_pci xhci_hcd

I placed the path to those scripts in the systemd service file ExecStart and ExecStop lines.  So far it suspended okay but did not reload the modules on resume.

Offline

#7 2016-10-07 02:42:17

branthebuilder
Member
Registered: 2016-10-01
Posts: 65

Re: [SOLVED] Suspend Error

Getting closer.  I can successfully suspend once.  xhci modules get unloaded at suspend and reloaded at resume.  But a second suspend command either freezes or immediately wakes up, both cases showing the same error from the OP.  Here are my current files used to make it work the first time:

[Unit]
Description=Script upon suspend/resume
Before=suspend.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/unload_xhci
StandardOutput=syslog

[Install]
WantedBy=sleep.target suspend.target
#! /bin/bash
modprobe -r xhci_pci xhci_hcd

And the corresponding for reloading:

[Unit]
Description=Script upon suspend/resume
After=suspend.target

[Service]
Type=oneshot
RemainAfterExit=yes
ExecStart=/usr/bin/load_xhci
StandardOutput=syslog

[Install]
WantedBy=sleep.target suspend.target
#! /bin/bash
modprobe xhci_pci xhci_hcd

How do I make the systemd units continue to work correctly beyond a single cycle?

Offline

#8 2016-10-07 08:40:55

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [SOLVED] Suspend Error

Remove the RemainAfterExit=yes line?

Offline

#9 2016-10-07 12:47:47

branthebuilder
Member
Registered: 2016-10-01
Posts: 65

Re: [SOLVED] Suspend Error

Perfect.  Seems to have solved it, thanks.  That parameter is misleading a bit.  I misunderstood it to mean keep the service loaded and ready to run the ExecStart parameter, but I guess it means "don't reset after running ExecStart".

Offline

Board footer

Powered by FluxBB