diff --git a/README.md b/README.md index 7e610c9..58bafe9 100644 --- a/README.md +++ b/README.md @@ -12,88 +12,195 @@ If you are searching for the Realtek 2.5 Gbits **USB Ethernet**, which may use R - [Realtek R8152 DKMS](https://github.com/awesometic/realtek-r8152-dkms) -## Installation - -There are 3 ways to install this DKMS module. Choose one as your tastes. - -Those are not interfering with each other. So you can do all 3 methods but absolutely you don't need to. - -Installation using the Debian package is recommended for the sake of getting the newer driver. - -### Debian package - -#### Released package file - -Download the latest Debian package from the Release tab on the Github repository. - -Then enter the following command. - -```bash -sudo dpkg -i realtek-r8125-dkms*.deb -``` - -> If multiple files selected by the wild card, you should type the specific version of the file. -> -> ```bash -> sudo dpkg -i realtek-r8125-dkms_9.013.02-2_amd64.deb -> ``` - -If dependency error occurs, try to fix that with `apt` command. - +## Install +There are 3 ways to install this DKMS module not every works for every +distribution. This table should help you decide which way to go. + +| Nr | Method | Fedora/RedHat based | Debian based | +|----|-----------------------------|:-------------------:|:---------------:| +| 1 | [deb package](#deb) | | v | +| 2 | [Launchpad PPA](#launchpad) | | v | +| 3 | [autorun.sh](#autorun) | v | v | +| 4 | [dkms-install.sh](#dkms) | v (Recommended) | v (Recommended) | + +Those are not interfering with each other. So you can do all 3 methods but +absolutely you don't need to. + +1. First method using the Debian (deb) package + + 1. Download the deb package or build it from scratch + + + Download deb package + ```bash + curl -sSL ... + ``` + + + From scratch + ```bash + sudo apt install devscripts debmake debhelper build-essential dkms + git clone --depth 1 https://github.com/awesometic/realtek-r8125-dkms.git + cd realtek-r8125-dkms + dpkg-buildpackage -b -rfakeroot -us -uc + ``` + + 2. Install the deb package + ```bash + sudo dpkg -i realtek-r8125-dkms_9.011.00-1_amd64.deb + ``` + + If dependency error occurs, try to fix that with `apt` command. + ```bash + sudo apt install --fix-broken + ``` + +2. Second method using the Launchpad PPA + + 1. Add the Launchpad PPA + ```bash + sudo add-apt-repository ppa:awesometic/ppa + ``` + + 2. Install the package using `apt` tool + ```bash + sudo apt install realtek-r8125-dkms + ``` + +3. Third method using the autorun.sh script + + Using the `autorun.sh` script that Realtek provides on their original + driver package. This is **not installed as a DKMS**, only efforts to the + current kernel. + + 1. Download/Clone repository + ```bash + git clone --depth 1 https://github.com/awesometic/realtek-r8125-dkms.git + cd realtek-r8125-dkms + ``` + 2. Install driver by running the autorun.sh script + ```bash + sudo ./autorun.sh + ``` + +4. Fourth method using the `dkms-install.sh` script + + This script is from aircrack-ng team. You can install the DKMS module by a + simple command. + + 1. Download/Clone repository + ```bash + git clone --depth 1 https://github.com/awesometic/realtek-r8125-dkms.git + cd realtek-r8125-dkms + ``` + + 2. Install dependencies + + apt (Debian/Ubuntu) + ``` + sudo apt install dkms + ``` + + dnf/yum (Fedora/RedHat) + ```bash + sudo dnf install dkms + ``` + + 3. Install DKMS module by running the `dkms-install.sh` script + ```bash + sudo ./dkms-install.sh + ``` + +# Blacklist and load r8125 module + 1. Blacklist the r8169 module + ```bash + sudo tee -a /etc/modprobe.d/blacklist-r8169.conf > /dev/null < /dev/null < /dev/null < - If you need to load both r8169 and r8125, maybe removing r8125 firmware could make it work. Please enter `sudo rm -f /lib/firmware/rtl_nic/rtl8125*` to remove all the r8125 firmwares on the system. But it is just a workaround, you should have to do this every time installing the new kernel version or new Linux firmware. +> - In the case of the Debian package, I will update the scripts to make it do this during the installation. -This script is from aircrack-ng team. You can install the DKMS module by a simple command. +## Debian package build -Download or clone this repository and move to the extracted directory, then run the script. +You can build yourself this after installing some dependencies including `dkms`. ```bash -sudo ./dkms-install.sh +sudo apt install devscripts debmake debhelper build-essential dkms ``` -## Verify the module is loaded successfully - -After installing the DKMS package, you may not be able to use the new `r8125` module on the fly. This because the existing `r8169` module will be loaded priority to `r8125` so that it prevents working of the `r8125` module. - -Check if the `r8169` module loaded currently. - ```bash -lsmod | grep -i r8169 +dpkg-buildpackage -b -rfakeroot -us -uc ``` - -If there is a result, maybe the `r8125` module wasn't loaded properly. You can check out modules currently in use via `lspci -k` or `dmesg` too. - -To use the `r8125` module explicitly you can add the `r8169` module to not be loaded by adding it to a blacklist file. - -Enter the following command to configure the blacklist. - +======= ```bash sudo tee -a /etc/modprobe.d/blacklist-r8169.conf > /dev/null <>>>>>> origin/master ## LICENSE -GPL-2 on Realtek driver and the debian packaing. +GPL-2 on Realtek driver and the Debian packing. ## References