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."
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] multi-user. target
WantedBy=
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 XHC.to. fix.suspend. issue.service
sudo systemctl status toggle.
5) Enable it on boot with XHC.to. fix.suspend. issue.service
sudo systemctl enable toggle.
Last steps are based on /www.reddit. com/r/archlinux /comments/ 3zxg65/ how_to_ permanently_ change_ procacpiwakeup_ or/
https:/