我正在尝试使用 r8125 PCIe 卡将我的家庭网络升级到 2.5 Gbps 以太网(库迪)。经过大量的故障排除和研究,我无法让该卡在这台机器上运行。尽管卡被识别(enp6s0
),但它没有传输任何数据(没有互联网或 LAN 连接)。
安全启动已关闭:
$ mokutil --sb-state
EFI variables are not supported on this system
系统信息:
$ inxi -F
System: Host: zephyr Kernel: 5.9.0-050900-generic x86_64 bits: 64 Desktop: LXQt 0.14.1
Distro: Ubuntu 20.04.2 LTS (Focal Fossa)
Machine: Type: Desktop Mobo: Gigabyte model: B550M DS3H v: x.x serial:
BIOS: American Megatrends v: F10 date: 09/18/2020
CPU: Topology: 8-Core model: AMD Ryzen 7 3700X bits: 64 type: MT MCP L2 cache: 4096 KiB
Speed: 2196 MHz min/max: 2200/3600 MHz Core speeds (MHz): 1: 2195 2: 2195 3: 2189 4: 2191 5: 2196 6: 2196 7: 2189 8: 2195 9: 2196 10: 2193 11: 2197 12: 2196 13: 2194 14: 2192 15: 2195 16: 2190
Graphics: Device-1: Advanced Micro Devices [AMD/ATI] Park [Mobility Radeon HD 5430] driver: radeon v: kernel
Display: x11 server: X.Org 1.20.9 driver: radeon FAILED: ati unloaded: fbdev,modesetting,vesa
resolution: 1920x1080~60Hz
OpenGL: renderer: AMD CEDAR (DRM 2.50.0 / 5.9.0-050900-generic LLVM 11.0.0) v: 3.3 Mesa 20.2.6
Audio: Device-1: Advanced Micro Devices [AMD/ATI] Cedar HDMI Audio [Radeon HD 5400/6300/7300 Series] driver: snd_hda_intel
Device-2: Advanced Micro Devices [AMD] Starship/Matisse HD Audio driver: snd_hda_intel
Sound Server: ALSA v: k5.9.0-050900-generic
Network: Device-1: Realtek RTL8125 2.5GbE driver: r8169
IF: enp6s0 state: up speed: 1000 Mbps duplex: full mac: b4:4b:d6:27:23:06
Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169
IF: enp9s0 state: down mac: 18:c0:4d:6e:99:ff**
Drives:
Local Storage: total: 14.67 TiB used: 156.59 GiB (1.0%)
ID-1: /dev/nvme0n1 vendor: Transcend model: TS128GMTE110S size: 119.24 GiB
ID-2: /dev/sda vendor: Western Digital model: WD40EZRZ-22GXCB0 size: 3.64 TiB
ID-3: /dev/sdb vendor: Western Digital model: WD40EZRZ-19GXCB0 size: 3.64 TiB
ID-4: /dev/sdg vendor: Western Digital model:
WD40EZRZ-22GXCB0 size: 3.64 TiB
ID-5: /dev/sdh vendor: Western Digital model: WD40EZRZ-22GXCB0 size: 3.64 TiB
RAID:
Device-1: md0 type: mdraid status: active raid: raid-10 report: 4/4 UUUU Components: online: sdb~c1 sdg~c2 sda~c0 sdh~c3
Partition: ID-1: / size: 116.87 GiB used: 30.55 GiB (26.1%) fs: ext4 dev: /dev/nvme0n1p2
Sensors: System Temperatures: cpu: 76.9 C mobo: N/A gpu: radeon temp: 16 C
Fan Speeds (RPM): N/A
Info: Processes: 417 Uptime: 28m Memory: 15.62 GiB used: 2.56 GiB (16.4%) Shell: bash inxi: 3.0.38
$ lspci | grep Realtek
06:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller
09:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 16)
$ lsmod | grep r8125
r8125 159744 0
$ lsmod | grep r8169
r8169 94208 0
$ ethtool enp6s0
Settings for enp6s0:
Supported ports: [ TP MII ]
Supported link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
2500baseT/Full
Supported pause frame use: Symmetric Receive-only
Supports auto-negotiation: Yes
Supported FEC modes: Not reported
Advertised link modes: 10baseT/Half 10baseT/Full
100baseT/Half 100baseT/Full
1000baseT/Full
2500baseT/Full
Advertised pause frame use: Symmetric Receive-only
Advertised auto-negotiation: Yes
Advertised FEC modes: Not reported
Speed: Unknown!
Duplex: Unknown! (255)
Port: MII
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Cannot get wake-on-lan settings: Operation not permitted
Link detected: no
[编辑]
$ cd r8125
$ sudo ./autorun.sh
[sudo] password for kevin:
Check old driver and unload it.
rmmod r8125
Build the module and install
At main.c:160:
- SSL error:02001002:system library:fopen:No such file or directory: ../crypto/bio/bss_file.c:69
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: ../crypto/bio/bss_file.c:76
sign-file: certs/signing_key.pem: No such file or directory
Warning: modules_install: missing 'System.map' file. Skipping depmod.
DEPMOD 5.9.0-050900-generic
load module r8125
Updating initramfs. Please wait.
update-initramfs: Generating /boot/initrd.img-5.9.0-050900-generic
Completed.
我尝试过的步骤:
- 从 Realtek 网站安装 r8125 驱动程序(v. 9.005.01)
- 执行 dkms install 详细说明这里
- 在 UEFI 中禁用板载 LAN 端口(设备 2:Realtek RTL8111/8168/8411 PCI Express 千兆以太网驱动程序:r8169)
- 卸载 r8169 驱动程序
sudo modprobe -r r8169
- 激活卡
sudo ifconfig enp6s0 up
- 已加载 Linux 内核 5.9,具有原生 r8125 支持
- 在 /etc/modprobe.d/blacklist.conf 中将 r8169 列入黑名单 [编辑]
- 与已知可在另一个系统中工作的相同型号 NIC 交换 [编辑]
- 将 NIC 移至不同的 PCIe 插槽 [编辑]
其他观察:
我有另一台装有 Gigabyte B450M-D3SH 的系统,安装了相同的 Cudy 卡,数据传输成功。我还没有更换这张卡来测试是否有缺陷。
奇怪的是,板载 LAN 似乎被识别为 PCIe 设备:
Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet driver: r8169
。这可能与问题的根源有关吗?
我不知道这个问题的原因。如能得到任何帮助我将不胜感激。
答案1
解决方案:
为了安全起见,请将 的副本另存
/etc/netplan/00-installer-config.yaml
为/etc/netplan/00-installer-config.yaml-old
。这样您就可以在需要时恢复。修改
/etc/netplan/00-installer-config.yaml
如下:network: ethernets: enp9s0: dhcp4: true enp4s0: addresses: [192.168.1.XX/24] gateway4: 192.168.1.1 nameservers: addresses: [Y.Y.Y.Y, Z.Z.Z.Z] version: 2
其中 X = 所需的 LAN IP,Y 和 Z = 选择的 DNS 名称服务器,并使用您的适配器名称(例如
enp4s0
)。请注意,.yaml 文件对缩进很敏感。保存存档
sudo netplan apply
我手动添加了从enp4s0
到addresses
。虽然上述步骤使 NIC 恢复了运行,但正确的驱动程序在启动时仍未加载。由于这是一个不同的问题,如果无法解决,我将以新主题的形式发布。
https://www.linuxtechi.com/assign-static-ip-address-ubuntu-20-04-lts/