[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Wi-Fi USB dongle disconnects



On 5/2/22, David Wright <deblis@lionunicorn.co.uk> wrote:
> On Mon 02 May 2022 at 12:26:44 (-0300), riveravaldez wrote:
>> Hi, I'm using a USB dongle to connect an old desktop machine (updated
>> debian-stable) to my home-WLAN (Wi-Fi).
>>
>> This is the hardware:
>>
>> ```
>> $ sudo lsusb -v
>> Bus 001 Device 007: ID 148f:7601 Ralink Technology, Corp. MT7601U
>> Wireless Adapter
>> Device Descriptor:
>>   bLength                18
>>   bDescriptorType         1
>>   bcdUSB               2.01
>>   bDeviceClass            0
>>   bDeviceSubClass         0
>>   bDeviceProtocol         0
>>   bMaxPacketSize0        64
>>   idVendor           0x148f Ralink Technology, Corp.
>>   idProduct          0x7601 MT7601U Wireless Adapter
>>   bcdDevice            0.00
>>   iManufacturer           1 MediaTek
>>   iProduct                2 802.11 n WLAN
>>   iSerial                 3 1.0
>> (...)
>> ```
>>
>> Working fine til just now, then (after system upgrade) it stop giving
>
> Does "system upgrade" mean more than, say, apt-get upgrade?

Hi, David, and thanks a lot for your help!

Literally means:

$ sudo apt-get update && sudo apt-get dist-upgrade

Afterwards:

$ sudo apt-get autoclean && sudo apt-get autoremove

This is what I do normally.

>> me connection (ip route: nothing).
>>
>> I tried to ifup the interface:
>>
>> ```
>> $ sudo ifup wlan0
>> [sudo] password for desktop:
>> Internet Systems Consortium DHCP Client 4.4.1
>> Copyright 2004-2018 Internet Systems Consortium.
>> All rights reserved.
>> For info, please visit https://www.isc.org/software/dhcp/
>>
>> Cannot find device "wlan0"
>> Failed to get interface index: No such device
>>
>> If you think you have received this message due to a bug rather
>> than a configuration issue please read the section on submitting
>> bugs on either our web page at www.isc.org or in the README file
>> before submitting a bug.  These pages explain the proper
>> process and the information we find helpful for debugging.
>>
>> exiting.
>> ifup: failed to bring up wlan0
>> ```
>>
>> Then checked journalctl:
>>
>> ```
>> $ sudo journalctl -b -exp3
>> (...)
>> may 02 10:35:04 debian kernel: usb usb1-port2: disabled by hub (EMI?),
>> re-enabling...
>> may 02 10:35:04 debian kernel: mt7601u 1-2:1.0: mt7601u_rxdc_cal timed
>> out
>> may 02 10:35:04 debian dhclient[1141]: receive_packet failed on wlan0:
>> Network is down
>> may 02 10:35:06 debian systemd-udevd[6026]: wlan0: Failed to get link
>> config: No such device
>> may 02 10:35:07 debian systemd-udevd[6061]: wlan1: Failed to rename
>> network interface 6 from 'wlan1' to 'wlx20e9170d5d9e': Device or
>> resource busy
>
> I recognise that MAC.

I am greatly and happily surprised.

> You posted about it in January. You were running
> it with iwd.

Indeed^2.

> Why is systemd-udevd trying to rename the interface?

Have no idea. Maybe I did something in an improper fashion...
In fact, can't recall touching nothing about systemd-udevd.
Should I?

> Do you still have the file:
>
> $ cat /lib/systemd/network/80-iwd.link
> [Match]
> Type=wlan
>
> [Link]
> NamePolicy=keep kernel      ←←←←←←←←←
> $
>
> or your own version under /etc?

I still have the file:

```
$ cat /lib/systemd/network/80-iwd.link
[Match]
Type=wlan

[Link]
NamePolicy=keep kernel
```

And in /etc I only found:

$ sudo ls -aR /etc/ | grep iwd
iwd
/etc/iwd:
iwd.service

But nothing I remember to have created (at least manually).

> Or has the upgrade tried to revert the system back to a more
> conventional ifupdown/wpa configuration in some way?

Maybe, that's one of the things I'm trying to rule out/discard,
but can't think/know of a way to check it.

If the USB-port makes an unstable contact, could that connect/
/disconnect make the system assign new name to the dongle in
each iteration? (Just an idea...)

It has not happened again since the last occurrence, couple of
hours ago.

>> may 02 10:35:08 debian dhclient[6067]: Failed to get interface index:
>> No such device
>> may 02 10:35:08 debian dhclient[6067]:
>> may 02 10:35:08 debian dhclient[6067]: If you think you have received
>> this message due to a bug rather
>> may 02 10:35:08 debian dhclient[6067]: than a configuration issue
>> please read the section on submitting
>> may 02 10:35:08 debian dhclient[6067]: bugs on either our web page at
>> www.isc.org or in the README file
>> may 02 10:35:08 debian dhclient[6067]: before submitting a bug.  These
>> pages explain the proper
>> may 02 10:35:08 debian dhclient[6067]: process and the information we
>> find helpful for debugging.
>> may 02 10:35:08 debian dhclient[6067]:
>> may 02 10:35:08 debian dhclient[6067]: exiting.
>> (...)
>> ```
>>
>> Tried renaming the interface with:
>>
>> $ sudo ip link set wlan1 name wlan0
>>
>> But it was unable to connect:
>>
>> ```
>> $ sudo ifup wlan0
>> Internet Systems Consortium DHCP Client 4.4.1
>> Copyright 2004-2018 Internet Systems Consortium.
>> All rights reserved.
>> For info, please visit https://www.isc.org/software/dhcp/
>>
>> Listening on LPF/wlan0/20:e9:17:0d:5d:9e
>> Sending on   LPF/wlan0/20:e9:17:0d:5d:9e
>> Sending on   Socket/fallback
>> DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 8
>> DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 9
>> DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 19
>> DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 14
>> DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11
>> No DHCPOFFERS received.
>> No working leases in persistent database - sleeping.
>> ```
>>
>> Apparently until I restarted iwd.service and tried again.
>>
>> And this is all I have in dmesg that seems relevant:
>>
>> ```
>> $ sudo dmesg
>> (...)
>> [   12.219824] usb 1-2: reset high-speed USB device number 2 using
>> ehci-pci
>> [   12.236267] EXT4-fs (sda3): mounted filesystem with ordered data
>> mode. Opts: (null)
>> [   12.382723] mt7601u 1-2:1.0: ASIC revision: 76010001 MAC revision:
>> 76010500
>> [   12.424352] mt7601u 1-2:1.0: EEPROM ver:0d fae:00
>> [   12.499390] EXT4-fs (sdb1): mounted filesystem with ordered data
>> mode. Opts: (null)
>> [   12.654265] ieee80211 phy0: Selected rate control algorithm
>> 'minstrel_ht'
>> [   12.655016] usbcore: registered new interface driver mt7601u
>> [   12.757239] mt7601u 1-2:1.0 wlx20e9170d5d9e: renamed from wlan0
>> (...)
>> [   14.305151] NET: Registered protocol family 38
>> [   14.761139] cryptd: max_cpu_qlen set to 1000
>> [   15.106086] alg: No test for hmac(md4) (hmac(md4-generic))
>> [   15.179675] forcedeth 0000:00:07.0 enp0s7: MSI enabled
>> [   15.179900] forcedeth 0000:00:07.0 enp0s7: no link during
>> initialization
>> [   16.175429] wlan0: authenticate with b8:66:85:fd:0a:d1
>> [   16.208493] wlan0: send auth to b8:66:85:fd:0a:d1 (try 1/3)
>> [   16.210114] wlan0: authenticated
>> [   16.211825] wlan0: associate with b8:66:85:fd:0a:d1 (try 1/3)
>> [   16.217859] wlan0: RX AssocResp from b8:66:85:fd:0a:d1 (capab=0x411
>> status=0 aid=5)
>> [   16.253727] wlan0: associated
>> [   16.286034] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
>> (...)
>> [ 4076.912718] ata2: link is slow to respond, please be patient (ready=0)
>> [ 4079.028863] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
>> [ 4079.293883] ata2.00: configured for UDMA/133
>> (...)
>> [ 4087.513366] ata2: limiting SATA link speed to 1.5 Gbps
>> (...)
>> [ 4827.042405] ata2: link is slow to respond, please be patient (ready=0)
>> [ 4831.182741] ata2: SRST failed (errno=-16)
>> [ 4834.199054] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
>> [ 4834.213936] ata2.00: configured for UDMA/133
>> (...)
>> [ 5010.497856] usb usb1-port2: disabled by hub (EMI?), re-enabling...
>> [ 5010.497870] usb 1-2: USB disconnect, device number 2
>> [ 5010.517364] wlan0: deauthenticating from b8:66:85:fd:0a:d1 by local
>> choice (Reason: 3=DEAUTH_LEAVING)
>> [ 5010.529234] mt7601u 1-2:1.0: mt7601u_rxdc_cal timed out
>> [ 5010.881275] usb 1-2: new high-speed USB device number 3 using ehci-pci
>> [ 5011.057056] usb 1-2: New USB device found, idVendor=148f,
>> idProduct=7601, bcdDevice= 0.00
>> [ 5011.057061] usb 1-2: New USB device strings: Mfr=1, Product=2,
>> SerialNumber=3
>> [ 5011.057063] usb 1-2: Product: 802.11 n WLAN
>> [ 5011.057065] usb 1-2: Manufacturer: MediaTek
>> [ 5011.057066] usb 1-2: SerialNumber: 1.0
>> [ 5011.197291] usb 1-2: reset high-speed USB device number 3 using
>> ehci-pci
>> [ 5011.360519] mt7601u 1-2:1.0: ASIC revision: 76010001 MAC revision:
>> 76010500
>> [ 5011.410269] mt7601u 1-2:1.0: EEPROM ver:0d fae:00
>> [ 5011.641684] ieee80211 phy1: Selected rate control algorithm
>> 'minstrel_ht'
>> [ 5012.373931] wlan1: authenticate with b8:66:85:fd:0a:d1
>> [ 5012.409969] wlan1: send auth to b8:66:85:fd:0a:d1 (try 1/3)
>> [ 5012.412313] wlan1: authenticated
>> [ 5012.415395] wlan1: associate with b8:66:85:fd:0a:d1 (try 1/3)
>> [ 5012.427217] wlan1: RX AssocResp from b8:66:85:fd:0a:d1 (capab=0x411
>> status=0 aid=5)
>> [ 5012.471904] wlan1: associated
>> [ 5015.504689] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
>> [ 5022.006182] ata2.00: limiting speed to UDMA/100:PIO4
>> (...)
>> [ 5035.039179] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
>> [ 5035.049098] ata2.00: configured for UDMA/100
>> (...)
>> [ 5082.414851] ata2.00: limiting speed to UDMA/33:PIO4
>> [ 5088.311274] ata2: link is slow to respond, please be patient (ready=0)
>> (...)
>> [ 5089.819441] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
>> [ 5090.088412] ata2.00: configured for UDMA/33
>> [ 5101.016259] ata2: link is slow to respond, please be patient (ready=0)
>> [ 5102.708442] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
>> [ 5103.018021] ata2.00: configured for UDMA/33
>> [ 5109.636963] ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
>> [ 5109.647373] ata2.00: configured for UDMA/33
>> (...)
>> [ 5310.861464] usbcore: deregistering interface driver mt7601u
>> [ 5310.876047] wlan1: deauthenticating from b8:66:85:fd:0a:d1 by local
>> choice (Reason: 3=DEAUTH_LEAVING)
>> [ 5345.351997] cfg80211: Loading compiled-in X.509 certificates for
>> regulatory database
>> [ 5345.352415] cfg80211: Loaded X.509 cert 'benh@debian.org:
>> 577e021cb980e0e820821ba7b54b4961b8b4fadf'
>> [ 5345.352789] cfg80211: Loaded X.509 cert 'romain.perier@gmail.com:
>> 3abbc6ec146e09d1b6016ab9d6cf71dd233f0328'
>> [ 5345.353160] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
>> [ 5345.360039] platform regulatory.0: firmware: direct-loading
>> firmware regulatory.db
>> [ 5345.364293] platform regulatory.0: firmware: direct-loading
>> firmware regulatory.db.p7s
>> [ 5345.566547] usb 1-2: reset high-speed USB device number 3 using
>> ehci-pci
>> [ 5345.729499] mt7601u 1-2:1.0: ASIC revision: 76010001 MAC revision:
>> 76010500
>> [ 5345.781510] mt7601u 1-2:1.0: EEPROM ver:0d fae:00
>> [ 5346.004025] ieee80211 phy0: Selected rate control algorithm
>> 'minstrel_ht'
>> [ 5346.005036] usbcore: registered new interface driver mt7601u
>> [ 5346.018630] mt7601u 1-2:1.0 wlx20e9170d5d9e: renamed from wlan0
>> [ 5358.065389] usb usb1-port2: disabled by hub (EMI?), re-enabling...
>> [ 5358.065411] usb 1-2: USB disconnect, device number 3
>> [ 5358.411474] usb 1-2: new high-speed USB device number 4 using ehci-pci
>> [ 5358.578358] usb 1-2: New USB device found, idVendor=148f,
>> idProduct=7601, bcdDevice= 0.00
>> [ 5358.578367] usb 1-2: New USB device strings: Mfr=1, Product=2,
>> SerialNumber=3
>> [ 5358.578370] usb 1-2: Product: 802.11 n WLAN
>> [ 5358.578373] usb 1-2: Manufacturer: MediaTek
>> [ 5358.578376] usb 1-2: SerialNumber: 1.0
>> [ 5358.715496] usb 1-2: reset high-speed USB device number 4 using
>> ehci-pci
>> [ 5358.878385] mt7601u 1-2:1.0: ASIC revision: 76010001 MAC revision:
>> 76010500
>> [ 5358.922502] mt7601u 1-2:1.0: EEPROM ver:0d fae:00
>> [ 5359.149277] ieee80211 phy1: Selected rate control algorithm
>> 'minstrel_ht'
>> [ 5359.185351] mt7601u 1-2:1.0 wlx20e9170d5d9e: renamed from wlan0
>> [ 5361.793265] usb usb1-port2: disabled by hub (EMI?), re-enabling...
>> [ 5361.793289] usb 1-2: USB disconnect, device number 4
>> [ 5362.147759] usb 1-2: new high-speed USB device number 5 using ehci-pci
>> [ 5362.317385] usb 1-2: New USB device found, idVendor=148f,
>> idProduct=7601, bcdDevice= 0.00
>> [ 5362.317390] usb 1-2: New USB device strings: Mfr=1, Product=2,
>> SerialNumber=3
>> [ 5362.317392] usb 1-2: Product: 802.11 n WLAN
>> [ 5362.317394] usb 1-2: Manufacturer: MediaTek
>> [ 5362.317395] usb 1-2: SerialNumber: 1.0
>> [ 5362.451820] usb 1-2: reset high-speed USB device number 5 using
>> ehci-pci
>> [ 5362.611884] mt7601u 1-2:1.0: ASIC revision: 76010001 MAC revision:
>> 76010500
>> [ 5362.653006] mt7601u 1-2:1.0: EEPROM ver:0d fae:00
>> [ 5362.882528] ieee80211 phy2: Selected rate control algorithm
>> 'minstrel_ht'
>> [ 5362.899636] mt7601u 1-2:1.0 wlx20e9170d5d9e: renamed from wlan0
>> (...)
>> [ 5658.776252] forcedeth 0000:00:07.0 enp0s7: MSI enabled
>> [ 5658.776471] forcedeth 0000:00:07.0 enp0s7: no link during
>> initialization
>> [ 5809.354940] mt7601u 1-2:1.0 wlan0: renamed from wlx20e9170d5d9e
>> (...)
>> [ 6300.060181] usbcore: deregistering interface driver mt7601u
>> [ 6313.163869] cfg80211: Loading compiled-in X.509 certificates for
>> regulatory database
>> [ 6313.164289] cfg80211: Loaded X.509 cert 'benh@debian.org:
>> 577e021cb980e0e820821ba7b54b4961b8b4fadf'
>> [ 6313.164664] cfg80211: Loaded X.509 cert 'romain.perier@gmail.com:
>> 3abbc6ec146e09d1b6016ab9d6cf71dd233f0328'
>> [ 6313.165035] cfg80211: Loaded X.509 cert 'sforshee: 00b28ddf47aef9cea7'
>> [ 6313.165104] platform regulatory.0: firmware: direct-loading
>> firmware regulatory.db
>> [ 6313.165126] platform regulatory.0: firmware: direct-loading
>> firmware regulatory.db.p7s
>> [ 6313.358053] usb 1-2: reset high-speed USB device number 5 using
>> ehci-pci
>> [ 6313.516804] mt7601u 1-2:1.0: ASIC revision: 76010001 MAC revision:
>> 76010500
>> [ 6313.563801] mt7601u 1-2:1.0: EEPROM ver:0d fae:00
>> [ 6313.796723] ieee80211 phy0: Selected rate control algorithm
>> 'minstrel_ht'
>> [ 6313.806916] mt7601u 1-2:1.0 wlx20e9170d5d9e: renamed from wlan0
>> [ 6313.807821] usbcore: registered new interface driver mt7601u
>> (...)
>> [ 6815.822493] mt7601u 1-2:1.0 wlan0: renamed from wlx20e9170d5d9e
>> [ 7129.740394] usb 1-2: USB disconnect, device number 5
>> [ 7130.093183] usb 1-2: new high-speed USB device number 6 using ehci-pci
>> [ 7149.902520] usb 1-2: new high-speed USB device number 7 using ehci-pci
>> [ 7150.069668] usb 1-2: New USB device found, idVendor=148f,
>> idProduct=7601, bcdDevice= 0.00
>> [ 7150.069677] usb 1-2: New USB device strings: Mfr=1, Product=2,
>> SerialNumber=3
>> [ 7150.069680] usb 1-2: Product: 802.11 n WLAN
>> [ 7150.069683] usb 1-2: Manufacturer: MediaTek
>> [ 7150.069685] usb 1-2: SerialNumber: 1.0
>> [ 7150.206535] usb 1-2: reset high-speed USB device number 7 using
>> ehci-pci
>> [ 7150.365290] mt7601u 1-2:1.0: ASIC revision: 76010001 MAC revision:
>> 76010500
>> [ 7150.404600] mt7601u 1-2:1.0: firmware: direct-loading firmware
>> mt7601u.bin
>> [ 7150.404617] mt7601u 1-2:1.0: Firmware Version: 0.1.00 Build: 7640
>> Build time: 201302052146____
>> [ 7150.809791] mt7601u 1-2:1.0: EEPROM ver:0d fae:00
>> [ 7151.037955] ieee80211 phy1: Selected rate control algorithm
>> 'minstrel_ht'
>> [ 7151.066642] mt7601u 1-2:1.0 wlx20e9170d5d9e: renamed from wlan0
>> [ 7206.059005] mt7601u 1-2:1.0 wlan0: renamed from wlx20e9170d5d9e
>> [ 7302.609562] wlan1: authenticate with b8:66:85:fd:0a:d1
>> [ 7302.641485] wlan1: send auth to b8:66:85:fd:0a:d1 (try 1/3)
>> [ 7302.646494] wlan1: authenticated
>> [ 7302.648787] wlan1: associate with b8:66:85:fd:0a:d1 (try 1/3)
>> [ 7302.655099] wlan1: RX AssocResp from b8:66:85:fd:0a:d1 (capab=0x411
>> status=0 aid=7)
>> [ 7302.696722] wlan1: associated
>> [ 7302.740673] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
>> (...)
>> [ 7367.972188] wlan1: deauthenticating from b8:66:85:fd:0a:d1 by local
>> choice (Reason: 3=DEAUTH_LEAVING)
>> [ 7408.668633] wlan1: authenticate with b8:66:85:fd:0a:d1
>> [ 7408.688516] wlan1: send auth to b8:66:85:fd:0a:d1 (try 1/3)
>> [ 7408.713645] wlan1: authenticated
>> [ 7408.716074] wlan1: associate with b8:66:85:fd:0a:d1 (try 1/3)
>> [ 7408.726381] wlan1: RX AssocResp from b8:66:85:fd:0a:d1 (capab=0x411
>> status=0 aid=7)
>> [ 7408.765378] wlan1: associated
>> [ 7411.797925] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
>> (...)
>> [ 7537.578604] wlan1: deauthenticating from b8:66:85:fd:0a:d1 by local
>> choice (Reason: 3=DEAUTH_LEAVING)
>> [ 7563.667081] wlan1: authenticate with b8:66:85:fd:0a:d1
>> [ 7563.689093] wlan1: send auth to b8:66:85:fd:0a:d1 (try 1/3)
>> [ 7563.696298] wlan1: authenticated
>> [ 7563.698306] wlan1: associate with b8:66:85:fd:0a:d1 (try 1/3)
>> [ 7563.703312] wlan1: RX AssocResp from b8:66:85:fd:0a:d1 (capab=0x411
>> status=0 aid=6)
>> [ 7563.745548] wlan1: associated
>> [ 7563.775953] IPv6: ADDRCONF(NETDEV_CHANGE): wlan1: link becomes ready
>> (...)
>> [ 7617.237687] wlan1: deauthenticating from b8:66:85:fd:0a:d1 by local
>> choice (Reason: 3=DEAUTH_LEAVING)
>> [ 7629.331386] mt7601u 1-2:1.0 wlan0: renamed from wlan1
>> [ 7637.295981] wlan0: authenticate with b8:66:85:fd:0a:d1
>> [ 7637.313960] wlan0: send auth to b8:66:85:fd:0a:d1 (try 1/3)
>> [ 7637.315588] wlan0: authenticated
>> [ 7637.319267] wlan0: associate with b8:66:85:fd:0a:d1 (try 1/3)
>> [ 7637.327951] wlan0: RX AssocResp from b8:66:85:fd:0a:d1 (capab=0x411
>> status=0 aid=6)
>> [ 7637.367580] wlan0: associated
>> [ 7637.416435] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
>> (...)
>> ```
>>
>> I think some HDD errors slip through (I have to fix that also...),
>> sorry, please ignore them.
>>
>> Seems to me like the interface changed its name without reason.
>>
>> Any hint what could had happened?
>
> Cheers,
> David.

Thanks again, David, kind regards.


Reply to: