One-shot network driver fix for Phytium D2000 / FT-2000 ARM64 machines running
Ubuntu 24.04 (arm64). A self-extracting .run installer that adapts both NICs
with a single command — install / uninstall / status.
| Hardware | Problem | Solution |
|---|---|---|
Onboard dual gigabit NICs (SoC DesignWare GMAC, ACPI PHYT0004 / FTGM0001) |
Stock Ubuntu stmmac driver only matches Device Tree, not ACPI → NICs don't exist |
Patched dwmac-generic module (ACPI match table + platform params), also fixes the cable-plug-in system hang |
WiFi (Realtek RTL8822CE, PCIe 10ec:c82f) |
In-kernel rtw88 driver misbehaves on Phytium → no WiFi found |
Realtek vendor closed-source driver rtl88x2ce (same approach as Kylin OS) |
phytium-d2000-netfix/
├── README.md ← this file (English)
├── README.zh-CN.md ← 中文文档
├── phytium-d2000-netfix.run ← use this one (self-extracting installer)
├── build/
│ ├── installer.sh ← installer source (self-extracting script head)
│ └── build-phytium-netfix-run.sh ← rebuild script for the .run package
└── payload/
├── dwmac/ ← onboard-NIC patch source (dwmac-generic.c + headers)
└── rtl88x2ce/ ← WiFi vendor driver source (closed-source, from dkms package)
- root privileges (required for installation)
- Kernel headers:
apt install linux-headers-$(uname -r) - Build toolchain:
apt install build-essential(provides make / gcc) - WiFi firmware:
/lib/firmware/rtw88/rtw8822c_fw.bin(shipped with Ubuntu 24.04, no manual step)
The installer compiles kernel modules on the target machine (no prebuilt binaries), so headers must match the running kernel. Re-run the installer after every kernel upgrade (see Notes).
bash,tar,gzip(stock on Ubuntu)- Nothing else special
chmod +x phytium-d2000-netfix.run
sudo ./phytium-d2000-netfix.run --install # install (default action)
sudo ./phytium-d2000-netfix.run --status # show current state
sudo ./phytium-d2000-netfix.run --uninstall # uninstall, restore stock state
./phytium-d2000-netfix.run --help # helpReboot after install — the onboard-NIC module is loaded from the initramfs at boot.
-
Install Ubuntu 24.04 Server (arm64)
-
Get temporary connectivity (USB ethernet adapter or anything), then:
sudo apt update sudo apt install -y build-essential linux-headers-$(uname -r) -
Copy
phytium-d2000-netfix.runto the machine and run:sudo ./phytium-d2000-netfix.run --install
-
Reboot:
sudo reboot -
Onboard NIC: works automatically, DHCP (
enaphyt4i0/enaphyt4i1) -
WiFi: the installer only ships the driver — it does NOT contain your WiFi password. Edit a netplan file:
# /etc/netplan/99-wifi.yaml network: version: 2 wifis: wlp4s0: dhcp4: true access-points: YourSSID: password: "YourPassword"
sudo netplan apply
-
Verify:
ip -br addr— both the onboard NIC andwlp4s0should have IPs
- initramfs trap: the installer always runs
update-initramfs -u. Do NOT skip it — Ubuntu bundles net drivers into the initramfs, and at boot the kernel loads modules from the initrd. Without refreshing it, your replaced module is silently ignored after reboot (classic "the fix doesn't work" rabbit hole). - Re-run after every kernel upgrade:
apt upgradeoverwrites the patched module with the stock one, and the new kernel needs freshly compiled modules. Just runsudo ./phytium-d2000-netfix.run --installagain (idempotent). - Do NOT hand-edit
/etc/modprobe.d/rtw88_blacklist.conf: the installer manages it. Core principle: blacklist only the in-kernelrtw88, NEVER the vendorrtl88x2ce. (Historically, a leftover blacklist entry onrtl88x2cewas the root cause of "WiFi not found".) - Random MAC on the onboard NIC: the ACPI tables carry no MAC address, so it changes every boot and DHCP re-assigns an IP. Expected behavior.
- PHY addresses are pinned: both onboard ports share one pair of RTL8211F PHYs (GMAC0 → addr 0, GMAC1 → addr 7). Don't switch to auto-scan, or both ports will fight over the same PHY.
--uninstallrestores the stockdwmac-genericmodule (from the backup taken at first install), removes the vendor driver and the blacklist, and refreshes the initramfs. Reboot to fully revert.- First-install backup lives at
/lib/modules/<kver>/kernel/drivers/net/ethernet/stmicro/stmmac/dwmac-generic.ko.zst.bak.
- Target: Phytium D2000 / FT-2000 (arm64), Ubuntu 24.04, kernel 6.8 line (verified on 6.8.0-100).
- Other kernels/distros untested; run
--statuson the target first. - The installer logs to the terminal; compile failures print the error tail (most common cause: kernel headers missing).
After install:
sudo ./phytium-d2000-netfix.run --statusExpected:
dwmac-generic.ko(bare, NOT.ko.zst) present in the stmmac dir → patchedrtl88x2ce.kopresent in/lib/modules/<kver>/updates/- initramfs dwmac copy is a bare
.ko(patched), not.ko.zst(stock) lsmodshows bothdwmac_genericandrtl88x2celoaded
SHA256 (phytium-d2000-netfix.run) = 0020f52d8e3472cde2baa957e037fa76002e099d1365c433b9d9e04e75260322
| Component | License |
|---|---|
payload/dwmac (patch source) |
GPL-2.0 (derived from Ubuntu kernel source) |
payload/rtl88x2ce (vendor driver) |
Realtek closed-source, © Realtek Corp. — for personal backup / internal use only; public redistribution must follow Realtek's license terms |
build/installer.sh, build/build-phytium-netfix-run.sh |
MIT |
If you plan to make this repo public, confirm that redistributing the rtl88x2ce source complies with Realtek's license; a private repo avoids this concern entirely for personal backup use.