Connection Failed on Fedora 41

My internet speed is very slow (even if I get 150/200 Mb/s with the speedtest).
I get also the error “Connection failed” often, and it keeps connecting and disconnecting… it is really annoying.

When I “ifconfig” I see 442 dropped packets. Could this be the reason?

How can I fix it?

certainly
That usually indicates a problem with the internet connection at ‘some point’
It may be between your pc and router, between the router and isp gateway, or somewhere else on the internet.
Using ping and testing various sites may provide some clues.

You usually can ‘fix’ only problems on your pc and between the pc and router.

and how can I check what’s the problem and what can I do to solve it?

I have dual boot and in windows I have no problem whatsoever with the internet connection. I guess it is a problem in Fedora, maybe some driver idk, any help?

Hi Lorenzo,

Welcome to Fedora! :slight_smile:

I am assuming you have an ethernet wired connection between your router and computer.
So, the things to check are:

  1. Are both ends of the cable securely fastened into the RJ45 sockets? – they should not come out or move out when gently pulled. Should fit snugly
  2. check the cable itself — if your are running on a 1Gbps network, the minimum cable spec should be CAT 5e. Look along the cable, there will be writing on it and one of those small sections of writing will have the Category (CAT) of the cable
  3. cable should be smooth and uniform along its entire length, no kinks/pinched/crushed/nicked/skinned areas AND the internal wires should not be exposed at the ends.
  4. RJ45 sockets in the computer and router should be clean and you should be able to clearly see 8 copper wires inside. They should be straight and uniformly spaced. The edges around the socket should be flat/uniform

If all those checks are in a good state, then you have a problem with either the router or the network interface in the computer.

I don’t have a wired connection, I’m on wi-fi

Hi Lorenzo,

Ok, on a wireless interface it is not that uncommon to see a few dropped packets (422 is not a lot).
As for the disconnects, a lot of times this has to do with the power management. So, depending on which type of wireless interface you have (USB dongle, internal PICe card ,…) you need to find the specific settings that explicitly disable the power management. IF that does not fix the issues, then you have a bit of work to do to fix. Could be overheating, could be a bad driver, could be a bad router … and on and on … … you will need to eliminate the cause by testing one thing at a time … (yeah, I know, a real pain! … but that’s how you do it :slight_smile: )

Network controller: Realtek Semiconductor Co., Ltd. RTL8852BE PCIe 802.11ax Wireless Network Controller

Do you know how can I disable the power management setting?

Hi Lorenzo,

Start here :slight_smile:

Here is the how2:
You need root or sudo to do the following:

  1. in /etc/NetworkManager/conf.d
  2. create a file with vi or nano called
    default-wiwfi-powersave.conf
  3. there should be 2 lines in the file
    [connection]
    wifi.powersave = 2
  4. save the file and reboot

Other values for wif.powersave = {n}
NM_SETTING_WIRELESS_POWERSAVE_DEFAULT (0): use the default value
NM_SETTING_WIRELESS_POWERSAVE_IGNORE (1): don’t touch existing setting
NM_SETTING_WIRELESS_POWERSAVE_DISABLE (2): disable powersave
NM_SETTING_WIRELESS_POWERSAVE_ENABLE (3): enable powersave

thank you!
I’ll try and I’ll be back here if it will still not work. Otherwise I’ll mark your answer as a solution

Sorry for the late reply, I had some serious family business to take care…

Nothing changed, maybe it got worse… wifi is slow as hell, and I get often the error “Connection Failed”

It also often give me the error: “Authentication required”… so maybe it’s a problem of authentication?

Hi Lorenzo,

Hmmm … try doing a WiFi audit to see how many access points are running at the same signal strength as yours. This sounds a lot like interference at this point.

How can I do a wifi audit?

However I have a dual-boot with windows and I don’t have this problem in windows

I am on the iliadbox

Hi Lorenzo,

Ok, looks like you are not getting much contention in the RF space … that’s good.

Let’s give this a try then:
Need to do as root or via sudo

  1. create a file in /etc/modprobe.d named rtw8852be.conf
  2. put these lines in the file
    options rtw89_pci disable_aspm_l1=y disable_aspm_l1ss=y
    options rtw89pci disable_aspm_l1=y disable_aspm_l1ss=y
    options rtw89_core disable_ps_mode=y
    options rtw89core disable_ps_mode=y
  3. reboot and let’s see what we get

I still get the error “Connection failed”

NOTE: I noticed that sometimes it tries to connect to that “Vodafone” wifi… maybe I have to change channel somehow?

maybe the problem could be the driver?

0000:02:00.0 Network controller: Realtek Semiconductor Co., Ltd. RTL8852BE PCIe 802.11ax Wireless Network Controller
Subsystem: Realtek Semiconductor Co., Ltd. Device b887
Kernel driver in use: rtw89_8852be
Kernel modules: rtw89_8852be

Hi Lorenzo,

It’s possible … Realtek wireless cards seem to have way more issues than the iNtel Wireless cards in my experience … I usually avoid Realtek …
Are you using the driver that came with Linux or is a 3rd party driver from GIT?

unfortunately I am on a laptop so I am stuck with that wireless card..

I am using the linux driver, I tried in the past to use the driver from github but I was not able to make it work

Hi Lorenzo,

Ok, I found this:
Do you know how to modify kernel parameters via GRUB?

I f yes, add/append this to the GRUB_CMDLINE_LINUX=
rtw_89_pci.disable_aspm_L1=Y rtw89_pci.disable_aspm_L1ss=Y