Wi-Fi USB dongle not recognised after sleep

Hi all,

Linux newb here. I have an issue regarding my Wi-Fi internet dongle. I’m running Manjaro KDE/Plasma, which I believe uses the NetworkManager service for wifi connectivity.

The issue is as follows. After my PC has been inactive for a certain amount of time (it seems to be 30+ minutes), when the PC wakes it no longer recognizes the USB dongle. The issue is resolved by manually unplugging the dongle and plugging it back in. Having read other posts on similar issues, I ran the command lsusb both before and after this procedure.

The output of lsusb after waking is

Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 046d:c24a Logitech, Inc. G600 Gaming Mouse
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 25a7:fa70 Areson Technology Corp 2.4G Wireless Receiver
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The output of lsusb after manually disconnecting and reconnecting the USB dongle is

Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 003 Device 002: ID 046d:c24a Logitech, Inc. G600 Gaming Mouse
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 004: ID 25a7:fa70 Areson Technology Corp 2.4G Wireless Receiver
Bus 001 Device 009: ID 1737:0079 802.11g Adapter [Linksys WUSB54GC v3] WUSB600N v2 Dual-Band Wireless-N Network Adapter [Ralink RT3572]
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Again, I’m a newb with linux, but this seems to indicate to me pretty clearly that for whatever reason the device is simply not being recognized by the kernel upon waking, with the USB dongle being device 009. The behavior persists regardless of which peripherals are plugged into the USB ports on the machine, and regardless of their physical configuration.

The same behavior is intermittently observed when I restart the PC, and is resolvable in the same manner. I have had this issue since installation of the OS, so I don’t think it’s a result of anything I have done.

The output of the command inxi --admin --verbosity=7 --filter --no-host --width while the Wi-Fi is active is as follows.

System:
  Kernel: 5.15.32-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 11.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.15-x86_64
    root=UUID=c9608465-0a7e-4d9d-8a68-63cccc981f7c rw quiet apparmor=1
    security=apparmor udev.log_priority=3
    resume=/dev/disk/by-uuid/c9608465-0a7e-4d9d-8a68-63cccc981f7c
    resume_offset=995328
  Desktop: KDE Plasma v: 5.24.4 tk: Qt v: 5.15.3 wm: kwin_x11 vt: 1 dm: SDDM
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Desktop Mobo: Gigabyte model: H61M-USB3-B3 v: x.x
    serial: <superuser required> BIOS: Award v: F9 date: 10/12/2011
Battery:
  Message: No system battery data found. Is one present?
Memory:
  RAM: total: 7.68 GiB used: 6.69 GiB (87.0%)
  RAM Report:
    permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: Intel Core i7-2600 bits: 64 type: MT MCP arch: Sandy Bridge
    family: 6 model-id: 0x2A (42) stepping: 7 microcode: 0x2F
  Topology: cpus: 1x cores: 4 tpc: 2 threads: 8 smt: enabled cache:
    L1: 256 KiB desc: d-4x32 KiB; i-4x32 KiB L2: 1024 KiB desc: 4x256 KiB
    L3: 8 MiB desc: 1x8 MiB
  Speed (MHz): avg: 2022 high: 3450 min/max: 1600/3800 scaling:
    driver: intel_cpufreq governor: schedutil cores: 1: 1696 2: 3450 3: 1820
    4: 1913 5: 1596 6: 1684 7: 1942 8: 2079 bogomips: 54299
  Flags: acpi aes aperfmperf apic arat arch_perfmon avx bts clflush cmov
    constant_tsc cpuid cx16 cx8 de ds_cpl dtes64 dtherm dts epb ept est
    flexpriority flush_l1d fpu fxsr ht ibpb ibrs ida lahf_lm lm mca mce
    md_clear mmx monitor msr mtrr nonstop_tsc nopl nx pae pat pbe pcid
    pclmulqdq pdcm pebs pge pln pni popcnt pse pse36 pti pts rdtscp rep_good
    sep smx ssbd sse sse2 sse4_1 sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow
    tsc tsc_deadline_timer vme vmx vnmi vpid x2apic xsave xsaveopt xtopology
    xtpr
  Vulnerabilities:
  Type: itlb_multihit status: KVM: VMX disabled
  Type: l1tf
    mitigation: PTE Inversion; VMX: conditional cache flushes, SMT vulnerable
  Type: mds mitigation: Clear CPU buffers; SMT vulnerable
  Type: meltdown mitigation: PTI
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl and seccomp
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: conditional, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: Intel 2nd Generation Core Processor Family Integrated Graphics
    vendor: Gigabyte driver: i915 v: kernel ports: active: HDMI-A-1,VGA-1
    empty: DP-1,DP-2,HDMI-A-2 bus-ID: 00:02.0 chip-ID: 8086:0102
    class-ID: 0300
  Display: x11 server: X.Org v: 1.21.1.3 with: Xwayland v: 22.1.1
    compositor: kwin_x11 driver: X: loaded: modesetting alternate: fbdev,vesa
    gpu: i915 display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3840x1080 s-dpi: 96 s-size: 1016x285mm (40.00x11.22")
    s-diag: 1055mm (41.54")
  Monitor-1: HDMI-A-1 mapped: HDMI-1 pos: primary,right
    model: LG (GoldStar) W2361 serial: <filter> built: 2010 res: 1920x1080
    hz: 60 dpi: 96 gamma: 1.2 size: 510x290mm (20.08x11.42")
    diag: 587mm (23.1") ratio: 16:9 modes: max: 1920x1080 min: 720x400
  Monitor-2: VGA-1 pos: primary,left model: Acer V226HQL serial: <filter>
    built: 2015 res: 1920x1080 hz: 60 dpi: 102 gamma: 1.2
    size: 477x268mm (18.78x10.55") diag: 547mm (21.5") ratio: 16:9 modes:
    max: 1920x1080 min: 720x400
  OpenGL: renderer: Mesa DRI Intel HD Graphics 2000 (SNB GT1)
    v: 3.3 Mesa 21.3.8 compat-v: 3.0 direct render: Yes
Audio:
  Device-1: Intel 6 Series/C200 Series Family High Definition Audio
    vendor: Gigabyte driver: snd_hda_intel v: kernel bus-ID: 00:1b.0
    chip-ID: 8086:1c20 class-ID: 0403
  Sound Server-1: ALSA v: k5.15.32-1-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.20 running: no
  Sound Server-3: PulseAudio v: 15.0 running: yes
  Sound Server-4: PipeWire v: 0.3.49 running: yes
Network:
  Device-1: Qualcomm Atheros AR8151 v1.0 Gigabit Ethernet vendor: Gigabyte
    driver: atl1c v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1 port: ef00
    bus-ID: 05:00.0 chip-ID: 1969:1073 class-ID: 0200
  IF: enp5s0 state: down mac: <filter>
  Device-2: 802.11g Adapter [Linksys WUSB54GC v3] WUSB600N v2 Dual-Band
    Wireless-N Network [Ralink RT3572]
    type: USB driver: rt2800usb bus-ID: 1-1.3:9 chip-ID: 1737:0079
    class-ID: 0000
  IF: wlp0s26u1u3 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  WAN IP: <filter>
Bluetooth:
  Message: No bluetooth data found.
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 1.24 TiB used: 100.06 GiB (7.9%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/sda maj-min: 8:0 vendor: SanDisk model: SDSSDHII120G
    size: 111.79 GiB block-size: physical: 512 B logical: 512 B speed: 3.0 Gb/s
    type: SSD serial: <filter> rev: 00RL scheme: MBR
  ID-2: /dev/sdb maj-min: 8:16 vendor: Seagate model: ST1000DM003-1SB10C
    size: 931.51 GiB block-size: physical: 4096 B logical: 512 B speed: 3.0 Gb/s
    type: HDD rpm: 7200 serial: <filter> rev: CC43 scheme: MBR
  ID-3: /dev/sdc maj-min: 8:32 vendor: Crucial model: CT240BX500SSD1
    size: 223.57 GiB block-size: physical: 512 B logical: 512 B speed: 3.0 Gb/s
    type: SSD serial: <filter> rev: R022 scheme: MBR
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 111.74 GiB size: 109.43 GiB (97.93%)
    used: 49.91 GiB (45.6%) fs: ext4 dev: /dev/sda2 maj-min: 8:2 label: N/A
    uuid: c9608465-0a7e-4d9d-8a68-63cccc981f7c
  ID-2: /run/media/josh/10F8DAE4F8DAC75E raw-size: 223.06 GiB
    size: 223.06 GiB (100.00%) used: 50.15 GiB (22.5%) fs: ntfs dev: /dev/sdc1
    maj-min: 8:33 label: N/A uuid: 10F8DAE4F8DAC75E
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: file size: 8 GiB used: 353.1 MiB (4.3%) priority: -2
    file: /swapfile
Unmounted:
  ID-1: /dev/sda1 maj-min: 8:1 size: 50 MiB fs: ntfs label: System Reserved
    uuid: BABAD4DEBAD497E9
  ID-2: /dev/sdc2 maj-min: 8:34 size: 517 MiB fs: ntfs label: N/A
    uuid: A6A02B3EA02B1479
USB:
  Hub-1: 1-0:1 info: Full speed or root hub ports: 2 rev: 2.0 speed: 480 Mb/s
    chip-ID: 1d6b:0002 class-ID: 0900
  Hub-2: 1-1:2 info: Intel Integrated Rate Matching Hub ports: 4 rev: 2.0
    speed: 480 Mb/s chip-ID: 8087:0024 class-ID: 0900
  Device-1: 1-1.3:9 info: 802.11g Adapter [Linksys WUSB54GC v3] WUSB600N v2
    Dual-Band Wireless-N Network [Ralink RT3572]
    type: Network driver: rt2800usb interfaces: 1 rev: 2.0 speed: 480 Mb/s
    power: 450mA chip-ID: 1737:0079 class-ID: 0000
  Device-2: 1-1.4:4 info: Areson Corp 2.4G Wireless Receiver
    type: Keyboard,Mouse driver: hid-generic,usbhid interfaces: 2 rev: 1.1
    speed: 12 Mb/s power: 100mA chip-ID: 25a7:fa70 class-ID: 0301
  Hub-3: 2-0:1 info: Full speed or root hub ports: 2 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Hub-4: 2-1:2 info: Intel Integrated Rate Matching Hub ports: 6 rev: 2.0
    speed: 480 Mb/s chip-ID: 8087:0024 class-ID: 0900
  Hub-5: 3-0:1 info: Hi-speed hub with single TT ports: 2 rev: 2.0
    speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 3-1:2 info: Logitech G600 Gaming Mouse type: Mouse,Keyboard
    driver: hid-generic,usbhid interfaces: 2 rev: 2.0 speed: 12 Mb/s
    power: 500mA chip-ID: 046d:c24a class-ID: 0300 serial: <filter>
  Hub-6: 4-0:1 info: Super-speed hub ports: 2 rev: 3.0 speed: 5 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
Sensors:
  System Temperatures: cpu: 42.0 C mobo: N/A
  Fan Speeds (RPM): N/A
Info:
  Processes: 269 Uptime: 18h 32m wakeups: 0 Init: systemd v: 250
  tool: systemctl Compilers: gcc: 11.2.0 clang: 13.0.1 Packages: 1523
  pacman: 1515 lib: 373 flatpak: 0 snap: 8 Shell: Zsh v: 5.8.1
  running-in: konsole inxi: 3.3.15

Any advice on diagnostic commands I might run, as well as any ideas for fixes, would be much appreciated.

Wifi powersave can be the cause here OR USB might be suspending when the computer is idle.

Disable wifi powersave:

create this file if it does not exist.
/etc/NetworkManager/conf.d/default-wifi-powersave-off.conf

By default there is:

[connection]
wifi.powersave = 3

Change the value to 2. Reboot for the change to take effect.

Possible values for the wifi.powersave field are:

NM_SETTING_WIRELESS_POWERSAVE_DEFAULT (0): use the default value
NM_SETTING_WIRELESS_POWERSAVE_IGNORE  (1): don't touch existing setting
NM_SETTING_WIRELESS_POWERSAVE_DISABLE (2): disable powersave
NM_SETTING_WIRELESS_POWERSAVE_ENABLE  (3): enable powersave

To disable USB autosuspend (assuming you are using GRUB)

In GRUB add to cmdline (GRUB_CMDLINE_LINUX_DEFAULT= "  ")

usbcore.autosuspend=-1

then sudo update-grub

to check:
cat /sys/module/usbcore/parameters/autosuspend 
should return -1
my default was 2

Thanks for the suggestion. Unfortunately, neither of these fixed the issue.

Do you still have tlp installed? Remove it …

Might consider to update the BIOS …