You are not logged in.

#1 2024-03-17 19:26:43

Woriux
Member
Registered: 2024-03-17
Posts: 8

[Solved]WiFi works well and then suddenly stops, requiring restarting

Hello, I installed Arch not long ago and am very happy about giving it a try. However I have run into a problem regarding internet connection. It is working quite well, giving satisfactory level of transfer speeds and the connection is strong, however out of nowhere it just drops and I have to use iwctl to do the connection again. Sometimes it is enough, but sometimes the device or even adapter goes missing. Sometimes restarting iwd is enough, but sometimes a full system reboot is needed for wifi to work again.

dmesg gives me this:

[ 9058.929097] rtw_8821cu 1-1.2:1.0: failed to download firmware
[ 9058.933471] rtw_8821cu 1-1.2:1.0: leave idle state failed
[ 9058.942345] rtw_8821cu 1-1.2:1.0: failed to leave ips state
[ 9058.942348] rtw_8821cu 1-1.2:1.0: failed to leave idle state
[ 9058.952023] wlan0: authenticate with c0:4a:00:46:c0:0a (local address=e0:09:bf:fb:f6:39)
[ 9066.956360] wlan0: send auth to c0:4a:00:46:c0:0a (try 1/3)
[ 9068.039226] wlan0: send auth to c0:4a:00:46:c0:0a (try 2/3)
[ 9069.025867] wlan0: send auth to c0:4a:00:46:c0:0a (try 3/3)
[ 9070.012555] wlan0: authentication with c0:4a:00:46:c0:0a timed out
[ 9242.875195] rtw_8821cu 1-1.2:1.0: failed to download firmware
[ 9242.879574] rtw_8821cu 1-1.2:1.0: leave idle state failed
[ 9242.888450] rtw_8821cu 1-1.2:1.0: failed to leave ips state
[ 9242.888453] rtw_8821cu 1-1.2:1.0: failed to leave idle state
[ 9318.202555] rtw_8821cu 1-1.2:1.0: failed to download firmware
[ 9318.206928] rtw_8821cu 1-1.2:1.0: leave idle state failed
[ 9318.215819] rtw_8821cu 1-1.2:1.0: failed to leave ips state
[ 9318.215826] rtw_8821cu 1-1.2:1.0: failed to leave idle state
[ 9319.424421] rtw_8821cu 1-1.2:1.0: failed to download firmware
[ 9319.428935] rtw_8821cu 1-1.2:1.0: leave idle state failed
[ 9319.437796] rtw_8821cu 1-1.2:1.0: failed to leave ips state
[ 9319.437799] rtw_8821cu 1-1.2:1.0: failed to leave idle state
[ 9327.605045] wlan0: authenticate with c0:4a:00:46:c0:0a (local address=e0:09:bf:fb:f6:39)
[ 9327.736457] wlan0: send auth to c0:4a:00:46:c0:0a (try 1/3)
[ 9327.738357] wlan0: authenticated
[ 9327.738735] wlan0: associate with c0:4a:00:46:c0:0a (try 1/3)
[ 9327.742376] wlan0: RX AssocResp from c0:4a:00:46:c0:0a (capab=0x431 status=0 aid=2)
[ 9327.754759] wlan0: associated

With this line the connection drops:

[ 9058.929097] rtw_8821cu 1-1.2:1.0: failed to download firmware

These lines show successful manual reconnection:

 [ 9327.605045] wlan0: authenticate with c0:4a:00:46:c0:0a (local address=e0:09:bf:fb:f6:39)
[ 9327.736457] wlan0: send auth to c0:4a:00:46:c0:0a (try 1/3)
[ 9327.738357] wlan0: authenticated 

I think there may be some interference regarding drivers? However I cannot confirm it, I couldn't find a way to list the drivers used for wifi connection. The adapter is Realtek USB adapter.

Last edited by Woriux (2024-03-25 20:44:24)

Offline

#2 2024-03-17 19:41:17

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [Solved]WiFi works well and then suddenly stops, requiring restarting

~$ modinfo -F parm rtw88_core   
disable_lps_deep:Set Y to disable Deep PS (bool)
support_bf:Set Y to enable beamformee support (bool)
debug_mask:Debugging mask (uint)
~$

So try disabling "Deep PS" (ie, set the parameter to "Y").

Reference: https://wiki.archlinux.org/title/Kernel … le_options

Offline

#3 2024-03-18 20:18:11

Woriux
Member
Registered: 2024-03-17
Posts: 8

Re: [Solved]WiFi works well and then suddenly stops, requiring restarting

Hi, head_on_a_stick, thank you for your advice. I managed to disable rtw88 driver, but seems that without it iwd doesn't find my adapter anymore and Wifi doesn't work, so I reverted the change. I was wondering if I could somehow migrate to rtl drivers, since they are in the table next to realtek. I could not find sources that could help me with that.

Offline

#4 2024-03-18 20:26:41

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,732
Website

Re: [Solved]WiFi works well and then suddenly stops, requiring restarting

My advice was to apply the disable_lps_deep=Y parameter to the rtw88_core kernel module. Sorry if that was unclear.

Offline

#5 2024-03-18 21:21:43

Woriux
Member
Registered: 2024-03-17
Posts: 8

Re: [Solved]WiFi works well and then suddenly stops, requiring restarting

That is what I did, but after that adapter stopped showing up in iwctl.

Offline

#6 2024-03-18 22:44:46

seth
Member
Registered: 2012-09-03
Posts: 51,678

Re: [Solved]WiFi works well and then suddenly stops, requiring restarting

How did you do this *exactly*?
What does

systool -vm rtw88_core
lsmod  | grep rtw88_core

report?

Online

#7 2024-03-22 21:18:04

Woriux
Member
Registered: 2024-03-17
Posts: 8

Re: [Solved]WiFi works well and then suddenly stops, requiring restarting

Hi, sorry for the delay. here I share the results of the queries:
systool response:

Module = "rtw88_core"

  Attributes:
    coresize            = "327680"
    initsize            = "0"
    initstate           = "live"
    refcnt              = "2"
    srcversion          = "720FDDFBC3AAB79278CF373"
    taint               = ""
    uevent              = <store method only>

  Parameters:
    debug_mask          = "0"
    disable_lps_deep    = "N"
    support_bf          = "Y"

  Sections:

lsmod response:

rtw88_core            327680  2 rtw88_8821c,rtw88_usb
mac80211             1576960  2 rtw88_core,rtw88_usb
cfg80211             1347584  2 rtw88_core,mac80211

Offline

#8 2024-03-22 21:20:57

seth
Member
Registered: 2012-09-03
Posts: 51,678

Re: [Solved]WiFi works well and then suddenly stops, requiring restarting

disable_lps_deep    = "N"

So you didn't add that parameter.

Add "rtw88_core.disable_lps_deep=Y" to the https://wiki.archlinux.org/title/Kernel_parameters and try again.

Online

#9 2024-03-23 07:19:30

Woriux
Member
Registered: 2024-03-17
Posts: 8

Re: [Solved]WiFi works well and then suddenly stops, requiring restarting

As I said before, I did that and it made the wifi more difficult to start, so I reverted. But to show that I can do it, here is the systool response after disabling deep ps.

Module = "rtw88_core"

  Attributes:
    coresize            = "327680"
    initsize            = "0"
    initstate           = "live"
    refcnt              = "2"
    srcversion          = "720FDDFBC3AAB79278CF373"
    taint               = ""
    uevent              = <store method only>

  Parameters:
    debug_mask          = "0"
    disable_lps_deep    = "Y"
    support_bf          = "Y"

After numerous reboots it was possible to get adapter recognized with PS deep disabled, but the wifi disconnections are still persistent if not more frequent than before.

Offline

#10 2024-03-23 08:29:41

seth
Member
Registered: 2012-09-03
Posts: 51,678

Re: [Solved]WiFi works well and then suddenly stops, requiring restarting

https://lore.kernel.org/all/8b86edab-5b … ger.net/T/ - and this is old…

Please post your complete system journal for a boot w/ "disable_lps_deep" disabled again :

sudo journalctl -b | curl -F 'file=@-' 0x0.st

Online

#11 2024-03-23 08:55:37

Woriux
Member
Registered: 2024-03-17
Posts: 8

Re: [Solved]WiFi works well and then suddenly stops, requiring restarting

Here I'm sharing the journal: http://0x0.st/Xr5h.txt

Offline

#12 2024-03-23 09:11:42

seth
Member
Registered: 2012-09-03
Posts: 51,678

Re: [Solved]WiFi works well and then suddenly stops, requiring restarting

That's an external dongle, right?
Have you tried to plug it into one of the xhci hubs?

Online

#13 2024-03-23 09:50:05

Woriux
Member
Registered: 2024-03-17
Posts: 8

Re: [Solved]WiFi works well and then suddenly stops, requiring restarting

Yes, it's usb dongle and I guess it's the same as the one mentioned in lore.kernel.org
I plugged it in in another hub.

lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 004: ID 04d9:1503 Holtek Semiconductor, Inc. Keyboard
Bus 001 Device 005: ID 17ef:608d Lenovo Optical Mouse
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 002 Device 002: ID 8087:0024 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 003: ID 0078:0006 Microntek Joystick
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 002: ID 0bda:c811 Realtek Semiconductor Corp. 802.11ac NIC
Bus 004 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 005 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 002: ID 8087:1024 Intel Corp. USB2.0 Device
Bus 006 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
lsusb -t
/:  Bus 001.Port 001: Dev 001, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/6p, 480M
        |__ Port 005: Dev 004, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
        |__ Port 005: Dev 004, If 1, Class=Human Interface Device, Driver=usbhid, 1.5M
        |__ Port 006: Dev 005, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
/:  Bus 002.Port 001: Dev 001, Class=root_hub, Driver=ehci-pci/2p, 480M
    |__ Port 001: Dev 002, If 0, Class=Hub, Driver=hub/8p, 480M
        |__ Port 006: Dev 003, If 0, Class=Human Interface Device, Driver=usbhid, 1.5M
/:  Bus 003.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 480M
    |__ Port 004: Dev 002, If 0, Class=Vendor Specific Class, Driver=rtw_8821cu, 480M
/:  Bus 004.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 5000M
/:  Bus 005.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/2p, 480M
    |__ Port 001: Dev 002, If 0, Class=Audio, Driver=snd-usb-audio, 12M
    |__ Port 001: Dev 002, If 1, Class=Audio, Driver=snd-usb-audio, 12M
    |__ Port 001: Dev 002, If 2, Class=Audio, Driver=snd-usb-audio, 12M
    |__ Port 001: Dev 002, If 3, Class=Human Interface Device, Driver=usbhid, 12M
/:  Bus 006.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/2p, 5000M

EDIT: the connection gets interrupted as before.

Last edited by Woriux (2024-03-23 10:06:57)

Offline

#14 2024-03-23 10:40:31

seth
Member
Registered: 2012-09-03
Posts: 51,678

Re: [Solved]WiFi works well and then suddenly stops, requiring restarting

The idea was to use one of the usb 3 hubs, no idea why the usb2 one now also shows up w/ xhci, but the relevant factor  is the power supply.

Online

#15 2024-03-24 10:22:47

Woriux
Member
Registered: 2024-03-17
Posts: 8

Re: [Solved]WiFi works well and then suddenly stops, requiring restarting

I installed rtl8821cu driver, everything seems buttery smooth regarding wifi connection right now. I will update the title when I ensure that the problem has been solved.

$ lsusb -t
.....
/:  Bus 003.Port 001: Dev 001, Class=root_hub, Driver=xhci_hcd/4p, 480M
    |__ Port 004: Dev 002, If 0, Class=Vendor Specific Class, Driver=rtl8821cu, 480M
.....

This is what I did in case anyone has problems with Realtek Semiconductor Corp. 802.11ac NIC and rtw_8821cu:

You have to install "yay", or use other AUR package install method. Tutorial on yay can be found here.

$ yay rtl8821cu

I found that only the third option worked for me:

3 aur/rtl8821cu-morrownr-dkms-git 5.12.0.4.120.7d16a68-1 (+12 0.15) (Installed: 5.12.0.4.180.01cc261-1)
    rtl8821cu chipset driver (morrownr fork)

Continue through the installation. After the installation the faulty rtw driver should be replaced automatically. You can check via

lsusb -t

(See the beginning of this comment). From here you probably should reboot, but I am not sure if that is necessary. After these steps the internet just works by itself.

Offline

Board footer

Powered by FluxBB