I have this service to run script on_wake whenever my computer wakes up:
[Unit]
Description=Customisation options that should always run on waking from sleep
After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
[Service]
ExecStart=/home/me/scripts/on_wake
# User=me
# Environment=DISPLAY=:0
[Install]
WantedBy=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target
When I enable it I get these warnings:
init /home/me/.config/systemd/user/on_wake.service is added as a dependency to a non-existent unit suspend.target
and it doesn't run (status is inactive dead). What should I be aiming at instead of "suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target"? Running on manjaro.
(Helpfully when you search this you get people linking to the power hooks section of the arch wiki, but the page has since been rewritten and there is no power hooks section)