How to solve internet connection problems


Back to the home page


There can be problems with wireless internet (most common) and with wired internet (rather rarely). First I'll describe how to deal with the wireless category, and then I'll describe a solution for the wired category.

Wireless internet problems fall into two subcategories: either you have no connection at all, or you have a flaky weak connection. I've described below how you might be able to solve both problems.


Contents of this page:

No wireless connection at all

1. Below you'll find a roadmap that you can apply item after item, in order to get your wireless network card working. Which will succeed in most cases.

For the sake of clarity: only apply the roadmap as far as is necessary to get your wireless card to function properly. Most people don't need to apply all of the items.

Realtek WiFi chipset: install a driver

1.1. In case you have a Realtek wireless chipset that doesn't work at all, that chipset probably needs a driver. You can install a driver like this.

Broadcom WiFi chipset: install the driver

1.2. When you have a Broadcom wireless card, you have to install a restricted non-free driver: the bcmwl-kernel-source. In most cases, that's the best driver.

In order to install it, first establish a temporary internet connection by other means.

Then from the menu, launch Driver Manager and install the closed non-free Broadcom driver it recommends to you. Afterwards, reboot your computer.

However, in a few cases this driver isn't adequate. Then try if it helps, when you disable Bluetooth. If disabling Bluetooth doesn't do the job either, then this is how you can install another driver:

a. First, establish a temporary internet connection by ethernet cable; in other words a wired connection.

Launch a terminal window.
(You can launch a terminal window like this: *Click*)

b. Use copy/paste to transfer the following magical incantation into the terminal (it's one long line):

sudo apt-get purge bcmwl-kernel-source broadcom-sta-common broadcom-sta-source && sudo apt-get install b43-fwcutter firmware-b43-installer

Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. Press Enter again.

c. Remove the ethernet cable.

d. Reboot your computer.

Intel WiFi chipset: install a newer driver

1.3. Sometimes you need a newer iwlwifi driver for your Intel WiFi chipset. You can obtain that like this.

Switch the wireless card on

1.4. Maybe the wireless chipset is being recognized by the system alright, and even provided with a driver, but.... it's simply not switched on. Proceed like this:

Launch a terminal window.
(You can launch a terminal window like this: *Click*)

Type:
iwconfig

Press Enter.

You can then not only see the name for your wireless chipset (for example: wlp2s0), but also whether it's off. If so, do the following:

- Is your computer a laptop? Then check whether you can enable the wireless chipset by means of a certain Fn key combination.

- If that doesn't help: check on a dual boot machine if it helps when you switch the card on in Windows and then reboot into Linux Mint.

- No avail? Check whether you can set the card in your BIOS / UEFI to "always on".

- No avail again? Then do the following:

Launch a terminal window.
(You can launch a terminal window like this: *Click*)

Type:
rfkill list all

Press Enter.

Does it show a "soft block"? Then try:

rfkill unblock all

Press Enter.

If this didn't work, proceed to the next item.

Disconnect the ethernet cable (LAN)

1.4.1. On some laptops, the wireless chipset is being disabled automatically when the laptop is already connected to the internet by means of an ethernet cable (LAN). That's because weird things can happen when you're connected to the internet by both means at the same time.

So disconnect the ethernet cable and check whether the wireless chipset is being activated automatically now.

When not successful, proceed with the next step.

Reset the rfkill status in the BIOS / UEFI

1.4.2. You can try the following procedure, which can reset the rfkill status on some laptops, thus removing the wireless "hard block":

- power off the laptop;
- remove the power cord and the battery;
- press and hold the power button for 30 seconds;
- put the battery back in place;
- connect the power cord;
- boot your Linux Mint again.

Wireless internet is being blocked by Bluetooth

1.4.3. This applies only to computers which have a combined Bluetooth / wireless chipset.

On some laptops, wireless internet (wifi or 3G) is being blocked by Bluetooth. In that case, the solution is simple: temporarily disable Bluetooth, by clicking on the Bluetooth icon in the upper panel. Then reboot your laptop. Bluetooth should remain disabled and you should be able to make wifi or 3G connection.

If Bluetooth should be enabled again after reboot, disable it more thouroughly by disabling it in the BIOS of your laptop.

No avail? Proceed to the next item.

Set your country code

1.5. Normally you need not bother with it, because starting with kernel 4.15, the Linux kernel takes care of setting the right country code for your WiFi. But in a few cases this might not work well, and then it might help when you set the country code for your WiFi by hand.

That can be done like this:

a. Launch a terminal window.
(You can launch a terminal window like this: *Click*)

b. Use copy/paste to transfer the following magical incantation into the terminal:

cat /usr/share/zoneinfo/zone.tab

Press Enter.

In the long list you see then, find the code for your country. For example the country code for the United States of America: US

c. Now you're going to set the country code for your WiFi. In the example command below I use the code US (change this for your own country). Copy/paste the following command line into the terminal:

sudo iw reg set US

(modify this command with the code for your own country)

Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.

Does this have a positive effect? Then make it persistent, as follows:

d. Better safe than sorry: first launch Timeshift and create a manual snapshot of your system, so that you can always roll back your system if things go south.

e. Launch a terminal window.
(You can launch a terminal window like this: *Click*)

f. An example is easiest: suppose you want to set the country code to US. Then copy/paste the following command line into the terminal (change US into the code for your own country!):

sudo sed -i 's/REGDOMAIN=/REGDOMAIN=US/' /etc/default/crda

Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.

g. Reboot your computer.

h. Verify whether the command has actually been issued, with this command:

iw reg get

Note: If you ever wish to undo this setting of the country code, you can find the how-to for that below (item 1.5.1).

Regrets? How to undo the setting of the country code

1.5.1. Regrets? Then you can undo the setting of the country code by executing the following terminal command (replace US by the code of your own country):

sudo sed -i 's/REGDOMAIN=US/REGDOMAIN=/' /etc/default/crda

Reboot, and all should be, as it was before....

Disable IPv6

1.6. Some old modems and routers can't deal with modern IPv6, causing complete failure to connect. In that case, disable IPv6 like this (item 4).

Limit your wireless network to the administrator user account

1.7. In Network Manager there's a setting which, when activated, makes your wireless network available for all user accounts. Nifty, but it contains a bug: when that setting is activated, it sometimes disables the entire wireless chipset for all user accounts! When you deactivate that setting, the problem is over.

As with nearly all hacks, there's a price to pay: after the hack only the administrator account (the first user account that you created during installation) will be able to use your wireless network. All other user accounts won't.

If you wish to do this, proceed as follows:

a. Log into the administrator account (the first user account that you created during installation).

b. If you've been able previously to connect to your wireles network, then it's stored in the known networks of Network Manager. Click on the icon of Network Manager in the system tray of your panel - Network Connections - section Wi-Fi: click on the name of your wireless network - click the Edit button

c. Tab General: remove the tick for: All users may connect to this network

See the screenshot below:



d. Click the Save button

e. Reboot your computer.

Set your router to a fixed wireless channel

1.8. Nowadays most new wireless routers use, by default, a feature called "automatic channel switching". Instead of having a fixed wireless channel, which was customary in the past.

This ensures a minimum of interference with the wireless networks of your neighbours. But in a few cases this feature inhibits establishing a stable wireless connection in Linux. So find out what's the best fixed wireless channel in your situation, set your router to it and then try to connect again.

No avail? Then proceed to the next item.

Turn the kernel module acer_wmi off

1.9. A certain kernel module, called acer_wmi, causes problems on some laptops. Because it has been loaded when it shouldn't have been.

a. Launch a terminal window.
(You can launch a terminal window like this: *Click*)

b. Now check whether the module is loaded; copy/paste the following blue command line into the terminal:

rfkill list all

Press Enter.

This command will tell you, what your wireless card is called. In many problem cases, it's called (among other things) like this:

1: acer-wireless: Wireless LAN
      Soft blocked: yes
      Hard blocked: no


The clue is then, that it's called acer-wireless (which means that acer_wmi is loaded) and that it has a soft block.

In such a case, proceed like this:

c. Copy/paste the following blue command line into the terminal (you can copy/paste with the right mouse button, it's one line):

sudo tee /etc/modprobe.d/blacklist-acer-wmi.conf <<< "blacklist acer_wmi"

Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. Press Enter again.

d. Reboot your computer.

e. No avail? Then undo the operation (remove the file /etc/modprobe.d/blacklist-acer-wmi.conf) and.... reboot your computer again.

Bad wireless connection

2. Another category of wireless internet problems is bad connections. You do have a connection, at least from time to time, but the quality stinks: low speed, unstable or flaky.

Below I'll describe two ways in which you may be able to improve your wireless connection. In many cases this is effective.

Note: when the first method is already successful, then of course you don't need to apply the second as well (duh....).

Improve WiFi connection by disabling power management for the wireless card (some chipsets)

2.1. For some wireless chipsets a simple tweak is sufficient for increasing the connection quality a lot. Namely disabling the power management for the wireless chipset. The speed of your wireless internet may then increase also.

There are two ways to do it: an easy method and a harder one. Below, I'll describe both ways.

The easiest way: improving your WiFi connection by executing a single command

2.1.1. The easiest way to improve your WiFi connection by disabling power management for the WiFi chipset, goes like this:

a. First you need to find out whether Mint applies power management to your WiFi chipset. For this, launch a terminal window.
(You can launch a terminal window like this: *Click*)

b. Type in the terminal:

iwconfig

Press Enter.

You can then not only see the name for your wireless chipset (for example: wlp2s0), but also whether Power Management is on for it. When it's off, or when no mention is made of Power Management at all, you don't need to do anything.

When Power Management is on, proceed as follows:

c. Use copy/paste for transferring the following blue line into the terminal (don't try to type it!):

sudo sed -i 's/3/2/' /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. In Mint this has changed: you'll see asterisks when you type. Press Enter again.

d. Reboot your computer.

e. Then check in the terminal, by the command iwconfig, whether Power Management for the wireless chipset is off now.

If so, you're done!

The harder way: improving your WiFi connection by editing a file manually

2.1.2. You can also edit a configuration file by hand, in order to disable power management for the Wifi chipset. It's a bit more difficult than the method described in item 2.1.1, but it you can do that as follows:

a. First you need to find out whether Mint applies power management to your wireless chipset. For this, launch a terminal window.
(You can launch a terminal window like this: *Click*)

b. Type in the terminal:

iwconfig

Press Enter.

You can then not only see the name for your wireless chipset (for example: wlp2s0), but also whether Power Management is on for it. When it's off, or when no mention is made of Power Management at all, you don't need to do anything.

c. When Power Management is on, proceed as follows.

In order to prevent typo's, copy/paste the following blue line into the terminal (it's one line!):

xed admin:///etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

Press Enter.

d. Now a text file opens. In that text file, you see the following content:

[connection]
wifi.powersave = 3


Change 3 into 2.

Save the modified file and close it.

e. Reboot your computer.

f. Then check in the terminal, by the command iwconfig, whether Power Management for the wireless chipset is off now.

If so, you're done!

Disable IPv6

2.2. Some old modems and routers can't deal properly with modern IPv6. This might cause a bad unstable connection or even a complete failure to establish any connection at all. In that case, disable IPv6 like this:

Menu - Preferences - Network Connections

Click on the name of your current connection - click the button Edit
Tab IPv6 Settings - Method: change it into Ignore

Click the button Save and then click the button Close

Disconnect and reconnect, or simply reboot your computer.

Driver ath9k, ath5k or ath10k: toggle some options

2.3. When you have an Atheros wireless chipset and it's running on the ath9k, ath5k or ath10k driver, then you might have a very slow and/or unstable connection with certain types of those chipsets.

In that case, for the ath9k and ath5k driver it may help to disable hardware encryption/decryption on the chipset. All you are doing then, is telling the driver to do the encryption/decryption in the software rather than using the chipset hardware for that.

This encryption/decryption occurs when using a secured wireless connection that utilizes WPA or WPA2. In almost all cases, therefore....

By shifting the encryption/decryption from the hardware to the software, network operations will consume a bit more CPU power, but otherwise, nothing should be affected. So the "price" you pay is small: only a little extra system load.

For the ath10k driver there's another option you can toggle, namely skipping OTP failure for calibration in testmode. This might help to bring up the wifi interface with default board data in case of failures in OTP download.

You can do this as follows:

a. Launch a terminal window.
(You can launch a terminal window like this: *Click*)

b. Type (use copy/paste to avoid typo's):
lsmod | grep ath

Press Enter.

In Linux, drivers are called modules. If you see the module ath9k, ath5k or ath10k in the output, you can continue.

c. Now copy/paste this line into the terminal:

For the ath9k module (driver):
echo "options ath9k nohwcrypt=1" | sudo tee /etc/modprobe.d/ath9k.conf

For the ath5k module (driver):
echo "options ath5k nohwcrypt=1" | sudo tee /etc/modprobe.d/ath5k.conf

For the ath10k module (driver):
echo "options ath10k_core skip_otp=y" | sudo tee /etc/modprobe.d/ath10k.conf

Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. Press Enter again.

d. Reboot your computer. The connection speed should be OK now.

Driver iwlwifi: toggle some options

2.4. When you have an Intel WiFi chipset which is not too ancient, it runs on the iwlwifi driver (old Intel chipsets might use the iwlegacy driver or the ipw200 driver). In some cases the iwlwifi driver performs better when certain options are toggled.

You can achieve that as follows:

First check whether your WiFi chipset actually runs on the iwlwifi driver:

a. Launch a terminal window.
(You can launch a terminal window like this: *Click*)

b. Use copy/paste to transfer this line into the terminal:

lsmod | grep iwlwifi

Press Enter.

Does the terminal output contain the word iwlwifi (in red letters)? If so, proceed with the next step.

c. Copy/paste the following blue command line into the terminal (this is one long line, don't chop it up!):

echo "options iwlwifi bt_coex_active=0 swcrypto=1 11n_disable=8" | sudo tee /etc/modprobe.d/iwlwifi-3options.conf

Press Enter. Type your password when prompted. In Ubuntu this remains entirely invisible, not even dots will show when you type it, that's normal. Press Enter again.

Hereby you achieve three things:

- With bt_coex_active=0 you disable the Bluetooth feature of the WiFi chipset, which sometimes interferes;

- With swcrypto=1 you shift the signal encryption from the hardware (WiFi chipset) to the software, thus taking some load off the WiFi chipset;

- With 11n_disable=8 you enable antenna aggregation (Tx AMPDU). Don't be confused because of the option name 11n_disable: when its value is set to 8 it does not disable anything, but enables transmission antenna aggregation (Tx AMPDU).

d. Reboot your computer.

e. No improvement? Then undo this hack by removing the file that contains the toggled options, with this terminal command:

sudo rm -v /etc/modprobe.d/iwlwifi-3options.conf

Then reboot your computer, and all should be as it was before.

Realtek wireless chipset: install another driver

2.5. In case you have a Realtek wireless chipset that often loses connection and runs below its ordinary speed, that chipset probably needs a better driver. You can install an improved driver like this.

Set your router to "N only" or G only"

2.6. With a few wireless chipsets the connection speed increases considerably, when you set the "Wireless Network Mode" in the configuration of the router with which they connect, to N only or G only. Try N only first; when no improvement, try G only.

The price that you pay is that you disable support for the other modes, but when you possess no WiFi chipsets that need those modes, then you lose nothing.

The configuration window of your router can usually be reached as a "web page" in Firefox. Linksys routers have their configuration normally at 192.168.1.1 (type it in the URL bar of Firefox and press Enter).

Set the BSSID field to the MAC address of the router

2.7. Network Manager scans the wireless network periodically every two minutes. This can cause problems for the functioning of the driver.

If that happens, you can disable such scanning in the settings of Network Manager, by setting the BSSID field to the MAC address of the access point.

This is how to do it:

a. Right-click on the icon of Network Manager in the system tray - click on Edit Connections... - click on the name of your current wireless network - click on the Edit button (gear wheel)

b. Tab Wi-Fi - BSSID: click on the little arrow to the right and select the MAC address of the access point.

c. Click Save.

d. Reboot.

No wired or wireless internet on a dual boot computer

3. This may be due to a flaw in Windows, which can be repaired easily.

If you have a dual bootable PC with Windows, and you've just used Windows, you may not get an IP address after a reboot in Linux. And so no internet connection.

This has the following reason: every network card has a unique MAC address. This address is ingrained in your NIC. The DHCP server in your router remembers this MAC address.

When you access the internet in Windows and then reboot in Linux, in many cases you'll get no IP address from the DHCP server in your router. Because this server will recall that it previously issued an IP address for that very same MAC address, and won't issue a new one.

You can solve this by forcing Windows to release the IP address, before you reboot the PC. By the way: Linux by default does release the IP address on shutdown. So a reboot from Linux into Windows causes no problems.

Tip: Did you forget to force Windows to release the IP address, and you don't want to boot Windows to do it as yet? Then simply boot Ubuntu or Linux Mint twice in a row. After the second boot of Ubuntu or Mint you can probably connect.


A. Manual method
1. Open a DOS window in Windows

Windows 7:
Start - All Programs - Accessories - Command Prompt

2. Type:
ipconfig /release

(note the space between ipconfig and /release)

And press Enter.


B. Semi-automatic method
By means of a shortcut on your desktop, you can apply a semi-automatic solution for this.

1. Launch Notepad

2. type the following text:
ipconfig /release

3. Save this text file as release.bat and place it on your desktop. Now you can always simply double click this file, before you exit Windows.

As I said, Linux releases the IP address by default on shutdown. So a reboot from Linux into Windows causes no problems.

For advanced users only: even more wireless drivers

4. If you're an experienced and advanced Linux user: the Github account of lwfinger contains even more drivers for wireless chipsets from Realtek.

The how-to for those is as follows:

sudo apt-get install git build-essential
git clone https://github.com/lwfinger/name-of-driver
cd name-of-driver
make
sudo make install

Reboot your computer.


Want more tips?

Do you want more tips and tweaks? There's a lot more of them on this website!

For example:

Speed up your Linux Mint!

Clean your Linux Mint safely

Avoid 10 fatal mistakes


To the content of this website applies a Creative Commons license.

Back to the home page

Disclaimer