This sounds like the system is waken up after going to sleep. You can disable wakeup sources as the following examples:
# list all wakeup sources $ cat /proc/acpi/wakeup Device S-state Status Sysfs node PEG0 S4 *enabled pci:0000:00:01.0 PEGP S4 *disabled pci:0000:01:00.0 ... GLAN S4 *enabled pci:0000:00:1f.6 XHC S0 *enabled pci:0000:00:14.0 # disable a specific wakeup source (i..e GLAN) $ echo GLAN | sudo tee /proc/acpi/wakeup # check GLAN is disabled $ cat /proc/acpi/wakeup | grep GLAN Normally USBs have higher chances to be blamed, but it can vary from systems to systems. -- You received this bug notification because you are a member of Kernel Packages, which is subscribed to linux in Ubuntu. https://bugs.launchpad.net/bugs/1928026 Title: Cannot suspend after the first suspend Status in linux package in Ubuntu: Incomplete Bug description: The suspend fail, it wakes up after 4 or 5 seconds from suspending. This issue is very similar to Elementary OS's problem which I discovered. The only difference is that in Ubuntu, it can suspend for the first time after the restart or turned on, after waking up, it wont be able to suspend again until restart. Ubuntu 20.04.2 LTS Macbook Air 13" Mid 2013 To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1928026/+subscriptions -- Mailing list: https://launchpad.net/~kernel-packages Post to : kernel-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~kernel-packages More help : https://help.launchpad.net/ListHelp