Package: modemmanager Version: 1.10.0-1 Severity: normal Hi,
since a while, ModemManager is using the new "strict" filter policy. Rather than probing all serial ports that are not blacklisted (which causes problems with serial devices that do not like to be probed), it now uses more specific rules about what devices are likely to be modems and does not probe any others. However, this strict policy does *not* use the blacklist (configured through udev rules), which I believe is problematic. This problem particularly surfaces when using Arduino serial devices. These development boards enumerate as TTY ACM USB devices, which cause the kernel to automatically create serial ports for them. However, in their USB descriptors, these devices advertise support for AT commands (class=2/subclass=2/protocol=1), which triggers the MM FILTER_RULE_TTY_ACM_INTERFACE and makes it probe these devices. Of course, the actual problem in this case is that these devices misadvertise themselves in their USB descriptor. I've raised this issue in the Arduino community [1] and hopefully this will be fixed in the future, but this will not help for existing devices (whose firmware is not automatically or easily updated). This means that there are a lot of Arduino devices out there which are broken by the switch to strict. Previously, these devices were handled by the blacklist, but now they are again probed when they should not. I suspect that there might be other devices that have a similar fate. Also, users (such as myself) might have collected some udev rules with blacklists over time, which now unexpectedly stop working. It seems that disabling the blacklist in strict mode is not an oversight from upstream, since they also offer a "paranoid" mode which is equal to "strict" mode but with the blacklist and greylist (manual scan only) enabled. A potential fix is to use the paranoid policy rather than the strict policy, or to explicitly enable the blacklist and/or greylist on top of the strict policy. I tried the latter, which indeed prevents MM from probing my Arduinos. I did this: $ cat /etc/systemd/system/ModemManager.service.d/override.conf [Service] Environment="MM_FILTER_RULE_TTY_BLACKLIST=1" Note that upstream discourages using the blacklists in their documentation: > It is not recommended to use this option in normal setups as the > blacklists may be obsoleted in future ModemManager versions (in favor > of using the Strict policy as default). However, I've raised this same issue upstream [2], asking them to reconsider this position. Since this issue is a regression (Stretch still has a working blacklist, but the Buster version uses the swtrict policy), it would make sense to me to still make this change in Buster, if the freeze policy allows this. [1]: https://github.com/arduino/ArduinoCore-avr/pull/92 [2]: https://gitlab.freedesktop.org/mobile-broadband/ModemManager/issues/127 Gr. Matthijs (Note that I'm running Ubuntu on this machine, but reporting this to Debian since that's where I believe this should be fixed) -- System Information: Debian Release: buster/sid APT prefers disco-updates APT policy: (990, 'disco-updates'), (990, 'disco-security'), (990, 'disco-backports'), (990, 'disco'), (50, 'testing'), (50, 'stable') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 5.0.0-16-generic (SMP w/4 CPU cores) Kernel taint flags: TAINT_WARN Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE=en_US.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled Versions of packages modemmanager depends on: ii libc6 2.29-0ubuntu2 ii libglib2.0-0 2.60.0-1 ii libgudev-1.0-0 1:232-2 ii libmbim-glib4 1.18.0-1 ii libmbim-proxy 1.18.0-1 ii libmm-glib0 1.10.0-1 ii libpolkit-gobject-1-0 0.105-25 ii libqmi-glib5 1.22.0-1.2 ii libqmi-proxy 1.22.0-1.2 ii libsystemd0 240-6ubuntu5 Versions of packages modemmanager recommends: ii usb-modeswitch 2.5.2+repack0-2ubuntu1 modemmanager suggests no packages. -- no debconf information