Solve Wireless Problems

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 10

https://sites.google.

com/site/easylinuxtipsproject/internet#TOC-Bad-wireless-
connection

How to solve internet connection problems

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
--------
1 No wireless connection at all
1.1 Realtek chipset: install a driver
1.2 Broadcom chipset: install the driver
1.3 Switch the wireless card on
1.3.1 Disconnect the ethernet cable (LAN)
1.3.2 Reset the rfkill status in the BIOS / UEFI
1.3.3 (Obsolete)
1.3.4 Wireless internet is being blocked by Bluetooth
1.4 Disable IPv6
1.5 Limit your wireless network to the administrator user account
1.6 Set your router to a fixed wireless channel
1.7 Turn the kernel module acer_wmi off
2 Bad wireless connection
2.1 Disable power management for the wireless card
2.2 Disable IPv6
2.3 Driver ath9k or ath5k: disable hardware encryption/decryption
2.4 Realtek wireless chipset: install another driver
2.5 Set your router to "G-only"
2.6 Set the BSSID field to the MAC address of the router
3 No wired or wireless internet on a dual boot computer
4 For advanced users only: even more wireless drivers
5 Want more tips?

--------------------------------------

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 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 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, launch Driver Manager from the menu. You need internet
connection for using that, so first establish a temporary internet connection by
ethernet cable or by another wireless dongle.

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. When prompted, type your password. Your password will remain entirely
invisible, not even dots will show, this is normal.
Press Enter again.

c. Remove the ethernet cable.

d. Reboot your computer.

-------------------------------------

Broadcom pour Ubuntu 18.04 (à tester)

sudo apt-get install --reinstall bcmwl-kernel-source

------------------------------------

Switch the wireless card on

1.3. 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.3.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.3.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.

(Obsolete)
1.3.3. Obsoleted.

---------------------------------------------
Wireless internet is being blocked by Bluetooth

1.3.4. 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.

---------------------------------------------

Disable IPv6

1.4. 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, left column).

--------------------------------------------

Limit your wireless network to the administrator user account

1.5. 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.6. 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.7. 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 green command
line into the terminal:

rfkill list all

Press Enter.

This command will tell you, how 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 and submit your password. Please note that the password will remain
invisible, not even asterisks will show, which is normal.

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 succesful, then of course you don't need to
apply the second as well (duh....).

-------------------------

Disable power management for the wireless card

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.

You can do that as follows:

a. First find out if Mint applies power management to your wireless chipset:

Launch a terminal window.


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

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.

b. When Power Management is on: copy/paste this line into the terminal (it's one
line):

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

Press Enter.

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

[connection]
wifi.powersave = 3

Change 3 into 2.

d. 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.

Note for advanced users: you can turn off wifi powersave with one single command as
well:
sudo sed -i 's/3/2/' /etc/NetworkManager/conf.d/*

--------------------------------
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 or ath5k: disable hardware encryption/decryption

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

In that case, 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.

You can do this as follows:

Launch a terminal window.


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

Type (use copy/paste to avoid typo's):


lsmod | grep ath

Press Enter.

If you see the module ath9k or ath5k mentioned in the output, you can continue.

Now start root mode. Type (use copy/paste):


sudo -s

Press Enter. When prompted, type your password. Your password will remain entirely
invisible, not even dots will show, this is normal.
Press Enter again.

Now copy/paste this line into the terminal:

For the ath9k module:


echo "options ath9k nohwcrypt=1" > /etc/modprobe.d/ath9k.conf

For the ath5k module:


echo "options ath5k nohwcrypt=1" > /etc/modprobe.d/ath5k.conf

Press Enter.

Now close root mode. Type:


exit

And press Enter. Then close the terminal.

Reboot your computer. The connection speed should be all right now.

-------------------------------------------

Realtek wireless chipset: install another driver

2.4. 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 "G-only"

2.5. With a few wireless chipsets the connection speed increases enormously, when
you set the "Wireless Network Mode" in the configuration of the router with which
they connect, to G only.

The price that you pay is that you disable the faster N-mode, but when your
internet service doesn't even reach the maximum of the G-mode (as is the case for
90 % of all households), 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.6. Network Manager scans the wireless network periodically every two minutes.
This can cause problems for the functioning of the driver.

If that happens, scanning can be disabled 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: 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 Edit - tab Wi-Fi - BSSID: click on the little arrow to the right and select
the MAC address of the access point. Click Save.

You might benefit from a 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.

You might also like