Comment 125 for bug 1574120

Revision history for this message
mike-g2 (mikeg-utk) wrote :

I have had this problem in the past and it reemerged on an upgrade from 16.04 to 18.04 and have resolved it. For me (Lenovo Yoga) the issue is with USB rewaking the machine.

The following fix worked for me.

1) Created file: /etc/systemd/system/toggle.XHC.to.fix.suspend.issue.service
with following informaiton

[Unit]
Description="Make suspend ignore USB wake up."

[Service]
ExecStart=/bin/bash -c "echo XHC >> /proc/acpi/wakeup"

[Install]
WantedBy=multi-user.target

2) Created a symbolic link to above script in /etc/systemd/system/multi-user.target.wants

3) Executed following commands
                sudo systemctl daemon-reload
                sudo systemctl start toggle.XHC.to.fix.suspend.issue.service

4) checked service was started with
      sudo systemctl status toggle.XHC.to.fix.suspend.issue.service

5) Enable it on boot with
             sudo systemctl enable toggle.XHC.to.fix.suspend.issue.service

Last steps are based on
https://www.reddit.com/r/archlinux/comments/3zxg65/how_to_permanently_change_procacpiwakeup_or/