How To Install Realtek Wifi Drivers on Manjaro
Manjaro Linux offers exceptional customization and performance, but setting up Realtek WiFi adapters often presents challenges for new users. Whether you’re migrating from Windows or simply struggling with wireless connectivity after a fresh installation, this comprehensive guide will help you get your Realtek WiFi working properly on Manjaro. We’ll explore multiple installation methods, troubleshooting steps, and optimization techniques to ensure a stable wireless connection.
Understanding Your Realtek WiFi Hardware
Before attempting to install drivers, you must identify your specific Realtek chipset. This crucial first step ensures you download and install the correct driver for your hardware.
For internal PCI/PCIe wireless cards, open a terminal and run:
lspci -v | grep -i network
For USB wireless adapters, use:
lsusb -v | grep -i wireless
These commands display information about your wireless hardware, including the manufacturer and model number. For Realtek devices, you’ll typically see a model number starting with “RTL” followed by numbers (e.g., RTL8821CE, RTL8812AU, or RTL8192EE).
For more comprehensive details, try:
inxi -F | grep -i wireless
Or:
sudo lshw -C network
Knowing your exact chipset is essential as each Realtek model requires a specific driver. Installing the wrong driver won’t resolve connectivity issues and might potentially cause system instability.
Note: Some Realtek chips like RTL8187B, RTL8188EE, and RTL8192CE may already be supported by the Linux kernel, but often require additional configuration for optimal performance.
Prerequisites for Driver Installation
Before diving into driver installation, several prerequisites must be met to ensure a smooth process.
Establishing a Temporary Internet Connection
The most challenging aspect of installing WiFi drivers is that you typically need an internet connection to download them – creating a catch-22 situation when WiFi is your only option.
If Ethernet is available, use a wired connection temporarily. For laptops without Ethernet ports, consider these alternatives:
- Android USB Tethering: Connect your Android phone via USB, enable USB tethering in your phone’s settings, and your Manjaro system should recognize it as a network interface.
- iPhone USB Tethering: For iPhone users, you’ll need to install the
libimobiledevice
package. - External USB WiFi Adapter: If available, use a compatible secondary WiFi adapter as a temporary solution.
Installing Essential Packages
Once you have internet connectivity, update your system and install required packages:
sudo pacman -Syu
sudo pacman -S base-devel git linux-headers dkms
The linux-headers
package is crucial – make sure to install headers matching your current kernel version, which you can check with:
uname -r
If you’re using a specific kernel variant like LTS or RT, install the corresponding headers:
sudo pacman -S linux-lts-headers # For LTS kernel
Method 1: Installing Drivers via AUR
The Arch User Repository (AUR) provides the simplest approach for most users to install Realtek WiFi drivers on Manjaro.
Finding the Right Driver Package
First, search for your specific Realtek chipset in the AUR. For example, for the RTL8821CE chipset:
yay -Ss rtl8821ce
Or if using pamac:
pamac search rtl8821ce
Look for packages with names like rtl8821ce-dkms-git
or similar.
Installing the Driver
To install the appropriate driver, run:
pamac build rtl8821ce-dkms-git # Replace with your specific driver package
The system will download the source code, compile it, and install the driver as a kernel module. During installation, you may need to confirm certain dependencies.
If you encounter build failures like those shown in the error logs, don’t panic – these are common with Realtek drivers and can usually be resolved.
Loading the Driver and Verifying Installation
After installation, reboot your system:
sudo reboot
To confirm the driver was installed correctly, run:
lsmod | grep rtl
This should show your newly installed Realtek driver in the list of loaded kernel modules. You can also check if your wireless interface is now visible:
ip link show
or
iwconfig
The advantage of AUR packages is that they’re maintained by the community and often include patches for specific kernel versions, making them more likely to work out-of-the-box compared to manual compilation methods.
Method 2: Manual Compilation and Installation
There are situations where manually compiling drivers from source code is necessary, such as when AUR packages are outdated or incompatible with your specific hardware or kernel version.
Finding the Source Code
Most Realtek WiFi drivers have community-maintained repositories on GitHub. To find the appropriate repository, search for your chipset model followed by “Linux” or “driver” on GitHub.
For example, for the RTL8821CE chipset:
git clone https://github.com/tomaspinho/rtl8821ce
cd rtl8821ce
Compilation Process
Most Realtek driver repositories include a Makefile with instructions for compilation. The general process is:
- Review the README file for specific instructions:
cat README.md
- Run make to compile the driver:
make
- Install the compiled driver:
sudo make install
Some repositories might include scripts like dkms-install.sh
that handle the DKMS setup automatically:
sudo ./dkms-install.sh
Blacklisting Conflicting Modules
Sometimes, you’ll need to blacklist competing drivers that might interfere with your newly installed one:
echo "blacklist rtw_8821ce" | sudo tee -a /etc/modprobe.d/blacklist.conf
Manual compilation offers greater control over the installation process but requires more technical knowledge and doesn’t automatically handle kernel updates unless properly configured with DKMS.
Installing Specific Realtek Chipset Drivers
Different Realtek chipsets have unique characteristics and requirements. Here’s guidance for some common models:
RTL8821CE Installation
The RTL8821CE is notorious for Linux compatibility issues. For this chipset:
- Install from AUR:
pamac build rtl8821ce-dkms-git
- If that fails, try manual installation:
git clone https://github.com/tomaspinho/rtl8821ce cd rtl8821ce make sudo make install
- After installation, load the module:
sudo modprobe 8821ce iwconfig
Common issues with RTL8821CE include poor signal strength and connectivity drops. These can often be mitigated with module parameters:
echo "options 8821ce rtw_power_mgnt=0 rtw_enusbss=0" | sudo tee /etc/modprobe.d/8821ce.conf
RTL8188FTV and Similar USB Adapters
For USB adapters like the RTL8188FTV:
- Install from AUR:
pamac build 8188eu-dkms
If you encounter DKMS errors as shown in the example log, you might need to try an alternative driver version or apply specific patches for your kernel version.
RTL8192EE and Other Chipsets
For older chipsets, kernel compatibility is crucial. If you experience issues with newer kernels, consider temporarily using an LTS kernel with better compatibility:
sudo pacman -S linux-lts
Then reboot and select the LTS kernel from the GRUB menu. As one user noted, downgrading from kernel 5.15 to 5.10 solved their slow WiFi issues with an Intel WiFi card – a similar approach may help with Realtek chipsets.
Installing Drivers Without Internet Access
The catch-22 situation of needing internet to install WiFi drivers when WiFi is your only connection option can be frustrating. Here are solutions:
Creating an Offline Package Repository
- On a computer with internet access, download the required packages and their dependencies:
mkdir -p ~/offline-packages/ cd ~/offline-packages/ pacman -Sw --cachedir . base-devel linux-headers git dkms
- Copy the downloaded packages to a USB drive.
- On your Manjaro system, mount the USB drive and install the packages:
sudo mount /dev/sdX1 /mnt sudo pacman -U /mnt/*.pkg.tar.xz
Using Android USB Tethering
As mentioned earlier, if you have an Android smartphone, you can use it for temporary internet access. This is often the simplest solution when available.
Downloading Source Code Manually
If you know which driver you need, download the source code repository as a ZIP file from GitHub on another computer, transfer it via USB, and compile it on your Manjaro system.
DKMS Configuration for Kernel Updates
Dynamic Kernel Module Support (DKMS) is crucial for maintaining WiFi functionality across system updates.
Understanding DKMS Benefits
Without DKMS, manually installed drivers need to be recompiled and reinstalled after each kernel update. DKMS automates this process by:
- Registering driver source code with the DKMS system
- Building the module for the current kernel
- Automatically rebuilding the module when a new kernel is installed
Most AUR packages for Realtek drivers include DKMS support by default. When installing such packages, the DKMS configuration is handled automatically.
Verifying DKMS Status
Check if your driver is properly registered with DKMS:
sudo dkms status
Troubleshooting DKMS Issues
If DKMS fails to build your module after a kernel update, check the build logs:
sudo cat /var/lib/dkms/rtl8821ce/*/build/make.log
If you see errors like those in the example log, you might need to:
- Ensure you have the correct kernel headers installed
- Update the driver source code or apply patches for the new kernel
- Reinstall the driver or try a different version
Troubleshooting Common Issues
Even with careful installation, Realtek WiFi drivers can present challenges. Here are solutions to common problems:
Connection Instability and Disconnects
If your WiFi connects but frequently disconnects, the issue might be with your connection profile rather than the driver. Try removing and recreating the connection:
sudo nmcli connection delete "Your_WiFi_Name"
Then reconnect to create a fresh profile.
You can also disable power management for better stability:
echo "options rtl8821ce rtw_power_mgnt=0" | sudo tee /etc/modprobe.d/rtl8821ce.conf
Slow WiFi Performance
If WiFi works but with extremely slow speeds, check if you’re using the optimal kernel version for your chipset. As one user reported, simply changing from kernel 5.15 to 5.10 dramatically improved their WiFi performance from 1-3Mb/s to 20-100Mb/s.
To install an LTS kernel:
sudo pacman -S linux-lts
No Networks Detected
If your WiFi adapter is recognized but doesn’t detect networks, check if the device is blocked:
rfkill list
sudo rfkill unblock wifi
Driver Loading Errors
If the module fails to load with errors, check for conflicting modules:
lsmod | grep rtl
And blacklist them if necessary:
echo "blacklist rtw_8821ce" | sudo tee -a /etc/modprobe.d/blacklist.conf
Always check system logs for clues:
journalctl -k | grep -i rtl
journalctl -k | grep -i wifi
Advanced Configuration and Optimization
Once your Realtek WiFi driver is installed and functioning, you can fine-tune its performance:
Improving Signal Strength
For better signal quality, adjust the antenna selection:
echo "options rtl8821ce ant_sel=2" | sudo tee -a /etc/modprobe.d/rtl8821ce.conf
The ant_sel
parameter controls which antenna is used. Experiment with different values (0-2) to find the optimal setting.
Power Management Settings
To balance performance and battery life:
echo "options rtl8821ce rtw_power_mgnt=1 rtw_enusbss=0" | sudo tee /etc/modprobe.d/rtl8821ce.conf
The rtw_power_mgnt
parameter accepts values:
- 0: Disable power saving (best performance)
- 1: Power saving with minimal performance impact
- 2: Maximum power saving (may reduce performance)
For laptops, a setting of 1 often provides the best balance.
Regional Settings
Adjust regional settings to comply with local regulations:
echo "options rtl8821ce rtw_country_code=US" | sudo tee -a /etc/modprobe.d/rtl8821ce.conf
Replace US
with your country code to ensure your adapter uses appropriate channels and power levels.
Post-Installation Verification
After installation, verify that everything is working correctly.
Confirming Successful Installation
Check if the module is loaded:
lsmod | grep rtl
Verify that the wireless interface is recognized:
ip link show
iwconfig
Checking Connection Status
Once connected to a network, check your connection quality:
watch -n1 "iwconfig wlan0 | grep -i quality"
Replace wlan0
with your interface name.
For a comprehensive overview of available networks:
nmcli device wifi list
Congratulations! You have successfully installed Realtek drivers. Thanks for using this tutorial for installing the Realtek wifi driver on Manjaro Linux system. For additional help or useful information, we recommend you check the official Realtek website.