NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
17.46k stars 13.65k forks source link

WWAN interface changes name and stops working after suspend #22533

Open mikael-andersson opened 7 years ago

mikael-andersson commented 7 years ago

Issue description

WWAN interface changes name and stops working after suspend, but usually starts working after another suspend. The problem reappears after some suspends but under which circumstances I have not identified.

First I will show log excerpt from when interface works and further down when it works.

After a suspend, but not every one, the WWAN interface changes name and stops working:

mikael@nixos> nmcli dev DEVICE TYPE STATE CONNECTION ttyACM1 gsm disconnected --
wlp3s0 wifi disconnected --
lo loopback unmanaged --

Below excerpt from the log when I cannot connect with my WWAN:

Feb 07 08:39:56 nixos kernel: cdc_ncm 3-4:1.6 wwp0s20u4i6: unregister 'cdc_ncm' usb-0000:00:14.0-4, Mobile Broadband Network Device ... (Bluetooth stuff) Feb 07 08:39:56 nixos systemd-sleep[21883]: System resumed. Feb 07 08:39:56 nixos ModemManager[4490]: (net/enp0s20u2): released by modem /sys/devices/pci0000:00/0000:00:14.0/usb3/3-2 Feb 07 08:39:56 nixos systemd[1]: Started Suspend. ... (Bluetooth stuff) Feb 07 08:39:56 nixos ModemManager[4490]: (tty/ttyACM1): released by modem /sys/devices/pci0000:00/0000:00:14.0/usb3/3-4 Feb 07 08:39:56 nixos systemd[1]: sleep.target: Unit not needed anymore. Stopping. Feb 07 08:39:56 nixos ModemManager[4490]: (usbmisc/cdc-wdm1): released by modem /sys/devices/pci0000:00/0000:00:14.0/usb3/3-4 Feb 07 08:39:56 nixos systemd[1]: Stopped target Sleep. Feb 07 08:39:56 nixos ModemManager[4490]: (tty/ttyACM0): released by modem /sys/devices/pci0000:00/0000:00:14.0/usb3/3-4 Feb 07 08:39:56 nixos systemd[1]: Reached target Suspend. Feb 07 08:39:56 nixos ModemManager[4490]: (usbmisc/cdc-wdm0): released by modem /sys/devices/pci0000:00/0000:00:14.0/usb3/3-4 Feb 07 08:39:56 nixos systemd-logind[799]: Operation 'sleep' finished. Feb 07 08:39:56 nixos ModemManager[4490]: (net/wwp0s20u4i6): released by modem /sys/devices/pci0000:00/0000:00:14.0/usb3/3-4 Feb 07 08:39:56 nixos systemd[1]: suspend.target: Unit is bound to inactive unit systemd-suspend.service. Stopping, too. Feb 07 08:39:56 nixos ModemManager[4490]: (tty/ttyACM2): released by modem /sys/devices/pci0000:00/0000:00:14.0/usb3/3-4 ... Feb 07 08:39:58 nixos kernel: cdc_acm 3-4:1.1: ttyACM0: USB ACM device Feb 07 08:39:58 nixos kernel: cdc_acm 3-4:1.3: ttyACM1: USB ACM device Feb 07 08:39:58 nixos kernel: cdc_wdm 3-4:1.5: cdc-wdm0: USB WDM device Feb 07 08:39:58 nixos kernel: cdc_ncm 3-4:1.6: MAC-Address: 02:15:e0:ec:01:00 Feb 07 08:39:58 nixos kernel: cdc_ncm 3-4:1.6 wwan0: register 'cdc_ncm' at usb-0000:00:14.0-4, Mobile Broadband Network Device, 02:15:e0:ec:01:00 Feb 07 08:39:58 nixos kernel: cdc_wdm 3-4:1.8: cdc-wdm1: USB WDM device Feb 07 08:39:58 nixos kernel: cdc_acm 3-4:1.9: ttyACM2: USB ACM device ... (wifi interface) Feb 07 08:39:58 nixos kernel: cdc_ncm 3-4:1.6 wwp0s20u4i6: renamed from wwan0 Feb 07 08:39:58 nixos kernel: cdc_wdm 3-4:1.8: wdm_int_callback - 0 bytes Feb 07 08:39:58 nixos kernel: cdc_wdm 3-4:1.5: wdm_int_callback - 0 bytes Feb 07 08:39:58 nixos systemd[1]: Started Power Management Daemon. Feb 07 08:39:58 nixos systemd[1]: Started Post-Resume Actions. Feb 07 08:39:58 nixos systemd[1]: Reached target Post-Resume Actions. Feb 07 08:39:58 nixos systemd[1]: post-resume.target: Unit not needed anymore. Stopping. Feb 07 08:39:58 nixos systemd[1]: Stopped target Post-Resume Actions. Feb 07 08:40:00 nixos ModemManager[4490]: Creating modem with plugin 'Ericsson MBM' and '6' ports Feb 07 08:40:00 nixos ModemManager[4490]: Modem for device at '/sys/devices/pci0000:00/0000:00:14.0/usb3/3-4' successfully created Feb 07 08:40:00 nixos ModemManager[4490]: couldn't load Supported Modes: 'Couldn't retrieve supported modes' Feb 07 08:40:00 nixos ModemManager[4490]: Couldn't load unlock retries: 'Unknown error' Feb 07 08:40:00 nixos ModemManager[4490]: Modem: state changed (unknown -> locked) Feb 07 08:40:00 nixos ModemManager[4490]: couldn't load IMSI: 'SIM PIN required' Feb 07 08:40:00 nixos ModemManager[4490]: couldn't load Operator identifier: 'Cannot load Operator ID without IMSI' Feb 07 08:40:00 nixos ModemManager[4490]: couldn't load Operator name: 'Could not parse the CRSM response' Feb 07 08:40:00 nixos ModemManager[4490]: couldn't load list of Own Numbers: 'SIM PIN required' Feb 07 08:40:00 nixos NetworkManager[22212]: [1486453200.6247] (ttyACM1): cannot enable/disable modem: locked

After most suspends, the WWAN interface gets the right name and works (I might however need to restart the ModemManager to get it to work, but I regard that as a separate and minor problem):

DEVICE TYPE STATE CONNECTION cdc-wdm0 gsm disconnected --
wlp3s0 wifi disconnected --
lo loopback unmanaged --

Below excerpt from the log when I can connect with my WWAN:

Feb 07 20:05:53 nixos kernel: cdc_ncm 3-4:1.6 wwp0s20u4i6: unregister 'cdc_ncm' usb-0000:00:14.0-4, Mobile Broadband Network Device
.. (of no interest what I could see)
Feb 07 20:05:53 nixos ModemManager[4490]: <info>  (tty/ttyACM0): released by modem /sys/devices/pci0000:00/0000:00:14.0/usb3/3-4
Feb 07 20:05:53 nixos ModemManager[4490]: <info>  (usbmisc/cdc-wdm0): released by modem /sys/devices/pci0000:00/0000:00:14.0/usb3/3-4
Feb 07 20:05:53 nixos ModemManager[4490]: <info>  (net/wwp0s20u4i6): released by modem /sys/devices/pci0000:00/0000:00:14.0/usb3/3-4
Feb 07 20:05:53 nixos ModemManager[4490]: <info>  (usbmisc/cdc-wdm1): released by modem /sys/devices/pci0000:00/0000:00:14.0/usb3/3-4
Feb 07 20:05:53 nixos ModemManager[4490]: <info>  (tty/ttyACM1): released by modem /sys/devices/pci0000:00/0000:00:14.0/usb3/3-4
Feb 07 20:05:53 nixos ModemManager[4490]: <info>  (tty/ttyACM2): released by modem /sys/devices/pci0000:00/0000:00:14.0/usb3/3-4

Feb 07 20:05:53 nixos systemd[1]: bluetooth.target: Unit not needed anymore. Stopping.
Feb 07 20:05:53 nixos systemd[1]: Stopped target Bluetooth.
Feb 07 20:05:53 nixos kernel: usb 3-4: new high-speed USB device number 23 using xhci_hcd
Feb 07 20:05:53 nixos kernel: psmouse serio1: synaptics: queried max coordinates: x [..5678], y [..4732]
Feb 07 20:05:53 nixos kernel: psmouse serio1: synaptics: queried min coordinates: x [1264..], y [1124..]
Feb 07 20:05:54 nixos kernel: iwlwifi 0000:03:00.0: L1 Enabled - LTR Disabled
Feb 07 20:05:54 nixos kernel: iwlwifi 0000:03:00.0: L1 Enabled - LTR Disabled
Feb 07 20:05:54 nixos kernel: iwlwifi 0000:03:00.0: Radio type=0x1-0x2-0x0
Feb 07 20:05:54 nixos systemd[1]: Reached target Bluetooth.
Feb 07 20:05:54 nixos kernel: usb 3-4: New USB device found, idVendor=0bdb, idProduct=1927
Feb 07 20:05:54 nixos kernel: usb 3-4: New USB device strings: Mfr=1, Product=2, SerialNumber=5
Feb 07 20:05:54 nixos kernel: usb 3-4: Product: H5321 gw
Feb 07 20:05:54 nixos kernel: usb 3-4: Manufacturer: Lenovo
Feb 07 20:05:54 nixos kernel: usb 3-4: SerialNumber: 1E397F6603252A10
Feb 07 20:05:54 nixos kernel: usbhid 3-4:1.0: can't add hid device: -71
Feb 07 20:05:54 nixos kernel: usbhid: probe of 3-4:1.0 failed with error -71
Feb 07 20:05:54 nixos kernel: usb 3-4: USB disconnect, device number 23
Feb 07 20:05:54 nixos kernel: IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready

Feb 07 20:05:54 nixos NetworkManager[22470]: <warn>  [1486494354.1221] (ttyACM1): cannot enable/disable modem: locked
Feb 07 20:05:54 nixos systemd[1]: Stopped Network Manager.
Feb 07 20:05:54 nixos systemd[1]: Starting Network Manager...
Feb 07 20:05:54 nixos systemd[1]: Started Network Manager.
Feb 07 20:05:54 nixos dbus[804]: [system] Activating via systemd: service name='org.freedesktop.nm_dispatcher' unit='dbus-org.freedesktop.nm-dispatcher.service'
Feb 07 20:05:54 nixos systemd[1]: Starting Network Manager Script Dispatcher Service...
Feb 07 20:05:54 nixos systemd[1]: Stopping Power Management Daemon...
Feb 07 20:05:54 nixos systemd[1]: Stopped Power Management Daemon.
Feb 07 20:05:54 nixos systemd[1]: Starting Power Management Daemon...
Feb 07 20:05:54 nixos dbus[804]: [system] Successfully activated service 'org.freedesktop.nm_dispatcher'
Feb 07 20:05:54 nixos systemd[1]: Started Network Manager Script Dispatcher Service.
Feb 07 20:05:54 nixos NetworkManager[23591]: <warn>  [1486494354.4564] keyfile: 'hostname' option is deprecated and has no effect
Feb 07 20:05:54 nixos systemd[1]: Started Power Management Daemon.
Feb 07 20:05:54 nixos systemd[1]: Started Post-Resume Actions.
Feb 07 20:05:54 nixos systemd[1]: Reached target Post-Resume Actions.
Feb 07 20:05:54 nixos systemd[1]: post-resume.target: Unit not needed anymore. Stopping.
Feb 07 20:05:54 nixos systemd[1]: Stopped target Post-Resume Actions.
Feb 07 20:05:54 nixos dbus[804]: [system] Activating via systemd: service name='org.freedesktop.hostname1' unit='dbus-org.freedesktop.hostname1.service'
Feb 07 20:05:54 nixos systemd[1]: Starting Hostname Service...
Feb 07 20:05:54 nixos dbus[804]: [system] Successfully activated service 'org.freedesktop.hostname1'
Feb 07 20:05:54 nixos systemd[1]: Started Hostname Service.
Feb 07 20:05:54 nixos nm-dispatcher[23599]: req:1 'hostname': new request (4 scripts)
Feb 07 20:05:54 nixos nm-dispatcher[23599]: req:1 'hostname': start running ordered scripts...
Feb 07 20:05:54 nixos kernel: IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready
Feb 07 20:05:54 nixos kernel: IPv6: ADDRCONF(NETDEV_UP): wlp3s0: link is not ready
Feb 07 20:05:55 nixos kernel: usb 3-4: new high-speed USB device number 24 using xhci_hcd
Feb 07 20:05:55 nixos kernel: usb 3-4: New USB device found, idVendor=0bdb, idProduct=1926
Feb 07 20:05:55 nixos kernel: usb 3-4: New USB device strings: Mfr=1, Product=2, SerialNumber=3
Feb 07 20:05:55 nixos kernel: usb 3-4: Product: H5321 gw
Feb 07 20:05:55 nixos kernel: usb 3-4: Manufacturer: Lenovo
Feb 07 20:05:55 nixos kernel: usb 3-4: SerialNumber: 1E397F6603252A10
Feb 07 20:05:55 nixos kernel: cdc_acm 3-4:1.1: ttyACM0: USB ACM device
Feb 07 20:05:55 nixos kernel: cdc_acm 3-4:1.3: ttyACM1: USB ACM device
Feb 07 20:05:55 nixos kernel: cdc_wdm 3-4:1.5: cdc-wdm0: USB WDM device
Feb 07 20:05:55 nixos kernel: cdc_ncm 3-4:1.6: MAC-Address: 02:15:e0:ec:01:00
Feb 07 20:05:55 nixos kernel: cdc_ncm 3-4:1.6 wwan0: register 'cdc_ncm' at usb-0000:00:14.0-4, Mobile Broadband Network Device, 02:15:e0:ec:01:00
Feb 07 20:05:55 nixos kernel: cdc_wdm 3-4:1.8: cdc-wdm1: USB WDM device
Feb 07 20:05:55 nixos kernel: cdc_acm 3-4:1.9: ttyACM2: USB ACM device
Feb 07 20:05:55 nixos kernel: cdc_ncm 3-4:1.6 wwp0s20u4i6: renamed from wwan0
Feb 07 20:05:55 nixos kernel: cdc_wdm 3-4:1.8: wdm_int_callback - 0 bytes
Feb 07 20:05:55 nixos kernel: cdc_wdm 3-4:1.5: wdm_int_callback - 0 bytes
Feb 07 20:05:57 nixos ModemManager[4490]: <info>  Creating modem with plugin 'Ericsson MBM' and '6' ports
Feb 07 20:05:57 nixos ModemManager[4490]: <info>  Modem for device at '/sys/devices/pci0000:00/0000:00:14.0/usb3/3-4' successfully created
Feb 07 20:05:58 nixos ModemManager[4490]: <warn>  couldn't load Supported Modes: 'Couldn't retrieve supported modes'
Feb 07 20:05:58 nixos ModemManager[4490]: <warn>  couldn't load Power State: 'Unknown error'
Feb 07 20:05:58 nixos ModemManager[4490]: <warn>  Couldn't load unlock retries: 'Unknown error'
Feb 07 20:05:58 nixos ModemManager[4490]: <info>  Modem: state changed (unknown -> locked)
Feb 07 20:05:58 nixos ModemManager[4490]: <warn>  couldn't load IMSI: 'SIM PIN required'
Feb 07 20:05:58 nixos ModemManager[4490]: <warn>  couldn't load Operator identifier: 'Cannot load Operator ID without IMSI'
Feb 07 20:05:58 nixos ModemManager[4490]: <warn>  couldn't load Operator name: 'Could not parse the CRSM response'
Feb 07 20:05:58 nixos ModemManager[4490]: <warn>  couldn't load list of Own Numbers: 'SIM PIN required'
Feb 07 20:05:58 nixos NetworkManager[23591]: <warn>  [1486494358.4301] (cdc-wdm0): cannot enable/disable modem: locked
Feb 07 20:05:58 nixos NetworkManager[23591]: <warn>  [1486494358.4344] (cdc-wdm0): No agents were available for this request.
Feb 07 20:05:58 nixos NetworkManager[23591]: <warn>  [1486494358.4349] device (cdc-wdm0): Activation: failed for connection 'gsm-cdc-wdm0'

I just realized that I should have written down exactly what error message I get when trying to connect when the device name is such that I cannot connect. I will try to complement with that information as soon as I get the problem again.

Steps to reproduce

I have not been able to determine what to do to reproduce more than suspend a number of times until the problem reappears.

Technical details

16.09.1623.74f24c7 (Flounder)

nix-env (Nix) 1.11.6

"16.09.1623.74f24c7"

nemanjan00 commented 6 years ago

I have the same problem on Arch linux. Did you find any solutions?

cyrinux commented 6 years ago

Same problem too on archlinux

stale[bot] commented 4 years ago

Thank you for your contributions.

This has been automatically marked as stale because it has had no activity for 180 days.

If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.

Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse.
  3. Ask on the #nixos channel on irc.freenode.net.