Installing the operating system Ubuntu Often the first step toward full control of a computer, users may be faced with an unpleasant surprise: no internet connection immediately after installation. This is a classic "chicken and egg" problem: downloading drivers requires internet access, and connecting to the network requires drivers. In most cases, the system kernel automatically detects wireless modules, but specific chipsets require manual configuration.
The setup process depends on your adapter manufacturer and the version of the distribution you are using. Modern versions, such as Ubuntu 22.04 LTS or 24.04, have an extensive database of proprietary drivers, but even they aren't omnipotent. You'll need to determine the exact device model, find compatible software code, and integrate it into the system to activate it. wireless interface.
Don't panic if the network indicator is silent. This is normal for many models, especially USB dongles with new chips. RealtekWe'll cover solutions ranging from the simplest, built-in graphical interfaces, to advanced terminal manipulations. The key is to follow the instructions carefully and check package version compatibility.
⚠️ Warning: Before you begin any manipulations with drivers, make sure you have an alternative network access (for example, via an Ethernet cable or USB modem with Android), as the installation process may require downloading files from repositories.
Determining the adapter model and chipset
The first critical step is accurately identifying your equipment. Simply knowing that it's a TP-Link or D-Link isn't enough, as identical housings can house completely different chips, requiring different installation approaches. You need to know the identifiers. Vid And Pid, which are unique to each device.
To do this, open a terminal and enter the command to view a list of USB devices. If you have an internal module connected via the PCI bus, use the command lspciIn the output, look for lines containing the words Wireless, Network, or 802.11. Write down the numbers after the ID; they look like this: xxxx:xxxx.
lsusb
If the adapter is connected via USB, the command output will show a line like Bus 001 Device 004: ID 2357:0120 TP-LinkThese numbers (2357:0120) will help you find the required driver online or in repositories. Manufacturers often use chips Realtek RTL8812AU, RTL8821CU or MediaTek, and the search for a solution should be carried out precisely by the name of the chip.
Using additional Ubuntu drivers
The easiest and safest way to get WiFi working is to use the built-in driver management tool. Developers Ubuntu We have provided a mechanism for automatically searching and installing proprietary modules that cannot be distributed as part of free software for licensing reasons.
Find the Software & Updates program in the application menu or enter it in the terminal software-properties-gtkGo to the "Additional Drivers" tab. The system will scan your hardware and offer a list of available options.
- 📡 If your adapter (for example, Broadcom or Realtek) appears in the list, select the item marked "recommended" and click "Apply changes".
- 🔒 The system will request an administrator password, after which it will begin automatically downloading and installing packages.
- 🔄 After the process is complete, be sure to restart your computer with the command
sudo reboot.
This method is ideal for beginners, as it eliminates the risk of version conflicts. However, if the list is empty or your adapter is too new, you'll have to resort to manual installation via repositories or source code.
Installing drivers via the DKMS repository
For popular models, especially from Realtek, there are often ready-made packages in community repositories. Usage DKMS (Dynamic Kernel Module Support) allows you to automatically rebuild the kernel module when updating the system, which eliminates the need for reinstallation after each kernel upgrade.
First, you need to update your package lists and install the basic compilation tools. Without them, installing modules is impossible. Run the following sequence of commands:
sudo apt update
sudo apt install dkms build-essential git
Next, you need to find the specific package for your chipset. For example, for the popular RTL8812AU chip, the package might be called rtl8812au-dkmsTry searching for it: apt search rtl88If the package is found, install it with the command sudo apt install package-name.
⚠️ Note: Interfaces and package names in repositories may change over time. If a standard package fails to install or causes errors, please consult the official project documentation or your distribution's support forum for the current package name.
Manually compiling drivers from source code
When ready-made packages are not available, the only solution is to compile the driver from the source code taken from GitHubThis method requires careful attention, but offers the best chance of reviving exotic or very new hardware. You'll need to clone the driver code repository.
Find the repository corresponding to your chipset (using the information from the first section). Make sure the selected driver version supports your Linux kernel version. Clone the repository to your home directory:
git clone https://github.com/author/driver-name.git
cd driver-name
Now you need to run the installation script. It is usually called install.sh or make.shBefore running, make sure you have the current kernel headers installed (linux-headers-generic). Running the script initiates the compilation process and subsequent registration of the module in the system.
☑️ Checklist before compilation
After successful compilation, the module will be added to the system, but not yet activated. You will need to either reboot or manually load the module with the command modprobeIf errors occur during the process, carefully read the terminal output—the problem is often due to missing dependencies.
Comparison of driver installation methods
The choice of installation method depends on your preparation and the specific situation. Automatic methods are preferable for system stability, while manual compilation offers flexibility but requires user support. The table below compares the main approaches.
| Method | Complexity | Risk of errors | Updatable |
|---|---|---|---|
| Additional drivers (GUI) | Low | Minimum | Automatic |
| DKMS repository | Average | Short | Automatic |
| Manual compilation | High | Medium/High | Requires manual work |
| Universal scripts | Average | Average | Depends on the script |
Using ready-made solutions through GUI or apt This ensures that the driver is signed and integrated into the boot chain securely. Manually building, however, allows you to use the latest versions of code that haven't yet made it into the official repositories, but it can lead to WiFi failure after a kernel update.
What is Secure Boot and how does it interfere?
If you have Secure Boot enabled in your BIOS/UEFI, the system may block manually installed drivers from loading because they aren't digitally signed by Microsoft. In this case, you'll need to either disable Secure Boot or sign the modules yourself with a MOK.
Diagnosing and resolving connection problems
Even after installing the driver, the network may not appear or work reliably. Often, the problem lies in a power management conflict or incorrect region settings. Check the interface status with the command ip link or iwconfigIf the interface exists but is in the DOWN state, bring it up using the command sudo ip link set wlan0 up.
One common cause of crashes is aggressive power saving. The driver may disable the adapter to conserve power, leading to connection interruptions. To disable this feature, create a configuration file:
sudo nano /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf
Change the parameter value wifi.powersave on 2 (which means power saving is disabled). Save the file and restart the network service: sudo systemctl restart NetworkManagerThis action often stabilizes the operation of chip-based adapters. Realtek And Atheros.
⚠️ Note: Changing power saving settings may increase your laptop's battery consumption. Use this method if connection stability is more important than battery life.
Frequently Asked Questions (FAQ)
Why did WiFi disappear after updating Ubuntu?
The update may have installed a new version of the Linux kernel for which the old driver wasn't compatible or wasn't automatically rebuilt. If you used the DKMS method, try reinstalling the driver package. If you installed it manually, you'll need to repeat the compilation process for the new kernel.
How can I check if the system sees my WiFi adapter?
Use the command lsusb for external devices or lspci for internal. If the device appears in the list, but there is no network, then the problem is software (drivers). If the device is not in the list even in lsusb, it may be faulty or disabled in BIOS.
Is it possible to use Windows drivers in Ubuntu?
Directly, no. However, there is a project ndiswrapper, which allows you to run Windows drivers (.inf files) on Linux. This is a last resort, is unstable, and only works on older devices. It's better to look for a native Linux driver.
What should I do if the WiFi power button doesn't work?
Check if the radio interface is blocked programmatically by the command rfkill listIf you see “Soft blocked: yes”, enter sudo rfkill unblock wifiIf "Hard blocked: yes", then the switch is physically disabled or blocked in the BIOS.