lwfinger / rtw88

A backport of the Realtek Wifi 5 drivers from the wireless-next repo.
645 stars 183 forks source link

Slow Wifi Speed [RTW8821ce] #119

Closed Muhiiii closed 1 year ago

Muhiiii commented 1 year ago

I am running Dualboot and my wifi Speed in Linux is very slow compared to Windows. I dont know which information i could give currently, so if you need any information i will try to provide information

lwfinger commented 1 year ago

First, run the following command: sudo find /sys/kernel/debug/ieee80211 -name rtw88 Save the path of that file. Then when running a test through speedtest.net, run the following command:

sudo cat /file path from above/phy_info Post that info as well as the output of 'iw info'.

Muhiiii commented 1 year ago

==========[Tx Phy Info]======== [Tx Rate] = VHT1SMCS3(0x2f)

==========[Rx Phy Info]======== [Rx Beacon Count] = 19 [Rx Rate] = VHT1SMCS7(0x33) [Rx Rate Count]:

lwfinger commented 1 year ago

Please repeat the 'sudo cat' command while you are transmitting to speedtest.net. This test showed the bulk of the RX operations were done ar VHT1MCS8, which should be about 170 Mbps. The transmit was at VHT1MCS3, so I thing that was only sending acks. What are the values that speedtest.net shows? What do you get from Windows?

Are you aware that you only have 1 antenna connected?

Muhiiii commented 1 year ago

Output during Upload: `==========[Common Info]======== Is link = Y Current CH(fc) = 42 Current BW = 2 Current IGI = 0x3b TP {Tx, Rx} = {1, 1}Mbps 1SS for TX and RX = N

==========[Tx Phy Info]======== [Tx Rate] = VHT1SMCS3(0x2f)

==========[Rx Phy Info]======== [Rx Beacon Count] = 19 [Rx Rate] = VHT1SMCS9(0x35) [Rx Rate Count]:

==========[Tx Phy Info]======== [Tx Rate] = VHT1SMCS3(0x2f)

==========[Rx Phy Info]======== [Rx Beacon Count] = 20 [Rx Rate] = VHT1SMCS9(0x35) [Rx Rate Count]:

No i was not aware of the fact that i am only using one antenna. I am using a Laptop so i did not think of that kind of things

lwfinger commented 1 year ago

Send me the output of 'iw list' as well. When I connect my 8852be, a wifi 6 device, to my wifi 5 router, it drives the lines at the full speed of my 500 Mbps broadband connection. The TX and RX speeds are VHT2SSMC9.

Muhiiii commented 1 year ago

Wiphy phy0 wiphy index: 0 max # scan SSIDs: 4 max scan IEs length: 2243 bytes max # sched scan SSIDs: 0 max # match sets: 0 Retry short limit: 7 Retry long limit: 4 Coverage class: 0 (up to 0m) Device supports T-DLS. Supported Ciphers:

lwfinger commented 1 year ago

I do not have a fix yet, but I have found a symptom.

I installed an 8821CE chip in my computer and tested the 5 GHz band to my various routers. The results are as follows:

Router level Rx Speed Tx Speed Wifi 4 108 Mbps 87 Wifi 5 15 1.4 Wifi 6 36 37

For some reason, the 802.11ac chip performs worst when connected to an 802.11ac AP! It seems that the driver is not handling the VHT speeds properly. If you have access to a Wifi 4 router, then you can improve your performance. In the meantime, I will be reporting this to Realtek. I will let you know when I have an update.

Muhiiii commented 1 year ago

Thanks for reaching out to Realtelk. How do you know that i am only using one Antenna?

lwfinger commented 1 year ago

I am not sure that you are. In your phy_info, there were the lines: VHT_MCS-1ss MCS[0:9] = {0, 0, 0, 0, 0, 0, 0, 0, 18, 116} [RSSI(dBm)] = {-48, -100}

For rtw89, these list the RSSI for the two antennas, but I get the same for my card, even though I have 2 antennas connected. Obviously, the results do not mean the same for rtw88.

I have installed an RTL8821CE in my laptop, and I am doing some testing. At the moment, the results are confusing as sometimes I get the poor performance you describe, and other times I get what would be expected, but I have no clue on what the difference is.

lwfinger commented 1 year ago

I am making some progress. I booted openSUSE Leap 15.4 and Leap 15.5, both of which use a 5.14.21 kernel. I have not been able to get either to fail using the rtw88 driver built into the kernel. Under Leap 15.4 and using a 5GHz connection, I get the following:

Wifi 6 365/262 Mbs Rx/Tx Wifi 5 156/119 Mbps Wifi 4 119/107 Mbps

I expected there to be a bigger difference between Wifi 4 and Wifi 5, but that is a smaller problem.

What kernel are you using? The command 'uname -r' will give that info.

Muhiiii commented 1 year ago

6.1.13-1-lts

lwfinger commented 1 year ago

It appears that we have a regression before kernel 6.1.X. I will try to bisect it.

Thanks for the info.

Muhiiii commented 1 year ago

Already thanks in advance.

lwfinger commented 1 year ago

I found the problem. It was a merge error in my copying of the kernel code to this repo. You should be able to do a new pull and get code that works properly.

Muhiiii commented 1 year ago

IT WORKS!!!!!!!