Automagic Automation on Sailfish

I’m having an issue where, if I restart the phone, the systemd service seems to start correctly. However, at least the flow that should start by a toggle of the privacy switch don’t do anything until the service is restarted.

I don’t see any journal logs until I restart the service either, but the way Sailfish rotates logs has been a bit of a mystery to me so I could just be missing those. I checked 2 minutes after reboot, and systemctl already reported the journal had been rotated since service start.

This might be because in certain circumstances (e.g. on a phone restart) the session d-bus may not be available at the time the service tries to initialize a connection.
Currently the daemon just gives up on the session bus if it can’t reach it the first time.

If automatic depends on a d-bus service, would it not make more sense to have the unit be activated by the d-bus service in the first place? Just a suggestion as I don’t know anything about the interaction between automagic and d-bus.

That’s a link to the d-bus systemd integration, but I guess Discourse decided the details aren’t necessary.

No. The only thing missing is for the daemon to re-check the connection and not just give up on the first try.