From cf72c02ea55f37c5d661bd4083487121b2369eb7 Mon Sep 17 00:00:00 2001 From: Jamoladdin <143245360+jamolweb@users.noreply.github.com> Date: Wed, 4 Feb 2026 14:18:56 +0500 Subject: [PATCH] Fix Realtek RTL8111/8168 ethernet adapter support for ASUS TUF Gaming laptops (#4497) --- install/config/all.sh | 1 + install/config/hardware/fix-realtek-r8168.sh | 11 +++++++++++ install/omarchy-base.packages | 1 + migrations/1770186458.sh | 6 ++++++ 4 files changed, 19 insertions(+) create mode 100644 install/config/hardware/fix-realtek-r8168.sh create mode 100644 migrations/1770186458.sh diff --git a/install/config/all.sh b/install/config/all.sh index f4ea88ba..f586dd9b 100644 --- a/install/config/all.sh +++ b/install/config/all.sh @@ -37,3 +37,4 @@ run_logged $OMARCHY_INSTALL/config/hardware/fix-apple-t2.sh run_logged $OMARCHY_INSTALL/config/hardware/fix-surface-keyboard.sh run_logged $OMARCHY_INSTALL/config/hardware/fix-asus-rog-audio-mixer.sh run_logged $OMARCHY_INSTALL/config/hardware/fix-asus-rog-mic.sh +run_logged $OMARCHY_INSTALL/config/hardware/fix-realtek-r8168.sh \ No newline at end of file diff --git a/install/config/hardware/fix-realtek-r8168.sh b/install/config/hardware/fix-realtek-r8168.sh new file mode 100644 index 00000000..a7ac5919 --- /dev/null +++ b/install/config/hardware/fix-realtek-r8168.sh @@ -0,0 +1,11 @@ +# Install r8168 driver for Realtek RTL8111/8168/8211/8411 ethernet adapters +# Common in ASUS TUF Gaming laptops and other modern systems +if lspci | grep -i "RTL8111\|RTL8168\|RTL8211\|RTL8411"; then + omarchy-pkg-add linux-headers r8168-lts + + # Blacklist problematic r8169 driver + echo "blacklist r8169" | sudo tee /etc/modprobe.d/blacklist-r8169.conf + + # Regenerate initramfs to ensure r8168 loads on boot + sudo mkinitcpio -P +fi \ No newline at end of file diff --git a/install/omarchy-base.packages b/install/omarchy-base.packages index 17eade58..be817a3a 100644 --- a/install/omarchy-base.packages +++ b/install/omarchy-base.packages @@ -147,3 +147,4 @@ xournalpp yaru-icon-theme yay zoxide +r8168-lts \ No newline at end of file diff --git a/migrations/1770186458.sh b/migrations/1770186458.sh new file mode 100644 index 00000000..83629d6e --- /dev/null +++ b/migrations/1770186458.sh @@ -0,0 +1,6 @@ +echo "Fix Realtek RTL8111/8168/8211/8411 ethernet adapter support for ASUS TUF and other laptops" + +# Run the hardware detection script for existing installations +if [ -f "$OMARCHY_INSTALL/config/hardware/fix-realtek-r8168.sh" ]; then + run_logged $OMARCHY_INSTALL/config/hardware/fix-realtek-r8168.sh +fi \ No newline at end of file