systemctl hybrid-sleep or anything similar is, according to the manual, supposed to execute all scripts found in /lib/systemd/system-sleep and after that continue it's own execution.Instead it completely and utterly ignores every single script I put in there:gnome-terminal -e touch Documents/qwertwhile [ 1 ] do    echo hidone^ this should go in an infinite loop after creating a file. I've also tried things like touch /home/u/Documents/qwert etc.I'm  pretty puzzled actually. It might actually be caused by the fact that hybrid-sleep, hibernate, etc. all lead to a crash before complete execution, i.e. my laptop is unable to enter any kind of power saving mode and instead goes into a completely frozen state with a blank screen - however, it logs out before that and only crashes after a couple of seconds, so I assume the scripts should be executed just fine; after all those should be executed even before logging out.
systemctl not running scripts under system-sleep
bash;systemd;suspend
gnome-terminal won't run from there as there is no X server for it to connect to (it's running as root, not as your logged in user). gnome-terminal isn't needed and is overkill here anyway. Just run touch /home/u/Documents/qwert without gnome-terminal -ealso:Make sure the script is executable (with chmod +x scriptname).Add #! /bin/sh or (#! /bin/bash if you use any bash-only features) as the first line of the script. 