Solved Ubuntu WiFi constantly disconnecting

Solved issue

Joopark

New Member
Joined
Feb 23, 2024
Messages
10
Reaction score
2
Credits
100
I am having a big problem with Ubuntu dual boot. I think I may have the wrong drivers for my WiFi card and I have been seeing that many people have exactly the same problem with the same WiFi card.

This is what I get when I run uname -a:
6.5.0-21-generic #21~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Feb 9 13:32:52 UTC 2 x86_64 x86_64 x86_64 GNU/Linux

The more info about the WiFi:

Output from iwconfig:
lo no wireless extensions.

wlo1 IEEE 802.11 ESSID:"joo 5.0GHz"
Mode:Managed Frequency:5.24 GHz Access Point: 14:EB:B6:1E:29:55
Bit Rate=866.7 Mb/s Tx-Power=3 dBm
Retry short limit:7 RTS thr:off Fragment thr:off
Power Management:off
Link Quality=66/70 Signal level=-44 dBm
Rx invalid nwid:0 Rx invalid crypt:0 Rx invalid frag:0
Tx excessive retries:0 Invalid misc:0 Missed beacon:0
As you can see I have turned off power management since many people say that is the problem. It doesn't seem to improve anything for me.

More about the WiFi card:

Network:
Device-1: MEDIATEK MT7921 802.11ax PCI Express Wireless Network Adapter
driver: mt7921e
IF: wlo1 state: up mac: <filter>

I think those are the right drivers. And everything should be working without a problem. But at the same time when I boot into windows I see that it uses different drivers the one for 7961.

I am thinking about switching to an older kernel hopping it would fix the problem but how does one do that.
Some info about the machine:
PU: 8-core AMD Ryzen 7 5800H with Radeon Graphics (-MT MCP-)
speed/min/max: 1123/400/4463 MHz Kernel: 6.5.0-21-generic x86_64 Up: 20m
Mem: 3817.0/15328.1 MiB (24.9%) Storage: 953.87 GiB (4.6% used) Procs: 385
Shell: Bash inxi: 3.3.13

Version: GSCN38WW
Version: IdeaPad Creator 5 16ACH6
Version: WIN
Version: IdeaPad Creator 5 16ACH6
Version: AMD Ryzen 7 5800H with Radeon Graphics
Firmware Version: Unknown
Firmware Version: Unknown
SBDS Version: Not Specified
String: Compiler Version: VC 9.0
 
Last edited:


I do not see which wi fi driver you have installed, can you run inxi -Nnz and copy back the full results [you may need to install inxi from the software manager]
 
etwork:
Device-1: MEDIATEK MT7921 802.11ax PCI Express Wireless Network Adapter
driver: mt7921e
IF: wlo1 state: up mac: <filter>

Hey the same is in the info about the WiFi card but here you go again :)
 
Media teck are often problematic products, The Wi-Fi Drivers are in the Kernel from 5-14 and higher, BUT there are still some problems across many distributions
 
root@abstower1:~# lspci | grep Wireless
10:00.0 Network controller: MEDIATEK Corp. MT7922 802.11ax PCI Express Wireless Network Adapter

This is almost the same wifi chip I have in this computer. I have the 7922. I never have any problems with it.
It didn't require any special drivers or compiles or anything... it just works.

root@abstower1:~# lsmod | grep mt79
mt7921e 24576 0
mt7921_common 86016 1 mt7921e
mt792x_lib 69632 2 mt7921e,mt7921_common
mt76_connac_lib 102400 3 mt792x_lib,mt7921e,mt7921_common
mt76 131072 4 mt792x_lib,mt7921e,mt7921_common,mt76_connac_lib
mac80211 1572864 4 mt792x_lib,mt76,mt7921_common,mt76_connac_lib
cfg80211 1335296 4 mt76,mac80211,mt7921_common,mt76_connac_lib

What does ip add show?
 
lsmod | grep mt79 shows
mt7921e 90112 0
mt76_connac_lib 40960 1 mt7921e
mt76 90112 2 mt7921e,mt76_connac_lib
mac80211 1249280 3 mt76,mt7921e,mt76_connac_lib
cfg80211 970752 4 mt76,mt7921e,mac80211,mt76_connac_lib


and ip add
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: wlo1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 10:6f:d9:36:8b:0f brd ff:ff:ff:ff:ff:ff
altname wlp3s0
inet 192.168.0.101/24 brd 192.168.0.255 scope global dynamic noprefixroute wlo1
valid_lft 7093sec preferred_lft 7093sec
inet6 fe80::b9a2:17b:bf61:ab94/64 scope link noprefixroute
valid_lft forever preferred_lft forever

I think it is also important to mention that I switched to Ubntu 20.04 since I read that it works great with the wifi card. Well it does not after all :| here: https://ubuntu.com/certified/component/934

Next I will be looking into this one: https://askubuntu.com/questions/148...n-connecting-or-no-intermittent-pages-display
 
I switched to Ubntu 20.04 since I read that it works great with the wifi card
If the machine is under 3 yrs old then i would recommend trying MX-Linux with AHS
 
lsmod | grep mt79 shows
mt7921e 90112 0
mt76_connac_lib 40960 1 mt7921e
mt76 90112 2 mt7921e,mt76_connac_lib
mac80211 1249280 3 mt76,mt7921e,mt76_connac_lib
cfg80211 970752 4 mt76,mt7921e,mac80211,mt76_connac_lib


and ip add
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: wlo1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 10:6f:d9:36:8b:0f brd ff:ff:ff:ff:ff:ff
altname wlp3s0
inet 192.168.0.101/24 brd 192.168.0.255 scope global dynamic noprefixroute wlo1
valid_lft 7093sec preferred_lft 7093sec
inet6 fe80::b9a2:17b:bf61:ab94/64 scope link noprefixroute
valid_lft forever preferred_lft forever


It would seem all your drivers are there.
I even see an IP address on your wifi interface. 192.168.0.101

Can you ping 192.168.0.1 ?
Why do you think this isn't working?
 
Yes I can ping it.

Update I am running Ubuntu 23.10 I am able to connect to 2.4GHz and also 5GHz. Problem is still there about every 15 minutes/3-4 times in the hour.

I am sure it's not the network itself since when booted into windows everything works great.

I am thinking that it could be some interfeerence with the dual boot, but I disabled any kind of caching/fast booting.

There is also the option that the network card is trying to maybe turning off but that is dissabled. So it's more like it just looses connection or maybe tries to search for another bandwidth I have no idea my Networking knowledge aint the strongest.

@Brickwizard The machine is indeed about 2 years old. But I have never heard of it I have only used Ubuntu, RedHat(work), Debian. I was really hopping to make it work or try Debian.
 
@dos2unix Is there a way to catch this change of state of the network card. Is there a log file somewhere what if ping something and contstantly log the result myself?
 
What is the output of...

netstat -i

Kernel Interface table
Iface MTU RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
enp0s13f0u3 1500 68199 0 0 0 13402 0 0 0 BMRU
lo 65536 91 0 0 0 91 0 0 0 LRU
wlp0s20f3 1500 0 0 0 0 0 0 0 0 BMU

In particular RX-ERR, RX-DRP, TX-ERR and TX-DRP for your wlo1 interface.

Do you have a screen similar to this, and can you run the command in the console?
nmcli dev wifi list

1708736444002.png
 
Last edited:
Did find a very useful log or so I think

so using this command I get a big log file of the network manager: journalctl /usr/sbin/NetworkManager

I will try to provide only relevant parts if you think I am missing something important let me know. I will paste them as pictures for better readability.

alright so initail boot I do get some error they don't seem to be a problem for now:
1708736309410.png


Then I this is what possibly happens when I get a drop in the wifi.
1708737298744.png

But I can also see other casses where the network manager disconnects without the fail
1708737403592.png



And here is the info you asked for

1708737453560.png

Output of netstat -i
Kernel Interface table
Iface MTU RX-OK RX-ERR RX-DRP RX-OVR TX-OK TX-ERR TX-DRP TX-OVR Flg
lo 65536 6475 0 0 0 6475 0 0 0 LRU
wlo1 1500 1835263 0 1 0 912962 0 0 0 BMRU
 
Also found this in system wide log which seems to be the whole picture the the network manager shuting down and starting back up
1708739333043.png

And by any chance do you know why discord is so heavily involved in the log files like 90% <-- Not relevant
 
What does - sudo rfkill list - show
0: ideapad_wlan: Wireless LAN
Soft blocked: no
Hard blocked: no
1: ideapad_bluetooth: Bluetooth
Soft blocked: no
Hard blocked: no
2: hci0: Bluetooth
Soft blocked: no
Hard blocked: no
3: phy0: Wireless LAN
Soft blocked: no
Hard blocked: no
 
Is Secure boot turned off? that will sometimes affect the wifi card.

But as @Brickwizard has said medi teck cards are problematic in Linux. So again you may want to to a usb wifi stick.
 
Yes secure boot is turned off.

Ubuntu 23.10 seems to have it fixed for now.
For this morning it has succesfully updated the DHCP lease every 1 hoour for a 2 hour lease time (IDK why it's set so low by default in the router, will just leave it like that)

I will reinstall the version since I feel like I created a lot of trash in this instance. And will let you know if it was soloved
 
Looking at your logs, I don't see any rfkill or dhcp, or secure boot problem.
What I do see, is networkd and networkManager fighting over control of your devices.

Since you're using Ubuntu 23.10, I would stick with the default NetworkManager.
This seems to be in a very weird state right now. This would be difficult to fix.
I would paste the lines here, but your logs are posted a pictures, not text.
 
Hey everyone I am back to share that Ubuntu 23.10 has solved the problem for me.

I started with 20.4 and updated my way up to 23.10 then I noticed there were no problems. I reinstalled it from scratch just because I felt that I have created a lot of junk.

Be careful when installing Ubuntu 23.10 the installer is new and somehow I couldn't make it install it in the place of the old one.
So it's quite simple you can enter into windows complete delete the partition that ubuntu is using. But then I got locked into grub the grub terminal which I had no idea how to use so I shutdown and enter bios and from there I enter windows and managed to remove grub from there. Then I had a problem with bit locker which didn't allow the new ubuntu to install which is as simple as stopping it from the settings. Everything after that went as smooth as butter just a simple dual boot installation
 

Members online


Top