I have a script that sets up my mouse preferences and it’s placed in Startup applications. It runs on startup, but when the lid is closed or the computer manually put in suspend (same thing really), the settings get removed. I have it so Ubuntu requires my password on return from suspend, but this login doesn’t seem to be the same as a regular login, as it doesn’t execute
I tried placing my script in
/lib/systemd/system-sleep/ but this executes before entering my password and it doesn’t seem that
xinput commands work at that point in the wake up cycle because the changes don’t take effect.
So I’m either looking for a way to make every suspend also execute a lock or log off cycle (as locking manually executes .profile) or find a way to execute a script specifically on the password entry on resume from suspend.