LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 07-20-2020, 11:12 AM   #1
zogthegreat
Member
 
Registered: Apr 2009
Location: Montreal, Canada
Distribution: Fedora, CentOS, Ubuntu
Posts: 63

Rep: Reputation: 16
WiFi keeps disconnecting - Ubuntu Server 20.04


Hi everyone!
I'm building a NextCloud server on an old laptop for my daughter, (you would be amazed how many pictures and videos a 14 year old can take!), and I'm having problems with the WiFi. Here are the steps that I'm taking to get the WiFI working:
sudo apt install wireless-tools wpasupplicant -y
wpa_passphrase XXXXXXX XXXXXXXX | sudo tee /etc/wpa_supplicant.conf
sudo wpa_supplicant -B -c /etc/wpa_supplicant.conf -i wlp1s0
sudo dhclient wlp1s0
ip addr show wlp1s0
sudo cp /lib/systemd/system/wpa_supplicant.service /etc/systemd/system/wpa_supplicant.service
sudo nano /etc/systemd/system/wpa_supplicant.service


I comment out "#ExecStart=/sbin/wpa_supplicant -u -s -O /run/wpa_supplicant" and Alias=dbus-fi.w1.wpa_supplicant1.service and I replace it with:

ExecStart=/sbin/wpa_supplicant -u -s -c /etc/wpa_supplicant.conf -i wlp1s0

sudo systemctl enable wpa_supplicant.service

sudo nano /etc/systemd/system/dhclient.service

///////

[Unit]
Description= DHCP Client
Before=network.target
After=wpa_supplicant.service

[Service]
Type=simple
ExecStart=/sbin/dhclient wlp1s0 -v
ExecStop=/sbin/dhclient wlp1s0 -r

[Install]
WantedBy=multi-user.target

///////

sudo systemctl enable dhclient.service

sudo nano /etc/dhcp/dhclient.conf

///////

interface "wlp1s0" {
send dhcp-requested-address 192.168.XX.XX;
}

///////

sudo systemctl restart dhclient

sudo nano /etc/netplan/00-installer-config.yaml

///////

network:
* ethernets:
* * enp2s0:
* * * dhcp4: true
* version: 2
* wifis:
* * wlp1s0:
* * * addresses: [192.168.2.14/24]
* * * gateway4: 192.168.2.1
* * * nameservers:
* * * * addresses: [192.168.2.1, 8.8.4.4, 8.8.8.8]
* * * access-points:
* * * * BELL437:
* * * * * password: A149E9D5
* * * dhcp4: false

///////


(The formatting of the .ymal looks strange here, but it is a good configuration)

sudo netplan --debug generate*
sudo netplan apply*
sudo reboot

After I reboot, I can connect to the WiFi connection via ssh, however, the NIC keeps dropping the connection. At first I thought that maybe I had a bad NIC, but I have tried Broadcom, Atheros and Intel NIC's with the same results.

Does anyone have any suggestions on what the problem is?

Thanks!

zog
 
Old 07-21-2020, 04:58 AM   #2
agillator
Member
 
Registered: Aug 2016
Distribution: Mint 19.1
Posts: 419

Rep: Reputation: Disabled
You say 'an old laptop'. Are you actually breaking into it and replacing the cards? If not, check and see what chip the wifi is using. Some years ago Broadcom chips had problems dropping periodically. The problem was the driver, but their driver was proprietary. Eventually I think there was one that worked but you had to dig to find it. I'm thinking one of the old Realtech cards had a similar problem but I could be wrong. Broadcom left a bad taste in my mouth and I still avoid them like the plague.
 
Old 07-21-2020, 08:31 AM   #3
zogthegreat
Member
 
Registered: Apr 2009
Location: Montreal, Canada
Distribution: Fedora, CentOS, Ubuntu
Posts: 63

Original Poster
Rep: Reputation: 16
Hi @agillator, Thanks for the reply.

The laptop that I'm using is a Dell Inspiron 7720 w/ an i7-3610QM, 16gb DDR3L, 256gb mSata drive. I use this as my "development" machine. I initially was using a Broadcom WiFi chip, but I noticed that it was creating kernel errors, which I thought was my problem. I then switched to a Atheros AR5B95, but I still had the same problem. Right now I have a Intel 2230 Wireless-N PCi WiFi installed, but it is also giving me the same problem. I'm thinking that I have a configuration error somewhere that is causing the problem, but I can't seem to find it.
 
Old 07-21-2020, 09:37 AM   #4
uteck
Senior Member
 
Registered: Oct 2003
Location: Elgin,IL,USA
Distribution: Ubuntu based stuff for the most part
Posts: 1,177

Rep: Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501Reputation: 501
Are other devices having drops as well? You may not being using them as much as the new server so have not noticed.
How old is the router or access point you are using, and can you access logs to see if it has any errors listed?
 
Old 07-21-2020, 09:59 AM   #5
zogthegreat
Member
 
Registered: Apr 2009
Location: Montreal, Canada
Distribution: Fedora, CentOS, Ubuntu
Posts: 63

Original Poster
Rep: Reputation: 16
Hi @uteck. All of the WiFi cards that I have tried work perfectly under Windows 10 and Ubuntu Desktop. My ISP upgraded my router/access point 2 years ago to a "Home Hub 2000". The system logs on the router are fairly useless, they only list PPOE connections to the ISP, nothing else. If I can find the time this week, I'll slap together a pfsense firewall to watch the network connections.
 
Old 07-21-2020, 10:27 AM   #6
agillator
Member
 
Registered: Aug 2016
Distribution: Mint 19.1
Posts: 419

Rep: Reputation: Disabled
Out of curiosity could heat be the problem? Does the machine seem to get hot? Usually that shows up by the machine shutting down but I suppose it could affect other parts like wifi.

Have you tried installing a different distribution? Mint 19.3 for example? If your current setup isn't working it only costs time to try other distros.
 
Old 07-21-2020, 10:56 AM   #7
zogthegreat
Member
 
Registered: Apr 2009
Location: Montreal, Canada
Distribution: Fedora, CentOS, Ubuntu
Posts: 63

Original Poster
Rep: Reputation: 16
Quote:
Originally Posted by agillator View Post
Out of curiosity could heat be the problem? Does the machine seem to get hot? Usually that shows up by the machine shutting down but I suppose it could affect other parts like wifi.

Have you tried installing a different distribution? Mint 19.3 for example? If your current setup isn't working it only costs time to try other distros.
I'm pretty sure that it's not a heat problem. The bottom of the laptop is open and it's sitting on a stand that allow for air flow beneath the laptop. Also, the NIC is cool to touch.

I tried Debian server, however, it really doesn't seem to like WiFi at all. I think that I will try Mint and see how that goes. It's not the best distro for a server build, but it might help me sort out the problem.
 
Old 07-21-2020, 01:33 PM   #8
agillator
Member
 
Registered: Aug 2016
Distribution: Mint 19.1
Posts: 419

Rep: Reputation: Disabled
Let us know what happens.
 
Old 07-22-2020, 10:39 AM   #9
zogthegreat
Member
 
Registered: Apr 2009
Location: Montreal, Canada
Distribution: Fedora, CentOS, Ubuntu
Posts: 63

Original Poster
Rep: Reputation: 16
So running Linux Mint 19.3 in headless mode gives me the same random disconnects via ssh. I have to assume that there is some type of hardware issue going on here and that when I'm running a GUI, either in Windows or Linux, I'm just not noticing random disconnects.

I'm going to setup some different hardware and try testing again.

Thanks for the help everyone!
 
Old 07-22-2020, 11:53 AM   #10
agillator
Member
 
Registered: Aug 2016
Distribution: Mint 19.1
Posts: 419

Rep: Reputation: Disabled
That's entirely possible bur I wouldn't totally discount something happening withvthe router. Easy enough to check if your phone can be a hotspot server. Does it still happen if you log on through your phone's hotspot. I assume it does but then you will know for sure. One other router thing to check is the lease time. When you are connected is your ip lease time something reasonable like a couple of hours or more? I'm using the 'if at first you don't succeed use a bigger hammer' approach here but sometimes it isn't a bad thing. If both of these check out then at least you can be sure it is something on your computer. The next thing I would check is to make sure the driver that is loaded is the latest driver. If so, and it probably is, then you are pretty certain is either configuration, which verifies what you are suspecting, or it is something really weird.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ubuntu server keeps suspending after disconnecting external display TheRealRWJ Linux - Server 7 10-02-2018 11:42 AM
Wifi keeps disconnecting more and more shengchieh Linux - Wireless Networking 5 02-24-2014 09:13 PM
Ubuntu. USB keeps disconnecting or not recognizing runequester Linux - Hardware 5 11-10-2012 01:41 PM
Wifi keeps disconnecting usually after about 10 mins. lugoteehalt Debian 2 07-14-2012 06:12 PM
wifi keeps disconnecting when the computer is idle tjyorkshire Linux - Wireless Networking 2 06-27-2007 10:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:26 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration