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."
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
Notes:
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 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
Notes: