Fibocom L850-GL: Probing delayed 15 seconds because trying to open QMI connection over MBIM
Versions:
- libqmi: 1.24.0
- libmbim: 1.20.2
- ModemManager: 1.12.12
The hardware used is a Lenovo T14 Gen1 (2020 Model). The WWAN modem is:
2020-11-30 07:58:58.402 kernel: usb 1-7: New USB device found, idVendor=2cb7, idProduct=0007, bcdDevice= 3.33
2020-11-30 07:58:58.402 kernel: usb 1-7: New USB device strings: Mfr=1, Product=2, SerialNumber=3
2020-11-30 07:58:58.402 kernel: usb 1-7: Product: L850-GL
2020-11-30 07:58:58.402 kernel: usb 1-7: Manufacturer: Fibocom Wireless Inc.
The WWAN modem has an USB-capable firmware.
I noticed that with this modem the probing takes quite long. This probing is repeated for every resume from S3, as the modem disconnects from USB. Here is my log file modem-manager.log containing the log output for ModemManager and kernel.
Here is the timeline of the probing process after resuming from S3.
2020-11-30 08:12:23.612 modem-manager.service: [1606723943.611391] (usbmisc/cdc-wdm0): adding device at sysfs path: /sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/usbmisc/cdc-wdm0
...
2020-11-30 08:12:27.271 modem-manager.service: [/dev/cdc-wdm0] MBIM error: OperationNotAllowed
2020-11-30 08:12:29.003 modem-manager.service: transaction 0x1 aborted, but message is not abortable
...
2020-11-30 08:12:43.674 modem-manager.service: [1606723963.674234] [device /sys/devices/pci0000:00/0000:00:14.0/usb1/1-7] exported modem at path '/org/freedesktop/ModemManager1/Modem/1'
...
2020-11-30 08:12:43.037 modem-manager.service: [1606723963.036996] Setting EPS network as supported
2020-11-30 08:12:43.037 modem-manager.service: [1606723963.037217] Modem allows up to 1 bearers
2020-11-30 08:12:43.037 modem-manager.service: [1606723963.037256] Creating bearer list (max: 1, max active: 1)
2020-11-30 08:12:43.037 modem-manager.service: [1606723963.037651] couldn't load carrier config: 'QMI PDC not supported'
...
2020-11-30 08:12:43.674 modem-manager.service: [1606723963.674234] [device /sys/devices/pci0000:00/0000:00:14.0/usb1/1-7] exported modem at path '/org/freedesktop/ModemManager1/Modem/1'
Looking at the code I noticed that the QMI over MBIM was introduced in 1.10 with the following commit:
commit c0cc694c67d9e71f200fb23e20473cc9b31d9ec0
Author: Aleksander Morgado <aleksander@aleksander.es>
Date: Tue Jun 19 11:55:10 2018 +0200
port-mbim: automatically try to open a QMI over MBIM device
Just for testing I modified the according call:
--- a/src/mm-broadband-modem-mbim.c
+++ b/src/mm-broadband-modem-mbim.c
@@ -2203,7 +2203,7 @@ initialization_started (MMBroadbandModem *self,
/* Now open our MBIM port */
mm_port_mbim_open (ctx->mbim,
#if defined WITH_QMI && QMI_MBIM_QMUX_SUPPORTED
- TRUE, /* With QMI over MBIM support if available */
+ FALSE, /* With QMI over MBIM support if available */
#endif
NULL,
(GAsyncReadyCallback)mbim_port_open_ready,
and the probing time went down from 20s to 3s. Here is a small excerpt from the a log with this patch applied:
2020-11-27 12:48:10.451 modem-manager.service: [1606481290.451207] (usbmisc/cdc-wdm0): adding device at sysfs path: /sys/devices/pci0000:00/0000:00:14.0/usb1/1-7/1-7:1.0/usbmisc/cdc-wdm0
...
2020-11-27 12:48:13.403 modem-manager.service: [1606481293.403281] [device /sys/devices/pci0000:00/0000:00:14.0/usb1/1-7] exported modem at path '/org/freedesktop/ModemManager1/Modem/1'
Multiple questions are on my mind here:
- Shouldn't the operation of establishing a QMI connection over MBIM be aborted when the first "OperationNotAllowed" error is happening?
- Do we need some quirk via udev property to control if this operation is performed?