USB WLAN-Adapter haben unter Linux oft Probleme mit den Energieeinstellungen.
Zuerst prüfen, ob die Treiber geladen sind:
sudo lsmod | grep mt76
mt76x0u 20480 0
mt76x0_common 49152 1 mt76x0u
mt76x02_usb 24576 1 mt76x0u
mt76_usb 49152 2 mt76x02_usb,mt76x0u
mt76x02_lib 102400 3 mt76x02_usb,mt76x0_common,mt76x0u
mt76 139264 5 mt76_usb,mt76x02_lib,mt76x02_usb,mt76x0_common,mt76x0u
mac80211 1454080 5 mt76,mt76x02_lib,mt76x02_usb,mt76x0_common,mt76x0u
cfg80211 1404928 5 mt76,mt76x02_lib,mac80211,mt76x02_usb,mt76x0_common
usbcore 409600 9 xhci_hcd,ehci_pci,mt76_usb,usb_storage,ehci_hcd,xhci_pci,mt76x02_usb,uas,mt76x0u
Passt so.
Bei meinem Adapter kam es zu folgendem Fehler:
sudo dmesg | grep mt76
[ 10.554910] mt76x0u 3-10:1.0: ASIC revision: 76100002 MAC revision: 76502000
[ 11.656688] mt76x0u 3-10:1.0: EEPROM ver:02 fae:04
[ 11.675365] usbcore: registered new interface driver mt76x0u
[ 11.707733] mt76x0u 3-10:1.0 wlx00c0cababac5: renamed from wlan0
[11268.427437] mt76x0u 3-10:1.0: timed out waiting for pending tx
[11273.106872] mt76x0u 3-10:1.0: ASIC revision: 76100002 MAC revision: 76502000
[11274.067163] mt76x0u 3-10:1.0: EEPROM ver:02 fae:04
[11274.092906] mt76x0u 3-10:1.0 wlx00c0cababac5: renamed from wlan0
Die Meldung „timed out waiting for pending tx“ ist auf das USB-Autosuspend zurückzuführen.
Zum Testen kann folgende Befehl ausgeführt werden, dann das USB-Gerät raus ziehen und neu einstecken.
sudo sh -c 'echo -1 > /sys/module/usbcore/parameters/autosuspend'
Das Setting bleibt bis zum Neustart aktiv.
Bei mir stand vorher eine 2 drin. Das bedeutet USB-Autosuspend ist aktiv und Geräte dürfen nach 2 Sekunden Inaktivität in den Energiesparmodus gehen.
Permanent kann man die Sache machen, indem man in der Grub-Konfig den entsprechenden Eintrag setzt (usbcore.autosuspend=-1):
GRUB_CMDLINE_LINUX_DEFAULT="quiet usbcore.autosuspend=-1"
Dann Grub updaten und rebooten:
sudo update-grub
sudo reboot