2

I have Ubuntu 18.04 on a pure-intel Thinkpad T480. It is usually connected to a couple of external monitors. If I choose suspend from the power icon (holding down alt), the laptop initiates the suspend process,and the two external monitors go into suspend mode. The LED on the laptop starts the blinking cycle to indicate suspend. But a second later, the laptop LED goes back to ON. The display don't start again, but as soon as move the wireless mouse, the external displays turn on. So it does not enter suspend.

Update:

Most of the time it works. I think I will have to watch this and try to find some logging when it doesn't work

Update: journalctl | grep suspend:

 pci_pm_suspend(): hcd_pci_suspend+0x0/0x30 returns -16
Jun 17 16:57:46 moncrief kernel: dpm_run_callback(): pci_pm_suspend+0x0/0x150 returns -16
Jun 17 16:57:46 moncrief kernel: PM: Device 0000:00:14.0 failed to suspend async: error -16
Jun 17 16:57:46 moncrief kernel: PM: Some devices failed to suspend, or early wake event detected

courtesy of lspci, the device is

00:14.0 USB controller: Intel Corporation Sunrise Point-LP USB 3.0 xHCI Controller (rev 21)
  • This article may help Add ‘Hibernate’ Option in Power Menu in Ubuntu 18.04 See the section about creating a file /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla – cmak.fr Jun 17 '18 at 0:06
  • It's not only 18.04. Sometimes in 16.04 when I suspend the laptop via GUI (when lid is closed which doesn't suspend so external monitor keeps playing video) the suspend doesn't stick. Sometimes a second suspend via GUI works sometimes it doesn't. Most of the time (about 90%?) suspending via GUI works perfectly when laptop lid is closed. Other times I'm resorting to using shutdown when all else fails. So I'm keenly watching for answers on your question. – WinEunuuchs2Unix Jun 17 '18 at 1:39
  • My issue is specifically with xhci usb. I will try to install the script here: gist.github.com/timrs2998/77b3c2c2567cbd38f38cde64f1155956 into /lib/systemd/system-sleep – Tim Richardson Jun 19 '18 at 0:46
  • It works, so I posted it as an answer – Tim Richardson Jun 19 '18 at 1:03
1

Based on this similar problem with a Dell Inspiron

https://gist.github.com/ioggstream/8f380d398aef989ac455b93b92d42048

I installed in

/lib/systemd/system-sleep

the script here: https://gist.github.com/timrs2998/77b3c2c2567cbd38f38cde64f1155956#file-system-sleep-xhci-sh

authored by: Roberto Polli (ioggstream)

After creating the file, don't forget

sudo chmod u+x

...

#!/bin/sh
# 
# This script should prevent the following suspend errors
#  which block suspend on Dell Inspiron laptop & Thinkpad T480. 
#
# 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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.