Skip to content

modemmanager: suppress hotplug log noise - #30578

Open
micpf wants to merge 1 commit into
openwrt:openwrt-25.12from
micpf:mm-2512-noise
Open

micpf wants to merge 1 commit into
openwrt:openwrt-25.12from
micpf:mm-2512-noise

Conversation

@micpf

@micpf micpf commented Sep 22, 2026

Copy link
Copy Markdown
Contributor

Backport of the modemmanager hotplug noise reduction to openwrt-25.12, as requested in #30571.

Context

On master this landed as three commits:

openwrt-25.12 never received any of them, so it still emits the per-device "event processed" info line for every virtual net device (bridges, veth, SQM IFB, GRE, tun/tap, ...) and a daemon.err per modem port when the live mmcli --report-kernel-event runs before ModemManager is up.

Note the QMAP/QMI/MBIM regression fixed by #30571 does not exist on 25.12, because the commit that caused it (7885dff933e7, the blanket /devices/virtual/* exit) was never backported. This PR therefore brings the noise reduction only, in its final mux-safe form.

Change

Squashed into a single commit to avoid landing the intermediate buggy 7885dff933e7 step on a release branch. mm_report_event() becomes the single authority:

  • returns non-zero when it drops a virtual device (still keeping qmapmux*/qmimux*/mbimmux*),
  • returns success when it caches an event for a not-yet-running ModemManager,
  • the hotplug scripts (net, tty, wwan) only log "event processed" when the event was actually reported,
  • the live mmcli call is skipped while MM is down (the wrapper replays from cache).

The resulting net/modemmanager files are byte-for-byte identical to master. PKG_RELEASE bumped 10 → 11.

Maintainer checklist

  • PR title has proper package prefix modemmanager:
  • Tested the code in this PR
  • PKG_RELEASE bumped

Backport the modemmanager hotplug noise reduction from master.

On every boot and hotplug replay each net/tty/wwan uevent is handed to
mm_report_event via the hotplug scripts, which log an info "event
processed" line to daemon.info before mm_report_event decides whether
the device is relevant.  On a target with SQM tunnels, bridges and veth
that is dozens of pointless info lines per boot.  In addition, procd
replays every uevent before /etc/init.d/modemmanager starts, so the live
mmcli --report-kernel-event call fails with "couldn't get bus" and is
logged as daemon.err per modem port.

Make mm_report_event the single authority on what is worth reporting: it
now returns non-zero when it drops a virtual device (keeping the QMAP/
QMI/MBIM multiplexing netdevices qmapmux*/qmimux*/mbimmux*, which are
virtual but are real modem data ports) and returns success when it caches
an event for a not-yet-running ModemManager.  The hotplug scripts only
emit their "event processed" info log when the event was actually
reported.  The live mmcli call is skipped while ModemManager is down; the
wrapper replays the cache once it is up.

This combines the master commits below into a single change; the
intermediate /devices/virtual guard of 7885dff, which wrongly
dropped the mux data ports, is superseded by the mm_report_event based
filtering and is therefore not applied on its own.

(cherry picked from commit 187382d)
(cherry picked from commit f094afb)
Signed-off-by: Michael Pfeifroth <micpf@westermo.com>

@openwrt-ai openwrt-ai left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed 1 new commit; no new issues found.


Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

release/25.12 Issues/PR on branch 25.12

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants