lwfinger / rtl8188eu

Repository for stand-alone RTL8188EU driver.
Other
1.69k stars 600 forks source link

Wi-Fi network goes asleep after some period of inactivity #451

Open simurq opened 1 year ago

simurq commented 1 year ago

I know that r8188eu was replaced in kernel 6.3 by rtl8xxxu. And since then my wi-fi network sort of "goes asleep" after some period of inactivity, e.g. when I'm not browsing, making me to toggle the wi-fi switch every time I want to go back online to re-connect it.

Since the driver branch 5.2.2.4 I'm using was last updated back in July, can you please advise what I can do to prevent the wi-fi network from falling into a state of drowsiness? Thank you!

Wi-Fi dongle: TP-Link TL-WN725N Linux Kernel: 6.5.6 OS: Pop!_OS 22.04

EDIT: From the report generated by iwconfig:

Frequency: 2.412 GHz Power Management: off

dubhater commented 12 months ago

Next time the wifi falls asleep, please run sudo journalctl -b and attach the full output here.

simurq commented 11 months ago

Next time the wifi falls asleep, please run sudo journalctl -b and attach the full output here.

Thank you for your interest! Here is the output of the command:

Before restart (asleep) After restart

Hope it helps!

dubhater commented 11 months ago

Unfortunately I don't see anything strange in the logs.

Does the problem still happen if you move the computer closer to the access point?

Does the driver in this repository work better?

It's probably best to have only one driver at a time loaded, 8188eu or rtl8xxxu.

simurq commented 11 months ago

Does the problem still happen if you move the computer closer to the access point?

It's the same, unfortunately. I'm writing this message using USB tethering option on my phone. And this is strange, since both devices use the same network (I turned off mobile data on the phone). But I've never had a similar problem when connecting to the Internet from phone.

Does the driver in this repository work better?

With every kernel update and up until this problem, I'd usually re-download, build and install the rtl8188eu driver from branch 5.2.2.4.

It's probably best to have only one driver at a time loaded, 8188eu or rtl8xxxu.

This is the output of sudo lshw -C netwrok | grep "driver". Does it mean I use two separate drivers after the kernel update (for reasons I'm not aware of)? If so, do I need to revert to 8188eu (somehow?) or do something else?

configuration: autonegotiation=on broadcast=yes driver=r8169 driverversion=6.5.6-76060506-generic firmware=rtl8168h-2_0.0.2 02/26/15 latency=0 link=no multicast=yes port=twisted pair

configuration: broadcast=yes driver=rtl8xxxu driverversion=6.5.6-76060506-generic firmware=N/A ip=192.168.1.9 link=yes multicast=yes wireless=IEEE 802.11

configuration: autonegotiation=off broadcast=yes driver=rndis_host driverversion=6.5.6-76060506-generic duplex=half firmware=RNDIS device ip=192.168.11.196 link=yes multicast=yes port=twisted pair

And this is the output of sudo dmesg | grep [Rr][Tt][Ll]:

[ 1.018409] r8169 0000:02:00.0 eth0: RTL8168h/8111h, 30:9c:23:46:39:85, XID 541, IRQ 125 [ 5.807112] usb 1-9: RTL8188EU rev D (TSMC) romver 0, 1T1R, TX queues 2, WiFi=1, BT=0, GPS=0, HI PA=0 [ 5.807117] usb 1-9: RTL8188EU MAC: d0:37:45:0f:ae:35 [ 5.807119] usb 1-9: rtl8xxxu: Loading firmware rtlwifi/rtl8188eufw.bin [ 6.309273] usbcore: registered new interface driver rtl8xxxu [ 7.255008] RTW: rtl8188eu v5.2.2.4_25483.20171222 [ 7.255042] usbcore: registered new interface driver rtl8188eu [ 7.280363] rtl8xxxu 1-9:1.0 wlxd037450fae35: renamed from wlan0 [ 9.200568] usb 1-9: rtl8xxxu_bss_info_changed: HT supported

lwfinger commented 11 months ago

You are only using r8xxxu. In the configuration, the entries with "twisted pair" are the wiired interfaces.

dubhater commented 11 months ago

Does it help to keep ping <router ip address> running in a terminal all the time?

simurq commented 11 months ago

You are only using r8xxxu. In the configuration, the entries with "twisted pair" are the wiired interfaces.

Thank you for pointing that out, Larry. Does it mean I need to reinstall the rtl8188eu driver? And what about Linux replacing it with the rtl8xxxu driver?

Does it help to keep ping running in a terminal all the time?

Sounds like a radical option, but definitely one to try out when my network drops off again. Thanks!

lwfinger commented 11 months ago

The rtl8188eu driver is an option, but you will need to blacklist rtl8xxxu.

The driver is staging was dropped when rtl8xxxu was modified to support this device. I kept the external one in this repo to offer a choice. I have no idea which driver is better,

simurq commented 11 months ago

The rtl8188eu driver is an option, but you will need to blacklist rtl8xxxu.

Thank you! I blacklisted it as you advised (added the relevant line to /etc/modprobe.d/blacklist.conf), restarted the system, checked if it is replaced with your driver and tested the network performance for a few days. But the problem remains, unfortunately.

So, basically we're on square one again, and I'm even thinking of replacing the dongle as yet another radical option...

Thank you for trying to help anyway!

dubhater commented 11 months ago

There is a newer version of this driver: https://github.com/aircrack-ng/rtl8188eus/

and even newer still: https://github.com/ivanovborislav/rtl8188eu/

You should try them both.

If you end up looking for another dongle, something based on MT7601U should have similar price and features, and better performance.

simurq commented 11 months ago

There is a newer version of this driver: https://github.com/aircrack-ng/rtl8188eus/

and even newer still: https://github.com/ivanovborislav/rtl8188eu/

You should try them both.

If you end up looking for another dongle, something based on MT7601U should have similar price and features, and better performance.

Thank you very much! I'll try your suggestions asap.

PS: Just wondering if it somehow might be related to the regression issue reported here and here? I'm not a Linux expert, nor a network specialist at all, but the article seems to be sort of in sync with my issue, or is it?...

dubhater commented 11 months ago

You can check easily by updating to kernel 6.6.6.