Modem, SMS and VoLTE

On this page

T-Mobile US has no 2G/3G network, so on this carrier a phone without VoLTE can’t make calls. The FP6 modem doesn’t run IMS for mainline Linux; the IMS client has to run on the host. That client is Catcrafts’ imsd.

How it works

Results on T-Mobile US

What we found along the way:

FindingEffectHandling
5G SA registers packet-onlyno SMS path (imsd doesn’t advertise SMS over IP), data stallspin the modem to LTE (fp6-lte-pin)
The network’s PCO lists several P-CSCFs, and the first one may never answer the unprotected REGISTER (“no 401”)imsd always took the first, exited, restarted with the same list, foreverpatch 0002
A fresh REGISTER soon after a failed one got refused with 401imsd’s registration recovery then holds fresh registrations: 21 min at first, growing ×1.5 per step up to 60 min. The holds live in /run/imsd.holds, so a reboot clears themkeep upstream’s RestartSec=120, don’t shorten it; don’t restart imsd right after it registered
Call audio: imsd’s default GAIN=10 (+20 dB) amplified the speaker echofar end heard an echopatch 0003 + fp6-audio.conf
pw-record kept running with the mic open after every callprivacy and batterypatch 0004
ModemManager 1.24.2 segfaulted 3× while the IMS bearer and data came up togetherIMS took longer to come upnot reproduced once both are up; Catcrafts runs a 1.25.95 snapshot
qcom-modem-setup fails with an empty AID when there’s no SIMlog noise onlyqcom-phone-utils
The SIM reports sim-pin2 / FDN “enabled lock”noneignore
The first SMS after one boot failed (WmsMessageDeliveryFailure), and the retry workedminorwatch

Packaging (Debian toolchain only)

Source: imsd v1.1.0, GPL-3.0-only. Packages: imsd (daemon, helpers, systemd unit, D-Bus and polkit policy), imsd-ofono (GNOME Calls), imsd-plasma (Plasma Dialer; built, not tested). Upstream target: the patches to Catcrafts; the packaging to Debian (ITP, Section net).

Upstream builds only with Crafter.Build: a Flatpak toolchain with clang 23 that fetches git repositories at build time. Debian needs an offline build with its own compiler.

Patches

PatchWhatScopeTested
0001 CMake buildmirrors project.cpp: imsd-core and imsd-bus module libraries, five executables, eight test suites. import std comes from building libc++’s own std.cppm (found through libc++.modules.json) as an ordinary module library, so CMake’s experimental import std gate isn’t needed. The house lint rules (fetched at build time) aren’t rungeneric0 warnings; 8/8 tests on amd64 and arm64
0002 P-CSCFs that didn’t answer go lastims-pdn-up.sh --stopped runs as ExecStopPost=. When imsd exited non-zero after a fresh registration to a discovered P-CSCF, that address is recorded in /var/lib/imsd/pcscf-bad, with sequence numbers rather than times (the clock may be wrong early in boot), keeping the last 16. Each bring-up orders the PCO list: unrecorded addresses first, in PCO order, then recorded ones, least recently failed first, so a list where everything fails still cycles. An admin-set PCSCF= is never recordedgeneric, any carrierdead first P-CSCF → restart after 120 s → second P-CSCF → REGISTERED
0003 call audio targetsIMSD_PLAY_TARGET/IMSD_REC_TARGET → --target, IMSD_PLAY_CHANNEL/IMSD_REC_CHANNEL → --channel-map for pw-play/pw-record. Unset: unchanged behaviourgenericcalls
0004 SIGTERM before SIGKILLas root the helpers run as sudo -u <user> pw-*, and sudo can’t relay SIGKILL, so killing it left the tool running. Now SIGTERM, then SIGKILL after 1 sgeneric bug fixmic released after calls

The record is per address and survives reboots because the PCO’s P-CSCF list changes from boot to boot. Rotating within one list failed for that reason.

0002 is a shell-level fix. Upstream might prefer the daemon to try the next P-CSCF itself instead of exiting.

Debian toolchain notes

debian/rules:

In CMake, only the include paths and libraries come from pkg-config. Its -pthread compile flag would not match the shared std.pcm, and clang refuses to load a mismatched module.

Before an upload

Device configuration for imsd (in fp6-mobian-support)

imsd.service.d/fp6-audio.conf:

Environment=IMSD_PLAY_TARGET=ec_sink IMSD_REC_TARGET=ec_source
Environment=IMSD_PLAY_CHANNEL=FL IMSD_REC_CHANNEL=FL
Environment=GAIN=1.5

fp6-lte-pin

ModemManager doesn’t persist allowed modes, and the modem or the Settings panel switched them back to 3g/4g/5g once. fp6-lte-pin.service (WantedBy/PartOf ModemManager) watches ModemManager with gdbus monitor. When a modem appears, changes state or changes its current modes, it re-applies mmcli --set-allowed-modes=$FP6_ALLOWED_MODES:

Tested on T-Mobile US: switched 2g,3g,4g,5g / 5g to allowed: 4g about 70 s after boot.

This is a carrier workaround, not device support. Where 5G SA carries SMS or VoLTE is fine on 5G, it costs speed for nothing. Upstream, it should be opt-in. The real fixes are SMS over IP in imsd and 5G SA data in newer ModemManager.