71

On this site I see hundreds if not a thousand questions being asked about issues with a Wireless LAN adapter not being detected/recognized by Ubuntu. Some mainstream adapters appear to be utterly broken in Linux support, while others just require some simple steps to get it to work.

The options to get it to work appear to be infinitely huge and I have no clue where to get started!

What is considered 'best practice'? What order of things to try is most efficient in terms of time, effort and imposes minimal risk to my Ubuntu installation? Please help me save time and guide me what to do, step by step.

1
  • For those who are still looking for some solution, I searched for several days, the solution is therefore to update the kernel to 5.10 or 5.12 example, I had 5.8 on 20.04.2 LTS with a dual boot, neither wireless or bluetooth worked, I upgraded the kernel to 5.12 via askubuntu.com/a/1291835/855698 and it works now. I hope it will help those who will have this trouble.
    – PЯINCƎ
    Jun 7, 2021 at 10:12

3 Answers 3

90

This answer covers completely non-functional wireless LAN only. It is not about stability/performance issues, or half-working cases. However, some steps may be helpful in case you're running into them and looking for other options.

Preparation

In this answer I'm assuming you're familiar with at least the following tasks: running commands in a terminal and installing regular Ubuntu software packages. If you're not familiar with these basic steps, start reading this and this.

  1. Get the machine connected to the internet. This makes performing the the steps a lot easier and to use the clipboard for the actions.

    If another network card is working, this should be easy. If your only card is failing at this point, find alternatives to this and be creative, e.g. using an USB wired network adapter or an alternative working WiFi adapter borrowed from a friend or neighbour.

  2. Make sure you have installed the following packages: lshw, rfkill.

  3. Update your system. By installing all latest (regular) system updates, bug fixes already released by developers after the release should be on your PC by doing so. Don't forget to reboot your system afterwards. See also How do I update Ubuntu?

    After applying all updates, reboot. It may already work in this stage. If not, just continue.

Is it really a driver issue?

First of all, one should determine whether the card isn't recognized and/or if it's a radio kill switch preventing it from working. Follow all steps below, as your problem may be two- or three-fold:

  1. Run sudo lshw -C network in a terminal.

    You might need to install lshw first.

    • In case multiple devices are listed, locate the device concerned.
    • In case it's listed as *-network UNCLAIMED, you should follow the steps in Installing (newer) drivers.
    • In case it's listed as *-network (without 'Unclaimed'), the output below about the driver could be relevant in further steps, e.g. configuration: broadcast=yes driver=iwlwifi
    • In case your device isn't listed at all, try the additional steps in Identifying the exact hardware.
  2. Run rfkill list in a terminal. This lists the state of radio killswitches. Sample output:

    1: phy0: Wireless LAN
            Soft blocked: no
            Hard blocked: no
    
    • In case you see yes on Hard blocked: refer to your notebook manual for a hardware switch for Wireless LAN.
    • In case you see yes on Soft blocked: hotkeys on your notebook may help activating it, as well as hitting "Enable Wireless" in the Network Manager applet. If that fails to remove the soft block, run sudo rfkill unblock all.
    • In case you don't see any kill switches listed: this might not apply for your device. Usually only mobile PCs are equipped with killswitches.
  3. Only for USB devices: exclude USB-level issues.

    • Preferably, try one directly attached to your mainbord, avoiding hubs or your computer case's connectors.
    • Try using another type of USB port (e.g. USB2.0 instead of USB3.0 port).
    • Go to Identifying the exact hardware and see if you can see some error messages when you plug in your device.
    • Try another cable (if any) you've verified is working.

Installing (newer) drivers

These are some obvious, sane and harmless steps to take, avoiding the ones listed in Things to avoid if possible.

  1. Try to see if Ubuntu suggests to install additional drivers. Refer to How do I install additional drivers? for more information on how to do do this.

  2. Install additional firmware as this may be required for your hardware.

    • Make sure you have enabled multiverse as posted in How do I enable the "multiverse" repository?
    • Install both linux-firmware and linux-firmware-nonfree packages, e.g. sudo apt-get install linux-firmware linux-firmware-nonfree and reboot.
  3. Try backported kernel modules (drivers) from the compat-wireless package. Ubuntu provides packages of compat-wireless of more recent Linux kernel releases for the kernel with the stable distribution (available since 11.10 Oneiric Ocelot).

    • Find the latest ones available by searching with your favourite package management tool. At the time of writing, this was linux-backports-modules-cw-3.6-quantal-generic for Quantal. In the near future, a 3.7 package may be out.
    • Install it, e.g. sudo apt-get install linux-backports-modules-cw-3.6-quantal-generic for Quantal, or sudo apt-get install linux-backports-modules-cw-3.6-precise-generic for Precise. Then reboot.

    In case you're running an LTS release (e.g. Precise or Lucid), backported kernels of all next releases are provided as a package. At the time of writing Quantal is the latest release after Precise and the package is linux-image-generic-lts-quantal and boot into your new kernel.

  4. From here on, you should consider trying out a more recent release of Ubuntu to see if it has gained support for your hardware, just by booting from a Live CD/USB. Also consider trying the latest Beta/RC of Ubuntu+1. If it does work, the easiest approach is to simply wait for the new release.

  5. Some hardware is just utterly broken on default installs, usually because the vendor isn't releasing (all) source code or does not allow redistribution of all required modules via Ubuntu. See the Hardware requiring special care section at the bottom to see if your device (chipset) is listed.

  6. Try the latest stable Linux kernel. This is a less harmless approach and may break other stuff. This should not be necessary as the more recent wireless drivers are provided by the compat-wireless package in the earlier option. However, it may just a bit newer and therefore include a bugfix helping you out.

    • Go to the kernel.ubuntu.com downloads section and identify the latest stable release (e.g. v3.7.1-raring at the time of writing).
    • Download all the .deb files for your architecture (e.g. amd64 or i386), plus the ones with all in the name.
    • Install them all at once by issuing e.g.:

      cd Downloads
      sudo dpkg -i linux-headers-3.7.1-030701-generic_3.7.1-12345678_amd64.deb linux-image... # include all
      
    • and finally, reboot into your new kernel.

    • if the new kernel doesn't work for you or introduces other issues, boot your system using the older kernel (e.g. hold Shift during the early boot stage to select it in the Grub menu) and then remove the packages using your package management e.g. sudo apt-get remove linux-\*3.7.1\*.

Identifying the exact hardware

The product you have was probably sold using a retail name completely irrelevant to you issue. Most vendors just use chipsets from manufacturers like Broadcom, Atheros, Ralink or Intel while the product itself may not carry this name. One example of this: a ThinkPad 11a/b/g/n Wireless LAN Mini Express Adapter may in fact just be a Atheros AR5418. The Thinkpad rebrand does usually not affect the hardware support in Linux, but the used chipset does. Therefore, it's of great importance to identify the chipset.

  • PCI and integrated devices (e.g. mobile PCs):

    lspci -nn | grep -i network
    
  • USB devices:

    lsusb
    

    In case you have trouble identifying it from this list:

    1. Unplug the device.
    2. Open a terminal and run sudo tail -n 0 -f /var/log/syslog
    3. Re-plug the device in and give the kernel/device a few seconds to initialize.
    4. Stop the command by pressing Ctrl+C. The output should help identifying it from the list.
    5. Check for output mentioning unable to enumerate USB device. If such output is present, your device is already failing on communication on USB-level. You're hitting a hardware issue probably: check for broken cables/connectors, power issues, broken hubs, other broken hardware. Don't bother dealing with drivers at this point - fix USB communication first.

In case your hardware isn't listed, this may be unrelated to your adapter, but a general PCI/USB bus error. This is considered outside the scope of a WiFi issue. Note that some notebooks have integrated WiFi adapters connected to an internal USB port, so it may be listed as USB in such a case.

Example output:

$ lsusb
Bus 001 Device 002: ID 8087:0024 Intel Corp. ...
                            ^^^^-- product ID
                       ^^^^------- vendor ID

$ lspci -nn | grep -i network
04:00.0 Network controller [0280]: Intel Corporation [...] [8086:4238] (rev 3e)
                                                vendor ID --^^^^
                                               product ID -------^^^^

Tips in using Google

  • Use the numeric product/vendor IDs as identified by the commands issued.
  • Use linux as a keyword with it, rather than Ubuntu.
  • Try using the device's chipset name as listed in the output in the steps of Identifying the exact hardware. Examples: AR9285, BCM4311, Intel+6300.
  • Avoid using keywords unrelated to hardware support. E.g. your desktop environment is unrelated, so use Ubuntu instead of Lubuntu.
  • Try to be sensitive for 'general' information about your device, rather than focusing on specific solutions, e.g. "Firmware is needed for this device", or reports of users that it worked out-of-the-box in a previous release.

I had no luck with all options. What should I provide in a new question?

Before posting a new question, search this site using keywords from Identifying the exact hardware.

  • All relevant (unexpected or errors) output from the options in this answer.
  • Relevant output of the steps done in the Identifying the exact hardware section.
  • The kernel you're running and the versions you've tried. Use the uname -r command to identify your kernel version.
  • Other Ubuntu versions you've tried.

Things to avoid if possible

  • Compiling from source (e.g. running make, sudo make install).

    • This may overwrite system files and confuse your package management. Installing this way may work, but can break anytime later if the package management updates overwrite the files again.
    • It may lead to unexpected errors which may be hard to solve for a novice user.
    • It's hard to undo all the changes done by sudo make install in case you want to revert your actions.
  • Ndiswrapper approaches.

    • This 'wrapper' around Windows drivers should be tried as a last resort only, as it's very inefficient to emulate a Windows environment on Linux for hardware drivers.
    • Stability and performance are usually reported as low.

Hardware requiring special care

  • Broadcom BCM43xx devices. Please refer to this answer for a nice tutorial on getting these devices to work.
9
  • wonderfull answer.
    – Denis
    Apr 25, 2015 at 2:19
  • 1
    Thanks for the great answer. But I'm not able to install linux-firmware-nonfree on ubuntu 16.04. Regardless of sources list. May be it is somehow replaced?
    – Bunyk
    Jul 28, 2016 at 10:19
  • Bunyk Try searching your distro's packages using sudo apt search (package name) and see if that shows a possibly renamed updated package.
    – Yokai
    Jan 22, 2017 at 7:27
  • As a MUCH easier first step, you can try disabling Secure Boot in UEFI/BIOS. Annoyingly, that worked for me. Not happy about them being mutually exclusive on my Yoga 3.
    – Chiramisu
    Jul 28, 2018 at 21:23
  • 1
    Please note that newer, as of 2021, Ubuntu versions make many of these steps no longer applicable. Please note that lshw and rfkill already installed. No need to install in 2021. linux-firmware is installed by default and nonfree no longer available.linux-backports-modules-cw is no longer available.Finally, ndiswrapper is deprecated.
    – chili555
    Oct 22, 2021 at 20:45
0

On some computers, including the 2013 Macbook Air, the correct wifi drivers are included but not enabled by default because they're proprietary. Open the "Software & Updates" application, go to the "Additional Drivers" tab, and if there are any drivers listed for your wireless adapter there, enable them and hit apply changes. If they were the right drivers, then your wifi will immediately start working.

-1

In my case, I had an old laptop on which I installed Lubuntu 19. The correct wifi drivers were already installed. I could see all wifi networks, but could not connect to them. Connecting through the internet via cable worked just fine.

After unsuccessfully trying to resolve the issue in many different ways, I found out that some (L?)ubuntu 19 users are having the same problems, and recommended to install Lubuntu 16, and so I did. My wifi adapter (and the touchpad as well) now both work out of the box.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .