Since I failed to find a way to tell systemctl to go to sleep in a one-time specified mode (see previous question), I decided to write some script to change whether the system goes to sleep in shallow or deep mode by writing directly into /sys/power/mem_sleep.
Available values on my system are s2idle and deep (default).
However, though I did that before, I cannot do it anymore: echo "[s2idle] deep" | sudo tee /sys/power/mem_sleep returns tee: /sys/power/mem_sleep: write error: Invalid argument and manual edit via vim as root I also cannot save.
I think I set the default kernel sleep mode to be deep... could that be the problem?