<html>
  <head>

    <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  </head>
  <body>
    Hi list,<br>
    I'm using Ubuntu 18.04.3 lts on a Lenovo Thinkpad X1 carbon i7-6600
    with modem LTE Sierra
    ID_MODEL=Sierra_Wireless_EM7455_Qualcomm_Snapdragon_X7_LTE-A.<br>
    When the laptop is power up I can use the modem, but when the laptop
    went to sleep and after I resume it, the modem disappear.<br>
    Now the laptop is resumed and the modem is not available to
    ModemManager 'cause this error:<br>
    <br>
    root@angelo-thinkpad-x1-carbon-4th:~# systemctl status ModemManager<br>
    ● ModemManager.service - Modem Manager<br>
       Loaded: loaded (/lib/systemd/system/ModemManager.service;
    enabled; vendor preset: enabled)<br>
       Active: inactive (dead) since Sat 2019-12-07 16:52:35 CET; 30min
    ago<br>
      Process: 13379 ExecStart=/usr/sbin/ModemManager
    --filter-policy=strict (code=exited, status=0/SUCCESS)<br>
     Main PID: 13379 (code=exited, status=0/SUCCESS)<br>
    <br>
    dic 07 16:52:35 angelo-thinkpad-x1-carbon-4th systemd[1]: Starting
    Modem Manager...<br>
    dic 07 16:52:35 angelo-thinkpad-x1-carbon-4th ModemManager[13379]:
    <info>  ModemManager (version 1.10.0) starting in system
    bus...<br>
    dic 07 16:52:35 angelo-thinkpad-x1-carbon-4th ModemManager[13379]:
    <warn>  Could not acquire the 'org.freedesktop.ModemManager1'
    service name<br>
    dic 07 16:52:35 angelo-thinkpad-x1-carbon-4th ModemManager[13379]:
    <info>  ModemManager is shut down<br>
    dic 07 16:52:35 angelo-thinkpad-x1-carbon-4th systemd[1]: Started
    Modem Manager.<br>
    <br>
    I looked at the archive, but I have found no one solution acceptable
    for me.<br>
    <br>
    Issuing lsusb I can found the modem:<br>
    <br>
    root@angelo-thinkpad-x1-carbon-4th:~# lsusb<br>
    Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub<br>
    Bus 001 Device 005: ID 138a:0090 Validity Sensors, Inc. <br>
    Bus 001 Device 004: ID 04f2:b5c1 Chicony Electronics Co., Ltd <br>
    Bus 001 Device 003: ID 8087:0a2b Intel Corp. <br>
    <b>B</b><b>us 001 Device 017: ID 1199:9079 Sierra Wireless, Inc. </b><br>
    Bus 001 Device 018: ID 1a86:7523 QinHeng Electronics HL-340
    USB-Serial adapter<br>
    Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub<br>
    <br>
    and the file in /etc/udev/rules.d<br>
    <br>
    root@angelo-thinkpad-x1-carbon-4th:~# more
    /etc/udev/rules.d/99-sierra.rules <br>
    ACTION!="add|change", GOTO="mbim_to_qmi_rules_end"<br>
    SUBSYSTEM!="usb|drivers", GOTO="mbim_to_qmi_rules_end"<br>
    <br>
    # load qmi_wwan module<br>
    SUBSYSTEM=="usb", \<br>
    ATTR{idVendor}=="1199", ATTR{idProduct}=="9079", \<br>
    RUN+="/sbin/modprobe -b qmi_wwan"<br>
    <br>
    # force Dell WWAN 5809e to configuration #1<br>
    SUBSYSTEM=="usb", \<br>
    ATTR{idVendor}=="1199", ATTR{idProduct}=="9079", \<br>
    ATTR{bConfigurationValue}="1"<br>
    <br>
    # add the new id in the qmi_wwan driver<br>
    SUBSYSTEM=="drivers", \<br>
    ENV{DEVPATH}=="/bus/usb/drivers/qmi_wwan", \<br>
    ATTR{new_id}="1199 9079"<br>
    <br>
    # load qcserial module<br>
    SUBSYSTEM=="usb", \<br>
    ATTR{idVendor}=="1199", ATTR{idProduct}=="9079", \<br>
    RUN+="/sbin/modprobe -b qcserial"<br>
    <br>
    # add the new id in the qcserial driver<br>
    SUBSYSTEM=="drivers", \<br>
    ENV{DEVPATH}=="/bus/usb-serial/drivers/qcserial", \<br>
    ATTR{new_id}="1199 9079"<br>
    <br>
    LABEL="mbim_to_qmi_rules_end"<br>
    <br>
    also <br>
    root@angelo-thinkpad-x1-carbon-4th:~# udevadm info --attribute
    /sys/class/net/wwp0s20f0u2i12<br>
    <br>
    Udevadm info starts with the device specified by the devpath and
    then<br>
    walks up the chain of parent devices. It prints for every device<br>
    found, all possible attributes in the udev rules key format.<br>
    A rule to match, can be composed by the attributes of the device<br>
    and the attributes from one single parent device.<br>
    <br>
      looking at device
    '/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.12/net/wwp0s20f0u2i12':<br>
        KERNEL=="wwp0s20f0u2i12"<br>
        SUBSYSTEM=="net"<br>
        DRIVER==""<br>
        ATTR{addr_assign_type}=="3"<br>
        ATTR{addr_len}=="6"<br>
        ATTR{address}=="e2:ab:3e:a9:14:02"<br>
        ATTR{broadcast}=="ff:ff:ff:ff:ff:ff"<br>
        ATTR{carrier_changes}=="0"<br>
        ATTR{carrier_down_count}=="0"<br>
        ATTR{carrier_up_count}=="0"<br>
        ATTR{dev_id}=="0x0"<br>
        ATTR{dev_port}=="0"<br>
        ATTR{flags}=="0x1002"<br>
        ATTR{gro_flush_timeout}=="0"<br>
        ATTR{ifalias}==""<br>
        ATTR{ifindex}=="28"<br>
        ATTR{iflink}=="28"<br>
        ATTR{link_mode}=="0"<br>
        ATTR{mtu}=="1500"<br>
        ATTR{name_assign_type}=="4"<br>
        ATTR{netdev_group}=="0"<br>
        ATTR{operstate}=="down"<br>
        ATTR{proto_down}=="0"<br>
        ATTR{tx_queue_len}=="1000"<br>
        ATTR{type}=="1"<br>
    <br>
      looking at parent device
    '/devices/pci0000:00/0000:00:14.0/usb1/1-2/1-2:1.12':<br>
        KERNELS=="1-2:1.12"<br>
        SUBSYSTEMS=="usb"<br>
        DRIVERS=="qmi_wwan"<br>
        ATTRS{authorized}=="1"<br>
        ATTRS{bAlternateSetting}==" 0"<br>
        ATTRS{bInterfaceClass}=="02"<br>
        ATTRS{bInterfaceNumber}=="0c"<br>
        ATTRS{bInterfaceProtocol}=="00"<br>
        ATTRS{bInterfaceSubClass}=="0e"<br>
        ATTRS{bNumEndpoints}=="01"<br>
        ATTRS{iad_bFirstInterface}=="0c"<br>
        ATTRS{iad_bFunctionClass}=="02"<br>
        ATTRS{iad_bFunctionProtocol}=="00"<br>
        ATTRS{iad_bFunctionSubClass}=="0e"<br>
        ATTRS{iad_bInterfaceCount}=="02"<br>
        ATTRS{supports_autosuspend}=="1"<br>
    <br>
      looking at parent device
    '/devices/pci0000:00/0000:00:14.0/usb1/1-2':<br>
        KERNELS=="1-2"<br>
        SUBSYSTEMS=="usb"<br>
        DRIVERS=="usb"<br>
        ATTRS{authorized}=="1"<br>
        ATTRS{avoid_reset_quirk}=="0"<br>
        ATTRS{bConfigurationValue}=="1"<br>
        ATTRS{bDeviceClass}=="00"<br>
        ATTRS{bDeviceProtocol}=="00"<br>
        ATTRS{bDeviceSubClass}=="00"<br>
        ATTRS{bMaxPacketSize0}=="64"<br>
        ATTRS{bMaxPower}=="500mA"<br>
        ATTRS{bNumConfigurations}=="1"<br>
        ATTRS{bNumInterfaces}==" 2"<br>
        ATTRS{bcdDevice}=="0006"<br>
        ATTRS{bmAttributes}=="a0"<br>
        ATTRS{busnum}=="1"<br>
        ATTRS{configuration}==""<br>
        ATTRS{devnum}=="17"<br>
        ATTRS{devpath}=="2"<br>
        ATTRS{idProduct}=="9079"<br>
        ATTRS{idVendor}=="1199"<br>
        ATTRS{ltm_capable}=="no"<br>
        ATTRS{manufacturer}=="Sierra Wireless, Incorporated"<br>
        ATTRS{maxchild}=="0"<br>
        ATTRS{product}=="Sierra Wireless EM7455 Qualcomm Snapdragon X7
    LTE-A"<br>
        ATTRS{quirks}=="0x0"<br>
        ATTRS{removable}=="fixed"<br>
        ATTRS{rx_lanes}=="1"<br>
        ATTRS{serial}=="LF71223242011020"<br>
        ATTRS{speed}=="480"<br>
        ATTRS{tx_lanes}=="1"<br>
        ATTRS{urbnum}=="82"<br>
        ATTRS{version}==" 2.10"<br>
    <br>
      looking at parent device '/devices/pci0000:00/0000:00:14.0/usb1':<br>
        KERNELS=="usb1"<br>
        SUBSYSTEMS=="usb"<br>
        DRIVERS=="usb"<br>
        ATTRS{authorized}=="1"<br>
        ATTRS{authorized_default}=="1"<br>
        ATTRS{avoid_reset_quirk}=="0"<br>
        ATTRS{bConfigurationValue}=="1"<br>
        ATTRS{bDeviceClass}=="09"<br>
        ATTRS{bDeviceProtocol}=="01"<br>
        ATTRS{bDeviceSubClass}=="00"<br>
        ATTRS{bMaxPacketSize0}=="64"<br>
        ATTRS{bMaxPower}=="0mA"<br>
        ATTRS{bNumConfigurations}=="1"<br>
        ATTRS{bNumInterfaces}==" 1"<br>
        ATTRS{bcdDevice}=="0500"<br>
        ATTRS{bmAttributes}=="e0"<br>
        ATTRS{busnum}=="1"<br>
        ATTRS{configuration}==""<br>
        ATTRS{devnum}=="1"<br>
        ATTRS{devpath}=="0"<br>
        ATTRS{idProduct}=="0002"<br>
        ATTRS{idVendor}=="1d6b"<br>
        ATTRS{interface_authorized_default}=="1"<br>
        ATTRS{ltm_capable}=="no"<br>
        ATTRS{manufacturer}=="Linux 5.0.0-37-generic xhci-hcd"<br>
        ATTRS{maxchild}=="12"<br>
        ATTRS{product}=="xHCI Host Controller"<br>
        ATTRS{quirks}=="0x0"<br>
        ATTRS{removable}=="unknown"<br>
        ATTRS{rx_lanes}=="1"<br>
        ATTRS{serial}=="0000:00:14.0"<br>
        ATTRS{speed}=="480"<br>
        ATTRS{tx_lanes}=="1"<br>
        ATTRS{urbnum}=="6043"<br>
        ATTRS{version}==" 2.00"<br>
    <br>
      looking at parent device '/devices/pci0000:00/0000:00:14.0':<br>
        KERNELS=="0000:00:14.0"<br>
        SUBSYSTEMS=="pci"<br>
        DRIVERS=="xhci_hcd"<br>
        ATTRS{ari_enabled}=="0"<br>
        ATTRS{broken_parity_status}=="0"<br>
        ATTRS{class}=="0x0c0330"<br>
        ATTRS{consistent_dma_mask_bits}=="64"<br>
        ATTRS{d3cold_allowed}=="1"<br>
        ATTRS{dbc}=="disabled"<br>
        ATTRS{device}=="0x9d2f"<br>
        ATTRS{dma_mask_bits}=="64"<br>
        ATTRS{driver_override}=="(null)"<br>
        ATTRS{enable}=="1"<br>
        ATTRS{irq}=="122"<br>
        ATTRS{local_cpulist}=="0-3"<br>
        ATTRS{local_cpus}=="f"<br>
        ATTRS{msi_bus}=="1"<br>
        ATTRS{numa_node}=="-1"<br>
        ATTRS{revision}=="0x21"<br>
        ATTRS{subsystem_device}=="0x2238"<br>
        ATTRS{subsystem_vendor}=="0x17aa"<br>
        ATTRS{vendor}=="0x8086"<br>
    <br>
      looking at parent device '/devices/pci0000:00':<br>
        KERNELS=="pci0000:00"<br>
        SUBSYSTEMS==""<br>
        DRIVERS==""<br>
    <br>
    <br>
    <br>
    thanks,<br>
    Angelo<br>
    <br>
  </body>
</html>