From 57c75db149a2bf554fc2b2489f0a9aa3be8562a1 Mon Sep 17 00:00:00 2001 From: Clayton Craft Date: Wed, 24 Dec 2025 20:45:15 -0800 Subject: [PATCH] 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 Part-of: --- device/community/soc-qcom/APKBUILD | 2 +- device/community/soc-qcom/modem-gnss.service | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/device/community/soc-qcom/APKBUILD b/device/community/soc-qcom/APKBUILD index f6ce4801b..e9d54cc20 100644 --- a/device/community/soc-qcom/APKBUILD +++ b/device/community/soc-qcom/APKBUILD @@ -200,5 +200,5 @@ f86ebf68bb7e41b531e5cd8fc3e54d8fafad314fb80950277e41004303b3bf75b2ae96f0228bdf4e 471583b91bc35608cb75d0b3ceb88fa793a4e763ea228703c50ffb1b45c0e9054646c46f710164ec3ef65a882a204fd59546f3a0ebb94b8d6c6f08c4043bcfd3 gstreamer.sh e33f41360ccc4900bb76a26cc7b46bde1fb90facdf45c4fbcebc80499386939948401cacd6df9f779eafab10f4ee77ee1fef3e7bd06f483f8c2a4a644c84f327 modemmanager.conf 99773091f2653f71d4365fdf4cce048a1904cd044a714778567ce0ff6c9c9d76ad537e6e49d1d02bf385f9d35c00794d093ece0fed046072ed5e1ea65baa5201 modem-gnss.initd -d1c355440c764d4f60562fdf1973da6764be4700345bdd88de33544933c6d5f3a54b05d6d4e29207d969a6d5c657052198ac4e935ce953e5c4f67891c68ca9e8 modem-gnss.service +db993ee0d19c6c9d33ee2fdf753fabb4a964598a9660fee931f8a27e0570c2b66065848bd388138b899caa9b22f56937f56a97c592ee19dded8a056c285e6522 modem-gnss.service " diff --git a/device/community/soc-qcom/modem-gnss.service b/device/community/soc-qcom/modem-gnss.service index 85e4f2494..2a2bdb024 100644 --- a/device/community/soc-qcom/modem-gnss.service +++ b/device/community/soc-qcom/modem-gnss.service @@ -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