You are not logged in.

#1 2020-02-09 20:18:51

laanan
Member
Registered: 2020-01-25
Posts: 22

Wifi Connection Suddenlty Drops -- a quest in progress

Hi folks, writing this post as I try to figure out a problem with the hope that I may get some pointers, but also that I might be able to solve a problem that others have and then be able to use this post to solve their own problems in the future.

I'm experiencing some strange behavior with Network Manager. Seemingly at random, I will lose my internet connection, and the only thing that will bring it back is a full reboot, which works every time.

My first thought was the modem (it's a Comcast modem), but all the other devices in the house stay connected. My second thought was, well, if restarting the whole system works, then it must just mean I need to figure out how to restart Network Manager to refresh the settings and connection. So that's was the starting point for my attempt to find a better solution than a reboot. I have followed many forum threads on this forum as well as other forums, trying to suss out a solution, with no luck (on the bright side, I have learned a lot!).

So far I have tried stopping and starting Network Manager through the GUI and CLI.

Commands I have tried include:

sudo systemctl restart NetworkManager.service

sudo service network-manager restart

sudo nmcli networking off (and then on)

sudo nmcli connection reload


All of these commands worked and restarted or reloaded the service (or connection), but there was no connection reestablished. Put another way, I would see the little wifi icon spin and then return to an icon indicating no connection. So, I decided it must not be a problem with the actual service.

After doing more reading, I then tried working with dhclient. releasing with 'sudo dhclient -r' seemed to do what it is supposed to do, but again did not change the outcome. I then tried to obtain a new IP, and made a stupid mistake. My terminal was not wide enough to show me the whole result of 'sudo nmcli connection,' so I thought my wifi device was 'wlp2.' Thus, dhclient could not find the device when I initially tried 'sudo dhclient wlp2.' Newbie mistake! I then checked my devices with 'nmcli device' which pumps out a differently configured table with the device names at the beginning (hence avoiding the cut off issue if your terminal window is not wide enough).

In my frustration, I had already resorted to a reboot before figuring out my idiotic mistake, so I am not sure at this moment if refreshing the IP is the solution. Perhaps folks could comment below to let me know if I am headed in the right directon (or not), and I plan to report back here once the issue crops up again (and once I try to release and refresh the IP.

Offline

#2 2020-02-09 21:41:27

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 330

Re: Wifi Connection Suddenlty Drops -- a quest in progress

@laanan, you have an comcast modem. Your pc and other devices is attached to the modem.
So you have a LAN (Local Area Network) inside the modem.
When you drop your internet connection, do you also drop connection to the LAN and all other devices?

Do your pc have a ethernet jack and can you attach to the modem with cable?

Does your internet connection still go away while on cable?

Your modem can lease dhcp-adresses to the LAN? Can you bind an specific lan adress to a specific mac-adress? If so, you can try to configure the wifi with a speciic adress. Does the connection stil drops?

Do you have an usb-wiffi dogngle? Have you tried that? Still drop connection?

What wireless chip do you have?

Last edited by rbh (2020-02-09 21:44:01)


// Regards rbh

Offline

#3 2020-02-10 02:41:15

laanan
Member
Registered: 2020-01-25
Posts: 22

Re: Wifi Connection Suddenlty Drops -- a quest in progress

@rbh, thanks for the ideas. It seems like you are aiming at my wifi card. According to lspci command:

Network controller: Realtek Semiconductor Co., Ltd. RTL8821AE 802.11ac PCIe Wireless Network Adapter

When the connection drops, the GUI indicates wifi is still connected, so far as I can tell. Network Manager can still detect available wifi networks, etc.

But, it is interesting. I'll try to connect via ethernet next time it drops to help discern between the wifi card and other issues. Another wrinkle to consider: mainly I use this laptop to connect via an SSL tunnel to work. Not sure how that would affect binding a specific lan address to a specific mac address. My understanding is that I have a static public IP address. Are you suggesting that I setup the LAN such that this laptop has a static local IP which is matched to its MAC address?

Offline

#4 2020-02-10 12:01:10

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 330

Re: Wifi Connection Suddenlty Drops -- a quest in progress

laanan wrote:

Network controller: Realtek Semiconductor Co., Ltd. RTL8821AE 802.11ac PCIe Wireless Network Adapter

Some years ago, there was many reports of problem with RTL8821AE.

Somee reported that it was better with line "options rtl8821ae int_clear=0 fwlps=0 ips=0" in  /etc/modprobe.d/rtl8821ae.conf.

When the connection drops, the GUI indicates wifi is still connected, so far as I can tell.

It is better if you start a ping and see if you have any drops when you lose internet connection. Your modem is also your router/gw.
Add "192.168.0.1    router" to /etc/hosts (adjust to what is your routers adress). Then you in terminal write "ping router".
Split the terminal and start a ping to an ip that answers: your external ip, your isp dns or Google dns (8.8.8.8) or anything stable on the other side of your modem.
Look at your pings, when your connection drops.

But, it is interesting. I'll try to connect via ethernet next time it drops to help discern between the wifi card and other issues.

It is good to rule out as much as possible... It would be good for you to explore what happens when you use an usb wifi dongle.

Another wrinkle to consider: mainly I use this laptop to connect via an SSL tunnel to work.

Hmm, is it your tunnel that drops, or is it all external connections that drops?

Not sure how that would affect binding a specific lan address to a specific mac address. My understanding is that I have a static public IP address.

All devices in your LAN, share the same public ip. BTw, you are sure it is static? (Often isp use external dhcp-range. If the range is not all to crowded, you will recive same external ip after reboot of modem.

Are you suggesting that I setup the LAN such that this laptop has a static local IP which is matched to its MAC address?

If your internal connections drop at same time as your external, it can be good to do that. I prefer to do it on machines I want to know home adress on... But, from what you describes and I can guess, it does not seem to be necessary for you.

How long time before connection drops? Is it totaly random? After some days, hours or minutes?

Last edited by rbh (2020-02-10 12:11:59)


// Regards rbh

Offline

#5 2020-02-10 15:58:43

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 330

Re: Wifi Connection Suddenlty Drops -- a quest in progress

One good test, I forgot to mention: Test network on another LAN. You have Wiffi at work, you can connect there?

Connect, start pinging your AP and outside LAN. Check it when you have a break. Break ping and comp are sum of pings. Resume (Arrow upp -> Enter) and let it work until next break.

Does it behave as when home, it is someting on your pc. If not, it is somethin on your router.


// Regards rbh

Offline

#6 2020-02-13 20:21:01

laanan
Member
Registered: 2020-01-25
Posts: 22

Re: Wifi Connection Suddenlty Drops -- a quest in progress

Hi @rbh,

I can confirm that wifi works great elsewhere. The problem does seem to be random to me. It happened a bunch when I first got BL running, and I just ignored it and it went away. Then it came back, and I thought, ok I have to address this (and started this thread). It hasn't happened again, yet, and so I am waiting for the chance to gather more information.

In the meantime, I did ping the router while on wifi, with no lost packets. I also plugged in to the ethernet port, with some very odd results. I initially set up the connection through the GUI, but could not get it to work. I then tried through the CLI (with ncmli commands) and worked on it for about an hour. I was really scratching my head, because everything seemed to be set up correctly, but it would not connect. I gave up and went back to wifi, did some writing and then went to sleep. Right before hitting the pillow, I put the laptop on "suspend."

The next day, when I started back up, the GUI indicated that a connection attempt was in process (the little thinking circle was rolling, instead of the wifi icon). I thought something like, "great, now the wifi is going to be dead," but when I clicked on the icon, it showed that wifi was connected normally and, very strangely, that ethernet was also connected. Thing is, no ethernet cable was connected. I thought, "well, why not?" and walked over to the router and jacked in. Yay! Ethernet connection (good, because I needed to change some settings on my router, anyhow).

So now ethernet works, but...super weird.

Another strange thing that is happening, which I do not know if it is related or not, happens when I turn on my VNC server. When enter 'vncserver,' it loads and I get to enter the password, etc., but it gives errors about a certain file not being writable. I think it is referring to something to do with X, the desktop management system. If I instead write 'sudo vncserver,' I don't get the "not writable" error, but instead get an error about timing out (still referring to the same file). When I remote in, I either get an error about X desktop, or, I get remoted in under root, not my normal user.

Like I said, not sure if the VNC drama is related to the overall drama or not....thanks for the help rbh!

--laanan

Offline

#7 2020-02-14 18:32:59

rbh
Member
From: Sweden/Vasterbotten/Rusfors
Registered: 2016-08-11
Posts: 330

Re: Wifi Connection Suddenlty Drops -- a quest in progress

laanan wrote:

It hasn't happened again, yet, and so I am waiting for the chance to gather more information.

That's good...

I also plugged in to the ethernet port, with some very odd results. I initially set up the connection through the GUI, but could not get it to work. I then tried through the CLI (with ncmli commands) and worked on it for about an hour. I was really scratching my head, because everything seemed to be set up correctly, but it would not connect. I gave up and went back to wifi,

"The point of NetworkManager is to make networking configuration and setup as painless and automatic as possible."
https://wiki.debian.org/NetworkManager

So, you should not need to setup wired connection (if you have standard simple lan with dhcp). Only enable it if it's not enabled in NetworkManager.


// Regards rbh

Offline

#8 2020-02-15 01:31:13

laanan
Member
Registered: 2020-01-25
Posts: 22

Re: Wifi Connection Suddenlty Drops -- a quest in progress

Hi @rbh, yep, that's why it was so weird. There was the default ethernet connection already set up, out of the box. Would not work, and neither would the others I set up manually. It didn't make sense to me, which is why I gave up, and then...it just started working the next morning. Maybe I am cursed!

Offline

Board footer

Powered by FluxBB