From 614ee535d49881c581068c86a320dfb59e177f58 Mon Sep 17 00:00:00 2001 From: Deokgyu Yang Date: Wed, 26 Jan 2022 16:49:52 +0900 Subject: [PATCH] Add README.md and REALTEK_README.txt Signed-off-by: Deokgyu Yang --- README.md | 100 +++++++++++++++++++++++++++++++++++++++++++++ REALTEK_README.txt | 41 +++++++++++++++++++ 2 files changed, 141 insertions(+) create mode 100644 README.md create mode 100755 REALTEK_README.txt diff --git a/README.md b/README.md new file mode 100644 index 0000000..4cd3583 --- /dev/null +++ b/README.md @@ -0,0 +1,100 @@ +# Realtek r8152 DKMS + +![GitHub release (latest SemVer)](https://img.shields.io/github/v/release/awesometic/realtek-r8152-dkms?sort=semver&style=for-the-badge) + +This provides Realtek r8152 driver in DKMS way so that you can keep the latest driver even after the kernel upgrade. + +## Compatibility + +The RTL8152 driver supports the following USB Ethernet chipsets. + +- **RTL8156 / RTL8156B(S)(G)**: 2.5 GbE (USB 3.0) +- **RTL8153 / RTL8153B**: 10/100/1000 MbE (USB 3.0) +- **RTL8154 / RTL8154B**: 10/100/1000 MbE (USB 2.0) +- **RTL8152B**: 10/100M (USB2.0) + +## 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-r8152-dkms*.deb +``` + +> If multiple files selected by the wild card, you should type the specific version of the file. +> +> ```bash +> sudo dpkg -i realtek-r8152-dkms_2.15.0-1_amd64.deb +> ``` + +If dependency error occurs, try to fix that with `apt` command. + +```bash +sudo apt install --fix-broken +``` + +#### Launchpad PPA (Recommended) + +Add the Launchpad PPA. + +```bash +sudo add-apt-repository ppa:awesometic/ppa +``` + +Then install the package using `apt` tool. + +```bash +sudo apt install realtek-r8152-dkms +``` + +### autorun.sh + +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. + +Download or clone this repository and move to the extracted directory, then run the script. + +```bash +sudo ./autorun.sh +``` + +### dkms-install.sh + +This script is from aircrack-ng team. You can install the DKMS module by a simple command. + +Download or clone this repository and move to the extracted directory, then run the script. + +```bash +sudo ./dkms-install.sh +``` + +## Debian package build + +You can build yourself this after installing some dependencies including `dkms`. + +```bash +sudo apt install devscripts debmake debhelper build-essential dkms +``` + +```bash +dpkg-buildpackage -b -rfakeroot -us -uc +``` + +## LICENSE + +GPL-2 on Realtek driver and the debian packaing. + +## References + +- [Realtek r8152 driver release page](https://www.realtek.com/en/component/zoo/category/network-interface-controllers-10-100-1000m-gigabit-ethernet-usb-3-0-software) diff --git a/REALTEK_README.txt b/REALTEK_README.txt new file mode 100755 index 0000000..dd91246 --- /dev/null +++ b/REALTEK_README.txt @@ -0,0 +1,41 @@ +- If you want to support S5 WOL, you have to find + + EXTRA_CFLAGS += -DRTL8152_S5_WOL + + in the Makefile. Then, remove the first character '#", if it exists. + + +- For Fedora, you may have to run the following command after installing the + driver. + + # dracut -f + +- For Ubuntu, you may have to run the following command after installing the + driver. + + # sudo depmod -a + # sudo update-initramfs -u + +- Example of setting speed + + 2.5G before kernel v4.10 + # ethtool -s eth0 autoneg on advertise 0x802f + + 2.5G for kernel v4.10 and later + # ethtool -s eth0 autoneg on advertise 0x80000000002f + + # ethtool -s eth0 autoneg on advertise 0x002f (1G) + # ethtool -s eth0 autoneg on advertise 0x000f (100M full) + # ethtool -s eth0 autoneg on advertise 0x0003 (10M full) + +- Disable center tap short + + # make CONFIG_CTAP_SHORT=OFF modules + +- Ring parameter + + Show Ring parameter + # ethtool -g eth0 + + Changes the number of ring entries for the Rx ring. + # ethtool -G eth0 rx 100