Upon upgrading from Fedora 41 to 42, I noticed that the USB tethering just doesn’t work

networkctl recognizes the device as “wwan” now, instead of “ether”. If I load up a previous kernel, USB tethering works normally.

This seems to be a change in the kernel, and probably won’t be reverted in the future. What do I do?

More detail in this comment

You know what? Fuck this. I just backed my shit up and installed Debian. Still, please try to look into this, this could be a problem for many others

  • konki@lemmy.one
    link
    fedilink
    arrow-up
    5
    ·
    2 days ago

    I have a similar problem on OpenSUSE. The solution for me is running modprobe rndis_host.

  • IHave69XiBucks@lemmygrad.ml
    link
    fedilink
    arrow-up
    5
    ·
    edit-2
    2 days ago

    I’ve been working on a phone tethering router so might have some insight here for you. Android can use CDC or RNDIS to tether. It depends on your phone which ones gonna be used. Try to figure out which one its using (can do this by watching logs when plugging in usb usually itll say there which type of device is connecting). When i was doing the router i had to make sure cdc_ether and rndis_host kernel modules were both loaded to ensure compatibility. It might be as simple as manually loading a module in the new kernel version. Although I’m not exactly sure how it’ll work on fedora i was doing this all on OPNsense.

    What i was doing was tethering the phone to a router (old thinkpad running router OS) then passing that connection on to its network and connecting to the Access Point on the network with my laptop. I still havent fully worked out the kinks yet but its going pretty well. Sorry i can’t be more specific for your case, but hopefully it gives you some terms you can use to google more effectively at the least.

      • IHave69XiBucks@lemmygrad.ml
        link
        fedilink
        arrow-up
        2
        ·
        2 days ago

        try to look up how to enable rndis in fedora manually and try it. Might work. Or you might need to download something too.

        • maliciousonion@lemmy.mlOP
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          2 days ago

          Below are the kernel logs for when I connect the USB on F42 (new kernel)

          new(the one that doesn't work)
          Apr 17 hh:mm:15 fedora kernel: usb 5-8: USB disconnect, device number 6
          Apr 17 hh:mm:15 fedora kernel: rndis_host 5-8:1.0 wwp0s29f7u8: unregister 'rndis_host' usb-0000:00:1d.7-8, Mobile Broadband RNDIS device
          Apr 17 hh:mm:15 fedora systemd-networkd[2818]: wwp0s29f7u8: Link DOWN
          Apr 17 hh:mm:15 fedora avahi-daemon[1092]: Interface wwp0s29f7u8.IPv6 no longer relevant for mDNS.
          Apr 17 hh:mm:15 fedora systemd-networkd[2818]: wwp0s29f7u8: Lost carrier
          Apr 17 hh:mm:15 fedora avahi-daemon[1092]: Leaving mDNS multicast group on interface wwp0s29f7u8.IPv6 with address fe80::acfa:54ff:fee2:5884.
          Apr 17 hh:mm:15 fedora avahi-daemon[1092]: Withdrawing address record for fe80::acfa:54ff:fee2:5884 on wwp0s29f7u8.
          Apr 17 hh:mm:20 fedora kernel: usb 5-8: new high-speed USB device number 7 using ehci-pci
          Apr 17 hh:mm:20 fedora kernel: usb 5-8: New USB device found, idVendor=2717, idProduct=ff88, bcdDevice= 4.19
          Apr 17 hh:mm:20 fedora kernel: usb 5-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
          Apr 17 hh:mm:20 fedora kernel: usb 5-8: Product: Redmi Note 11
          Apr 17 hh:mm:20 fedora kernel: usb 5-8: Manufacturer: Xiaomi
          Apr 17 hh:mm:20 fedora kernel: usb 5-8: SerialNumber: 2ce0eff1
          Apr 17 hh:mm:20 fedora kernel: rndis_host 5-8:1.0 wwan0: register 'rndis_host' at usb-0000:00:1d.7-8, Mobile Broadband RNDIS device, 7a:03:3c:1e:05:d2
          Apr 17 hh:mm:20 fedora mtp-probe[3287]: checking bus 5, device 7: "/sys/devices/pci0000:00/0000:00:1d.7/usb5/5-8"
          Apr 17 hh:mm:20 fedora mtp-probe[3287]: bus: 5, device: 7 was not an MTP device
          Apr 17 hh:mm:20 fedora kernel: rndis_host 5-8:1.0 wwp0s29f7u8: renamed from wwan0
          Apr 17 hh:mm:20 fedora systemd-networkd[2818]: wwan0: Interface name change detected, renamed to wwp0s29f7u8.
          Apr 17 hh:mm:20 fedora mtp-probe[3291]: checking bus 5, device 7: "/sys/devices/pci0000:00/0000:00:1d.7/usb5/5-8"
          Apr 17 hh:mm:20 fedora mtp-probe[3291]: bus: 5, device: 7 was not an MTP device
          Apr 17 hh:mm:24 fedora ModemManager[1186]: <msg> [base-manager] couldn't check support for device '/sys/devices/pci0000:00/0000:00:1d.7/usb5/5-8': not supported by any plugin
          

          And these are the logs on the old kernel that still works:

          old(the one that works)
          Apr 17 hh:mm:15 fedora kernel: usb 5-8: new high-speed USB device number 5 using ehci-pci
          Apr 17 hh:mm:15 fedora kernel: usb 5-8: New USB device found, idVendor=2717, idProduct=ff88, bcdDevice= 4.19
          Apr 17 hh:mm:15 fedora kernel: usb 5-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
          Apr 17 hh:mm:15 fedora kernel: usb 5-8: Product: Redmi Note 11
          Apr 17 hh:mm:15 fedora kernel: usb 5-8: Manufacturer: Xiaomi
          Apr 17 hh:mm:15 fedora kernel: usb 5-8: SerialNumber: 2ce0eff1
          Apr 17 hh:mm:15 fedora kernel: rndis_host 5-8:1.0 usb0: register 'rndis_host' at usb-0000:00:1d.7-8, RNDIS device, 82:1c:ae:65:4a:34
          Apr 17 hh:mm:15 fedora NetworkManager[1495]: <info>  [1744877835.2127] manager: (usb0): new Ethernet device (/org/freedesktop/NetworkManager/Devices/7)
          Apr 17 hh:mm:15 fedora mtp-probe[4001]: checking bus 5, device 5: "/sys/devices/pci0000:00/0000:00:1d.7/usb5/5-8"
          Apr 17 hh:mm:15 fedora mtp-probe[4001]: bus: 5, device: 5 was not an MTP device
          Apr 17 hh:mm:15 fedora kernel: rndis_host 5-8:1.0 enp0s29f7u8: renamed from usb0
          Apr 17 hh:mm:15 fedora NetworkManager[1495]: <info>  [1744877835.2356] device (usb0): interface index 7 renamed iface from 'usb0' to 'enp0s29f7u8'
          Apr 17 hh:mm:15 fedora NetworkManager[1495]: <info>  [1744877835.2456] device (enp0s29f7u8): state change: unmanaged -> unavailable (reason 'managed', managed-type: 'external')
          Apr 17 hh:mm:15 fedora NetworkManager[1495]: <info>  [1744877835.2479] device (enp0s29f7u8): carrier: link connected
          Apr 17 hh:mm:15 fedora NetworkManager[1495]: <info>  [1744877835.2484] device (enp0s29f7u8): state change: unavailable -> disconnected (reason 'carrier-changed', managed-type: 'full')
          Apr 17 hh:mm:15 fedora NetworkManager[1495]: <info>  [1744877835.2497] policy: auto-activating connection 'Wired connection 2' (1cd60103-249a-3a35-b7e8-c2ac149f67ab)
          Apr 17 hh:mm:15 fedora NetworkManager[1495]: <info>  [1744877835.2501] device (enp0s29f7u8): Activation: starting connection 'Wired connection 2' (1cd60103-249a-3a35-b7e8-c2ac149f67ab)
          Apr 17 hh:mm:15 fedora NetworkManager[1495]: <info>  [1744877835.2502] device (enp0s29f7u8): state change: disconnected -> prepare (reason 'none', managed-type: 'full')
          Apr 17 hh:mm:15 fedora NetworkManager[1495]: <info>  [1744877835.2505] device (enp0s29f7u8): state change: prepare -> config (reason 'none', managed-type: 'full')
          Apr 17 hh:mm:15 fedora NetworkManager[1495]: <info>  [1744877835.2566] device (enp0s29f7u8): state change: config -> ip-config (reason 'none', managed-type: 'full')
          Apr 17 hh:mm:15 fedora NetworkManager[1495]: <info>  [1744877835.2579] dhcp4 (enp0s29f7u8): activation: beginning transaction (timeout in 45 seconds)
          Apr 17 hh:mm:15 fedora avahi-daemon[1380]: Joining mDNS multicast group on interface enp0s29f7u8.IPv6 with address fe80::78eb:ce85:f0d8:dda6.
          Apr 17 hh:mm:15 fedora avahi-daemon[1380]: New relevant interface enp0s29f7u8.IPv6 for mDNS.
          Apr 17 hh:mm:15 fedora avahi-daemon[1380]: Registering new address record for fe80::78eb:ce85:f0d8:dda6 on enp0s29f7u8.*.
          Apr 17 hh:mm:15 fedora mtp-probe[4003]: checking bus 5, device 5: "/sys/devices/pci0000:00/0000:00:1d.7/usb5/5-8"
          Apr 17 hh:mm:15 fedora mtp-probe[4003]: bus: 5, device: 5 was not an MTP device
          Apr 17 hh:mm:17 fedora NetworkManager[1495]: <info>  [1744877837.2676] dhcp4 (enp0s29f7u8): state changed new lease, address=192.168.244.164, acd pending
          Apr 17 hh:mm:17 fedora NetworkManager[1495]: <info>  [1744877837.4372] dhcp4 (enp0s29f7u8): state changed new lease, address=192.168.244.164
          Apr 17 hh:mm:17 fedora avahi-daemon[1380]: Joining mDNS multicast group on interface enp0s29f7u8.IPv4 with address 192.168.244.164.
          Apr 17 hh:mm:17 fedora avahi-daemon[1380]: New relevant interface enp0s29f7u8.IPv4 for mDNS.
          Apr 17 hh:mm:17 fedora avahi-daemon[1380]: Registering new address record for 192.168.244.164 on enp0s29f7u8.IPv4.
          Apr 17 hh:mm:17 fedora NetworkManager[1495]: <info>  [1744877837.4400] policy: set 'Wired connection 2' (enp0s29f7u8) as default for IPv4 routing and DNS
          Apr 17 hh:mm:17 fedora systemd-resolved[1315]: enp0s29f7u8: Bus client set default route setting: no
          Apr 17 hh:mm:17 fedora NetworkManager[1495]: <info>  [1744877837.4676] device (enp0s29f7u8): state change: ip-config -> ip-check (reason 'none', managed-type: 'full')
          Apr 17 hh:mm:17 fedora NetworkManager[1495]: <info>  [1744877837.4739] device (enp0s29f7u8): state change: ip-check -> secondaries (reason 'none', managed-type: 'full')
          Apr 17 hh:mm:17 fedora NetworkManager[1495]: <info>  [1744877837.4771] device (enp0s29f7u8): state change: secondaries -> activated (reason 'none', managed-type: 'full')
          Apr 17 hh:mm:17 fedora NetworkManager[1495]: <info>  [1744877837.4790] device (enp0s29f7u8): Activation: successful, device activated.
          

          {clock details changed to hh:mm for privacy}

          One thing I notice is the new upgrade trying to use ModemManager rather than NetworkManager. The device is also defined as “Mobile Broadband”, instead of “Ethernet”.

          Loading the kernel module with modprobe, as another commenter suggested, didn’t make any change.

          Another thing: An excerpt from the kernel changelog at https://cdn.kernel.org/pub/linux/kernel/v6.x/

          rndis_host: Flag RNDIS modems as WWAN devices
          
          [ Upstream commit 67d1a8956d2d62fe6b4c13ebabb57806098511d8 ]
          
          Set FLAG_WWAN instead of FLAG_ETHERNET for RNDIS interfaces on Mobile
          Broadband Modems, as opposed to regular Ethernet adapters.
          
          Otherwise NetworkManager gets confused, misjudges the device type,
          and wouldn't know it should connect a modem to get the device to work.
          What would be the result depends on ModemManager version -- older
          ModemManager would end up disconnecting a device after an unsuccessful
          probe attempt (if it connected without needing to unlock a SIM), while
          a newer one might spawn a separate PPP connection over a tty interface
          instead, resulting in a general confusion and no end of chaos.
          
          The only way to get this work reliably is to fix the device type
          and have good enough version ModemManager (or equivalent).
          

          I am so lost xD

          • IHave69XiBucks@lemmygrad.ml
            link
            fedilink
            arrow-up
            2
            ·
            2 days ago

            So its treating your phone like a WWAN device like if you had mobile broadband built into the computer instead of treating it like a ethernet over usb connection. If there is a network connection showing up for it try to go in and force it to allow the phone to handle DHCP. Tethered phones act as the DHCP server in most cases, but if it thinks its an internet WWAN device the computer might be trying to be the DHCP server causing a conflict. Or force it to somehow recognize it as an ethernet connection.

          • IHave69XiBucks@lemmygrad.ml
            link
            fedilink
            arrow-up
            2
            arrow-down
            1
            ·
            2 days ago

            I asked ChatGPT about it since I’m not sure how to go about it, and got this. Might be worth a try.

            Prompt: In a recent update to the fedora operating system they changed it so mobile broadband modems are now flagged as WWAN devices rather then ethernet devices. This is causing it to treat a usb tethered phone as a WWAN device instead of a ethernet over usb device, and the tether is not working as a result. How could a user fix this on their system?

            Answer: You can teach ModemManager to completely ignore your phone’s RNDIS interface so that NetworkManager will handle it as a normal Ethernet link again. Here’s how:

            1. Find your phone’s USB IDs
              Plug in your phone with USB‑tethering enabled and run:

              lsusb
              

              You’ll see a line like:

              Bus 002 Device 008: ID 18d1:4ee7 Google Inc. Nexus/Pixel (tethering)
              

              Note the idVendor (here 18d1) and idProduct (here 4ee7).

            2. Create a udev rule to ignore it
              As root, create /etc/udev/rules.d/99-usb-tether-ignore.rules with these contents:

              # Tell ModemManager to ignore my phone’s USB‑tether interface
              ATTRS{idVendor}=="18d1", ATTRS{idProduct}=="4ee7", ENV{ID_MM_DEVICE_IGNORE}="1"
              

              (Replace 18d1/4ee7 with your phone’s IDs.) citeturn5search4

            3. Reload udev and restart services

              sudo udevadm control --reload-rules
              sudo udevadm trigger
              sudo systemctl restart ModemManager NetworkManager
              

            After that, your tethered phone will no longer be treated as a WWAN modem but as an ordinary USB‑Ethernet device—DHCP will kick in and Internet will flow as before.


            Tip:
            If you never use a cellular modem on this machine, you can also just uninstall ModemManager entirely:

            sudo dnf remove ModemManager
            ``` citeturn5search4