Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save viztastic/f6a9055df3744354ad7c31b67daaf756 to your computer and use it in GitHub Desktop.

Select an option

Save viztastic/f6a9055df3744354ad7c31b67daaf756 to your computer and use it in GitHub Desktop.
GMTek rtl8125 Debian 13 fix.md

Fix: RTL8125 2.5GbE Ethernet not detected on GMKtec Mini PC (Debian 13 "Trixie")

Summary

I went through enormous pain to figure this out, thought to share with anyone who could one day fin this useful.

Debian 13's default kernel driver (r8169) fails to recognize certain RTL8125 chip revisions found in GMKtec mini PCs. Ethernet interface never appears in ip link show, even though the hardware is present and functional. Fix: compile and install Realtek's out-of-tree r8125 driver via DKMS.

Symptoms

  • ip link show lists only lo and wlp1s0 (wifi). No enp* or eno* interface.
  • lspci | grep -i ethernet confirms hardware is present:
    02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 0c)
    
  • dmesg | grep -i r8169 shows:
    r8169 0000:02:00.0: error -ENODEV: unknown chip XID 689, contact r8169 maintainers (see MAINTAINERS file)
    
  • firmware-realtek package is already installed and up to date. Does not resolve the issue, since this is a driver gap, not a firmware gap.

Root Cause

The in-kernel r8169 driver does not have a matching profile for this chip revision (XID 689). Realtek maintains a separate out-of-tree driver, r8125, that supports newer RTL8125 silicon ahead of mainline kernel support.

Fix

1. Install build dependencies

apt install linux-headers-$(uname -r) build-essential dkms git

2. Clone the r8125 DKMS driver

cd /usr/src
git clone https://github.com/awesometic/realtek-r8125-dkms.git

3. Register with DKMS

cd realtek-r8125-dkms
dkms add .

Note the version DKMS assigns from the confirmation message, for example:

Creating symlink /var/lib/dkms/realtek-r8125/9.016.01/source -> /usr/src/realtek-r8125-dkms

4. Fix the folder naming mismatch

DKMS expects the source folder to be named /usr/src/<package>-<version> (e.g. /usr/src/r8125-9.016.01), matching dkms.conf. The cloned repo folder is named realtek-r8125-dkms instead, which causes dkms build to fail with:

Error! Could not find module source directory.
Directory: /usr/src/r8125-9.016.01 does not exist.

Fix with a symlink:

ln -s /usr/src/realtek-r8125-dkms /usr/src/r8125-9.016.01

Substitute the version number DKMS reported in step 3.

5. Build and install

dkms build r8125/9.016.01
dkms install r8125/9.016.01

6. Load and verify

modprobe r8125
lsmod | grep r8125
ip link show

Expected result: an eno* or enp* interface appears with state UP.

Secure Boot note

DKMS generates a self-signed MOK (Machine Owner Key) certificate during install to sign the module. If Secure Boot is enabled, you may see a MOK enrollment prompt on next reboot. Enroll it (set a temporary password when prompted) or the module will fail to load on subsequent boots despite working in the current session.

Environment tested

  • Hardware: GMKtec mini PC, RTL8125 2.5GbE onboard NIC
  • OS: Debian 13 (Trixie)
  • Kernel: 6.12.95+deb13-amd64
  • Driver source: awesometic/realtek-r8125-dkms, version 9.016.01
@XxStupendousManxX

XxStupendousManxX commented Aug 2, 2026

Copy link
Copy Markdown

Thank you @viztastic for this great guide. I worked for me with an identical setup. However when I upgraded the kernel to 6.12.96 for some reason my mini PC acted like the "start" of this guide — ethernet not present in ip link, etc. I fumbled around with some steps, including re-running step 1 of your guide, doing some ChatGPT troubleshooting, and eventually ended up with things working. Not sure fully how with the mess of my process. I wanted to ask, now on 6.12.96 when I run "sudo dkms status", I get:

r8125/9.016.01, 6.12.95+deb13-amd64, x86_64: installed
r8125/9.016.01, 6.12.96+deb13-amd64, x86_64: installed
realtek-r8125/9.016.01, 6.12.96+deb13-amd64, x86_64: built

A snippet of the response from "lspci -k":

...
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 0c)
        DeviceName: Onboard LAN Brodcom
        Subsystem: Realterk Semiconductor Co., Ltd. RTL8125 2.5GbE Controller
        Kernel driver in use: r8125
        Kernel modules: r8169, r8125
...

another piece of context, a response from sudo dmesg | grep -Ei 'r8125|r8169|dkms':

r8169 0000:02:00.0 error -ENODEV: unknown chip XID 689, contact r8169 maintainers (see MAINTAINERS file)
r8125: loading out-of-tree module taints kernel
r8125: module verification failed: signature and/or required key missing - tainting kernel
r8125 Ethernet controller driver 9.016.01-NAPI loaded
r8125: This product is covered by one or more of the following patents: US6,570,884, US6,115,776, and US6,327,625.
r8125 Copyright (C) 2025 Realtek NIC software team <nicfae@realtek.com>
r8125 0000:02:00.0 eno1: renamed from eth0

Is this how things should be with the symlink and guide steps in mind?

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment