Files
pmaports-rtwo/device/community/soc-qcom/modem-gnss.service
T
Clayton Craft cb0d645970 soc-qcom: restart modem-gnss.service on failure
Apparently starting after MM isn't always enough time for the location
service to be up, so this adds a periodic restart of the systemd service
every 30 seconds for up to 5 minutes.

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/8041>
2026-02-20 01:19:12 +00:00

25 lines
652 B
Desktop File

[Unit]
Description=Qualcomm GNSS Modem Setup
# These commands need to run after qrtr is up, MM seems to be late enough that
# this is the case.
# Ideally there would be a /dev or sysfs path we could add
# a ConditionPathExists= on...
After=ModemManager.service
Requires=ModemManager.service
# Give up after 5 minutes
StartLimitInterval=300
StartLimitBurst=10
[Service]
ExecStart=qmicli -d qrtr://0 --loc-set-engine-lock=mt
ExecStart=qmicli -d qrtr://0 --loc-set-nmea-types=all
Type=oneshot
# Apparently starting after MM isn't always enough time for the location service
# to be up
Restart=on-failure
RestartSec=30
[Install]
WantedBy=default.target