Realtek linux drivers wireless
Realtek RTL8811CU/RTL8821CU USB wifi adapter driver version 5.4.1 for Linux 4.4.x up to 5.x
Before build this driver make sure make , gcc , linux-header / kernel-devel , bc and git have been installed.
First, clone this repository
Check the name of the interface
Check the interface name of your wifi adapter using ifconfig . Usually, it will be wlan0 by default, but it may vary depends on the kernel and your device. On Ubuntu, for example, it may be named as wlx + MAC address. (https://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/)
If this is the case, you can either disable the feature following the link above, or replace the name used in the driver by
Build and install with DKMS
DKMS is a system which will automatically recompile and install a kernel module when a new kernel gets installed or updated. To make use of DKMS, install the dkms package.
To make use of the DKMS feature with this project, just run:
If you later on want to remove it, run:
Plug your USB-wifi-adapter into your PC
If wifi can be detected, congratulations. If not, maybe you need to switch your device usb mode by the following steps in terminal:
- find your usb-wifi-adapter device ID, like «0bda:1a2b», by type:
- switch the mode by type: (the device ID must be yours.)
Need install usb_modeswitch (Archlinux: sudo pacman -S usb_modeswitch )
Make it permanent
If steps above worked fine and in order to avoid periodically having to make usb_modeswitch you can make it permanent (Working in Ubuntu 18.04 LTS):
Edit usb_modeswitch rules:
Append before the end line LABEL=»modeswitch_rules_end» the following:
Make sure to set your ATTR
then your configuration in /lib/udev/rules.d/40-usb_modeswitch.rules should be
Build and install without DKMS
Use following commands:
If you later on want to remove it, do the following:
Checking installed driver
If you successfully install the driver, the driver is installed on /lib/modules/
/kernel/drivers/net/wireless/realtek/rtl8821cu . Check the driver with the ls command:
Make sure 8821cu.ko file present on that directory
Check with DKMS (if installing via DKMS):
sudo dkms status
ARM architecture tweak for this driver (this solves compilation problem of this driver):
Use the tool ‘iw’, please don’t use other tools like ‘airmon-ng’
About
Realtek RTL8811CU/RTL8821CU USB Wi-Fi adapter driver for Linux
Источник
Realtek linux drivers wireless
RTL8822x Firmware for GNU/Linux
The files in this repository are taken from Linux Mint 19.3 and will allow a Realtek RTL8822 b or c card to work on other distributions.
If you have trust issues, you can always boot with Mint 19.3 and take the files from there to use.
Log in with your favorite distribution, preferably with a new Kernel, as this has only been tested with 5.4+ Unload non-working modules from the Kernel, with:
You can run lsmod to see if they are named somehow differently in your OS, in case you do not run Debian.
Copy the files from this repo to your system, change the kernel path as needed! Load the modules with modprobe rtw88 and the WiFi should work.
It is unclear to me whether the /usr files are needed or if everything will work with just the files under /lib . Feel free to open an issue about this.
Did you rename the paths to work with with your current Kernel?
Usage on Debian Installer
Either on the graphical, text or live installer, open a terminal and do the above procedure before the installer checks for WiFi cards. The resulting installation will work out of the box and you do not need to copy the files again.
- Huawei Matebook D14 (2020) with AMD 3500U. (Probaly same as D15)
The following issues are not related to the network card, but to the AMD CPU/GPU. Since these two are commonly found together, I document the fixes here.
If you have issues with the installer not starting use a newer Kernel. The ISO files listed above are fine as are the STABLE ones from Debian.
If you have glitches with your screen (artifacts) disable compositing.
About
Linux Drivers for Realtek RTL8822x WiFicards, taken from Linux Mint 19.3
Источник
Realtek linux drivers wireless
A repo for the newest Realtek rtlwifi codes.
This branch has v5 of the code, which is latest from Realtek.
This code will build on any kernel 5.4 and newer as long as the distro has not modified any of the kernel APIs. IF YOU RUN UBUNTU, YOU CAN BE ASSURED THAT THE APIs HAVE CHANGED. NO, I WILL NOT MODIFY THE SOURCE FOR YOU. YOU ARE ON YOUR OWN.
I am working on fixing builds on older kernels.
This repository includes drivers for the following card:
If you are looking for a driver for chips such as RTL8188EE, RTL8192CE, RTL8192CU, RTL8192DE, RTL8192EE, RTL8192SE, RTL8723AE, RTL8723BE, or RTL8821AE, these should be provided by your kernel. If not, then you should go to the Backports Project (https://backports.wiki.kernel.org/index.php/Main_Page) to obtain the necessary code.
You will need to install «make», «gcc», «kernel headers», «kernel build essentials», and «git». You can install them with the following command, on Ubuntu:
If any of the packages above are not found check if your distro installs them like that.
For all distros:
Installation with module signing for SecureBoot
For other distros, supply the location of the MOK.der and MOK.priv files as the MOK_KEY_DIR environment variable:
How to disable/enable a Kernel module
Problem with recovery after sleep or hibernation
Some BIOSs have trouble changing power state from D3hot to D0. If you have this problem, then
sudo cp suspend_rtw89 /usr/lib/systemd/system-sleep/.
That script will unload the driver before sleep or hibernation, and reload it following resumption.
If it turns out that your system needs one of the configuration options, then do the following:
There, enter the line below:
The available options for rtw89pci are disable_clkreq, disable_aspm, and disable_aspm The available options for rtw89core are debug_mask, and disable_ps_mode
Normally, none of these will be needed.
When your kernel changes, then you need to do the following:
Remember, this MUST be done whenever you get a new kernel — no exceptions.
These drivers will not build for kernels older than 5.4. If you must use an older kernel, submit a GitHub issue with a listing of the build errors. Without the errors, the issue will be ignored. I am not a mind reader.
When you have problems where the driver builds and loads correctly, but fails to work, a GitHub issue is NOT the best place to report it. I have no idea of the internal workings of any of the chips, and the Realtek engineers who do will not read these issues. To reach them, send E-mail to linux-wireless@vger.kernel.org. Include a detailed description of any messages in the kernel logs and any steps that you have taken to analyze or fix the problem. If your description is not complete, you are unlikely to get any satisfaction.
About
Driver for Realtek 8852AE, an 802.11ax device
Источник
Realtek linux drivers wireless
This modified version of the RealTek WiFi driver fixes some issues with RealTek cards on Linux.
Why use this driver?
- It has been modified to allow you to transmit at up to 33 dBm instead of the stock driver hard limit of 20 dBm, regardless of your CRDA regulatory domain. This is a substantial increase in capability because every 3 dB increase is equivalent to a doubling of the power. IOW, you can pump out 4x more Tx power than before. This is subject to CRDA restrictions however (though you can set that to whatever you want, just make sure you’re staying legal)
- It has a few default settings that generally increase stability
- Some helpful fixes are backported from newer kernels so that they can be enjoyed without upgrading the entire kernel (very useful for staying on your distros current kernel while benefitting from fixes relating to this driver)
Well supported RealTek cards:
Well supported kernel releases:
Well supported Ubuntu (and Ubuntu-based) releases:
Well supported Fedora (and Fedora based) releases:
Arch is also supported, but tends to break each time the kernel is bumped up a minor version (like 3.13.x to 3.14.x). I try to fix the breakage quickly but this is not how I support my family 😉
Other RealTek cards, kernel releases, and Linux flavors/releases are supported, but not tested by me (since I don’t have them/use them). From the original readme file:
—This driver supports following RealTek PCIE Wireless LAN NICs:
—This driver supports following Linux OSes:
Please note that I have only tested the driver on Ubuntu and Fedora (the well supported releases). If you are NOT using Ubuntu, pay close attention to your kernel version when selecting branches. You also need to substitute your package manager whenever you see apt-get install , so Fedora would be dnf install xxx . Most package names are the same but there may be some difference.
There is an install script called install.sh which attempts to automate the manual steps. If the script fails to build and install the driver, you should follow the steps for manual installation.
After cloning this repo, if you want to run the install script, simply run:
If you already have git installed, you can run this one-liner to clone the repo and kick of the automatic install script:
You may wish to register the modules with DKMS for automatic rebuild when your kernel changes. For that, see the steps for Semi-Automatic Installation (DKMS).
Semi-Automatic Installation (DKMS):
Thanks to saiarcot895 for the initial effort getting this working
You can alternatively use DKMS, so that when a new patch-release of the kernel is released by your distro, you don’t have to manually recompile the driver. However, there are a few drawbacks with this method:
You need to know what kernel version you are on.
You need to change the branch when you change the minor version of the kernel (e.g. 3.13.x to 3.15.x).
Follow steps 0-2 in the «Manual Installation» section below.
Copy the repo cp -rv . /usr/src/rtlwifi-1.0.0
Run the following command to register the sources with DKMS (the 1.0.0 can be any numbers): (note the period at the end!)
sudo dkms add rtlwifi/1.0.0 .
Run the following command to build and install the modules:
sudo dkms install rtlwifi/1.0.0
DKMS should automatically switch you onto the new modules. To verify this, run ./am_i_using_this_driver.sh .
To uninstall and remove the modules from DKMS, run the following command:
To check your kernel version:
These commands should be typed in an open terminal. I recommend you start in your home directory by typing cd
0. Clone this git repository:
Install git if necessary:
Clone the repo (Basically it makes a copy of the current source code)
1. Install build dependencies:
2. (Skip unless your first build attempt fails) -> Make sure you are on the correct branch for your kernel version. The branches are named after Ubuntu releases to which they commonly apply, but the most important factor is not the version of Ubuntu, it is the kernel version. There is a script called verify_branch that will help you find the right branch based on your kernel version. When you run «make», the script verify_branch will be automatically called for you. It will recommend to you the best branch for your kernel version. If you tried the recommended branch and your build failed, you may need to try a different one. If so, decline the offer to automatically switch branches for you.
If you need to, you can switch to the correct branch with:
Ex: «git checkout ubuntu-13.04»
4. Unload the existing rtl kernel modules.
4.5. (Optional) Backup stock drivers
You may wish to make a backup of your stock drivers in case you need to restore them. This is done for you automatically by the install script but the truly paranoid may wish to do it themselves as well.
Or tarball it up:
Important: When restoring this backup manually, make absolutely sure you are putting it back in to the exact same kernel version. Failure to do this properly may result in an unbootable system. I suggest you let the script do your backups automatically and use this as a last resort.
6. Modprobe in the new driver (if you’re not using an RTL8188CE or RTL8192CE, adjust accordingly):
(rtl8192ce is the driver for the RTL8188CE card also)
7. The rtl8192ce should load all modules it depends on ( rtlwifi , rtl8192c_common , mac80211 , cfg80211 , etc.), but if it doesn’t work you may need to modprobe back in the other modules too. Common modules:
NOTE: Unlike the stock driver, rtl8192c_common is only required with kernel >= 3.14
8. Make persistent by adding this to the end of /etc/modules (for Ubuntu), or /etc/rc.modules (for Fedora) (if Fedora make sure /etc/rc.modules is executable), or /etc/modules-load.d/rtlwifi.conf (for Arch). If you don’t have an RTL8188CE or RTL8192CE, then substitute the correct kernel module in place of rtl8192ce :
NOTE: By «make persistent», I mean making the loading of the RLT8192CE kernel modules happen automatically at boot time so you don’t have to modprobe them in yourself. If udev is seeing your Realtek card (which is usually the case), then it will load the kernel modules for you without this, but putting this in hurts nothing.
You may want to verify your CRDA domain. For example if you were in Bolivia it would be: iw reg set BO There is more information about CRDA available at: http://ttys1.wordpress.com/2012/04/12/fixing-regulatory-domain-crda-of-realtec-wireless-device-drivers/
0. To check whether you are running this driver or not, run the script:
1. If you have loaded the kernel modules (with modprobe ) and you are using this driver (check with the script in step 0), and you still have no connection, try restarting wpa_supplicant . If you use systemd :
2. If you get the following error:
You may have invalid configuration options in /etc/modprobe.d/rtl8192ce.conf . You can either remove the file or remove any options that are not supported.
3. If your connection seems unstable:
This driver has been modified to allow up to 33 dBm Tx power (instead of the stock driver limit of 20). This allows you to crank up the Tx power, which vastly improves performance for me.
To do this, your CRDA regulatory domain must allow it. You need to be aware of the laws that govern your local area so you are not in violation. If you do this, you assume all legal liability for your actions. Also, don’t crank your Tx power up to 33 dBm when you’re sitting right next to your router. Almost all wireless routers have AGC built-in that will save them from hot transmitters, but it is better to try not to fry the receiver. Keep in mind that you’re hacking your wi-fi card to bypass the normal safety net(s) that prevent us from doing cool stuff.
A very lenient CRDA domain is Bolivia (BO) that will let you up to 33 dBm. To set Bolivia, run the following:
To turn up the Tx power, run this (substitute your wireless interface name for and desired power level for ):
To check the current Tx power, run:
The current Tx power will be listed as Tx-Power=xx dBm
4. If you’re getting power drops*:
You may have better luck fixing your data rate. The best rate will vary depending on your Tx power, Rx power, and distance from the router. You may want to set the rate to be fixed at a speed similar to your internet connection speed unless you’re doing other stuff on your LAN. Basgoosen found his sweet spot to be 24M. You can set the fixed rate as follows (substitute your wireless interface for , so for example wlan0):
To make this persistent, create a file in /etc/network/if-up.d containing the following (substitute your wireless interface for !):
*Thanks to basgoosen for this suggestion
5. My kernel package was updated by my distro and now I’m stuck back on the stock driver!
Yeah unfortunately this does currently happen anytime your kernel package is updated by your distro. The solution is to rebuild and reinstall this driver. On the plus side that gives you a chance to pull down the latest changes so that you’re up to date.
Please don’t save a copy of the drivers compiled under a different version of the kernel to copy back in after the kernel update. While a clever solution, this could cause undefined and potentially disastrous results if the ABI changes (which it does frequently). The drivers need to be rebuilt using the new kernel headers to ensure they are compiled correctly. It may work fine for a few upgrades, but eventually it will leave your system unbootable.
You can run this command to automatically clone this repo and kick off the installer (git must be installed already):
You might also consider using DKMS if your kernel changes often. There are instructions near the top of this README.
6. I think this driver broke something. How do I get back to the stock driver?
You basically have two choices. Either will get the job done. When you run sudo make uninstall , the make script will try to restore your backup from when you installed. The system works like this:
- When you run sudo make install , the existing drivers are backed up to
/.rtlwifi-backups as a precaution (this is new as of 29-May-2014, so if you installed before then, you have no backups. Sorry)
Choice #1 — Use the backup that the install script made for you:*
- Note that this will look in the home directory of whichever user you are when you run it, so if it doesn’t see a backup, try it again with sudo so that it will check root’s home directory, or as a regular user so it will check that user’s directory.*
Choice #2 — Reinstall your distro’s kernel package:
This obviously varies by distro. For Ubuntu, try:
Please consider reporting the failure (or even better, send a pull request), so I can try to fix it.
About
This modified version of the RealTek WiFi driver fixes some issues with RealTek cards on Linux.
Источник