Arch Linux caffeinate is not started
Hello!
I'm currently trying to debug why the backups aren't being run consistently on my Arch Linux install, and I know that it probably has to do with the fact it's a laptop, which I've configured to go into suspend/sleep.
Logs
Aug 29 00:00:22 MainComp systemd[1]: Starting resticprofile backup for profile laptop in /home/username/.config/resticprofile/profiles.yaml...
Aug 29 00:00:23 MainComp resticprofile[136241]: 2025/08/29 00:00:23 preventing system sleep: Interactive authentication required.
Aug 29 00:00:23 MainComp systemd[1]: Started resticprofile backup for profile laptop in /home/username/.config/resticprofile/profiles.yaml.
Aug 29 00:00:23 MainComp resticprofile[136241]: 2025/08/29 00:00:23 profile 'laptop': starting 'backup'
Aug 29 00:00:24 MainComp resticprofile[136398]: using parent snapshot 6820a8db
Aug 29 00:00:29 MainComp resticprofile[136398]: Files: 980 new, 401 changed, 81843 unmodified
Aug 29 00:00:29 MainComp resticprofile[136398]: Dirs: 40 new, 147 changed, 15569 unmodified
Aug 29 00:00:29 MainComp resticprofile[136398]: Added to the repository: 93.663 MiB (55.976 MiB stored)
Aug 29 00:00:29 MainComp resticprofile[136398]: processed 83224 files, 28.259 GiB in 0:06
Aug 29 00:00:29 MainComp resticprofile[136398]: snapshot 80315b62 saved
Aug 29 00:00:29 MainComp resticprofile[136241]: 2025/08/29 00:00:29 profile 'laptop': finished 'backup'
Aug 29 00:00:29 MainComp resticprofile[136241]: 2025/08/29 00:00:29 caffeinate is not started
Aug 29 00:00:29 MainComp systemd[1]: [email protected]: Deactivated successfully.
Aug 29 00:00:29 MainComp systemd[1]: [email protected]: Consumed 11.391s CPU time, 493M memory peak.
Aug 30 10:51:07 MainComp systemd[1]: Starting resticprofile backup for profile laptop in /home/username/.config/resticprofile/profiles.yaml...
Aug 30 10:51:08 MainComp resticprofile[229252]: 2025/08/30 10:51:08 preventing system sleep: The operation inhibition has been requested for is already running
Aug 30 10:51:08 MainComp systemd[1]: Started resticprofile backup for profile laptop in /home/username/.config/resticprofile/profiles.yaml.
Aug 30 10:51:08 MainComp resticprofile[229252]: 2025/08/30 10:51:08 profile 'laptop': starting 'backup'
Aug 30 10:51:08 MainComp resticprofile[229252]: subprocess ssh: ssh: connect to host 192.168.0.11 port 22: Network is unreachable
Aug 30 10:51:08 MainComp resticprofile[229252]: Fatal: unable to open repository at sftp:pi:/home/Harddisk1TB//LaptopBackup: unable to start the sftp session, error: error receiving ver>
Aug 30 10:51:08 MainComp resticprofile[229252]: 2025/08/30 10:51:08 backup on profile 'laptop': exit status 1
Aug 30 10:51:08 MainComp resticprofile[229252]: 2025/08/30 10:51:08 caffeinate is not started
Aug 30 10:51:08 MainComp systemd[1]: [email protected]: Main process exited, code=exited, status=1/FAILURE
Aug 30 10:51:08 MainComp systemd[1]: [email protected]: Failed with result 'exit-code'.
caffeinate, i've found, is a utility that's not available to Arch! I'm not entirely sure yet how this is affecting the backup schedule, but I think it might merit a note in the documentation. Also, if there is any advice on how to troubleshoot this problem I'd be greatly in your favor.
Couple other notes:
- The backup is supposed to run at 00:00:00 of every day.
- I still need to look into systemd's prevention of sleep.
- I have a service (code below) (source) that I've tried to use for waiting for the network to come back up, as you can see, no dice.
delay-network-up.service
``` [Unit] DefaultDependencies=no After=nss-lookup.target Before=network-online.target[Service] Type=oneshot RemainAfterExit=yes ExecStart=sh -c 'until ping -c 1 [IP ADDRESS]; do sleep 1; done'
[Install] WantedBy=network-online.target
</details>
Update:
- I looked through the codebase, realized from /preventsleep/linux.go that Caffinate is what the golang struct is called, but it's really a wrapper for the inhibit function of systemd
- I am not very adept at all the nuances of Linux, sorry, so I'm learning about it right now!
- Knowing this now, I realize that the prudent piece of information comes from:
resticprofile[300043]: 2025/08/31 00:00:31 preventing system sleep: Interactive authentication required. - I am using
schedule-permission: userin my configuration.
If I can sleuth out more information, I'll be sure to update this!
Sorry, caffeinate is the name of the CLI that prevents system sleep on macOS. I liked the name so I reused it 🙄
I haven't seen this issue on my system (Interactive authentication required.) but I'll look it up if I can replicate it (scheduling permissions changed a bit recently)