- Установка драйвера USB WiFi адаптера в Linux (на примере DEXP WFA-601)
- Путь веры
- Путь разума
- How to Install Realtek Wifi Drivers in Ubuntu 22.04 | Linux Mint 21/20
- How to Tell Which Wi-Fi Chipset you have?
- Install Realtek Wi-Fi Driver from PPA:
- Step 1: Disable Secure Boot
- Step 2: Add the Ubuntu PPA
- Step 3: Update the cache
- Step 4: Select install driver package for your chipset
- Step 5: Load the driver (Kernel Module)
- How to Uninstall:
Установка драйвера USB WiFi адаптера в Linux (на примере DEXP WFA-601)
В связи с переездом и нежеланием захламлять дом проводами повесил в прихожей роутер, а для компьютера купил Wi-Fi адаптер DEXP WFA-601.
Пока работал в Windows 10 проблем не было. Однако сгоревший жесткий диск подтолкнул меня к установке Linux (конкретно Kubuntu).
Путь веры
Захожу на официальный сайт производителя и скачиваю драйвер для любой ОС. Результат предсказуем: Linux != «любая ОС».
Роюсь в коробочках и нахожу родной CD-диск от адаптера. Скачиваю драйвер, нахожу «install.sh»:
$ chmod a+x install.sh $ sudo ./install.sh
Драйвер не компилируется, вылетает с ошибкой.
cc1: error: code model kernel does not support PIC mode
Не буду тратить время на описание, боя с ней. В гугле нашел советы персобирать ядро, пересобирать gcc… В общем мой уровень не позволяет такие сложности.
Путь разума
Первым делом решил проверить видит ли железку ядро. Вытаскиваю адаптер и втыкаю его в соседний разъем.
. [ 1498.558445] usb 1-1.1: new high-speed USB device number 6 using ehci-pci [ 1498.667540] usb 1-1.1: New USB device found, idVendor=0bda, idProduct=a811 [ 1498.667544] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=3 [ 1498.667546] usb 1-1.1: Product: 802.11ac WLAN Adapter [ 1498.667548] usb 1-1.1: Manufacturer: Realtek [ 1498.667550] usb 1-1.1: SerialNumber: 00e04c000001
Ищу название драйвера на лазерном диске от производителя, вот оно: RTL8821AU_Linux_v5.2.6.3_25025_COEX20171103-6c6d.20171106.
Подключаю смартфон в режиме модема и пробую в лоб:
sk@ds:~$ sudo apt install realtek-88xxau-dkms [sudo] password fоr sk: Чтение списков пакетов… Готово Построение дерева зависимостей Чтение информации о состоянии… Готово E: Невозможно найти пакет realtek-88xxau-dkms
Видимо репозиторий моего дистрибутива к такому не готов. Захожу на гитхаб и качаю исправленную версию драйвера.
Распаковываю, нахожу dkms-install.sh, запускаю его. Драйвер установлен.
Не будучи гуру linux не стал разбираться с остановкой и запуском адаптера, ввел:
How to Install Realtek Wifi Drivers in Ubuntu 22.04 | Linux Mint 21/20
Linux Kernel keeps updating with new device drivers. But, there are still some devices lack out-of-box support. Thanks to the open-source community, there are always a group of people maintaining missing drivers.
How to Tell Which Wi-Fi Chipset you have?
Firstly, you may want to find out the device name of your wireless network card. In Ubuntu or Linux Mint, you may just search for and open “hardinfo” (aka, System Profiler and Benchmark) either from start menu or ‘Activities’ overview.
Install "hardinfo" via Ubuntu Software or Synaptic Package Manager if you don't have it.
When it opens, navigate to “Devices -> PCI Devices“. Then, find out the network controller information in the right. For USB Wi-Fi adapter, go find it under “Devices -> USB Devices“.
For those familiar Linux command, use lspci command to find integrated network card or lsusb for USB adapter:
Install Realtek Wi-Fi Driver from PPA:
There’s a github repository that maintains RTL8822BE, RTL8822CE, RTL8821CE, RTL8723DE, RTL8723AU, RTL8723BU, RTL8188EU driver source codes. Advanced users may go to that page, grab the source and build by yourself.
To make life easier, the kablosuz-wireless PPA maintains the driver packages for:
- rtl8723bu, rtl8822bu, rtl8188eu, rtl8188eus, rtl8188fu, rtl8188gu, rtl8192cu, rtl8192du, rtl8192ee, rtl8192eu, rtl8192fu, rtl8723au, rtl8723bu, rtl8723de, rtl8723ds, rtl8723du, rtl8812au, rtl88XXau, rtl8814au, rtl8821ce, rtl8821cu, rtl8822bu, rtl8822ce, rtl8852au, rtw88, and rtw89.
The guy also maintains another PPA with packages for:
- r8101, r8125, RTL8152/RTL8153/RTL8156, r8168, rts5139, and rts5229 network drivers.
Step 1: Disable Secure Boot
The drivers are built in DKMS mode that will work (rebuild automatically) even after update to new Kernel series. If you have your system installed in UEFI mode, you have to disable secure boot first.
1. To verify if your system is installed in UEFI mode, open terminal (Ctrl+Alt+T) and run command:
[ -d /sys/firmware/efi ] && echo "EFI" || echo "BIOS"
2. To check the status of secure boot:
If secure boot is enabled, reboot into BIOS/UEFI settings and disable it!
Step 2: Add the Ubuntu PPA
First, open terminal by pressing Ctrl+Alt+T key combination on keyboard. When it opens, run the command below to add the PPA:
sudo add-apt-repository ppa:kelebek333/kablosuz
For r8101, r8125, RTL8152/RTL8153/RTL8156, r8168, rts5139, and rts5229 network drivers, add another PPA:
sudo add-apt-repository ppa:kelebek333/drivers
Step 3: Update the cache
Ubuntu 22.04 now automatically updates the cache while adding PPA. But, Linux Mint does not. So you have to manually run the command below to refresh cache:
Step 4: Select install driver package for your chipset
Open “Synaptic Package Manager“, navigate to “Origin” tab in the left. Finally click on “LP-PPA-kelebek333-drivers” or “LP-PPA-kelebek333-kablosuz” to list all the packages from that repository. Finally, right-click on desired driver package, mark for installation, and click Apply.
Install Synaptic Package Manager from Ubuntu Software if you don't have it.
Or, you can install the package via apt command (for example, install r8822bu driver):
sudo apt install r8822bu-dkms
Keep an eye on output info while installing the package. It tells where to install the Kernel modules.
Step 5: Load the driver (Kernel Module)
After installing the driver package, restart your computer. Then, you may find out the modules via:
ls /usr/lib/modules/$(uname -r)/updates/dkms
The command should outputs the previously installed Kernel modules in .ko
files.
You can finally, load the driver ( 8723ds for example) via command:
And, verify via lsmod command with ‘grep’ filter:
If you have loaded the correct network driver, Wi-Fi should work now!
How to Uninstall:
To unload the driver module, use modprobe command with -r flag. For example, unload ‘8723ds’ via command:
And, to remove the driver package, either use “Synaptic Package Manager” or run apt remove command:
sudo apt remove package_name
To remove the Ubuntu PPAs, use command:
sudo add-apt-repository --remove ppa:kelebek333/kablosuz
sudo add-apt-repository --remove ppa:kelebek333/drivers