E. Liddell wrote:
The nuclear option would be to rebuild the kernel without support for suspend, but that may be overkill. There *should* be a software "helper" at some level (below TDE, but above the kernel) that you can kill instead. Possible suspects include elogind, suspend (https://github.com/bircoph/suspend), hibernate-script (https://gitlab.com/nigelcunningham/Hibernate-Script), and the obsolete pm-utils. There may be other Devuan- or Debian-specific options that I don't know about.
if you use systemd
sudo systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target
I don't remember if you mentioned it is a laptop or a desktop.
If laptop could be lid close thing