From 970a44f93d6afe4affafa8a98f4b1e9d4e2489c4 Mon Sep 17 00:00:00 2001 From: Jorijn van der Graaf Date: Mon, 24 Aug 2026 19:44:18 +0200 Subject: [PATCH] aports/fp6-device-tweaks: stop the modem-gnss 30 s restart loop pmOS's modem-gnss.service runs two qmicli calls, and the second -- --loc-set-nmea-types=all -- can never succeed on this modem: the LOC engine answers QMI error 94 'NotSupported' to both get and set. That is a permanent capability gap, not the boot race Restart=on-failure exists for, so the unit failed and restarted every 30 s for the whole uptime (restart counter 25 after 13 minutes; 165 over one evening). Its StartLimit does not stop it either: 10 restarts at RestartSec=30 span ~303 s, just past StartLimitInterval=300. Ship a drop-in that tolerates that one command's failure. The boot-race retry stays armed -- a LOC service that is genuinely not up still fails the first ExecStart. Nothing is lost: ModemManager issues its own set-NMEA-types and takes the same 94 regardless, and location comes from the Position Report path our modemmanager patches add. Byte-identical to the drop-in verified on the dev phone (sha256 b0b5f71b0f25c3c5a8fc9e926f187412a6711da95f773234065f37ddcc1d3c6d): across a reboot the unit runs once, Result=success, 0 restarts. Assisted-by: Claude:claude-opus-5 --- aports/device/fp6-device-tweaks/APKBUILD | 9 ++++++++- .../modem-gnss-nmea-optional.conf | 14 ++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 aports/device/fp6-device-tweaks/modem-gnss-nmea-optional.conf diff --git a/aports/device/fp6-device-tweaks/APKBUILD b/aports/device/fp6-device-tweaks/APKBUILD index 6ba018a..04485e6 100644 --- a/aports/device/fp6-device-tweaks/APKBUILD +++ b/aports/device/fp6-device-tweaks/APKBUILD @@ -9,9 +9,12 @@ # trigger; iio-sensor-proxy must use its poll backend or auto-rotate is dead # - iio-sensor-proxy restart drop-in: revives it after the known boot-time # libssc crash on unconfigured SSC +# - modem-gnss drop-in: this modem's LOC engine answers QMI 94 NotSupported +# to NMEA-type config, which is permanent, so pmOS's modem-gnss.service +# retried it every 30 s forever (its StartLimit never trips) maintainer="Jorijn van der Graaf " pkgname=fp6-device-tweaks -pkgver=3 +pkgver=4 pkgrel=0 pkgdesc="Fairphone 6 device-critical system configuration" url="https://forgejo.catcrafts.net/Catcrafts/fp6-img" @@ -26,6 +29,7 @@ source=" inv-icm42600.conf 81-fp6-accel-poll.rules iio-sensor-proxy-restart.conf + modem-gnss-nmea-optional.conf " package() { @@ -39,10 +43,13 @@ package() { "$pkgdir"/etc/udev/rules.d/81-fp6-accel-poll.rules install -Dm644 "$srcdir"/iio-sensor-proxy-restart.conf \ "$pkgdir"/etc/systemd/system/iio-sensor-proxy.service.d/restart.conf + install -Dm644 "$srcdir"/modem-gnss-nmea-optional.conf \ + "$pkgdir"/etc/systemd/system/modem-gnss.service.d/10-nmea-types-optional.conf } sha512sums=" 5e60fef47cb09cec7cab73464183dfd9e9cb32cebd1d20a67922c10c5a747eca8d106b66737d06af5c5c162a6baf37ab62a82709cc20911044face100d482919 inv-icm42600.conf cc13f6abc4538fef976c59893992dd2c193cd0eac5da37a9fb01ba421b3ba8ff303aa438ec2fe4d10f50165f90be211d4b2c39dc6ef58d0d320fba8182ccf287 81-fp6-accel-poll.rules 1800ad5c11b4e38c10b0c72b2392a6dc978a4e37bcd964182adb90d7d9aa7afc74acf102e2051dbf864021c05821f683af8943e2729e1eaa195856a0bd635e09 iio-sensor-proxy-restart.conf +8fec832be59ca616d3e6a4c0a5ef8067d25f767c79155d8b0ef5761b8d21532932235a3236807305937029efe6255a16696d05523e3e654e2dc2212a281fe12c modem-gnss-nmea-optional.conf " diff --git a/aports/device/fp6-device-tweaks/modem-gnss-nmea-optional.conf b/aports/device/fp6-device-tweaks/modem-gnss-nmea-optional.conf new file mode 100644 index 0000000..e121110 --- /dev/null +++ b/aports/device/fp6-device-tweaks/modem-gnss-nmea-optional.conf @@ -0,0 +1,14 @@ +# FP6 (milos): the modem LOC engine does not implement NMEA-type configuration +# at all -- both --loc-get-nmea-types and --loc-set-nmea-types return +# QMI protocol error (94) NotSupported. That is a permanent engine capability, +# not a boot race, so the unit's Restart=on-failure retried it every 30 s +# forever (StartLimitBurst=10/StartLimitInterval=300 never trips: 10 restarts +# at RestartSec=30 span ~303 s > 300 s). NMEA sentences are delivered by the +# engine regardless -- on-device fixes carry RMC. +# +# Tolerate the failure of that one command; a genuinely-not-up LOC service +# still fails the first ExecStart and keeps the intended boot-race retry. +[Service] +ExecStart= +ExecStart=qmicli -d qrtr://0 --loc-set-engine-lock=mt +ExecStart=-qmicli -d qrtr://0 --loc-set-nmea-types=all