operating system Ubuntu Wireless networking has long ceased to be the preserve of system administrators and hardcore programmers, becoming a fully-fledged work environment for millions of users worldwide. However, despite impressive process automation, connecting to a wireless network can sometimes turn into a real quest, especially if you're using specific hardware or a recent distribution release. Unlike Windows, where drivers are often built into the system or easily downloaded, in the Linux world, manual intervention is sometimes required to activate them. network interfaces.
Connection issues are most often rooted not in the operating system itself, but in the absence of proprietary drivers or power management conflicts, which by default try to "save" battery power by disabling the Wi-Fi module. A critical step Before starting any manipulations, it's important to determine the exact model of your wireless adapter, as this determines the software installation method you choose. Without this information, any further actions may be useless, as the commands for the chips Broadcom are absolutely not suitable for devices Realtek or Intel.
In this guide, we'll cover not only standard graphical methods but also delve into console utilities that allow you to diagnose and fix errors where the graphical interface is ineffective. You'll learn how to manage connections through nmcli, configure static IP addresses, and, most importantly, troubleshoot common errors that occur during the first system startup. Expect some terminal work, but the result—a stable and fast internet connection—will be worth it.
Hardware diagnostics and adapter model identification
Before attempting to install any packages or change configuration files, it's important to clearly understand what kind of device you're dealing with. In the Linux world, the abstract concept of "Wi-Fi not working" means nothing to an experienced user, so the first step is always identification. hardwareThe most reliable way to obtain this information is to use the utility lspci for internal cards or lsusb for external USB dongles that connect to a computer.
Launch the terminal and enter the command lspci | grep -i networkto see a list of network controllers installed on your motherboard. If you are using an external adapter, replace the command with lsusb and carefully examine the output, looking for lines with manufacturer names like Realtek, Ralink, MediaTek, or Atheros. Vendor ID And Device ID, which are often displayed in hexadecimal number format (such as 0280 or 0000), are the key to finding the correct driver in the repositories or on the manufacturer's website.
Sometimes the system sees a device but can't identify it correctly, marking it as "Unassigned class" or simply leaving it unnamed. In such cases, it's helpful to use a more detailed utility. lshw, which displays technical information about the hardware configuration. Enter the command sudo lshw -C networkto get a detailed report on the status of all network interfaces, including their logical names (e.g. wlp2s0) and the current driver status.
- 🔍 Use
lspci -nnto obtain numeric device identifiers if the manufacturer name is not displayed explicitly. - 📝 Write down the chipset model (for example, RTL8812AU), since it is by this that the search for drivers on the Internet will be conducted.
- ⚡ Check if the kernel module is loaded using the command
lsmod | grep -i wifioriwconfig.
⚠️ Attention: If the command outputlspciorlsusbIf the device isn't visible at all, there may be a physical issue. Check that the card is firmly seated in the Mini-PCIe or M.2 slot, as Ubuntu won't be able to configure something it can't physically see.
Installing drivers via the graphical interface and repositories
Modern versions Ubuntu They are equipped with a powerful mechanism for automatically searching and installing proprietary drivers, making life much easier for beginners. Most often, the problem can be resolved in just a few clicks using the built-in "Additional Drivers" tool, which scans the system and suggests available software options for your hardware. This is the safest option, as all offered packages have been verified by the distribution's developers and are guaranteed to be compatible with the current kernel version.
To use this method, open the application menu and find the utility Software & Updates (Programs and Updates), then go to the "Additional Drivers" tab. The system will search for an alternative driver for your Wi-Fi module (for example, bcmwl-kernel-source for Broadcom or firmware-realtek), it will be displayed in the list with an activation offer. All you have to do is select the desired item, click "Apply Changes" and wait for the installation to complete, after which you will be required to reboot.
In cases where the graphical interface does not offer solutions or does not work correctly, you have to resort to manual installation through the terminal using a package manager. aptFor many popular chipsets, it's enough to simply install the firmware package, for example, by running the command sudo apt install firmware-linux-nonfree or sudo apt install linux-firmwareThese packages contain the firmware binaries required for a wide range of wireless adapters that cannot operate solely on open source code.
If the standard repositories don't contain the required driver, you often have to resort to a PPA (Personal Package Archive) or build the driver from source code. This is a more complex approach, requiring the installation of development packages such as build-essential, linux-headers And dkms, which are necessary for compiling kernel modules. Without a set DKMS (Dynamic Kernel Module Support) any manually installed driver will stop working after the first kernel update, resulting in connection loss.
☑️ Check before installing drivers
| Manufacturer | Typical driver package | Comment |
|---|---|---|
| Broadcom | bcmwl-kernel-source |
Requires disabling the free driver bcma |
| Realtek | firmware-realtek |
Often requires building from GitHub for new models |
| Intel | firmware-iwlwifi |
It usually works out of the box, you only need firmware |
| MediaTek | firmware-misc-nonfree |
Commonly found in ASUS and Acer laptops |
Manual driver installation for Broadcom and Realtek
The chip situation Broadcom in Ubuntu often requires special treatment, since the driver is open source bcma may conflict with proprietary wl, which provides full functionality. To avoid conflicts, you must first blacklist the open module by creating a configuration file in the directory /etc/modprobe.d/After this, you can safely install the package. bcmwl-kernel-source, which will automatically compile and include the correct kernel module for your card.
For adapter owners Realtek, especially for newer models supporting the AC and AX standards, standard repositories may not be sufficient. In such cases, the only viable option is cloning a repository from GitHub (for example, a popular project) rtl88x2bu or rtl8812au) and manual compilation. This process involves downloading the source code, running the installation script, and then registering the module in DKMS, which ensures its operation after system updates.
The manual installation process seems daunting at first glance, but in reality it boils down to running a series of commands in the terminal. First, you clone the repository with the command git clone, then go to the folder with the driver and run the installation script, which is often called install.sh or dkms-install.shIf there is no script, you will have to manually copy the module files to /lib/modules/$(uname -r)/kernel/drivers/net/wireless/ and update dependencies with the command depmod -a.
- 💻 Make sure you have a temporary internet connection via an Ethernet cable or USB modem, as additional packages will be needed for compilation.
- 🔒 When working with GitHub repositories, check the date of the last code update to ensure support for current kernel versions.
- 🔄 After manual installation, always run the command
sudo modprobe -r <old_driver_name>before loading a new one.
What should I do if driver compilation fails?
Most often, the error occurs due to missing kernel header files. Make sure the package linux-headers-$(uname -r) installed. The second common cause is that the GCC compiler version does not match the version used to build the kernel; in this case, you may need to install a specific version of GCC or update the system. Also, check the terminal output for messages about missing dependencies.
Setting up a connection via the terminal (nmcli)
NetworkManager's graphical interface is convenient, but in situations where it doesn't start or is unstable, the command line comes to the rescue. The utility nmcli (NetworkManager command line interface) provides complete control over network connections and allows you to perform the same actions as the GUI, but with greater detail. powerful tool, which allows you to not only connect to networks, but also create new profiles, manage passwords, and diagnose problems.
To connect to a Wi-Fi network, you must first make sure that the radio module is turned on. Command nmcli radio wifi on activates the wireless adapter if it was turned off, and nmcli dev wifi list will display a list of available networks within range. To connect, use the command nmcli dev wifi connect "Network_Name" password "Your_Password", where you need to substitute the actual data of your access point instead of quotation marks.
One of the common tasks is setting up a static IP address, which is often required in corporate networks or for servers. With the help of nmcli This is done by changing the connection profile: nmcli con mod "Profile_Name" ipv4.addresses 192.168.1.50/24 And nmcli con mod "Profile_Name" ipv4.method manualAfter changing the parameters, you must restart the connection with the command nmcli con up "Profile_Name"for the new settings to take effect.
If the connection is established but the internet isn't working, it's worth checking your DNS servers. You can enter public DNS from Google or Cloudflare directly in your profile settings: nmcli con mod "Profile_Name" ipv4.dns "8.8.8.8 1.1.1.1"This often solves "name resolution" problems, where sites cannot be opened by domain name but can be pinged by IP address.
Troubleshooting Wi-Fi disconnects and energy management
One of the most annoying issues with Ubuntu on laptops is Wi-Fi randomly disconnecting or failing to connect to the network after waking from sleep mode. This is most often caused by the kernel's power-saving mechanism, which attempts to power down the wireless module to conserve battery life. As a result, the adapter simply goes to sleep and stops responding to system requests, requiring a full reboot to recover.
To disable this aggressive policy, you need to create or edit a configuration file for NetworkManager. Create the file /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf (or find an existing one) and change the parameter wifi.powersave for meaning 2, which means turning off the power saving mode. Meaning 3 includes it, and 1 leaves control to the system, but for stability it is better to use a hard shutdown.
Another cause of instability could be a conflicting kernel module or incorrect region settings. Make sure that the file /etc/default/crda the correct country code is specified (for example, REGDOMAIN=RU or US), as this affects the permitted signal strength and available channels. An incorrect region may result in the router operating on a channel that is legally prohibited in your settings, and Ubuntu will simply ignore the network.
- 🛑 Check the RF blocking status with the command
rfkill list all; if Wi-Fi is blocked by software (Soft blocked), userfkill unblock wifi. - 🔋 On laptops, disable the "Automatically connect to this network when it is available" feature for guest networks to prevent the system from constantly trying to scan the air.
- 🔧 If nothing helps, try temporarily disabling IPv6 in your connection settings, as some routers do not correctly process requests for this protocol.
⚠️ Attention: The interfaces and names of configuration files may vary slightly depending on the Ubuntu version and desktop environment used (GNOME, KDE, XFCE). Always check the official documentation for your specific release for up-to-date paths.
Frequently Asked Questions (FAQ)
Why doesn't Ubuntu see my Wi-Fi adapter even though it works in Windows?
Most likely, your system doesn't have proprietary drivers or firmware for your card model installed. In Windows, drivers are often built into the installer or downloaded automatically, but in Linux, they need to be installed separately. Also, check if "Secure Boot" is enabled in the BIOS, as this mode can block the loading of third-party kernel modules required for Wi-Fi operation.
How to reset all network settings in Ubuntu to factory defaults?
For a complete reset, you can delete the NetworkManager configuration files. Run the following commands: sudo rm /etc/NetworkManager/system-connections/* to delete saved passwords and profiles, and then restart the service with the command sudo systemctl restart NetworkManagerThis will return your network settings to the way they were after installation.
Is it possible to share Wi-Fi from an Ubuntu laptop?
Yes, this is possible. In modern versions of Ubuntu (20.04 and newer), there's a built-in "Hotspot" feature in the network settings. Simply select it from the Wi-Fi menu, set the network name and password, and your computer will create a virtual hotspot through which other devices can access the internet.
What should I do if my Wi-Fi speed in Ubuntu is significantly slower than in Windows?
Check if you're using an outdated security standard or protocol. Go to your router settings and make sure the mode is enabled. WPA2/WPA3 and a channel width of 40/80 MHz. Also, in Ubuntu, it's worth disabling IPv6 if your ISP doesn't support it, and making sure the adapter driver isn't using a power-saving mode that reduces speed.