Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
WiFi disconnects when USB drives connect.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
yuuki102
n00b
n00b


Joined: 21 Sep 2021
Posts: 32

PostPosted: Wed Jul 17, 2024 8:41 pm    Post subject: WiFi disconnects when USB drives connect. Reply with quote

Hello,

I have a rather puzzling problem. Every time I connect my Sandisk USB flash drive, my WiFi looses connection. This doesn't happen if I'm close to the AP (in the same room) but anywhere else than that, this is what happens.

This is what the kernel logs have to say:
Code:
[Jul17 21:23] usb 4-8: new SuperSpeed USB device number 2 using xhci_hcd
[  +0.017503] usb 4-8: New USB device found, idVendor=0781, idProduct=5581, bcdDevice= 1.00
[  +0.000002] usb 4-8: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[  +0.000001] usb 4-8: Product: Ultra
[  +0.000001] usb 4-8: Manufacturer: SanDisk
[  +0.000000] usb 4-8: SerialNumber: 0401990395d27257728a4187a78c36be4af3dbe31b51690eeb6886131bfa53b216b7000000000000000000002169f9c0ff9b061881558107a4a77241
[  +0.015166] usb-storage 4-8:1.0: USB Mass Storage device detected
[  +0.000153] scsi host3: usb-storage 4-8:1.0
[  +0.000047] usbcore: registered new interface driver usb-storage
[  +0.001606] usbcore: registered new interface driver uas
[  +1.023485] scsi 3:0:0:0: Direct-Access     SanDisk  Ultra            1.00 PQ: 0 ANSI: 6
[  +0.000203] sd 3:0:0:0: Attached scsi generic sg0 type 0
[  +0.005180] sd 3:0:0:0: [sda] 60063744 512-byte logical blocks: (30.8 GB/28.6 GiB)
[  +0.000863] sd 3:0:0:0: [sda] Write Protect is off
[  +0.000001] sd 3:0:0:0: [sda] Mode Sense: 43 00 00 00
[  +0.000365] sd 3:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
[  +0.003188]  sda: sda1 sda2
[  +0.000213] sd 3:0:0:0: [sda] Attached SCSI removable disk
[  +4.724957] ntfs3: Enabled Linux POSIX ACLs support
[  +0.000002] ntfs3: Read-only LZX/Xpress compression included
[  +6.988323] wlan0: Connection to AP ac:64:62:7a:96:b4 lost
[Jul17 21:24] usb 4-8: USB disconnect, device number 2
[Jul17 21:26] wlan0: authenticate with ac:64:62:7a:96:b4
[  +0.000012] wlan0: 80 MHz not supported, disabling VHT
[  +0.005367] wlan0: send auth to ac:64:62:7a:96:b4 (try 1/3)
[  +0.045719] wlan0: authenticated
[  +0.001869] wlan0: associate with ac:64:62:7a:96:b4 (try 1/3)
[  +0.016540] wlan0: RX AssocResp from ac:64:62:7a:96:b4 (capab=0x1411 status=0 aid=7)
[  +0.027330] wlan0: associated
[  +0.093890] wlan0: Limiting TX power to 20 (20 - 0) dBm as advertised by ac:64:62:7a:96:b4


There aren't any errors besides the connection loss, so I'm really at a loss as to what to do. Could this be a hardware fault? It's a new laptop bought last year, and it still has one year warranty left. I could claim it but again, I'm not sure it's a hardware fault, and if I go to the store unprepared, the techs will either blame me or Linux.

By the way, the exact same problem was occuring in Fedora Linux back when I had it.

Specs:

Code:

fedora-msi /home/miohatsume # inxi -Fxz
System:
  Kernel: 6.6.35-gentoo-dist arch: x86_64 bits: 64 compiler: gcc v: 13.2.1
  Desktop: Xfce v: 4.18.1 Distro: Gentoo Base System release 2.15
Machine:
  Type: Laptop System: Micro-Star product: GF63 Thin 11UC v: REV:1.0
    serial: <filter>
  Mobo: Micro-Star model: MS-16R6 v: REV:1.0 serial: <filter> UEFI: American
    Megatrends LLC. v: E16R6IMS.10E date: 09/21/2022
Battery:
  ID-1: BAT1 charge: 27.2 Wh (59.9%) condition: 45.4/51.3 Wh (88.5%)
    volts: 11.8 min: 11.4 model: MSI BIF0_9 status: not charging
CPU:
  Info: 8-core model: 11th Gen Intel Core i7-11800H bits: 64 type: MT MCP
    arch: Tiger Lake rev: 1 cache: L1: 640 KiB L2: 10 MiB L3: 24 MiB
  Speed (MHz): avg: 1139 high: 4009 min/max: 800/4600 cores: 1: 800 2: 800
    3: 800 4: 1281 5: 800 6: 4009 7: 800 8: 800 9: 1524 10: 800 11: 800 12: 800
    13: 800 14: 800 15: 800 16: 1811 bogomips: 73744
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx
Graphics:
  Device-1: Intel TigerLake-H GT1 [UHD Graphics] vendor: Micro-Star MSI
    driver: i915 v: kernel arch: Gen-12.1 bus-ID: 00:02.0
  Device-2: NVIDIA GA107M [GeForce RTX 3050 Mobile] vendor: Micro-Star MSI
    driver: nvidia v: 550.90.07 arch: Ampere bus-ID: 01:00.0
  Device-3: SunplusIT HD Webcam driver: uvcvideo type: USB bus-ID: 3-10:2
  Display: server: X.org v: 1.21.1.13 driver: X: loaded: modesetting,nvidia
    dri: iris gpu: i915 resolution: 1920x1080
  API: Vulkan v: 1.3.283 drivers: N/A surfaces: xcb,xlib devices: 2
  API: OpenGL Message: Unable to show GL data. glxinfo is missing.
Audio:
  Device-1: Intel Tiger Lake-H HD Audio vendor: Micro-Star MSI
    driver: sof-audio-pci-intel-tgl bus-ID: 00:1f.3
  API: ALSA v: k6.6.35-gentoo-dist status: kernel-api
  Server-1: PipeWire v: 1.0.7 status: n/a (root, process)
Network:
  Device-1: Intel Tiger Lake PCH CNVi WiFi driver: iwlwifi v: kernel
    bus-ID: 00:14.3
  IF: wlan0 state: up mac: <filter>
  Device-2: Realtek RTL8111/8168/8211/8411 PCI Express Gigabit Ethernet
    vendor: Micro-Star MSI driver: r8169 v: kernel port: 3000 bus-ID: 03:00.0
  IF: enp3s0 state: down mac: <filter>
  IF-ID-1: hw0 state: unknown speed: N/A duplex: N/A mac: N/A
Bluetooth:
  Device-1: N/A driver: btusb v: 0.8 type: USB bus-ID: 3-14:3
  Report: rfkill ID: hci0 rfk-id: 0 state: down bt-service: stopped
    rfk-block: hardware: no software: no address: see --recommends
Drives:
  Local Storage: total: 476.94 GiB used: 138.3 GiB (29.0%)
  ID-1: /dev/nvme0n1 vendor: Samsung model: MZVL4512HBLU-00BTW
    size: 476.94 GiB temp: 35.9 C
Partition:
  ID-1: / size: 453.6 GiB used: 138.14 GiB (30.5%) fs: ext4 dev: /dev/dm-0
    mapped: luks-da9deb3f-dc33-4312-8d5b-cd63c8737fe8
  ID-2: /boot size: 1.9 GiB used: 168.4 MiB (8.7%) fs: ext4
    dev: /dev/nvme0n1p2
Swap:
  ID-1: swap-1 type: partition size: 12 GiB used: 0 KiB (0.0%)
    dev: /dev/nvme0n1p3
Sensors:
  Src: /sys System Temperatures: cpu: 46.0 C mobo: N/A
  Fan Speeds (rpm): N/A
Info:
  Memory: total: 16 GiB available: 15.33 GiB used: 2.45 GiB (16.0%)
    igpu: 60 MiB
  Processes: 331 Uptime: 1h 39m Init: SysVinit rc: OpenRC v: 0.54.2
    runlevel: default
  Packages: 744 Compilers: gcc: 13.2.1 Shell: Bash v: 5.2.26 inxi: 3.3.33


Any ideas?
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5064
Location: Bavaria

PostPosted: Wed Jul 17, 2024 8:59 pm    Post subject: Re: WiFi disconnects when USB drives connect. Reply with quote

yuuki102 wrote:
Any ideas?

This could be a problem with the power supply ... the USB device may be drawing too much power. But please don't ask me what you can do (apart from using other USB ports).
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Banana
Moderator
Moderator


Joined: 21 May 2004
Posts: 1712
Location: Germany

PostPosted: Thu Jul 18, 2024 6:52 am    Post subject: Reply with quote

maybe there is a bios setting about USB power, or maybe this is a case of bad connections if those two USB ports are close together?

A possible solution would be to use an external powered USB hub.
_________________
Forum Guidelines

PFL - Portage file list - find which package a file or command belongs to.
My delta-labs.org snippets do expire
Back to top
View user's profile Send private message
yuuki102
n00b
n00b


Joined: 21 Sep 2021
Posts: 32

PostPosted: Thu Jul 18, 2024 7:04 pm    Post subject: Re: WiFi disconnects when USB drives connect. Reply with quote

pietinger wrote:
yuuki102 wrote:
Any ideas?

This could be a problem with the power supply ... the USB device may be drawing too much power. But please don't ask me what you can do (apart from using other USB ports).


This was also my thought. But it's a laptop and there are no USB devices besides that 32GB thumb drive. Isn't it weird for a high-performance laptop to not supply enough power to that?

That said, the thumb drive does get awfully hot, so maybe it isn't very efficient.

Still, it outta be able to handle a WiFi card and a simple USB mass storage...
Back to top
View user's profile Send private message
yuuki102
n00b
n00b


Joined: 21 Sep 2021
Posts: 32

PostPosted: Thu Jul 18, 2024 7:08 pm    Post subject: Reply with quote

Banana wrote:
maybe there is a bios setting about USB power, or maybe this is a case of bad connections if those two USB ports are close together?

A possible solution would be to use an external powered USB hub.


That'd probably solve it yeah. But isn't it strange? I got that laptop for 1000 euros last summer. The least I'd expect is the ability to connect a USB thumb drive without the need for an external power source.

Even my Dad's old Core 2 Duo machine can use that USB flash drive without problems. It's a typical Toshiba C660 that runs Debian...

How strange. All I know is that if I take it there, they won't know what to do about it anyway. That same shop told my friend that his unbootable laptop needs a 600 euro motherboard because it's dead. I told him to remove one of the RAM sticks and boom, working laptop. Simple 20 euro fix.

The shop is a major retailer in Greece (one of the most well known that have chains all across the country) so not exactly random.
Back to top
View user's profile Send private message
yuuki102
n00b
n00b


Joined: 21 Sep 2021
Posts: 32

PostPosted: Thu Jul 18, 2024 7:37 pm    Post subject: Reply with quote

I checked with lsusb and the USB drive is in its own root hub:

Code:
fedora-msi /home/miohatsume # lsusb -t
/:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/1p, 480M
/:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 10000M
/:  Bus 003.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/16p, 480M
    |__ Port 010: Dev 002, If 0, Class=Video, Driver=uvcvideo, 480M
    |__ Port 010: Dev 002, If 1, Class=Video, Driver=uvcvideo, 480M
    |__ Port 014: Dev 003, If 0, Class=Wireless, Driver=btusb, 12M
    |__ Port 014: Dev 003, If 1, Class=Wireless, Driver=btusb, 12M
/:  Bus 004.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/8p, 20000M/x2
    |__ Port 008: Dev 002, If 0, Class=Mass Storage, Driver=usb-storage, 5000M


Code:

Bus 004 Device 002: ID 0781:5581 SanDisk Corp. Ultra
Couldn't open device, some information will be missing
Device Descriptor:
  bLength                18
  bDescriptorType         1
  bcdUSB               3.00
  bDeviceClass            0 [unknown]
  bDeviceSubClass         0 [unknown]
  bDeviceProtocol         0
  bMaxPacketSize0         9
  idVendor           0x0781 SanDisk Corp.
  idProduct          0x5581 Ultra
  bcdDevice            1.00
  iManufacturer           1 SanDisk
  iProduct                2 Ultra
  iSerial                 3 0401990395d27257728a4187a78c36be4af3dbe31b51690eeb6886131bfa53b216b7000000000000000000002169f9c0ff9b061881558107a4a77241
  bNumConfigurations      1
  Configuration Descriptor:
    bLength                 9
    bDescriptorType         2
    wTotalLength       0x002c
    bNumInterfaces          1
    bConfigurationValue     1
    iConfiguration          0
    bmAttributes         0x80
      (Bus Powered)
    MaxPower              896mA
    Interface Descriptor:
      bLength                 9
      bDescriptorType         4
      bInterfaceNumber        0
      bAlternateSetting       0
      bNumEndpoints           2
      bInterfaceClass         8 Mass Storage
      bInterfaceSubClass      6 SCSI
      bInterfaceProtocol     80 Bulk-Only
      iInterface              0
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x81  EP 1 IN
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst               1
      Endpoint Descriptor:
        bLength                 7
        bDescriptorType         5
        bEndpointAddress     0x02  EP 2 OUT
        bmAttributes            2
          Transfer Type            Bulk
          Synch Type               None
          Usage Type               Data
        wMaxPacketSize     0x0400  1x 1024 bytes
        bInterval               0
        bMaxBurst              15


I guess this is helpful information. I might need to hunt down how much current my USB drive draws.
Back to top
View user's profile Send private message
pcmaster
Advocate
Advocate


Joined: 04 Dec 2003
Posts: 2234
Location: Barcelona

PostPosted: Sun Jul 21, 2024 12:51 pm    Post subject: Reply with quote

None of the devices in the lsusb output are a wifi adapter.

You have an USB 2.0 video adapter, an USB 1.x bluetooth adapter and a USB 3.0 flash drive.

In your dmesg:

Connection to AP ac:64:62:7a:96:b4 lost

May be an interference. Try it this happens using an USB3.0 cable between the computer and the flash drive.
_________________
pcmaster
Back to top
View user's profile Send private message
LiamOS
n00b
n00b


Joined: 06 Jun 2012
Posts: 67
Location: Ireland

PostPosted: Mon Jul 22, 2024 10:35 am    Post subject: Reply with quote

Over the years I've has some ground loops between USB devices (could hear my mouse movement in my headphones) among other electronic issues, weird behaviour like this doesn't surprise me a lot anymore.

I've had power issues with external USB drives on Raspberry Pis before pulling so much current that the board voltage drops, and while I didn't check how much power the USB drive was pulling it was very clearly a lot relative to what I'd expected.
It could even be that the sudden load when it's connected is enough to drop the voltage briefly on the USB power stage, and that this causes the WiFi chip to brown the bed. Do you have other USB ports you can try?
_________________
CFLAGS=" -O999999"
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum