Installing Realtek RTL8411 WiFi Drivers on Manjaro Linux: A Complete Guide

The situation when after installing the distribution Manjaro No internet connection is a classic problem for laptop owners with adapters Realtek. In particular, the chip RTL8411, often found in budget laptops, requires special attention, as standard Linux kernels don't always include the necessary module to enable it. The user encounters a lack of wireless networks in the list of available connections.

The solution lies in manually compiling and installing the kernel module. rtl8821au, which is responsible for the operation of this equipment. The process may seem complicated to a beginner, but having a powerful package manager pacman and repository AUR (Arch User Repository) makes this process much easier. You'll only need to follow a clear procedure and have temporary network access, such as via a USB modem or Ethernet cable.

It is important to understand that without a properly functioning driver, the system will not be able to recognize your device as a network interface. Linux kernel The chip is the heart of the system, but it requires special instructions to interact with the hardware. In this guide, we'll cover every step: from determining the exact chip model to finalizing the module's autoload settings.

Equipment identification and environment preparation

The first step should always be to accurately identify the device. Although we assume the presence of a chip RTL8411In reality, laptop vendors may use various modifications or cloned versions of controllers. To check, use the terminal and the command lsusb or lspci, depending on the adapter connection type.

Enter the following command in Terminal to see a list of connected USB devices:

lsusb

In the command output, look for lines containing Realtek or codes 0bdaThese identifiers indicate the need to install a specific driver package. If the device is displayed as "Unknown" or has a strange ID, it may indicate a more specific approach or a kernel update is required.

⚠️ Attention: Do not attempt to install drivers designed for the 8812 or 8814 series chips if your device ID indicates an 8821 series. This will result in module conflicts and possible network instability.

Once the model is validated, it is necessary to ensure that the system has the basic tools for compilation. Repository AUR requires a compiler gcc and utilities makeWithout them, the module build process will be impossible, and you will receive an error when running the installation script.

Check for the presence of required packages and install them if they are missing:

sudo pacman -S base-devel linux-headers git

☑️ Pre-installation check

Completed: 0 / 4

Using the AUR repository to install the driver

The most reliable way to get the latest driver version for RTL8411 - is to use the repository AUR. Plastic bag rtl8821au-dkms-git is the most preferable, as it is automatically rebuilt when the system kernel is updated, which eliminates the need for manual re-installation after each upgrade Manjaro.

To work with AUR you need an assistant, for example, yay or pamacIf you don't have it installed yet yay, it can be easily built from source. This is standard procedure for users of Arch-like systems, providing access to thousands of additional programs.

git clone https://aur.archlinux.org/yay.git

cd yay

makepkg -si

After installing the package manager, the driver installation process is reduced to a single command. The manager will automatically download the source code, check dependencies, and compile the module for your current kernel version. This saves time and reduces the risk of human error when manually copying files.

Install the driver using the following command:

yay -S rtl8821au-dkms-git

During the installation process, the system may ask for confirmation. Agree to the terms and conditions, and the script will exit. If successful, the module will be added to the kernel module tree but will not yet be activated. A system reboot or manual download of the module will complete the process.

What to do if yay is not installed?

If you encounter errors building yay, check that the base-devel package is fully installed. Sometimes, the absence of one of the components (for example, pkgconf) can interrupt the process. Also, make sure your system time is synchronized, as time errors can cause issues with SSL certificates when cloning repositories.

Manual compilation and installation of the kernel module

In some cases, using ready-made packages from the AUR may be impossible due to compatibility issues or specific kernel version requirements. In these cases, manually compiling the driver from source code is the only option. This method provides complete control over the process, but requires careful attention.

First, you need to clone the driver repository. There are various driver forks for Realtek chips, but the repository from morrownr or similar supported communities.

git clone https://github.com/morrownr/8821au-20210708.git

cd 8821au-20210708

While in the source code folder, run the installation script. It will automatically detect the kernel version and header paths. It's important to run the script with root privileges, as it will make changes to system directories. /lib/modules.

sudo./install-driver.sh

After the script completes, you need to check whether the module has loaded. Use the command lsmod | grep 8821auIf the output contains a line with the module name, the driver has been successfully integrated into the kernel. If there is no output, you need to manually load it via modprobe.

Team Description of action Expected result
lsmod Shows loaded modules List of active drivers
modprobe 8821au Force loading a module No errors in the terminal
ip link Display network interfaces The appearance of wlan0 or name
dmesg | grep firmware Checking download logs Messages about successful initialization

Setting up NetworkManager and managing energy savings

After the driver is successfully installed, the system should see the wireless adapter. However, by default NetworkManager The interface may not activate, or the driver may aggressively use power-saving mode, resulting in connection interruptions. For stable operation, it is recommended to adjust the configuration parameters.

Create or edit a configuration file for NetworkManager to prevent it from turning off WiFi to save power. This is especially important for laptops, where the system strives to extend battery life, sometimes at the expense of connection stability.

sudo nano /etc/NetworkManager/conf.d/default-wifi-powersave-on.conf

In this file, you need to change the value of the parameter wifi.powersave. Set it to value 2, which means turning off the power saving mode. Meaning 3 includes it, and 1 leaves the default setting.

⚠️ Attention: Changing power saving settings may slightly increase your laptop's power consumption. However, for desktop PCs or when connected to a power outlet, this is the optimal option to avoid micro-interruptions in connection.

It's also worth making sure the NetworkManager service is running and enabled for startup. This is usually set by default on Manjaro, but after major system changes, it's a good idea to check. Use systemctl to manage services.

sudo systemctl enable NetworkManager

sudo systemctl restart NetworkManager

📊 Have you encountered the problem of WiFi disconnecting after installing Linux?
Yes, all the time.
Sometimes it happens
Never happened before
I don't use WiFi

Diagnosing and resolving common errors

Even if you follow all the instructions, unexpected situations may arise. Often, the problem lies not with the driver itself, but with a kernel version conflict or missing firmware files. Logging — your main tool in such cases.

Use the utility dmesg to view kernel messages in real time. Filter the output by word firmware or wlanto see if the system is trying to load the firmware and if there are any file access errors.

dmesg | grep -i firmware

If you see errors related to missing files, check the directory /usr/lib/firmwareSometimes you need to manually copy the firmware files from the driver source code folder to the system directory if the installer doesn't do this automatically.

Another common issue is the wireless module being blocked at the RFKill level. This can be caused by a software switch or BIOS settings. Check the blocking status with the command rfkill list.

If the status shows Soft blocked: yes, unlock the adapter with the command:

sudo rfkill unblock wifi

In case the status Hard blocked: yes, software methods won't help. You need to look for a physical switch on the laptop case or use a key combination (usually Fn + key with antenna).

Updating drivers when changing the system kernel

One of the key features of Arch-based distributions such as Manjaro, is frequent kernel updates. Each new kernel release requires recompilation of modules not included in the core set. If you used the DKMS (Dynamic Kernel Module Support) method, this process occurs automatically.

However, if you installed the driver manually without DKMS, you'll have to repeat the compilation process after each major system update. To avoid losing network access, it's recommended to always have an alternative connection (USB modem) on hand before updating.

To check the DKMS status and rebuild modules, you can use the command:

sudo dkms autoinstall

This command will check all installed DKMS modules and build them for the currently running kernel. This is a useful command for restoring network functionality if it's lost after an update.

Regular system maintenance includes not only updating packages but also clearing the cache of old driver versions. This helps keep the system clean and prevents conflicts between different module versions.

What should I do if WiFi disappears after updating the kernel?

First, boot from the previous kernel version using the GRUB bootloader menu. If the network works there, then the issue is related to the new kernel's compatibility. Run the command sudo pacman -S linux-headers for the current kernel, then reinstall the driver via yay or run sudo dkms autoinstall.

Is it possible to use Windows drivers through Wine?

No, device drivers interact directly with the operating system kernel, and Wine only emulates the Windows library layer for applications. For hardware to work on Linux, native drivers written specifically for the Linux kernel are required.

Why is WiFi speed slower than in Windows?

This may be related to power saving settings or the encryption standard used. Try changing the region in your router settings or in the driver configuration file. Also, make sure you're using the 5 GHz frequency if your adapter and router support dual-band mode.