A new maintenance version was released these days: 3.2.0-29. Change that number or shorten it to 3.2.0 in the above written script.
The resume behaviour improved a lot. But I've got another issue which is unresolved. One of four times cinnamon panel is garbled when resuming from suspend. Restarting cinnamon (ALT_F2-r) solves it. But the fact I have to trigger it manually is annoying. So I tried to implement another sleep.d-script to automatically restart cinnamon:
My first attempt: Window manager error: Unable to open X display (pm-suspend.log)
... cinnamon --replace
This one works but unfortunately it shows cinnamon's root settings - which differ from mine (as user).
... export DISPLAY=:0 && cinnamon --replace
This one won't work if there are several user accounts as it would replace the panel with the one of the named [user] no matter who is resuming.
... export DISPLAY=:0 && sudo -u [user] cinnamon --replace
This one resets the session and logs you out ;( (like Ctrl Alt Bksp).
... killall -HUP gnome-session
Is there someone who knows how to restart cinnamon on resume?
Any help is appreciated ... Thanks