Legion Lenovo 5 15ARH05H and USB-C network adapter

Hello,
I purchased a USB/USB-C network adapter, which contains a Realtek Semiconductor USB 10/100/1G/2.5G LAN chip. The system recognized the card without any issues, the internet is working, but the maximum download speed it reaches is 1400Mbps (connected via USB-C). I get slightly better speeds over Wi-Fi.
Does anyone have any suggestions on how I can make the card support the maximum speed of my connection, which is 2Gbps?

Kernel: 6.12.4-s
USB-C: 3.2 Gen 1 5Gbps Data Transfer

Best regards.

I tested it on LiveCD Linux Mint, and the download speed is at a maximum of 2100Mbps. On CashyOS, both with wired and wireless connections, the download speed is a maximum of 1400Mbps. Is it possible that there is a limit set somewhere in the system?

Does sudo sysctl -w net.ipv4.tcp_ecn=2 help?

No :frowning:

❯ sudo sysctl -w net.ipv4.tcp_ecn=2
[sudo] hasło użytkownika kozacki: 
net.ipv4.tcp_ecn = 2

~ 10s

What about Arch’s kernel or our LTS kernel?

# Arch
sudo pacman -S linux linux-headers

# LTS
sudo pacman -S linux-cachyos-lts linux-cachyos-lts-headers

It is the same. On Kernel Arch and Kernel CashyOS LTS, the speeds range between 1300/1400Mbps.

Hmm, that’s very strange.

Can you test if you remove cachyos-settings? These contain several other tweaks that we make.

sudo pacman -R cachyos-settings
sudo mkinitcpio -P

A little better


 speedtest-cli
Retrieving speedtest.net configuration...
Testing from Orange Polska (83.30.131.70)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Syrion Sp. z o.o. (Zory) [89.02 km]: 6.259 ms
Testing download speed................................................................................
Download: 1682.97 Mbit/s
Testing upload speed......................................................................................................
Upload: 578.57 Mbit/s

Did you reboot after?

Yes, now is ok. The problem occurs only on browser-based speed tests. But overall, everything is fine now. Thank you for your help.

❯ speedtest-cli
Retrieving speedtest.net configuration...
Testing from Orange Polska (83.30.131.70)...
Retrieving speedtest.net server list...
Selecting best server based on ping...
Hosted by Syrion Sp. z o.o. (Zory) [89.02 km]: 5.232 ms
Testing download speed................................................................................
Download: 2016.38 Mbit/s
Testing upload speed......................................................................................................
Upload: 534.92 Mbit/s

I have one more question: when I boot the system, I now have 3 kernel versions to choose from. How can I clean this up so that I only have the options CashyOS + CashyOS (fall back)?

sudo pacman -Rns linux-cachyos-lts{,-headers} linux{,-headers}

Right, so there’s a problematic entry in our settings.

net.ipv4.tcp_fastopen=3 # Default 1
net.ipv4.tcp_ecn=1 # Default 2
net.ipv4.tcp_timestamps=0 # Default 1
net.core.netdev_max_backlog=16384 # Default 1024
net.ipv4.tcp_slow_start_after_idle=0 # Default 1
net.ipv4.tcp_rfc1337=1 # Default 0

@kozacki These are the various sysctls we set related to networking. Do you mind helping us bisect which of these sysctls are problematic so we can drop them? Firstly, reinstall the cachyos-settings package and reboot

sudo pacman -S cachyos-settings

Then you can start changing the settings

sudo sysctl -w <tunable>=<value>

Thank you :slightly_smiling_face:

Should I change each setting one by one and test the connection? Should I restart the system after each change?

The changes you make with the command aren’t persisted on reboot, I would think that restarting the connection should be sufficient. If not, you would need to change the settings in /usr/lib/sysctl.d/99-cachyos-settings.conf and reboot after each change.

Yes, please.

Another user has bisected this down to net.ipv4.tcp_fastopen. Can you confirm that setting this to 1 fixes your performance?

It’s hard to say because one speed test shows 1400, another 1000, and the terminal one, which used to be the fastest, now shows 100-500. I understand there can be differences between them, but such big ones?