I've defined the following service to start a screen locker before suspending:
$ cat /etc/systemd/system/screenlock.service
Description=Lock X session using slock
I want to have my screen lock and backlight fade out after some delay, and then I want to have the backlight fade back in when I move the cursor or press a button. Having the screen fade out is easy ...