soc-qcom: delay starting modem-gnss on boot

modem-gnss / qmicli depends on qrtr being up, or it fails on boot and
GPS doesn't work on this device:

 sargo systemd[1]: Starting Google Sargo (Pixel 3a) GNSS Modem Setup...
 sargo qmicli[1080]: error: node with id 0 not found in QRTR bus

Ideally there would be a path in /dev or sysfs so we could add a
ConditionPathExists= in the unit, but I tried hard to find something and
was unable to. Making modem-gnss depend on ModemManager seems to work
around this issue, since qrtr seems to always (in my testing) be up by
then. IIUC in the future we may not have to run qmicli to enable GPS, so
this patch is a workaround to fix a workaround.

Signed-off-by: Clayton Craft <craftyguy@postmarketos.org>
Part-of: <https://gitlab.postmarketos.org/postmarketOS/pmaports/-/merge_requests/7636>
This commit is contained in:
Clayton Craft 2025-12-24 20:45:15 -08:00 committed by The Friendly Merge Bot
parent 8d356e5056
commit 57c75db149
No known key found for this signature in database
2 changed files with 7 additions and 1 deletions

View file

@ -200,5 +200,5 @@ f86ebf68bb7e41b531e5cd8fc3e54d8fafad314fb80950277e41004303b3bf75b2ae96f0228bdf4e
471583b91bc35608cb75d0b3ceb88fa793a4e763ea228703c50ffb1b45c0e9054646c46f710164ec3ef65a882a204fd59546f3a0ebb94b8d6c6f08c4043bcfd3 gstreamer.sh
e33f41360ccc4900bb76a26cc7b46bde1fb90facdf45c4fbcebc80499386939948401cacd6df9f779eafab10f4ee77ee1fef3e7bd06f483f8c2a4a644c84f327 modemmanager.conf
99773091f2653f71d4365fdf4cce048a1904cd044a714778567ce0ff6c9c9d76ad537e6e49d1d02bf385f9d35c00794d093ece0fed046072ed5e1ea65baa5201 modem-gnss.initd
d1c355440c764d4f60562fdf1973da6764be4700345bdd88de33544933c6d5f3a54b05d6d4e29207d969a6d5c657052198ac4e935ce953e5c4f67891c68ca9e8 modem-gnss.service
db993ee0d19c6c9d33ee2fdf753fabb4a964598a9660fee931f8a27e0570c2b66065848bd388138b899caa9b22f56937f56a97c592ee19dded8a056c285e6522 modem-gnss.service
"

View file

@ -1,5 +1,11 @@
[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
[Service]
ExecStart=qmicli -d qrtr://0 --loc-set-engine-lock=mt