Entirely disable suspension (at kernel level? - has to be independent of used DE and login state!)
Solution 1:
I found the solution on Server Fault:
We have to create an executable script in /etc/pm/sleep.d/
that will cancel any hibernate or suspend actions.
sudoedit /etc/pm/sleep.d/000cancel-hibernate-suspend
The content of this file should be:
#!/bin/sh
# prevents hibernation and suspend
. "$PM_FUNCTIONS"
case "${1}" in
suspend|hibernate)
inhibit
;;
resume|thaw)
exit 0
;;
esac
Now make that file executable:
chmod 0755 /etc/pm/sleep.d/000cancel-hibernate-suspend