devome / blog

个人网站的源码
https://evine.win
0 stars 0 forks source link

PVE 8 安装 ReakTEK RTL8125B 2.5G网卡驱动 #78

Open devome opened 1 year ago

devome commented 1 year ago

https://evine.win/p/pve-install-realtek-8125-driver/

前言 近期在PVE中发现,只要连接数一多,PVE会有两个单核的使用率明显比其他核超过一大截。经过查询资料发现,这是因为我的 RealTEK RTL8125 2.5GB 网卡默认加载的

tanquan commented 1 year ago

您好, 请问 「禁用ASPM」是否需要在 realtek-r8125-dkms/src/Makefile 文件中,修改为 CONFIG_ASPM = n

devome commented 1 year ago

@tanquan 您好, 请问 「禁用ASPM」是否需要在 realtek-r8125-dkms/src/Makefile 文件中,修改为 CONFIG_ASPM = n

无需,有patch。安装deb不需要修改内容。

tanquan commented 1 year ago

@devome

@tanquan 您好, 请问 「禁用ASPM」是否需要在 realtek-r8125-dkms/src/Makefile 文件中,修改为 CONFIG_ASPM = n

无需,有patch。安装deb不需要修改内容。

谢谢!

Lovest20018 commented 12 months ago

感谢发布。想问下新的Releases 有必要更新吗? 更新需要如何操作呢?

devome commented 12 months ago

@Lovest20018 感谢发布。想问下新的Releases 有必要更新吗? 更新需要如何操作呢?

驱动本身没有改,能用就无需更新。

bigbot123 commented 11 months ago

你好,安装前是1个核心有负载,安装完之后只有最后的4个核心有负载,请问这算正常现象吗?CPU是AMD 7840HS的

devome commented 11 months ago

@bigbot123 你好,安装前是1个核心有负载,安装完之后只有最后的4个核心有负载,请问这算正常现象吗?CPU是AMD 7840HS的

正常吧。

bigbot123 commented 11 months ago

@devome

@bigbot123 你好,安装前是1个核心有负载,安装完之后只有最后的4个核心有负载,请问这算正常现象吗?CPU是AMD 7840HS的

正常吧。

好的,感谢大佬

Melody-Test commented 10 months ago

root@pve:~# headers=$(dpkg -l | awk '/^ii.+kernel-[0-9]+.[0-9]+.[0-9]/{gsub(/-signed/, ""); gsub(/kernel/, "headers"); print $2}' | tr "\n" " ") root@pve:~# eval apt install -y $headers Reading package lists... Done Building dependency tree... Done Reading state information... Done proxmox-headers-6.5.11-7-pve is already the newest version (6.5.11-7). proxmox-headers-6.5.11-7-pve set to manually installed. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. root@pve:~# dpkg -i realtek-r8125-dkms_9.012.04-1_all.deb Selecting previously unselected package realtek-r8125-dkms. (Reading database ... 78750 files and directories currently installed.) Preparing to unpack realtek-r8125-dkms_9.012.04-1_all.deb ... Unpacking realtek-r8125-dkms (9.012.04-1) ... Setting up realtek-r8125-dkms (9.012.04-1) ... WARNING: /usr/lib/dkms/common.postinst does not exist. WARNING: /usr/share/realtek-r8125-dkms/postinst does not exist. ERROR: DKMS version is too old and realtek-r8125-dkms was not built with legacy DKMS support. You must either rebuild realtek-r8125-dkms with legacy postinst support or upgrade DKMS to a more current version. dpkg: error processing package realtek-r8125-dkms (--install): installed realtek-r8125-dkms package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: realtek-r8125-dkms

到这就不会操作了........

devome commented 10 months ago

@Melody-Tes 你没有安装dkms,你是不是漏掉了一步。

Melody-Test commented 10 months ago

@Melody-Tes 你没有安装dkms,你是不是漏掉了一步。

安装了 没有前面的步骤都按教程来的 然后就报上面的错了 我还装过12代核显直通的dkms 不知道有没有影响

devome commented 10 months ago

@Melody-Test 可是如果你apt install dkms了的话,就会存在 /usr/lib/dkms/common.postinst 这个文件,怎么会报错说它不存在呢?/usr/lib/dkms/common.postinst does not exist.

devome commented 10 months ago

@Lovest20018 你这是zfs-dkms的问题,好像和我这没关系。

MilesTEG1 commented 7 months ago

Hello, I'm trying to get the driver working, but I get an error when I hit the insmod command:

insmod: ERROR: could not insert module /lib/modules/6.5.13-3-pve/updates/dkms/r8125.ko: Key was rejected by service".

And I don't have anymore a driver loaded, I've got the installed, but not loaded. So I can't use my proxmox install. Can someone help me ?

devome commented 7 months ago

@MilesTEG1 Perhaps you need to disable secure boot in uefi.

MilesTEG1 commented 7 months ago

@devome @MilesTEG1 Perhaps you need to disable secure boot in uefi.

I can give a try. But I was hoping I can keep secureboot...

devome commented 7 months ago

@MilesTEG1 If you want to keep secure boot, you can see: https://github.com/linux-surface/linux-surface/issues/906

a961335435 commented 6 months ago

7请问大佬,这个需要怎么启用 TX 多队列,启用 RSS,禁用 ASPM,如果都弄好了可以做成esxi6.7可用的.vib文件吗?

devome commented 6 months ago

@a961335435 已经启用好了,不用再改。

a961335435 commented 6 months ago

@devome @a961335435 已经启用好了,不用再改。

可以出一个esxi用的吗,大佬,太难了

a961335435 commented 6 months ago

大佬你上传的r8125-9.013.02.tar.bz2是已经修改好的吗?是的话我尝试跟着github分享的编译esxi驱动教程试一试

devome commented 6 months ago

@a961335435 r8125-9.013.02.tar.bz2是官方原版。

a961335435 commented 6 months ago

@devome @a961335435 r8125-9.013.02.tar.bz2是官方原版。 大佬原版怎么启用 TX 多队列,启用 RSS,禁用 ASPM

devome commented 6 months ago

@a961335435 见 https://github.com/devome/realtek-r8125-dkms/blob/master/PKGBUILD#L24-L27

a961335435 commented 6 months ago

@devome @a961335435 见 https://github.com/devome/realtek-r8125-dkms/blob/master/PKGBUILD#L24-L27

卧槽,看不懂,根本看不懂😫

devome commented 6 months ago

@a961335435 很简单,就是把Makefile中CONFIG_ASPM改成n,把ENABLE_MULTIPLE_TX_QUEUE和ENABLE_RSS_SUPPORT改成y。

a961335435 commented 6 months ago

@devome @a961335435 很简单,就是把Makefile中CONFIG_ASPM改成n,把ENABLE_MULTIPLE_TX_QUEUE和ENABLE_RSS_SUPPORT改成y。 感谢大佬🙏

wangzhu83 commented 6 months ago

大佬你好,最近把PVE核心从6.5升级6.8后,PVE卡开机,要手动降级核心才能启动。 和安装过realtek-r8125-dkms驱动有关系吗?,是不是每次升级前要手动更新或重装一下realtek-r8125-dkms驱动?

devome commented 6 months ago

@wangzhu83 r8125驱动不影响开机,即使没有这个驱动也不会影响开机。不过,你可以运行dkms status来检测一下每个内核是不是都安装好了r8125驱动。

wangzhu83 commented 6 months ago

@devome @wangzhu83 r8125驱动不影响开机,即使没有这个驱动也不会影响开机。不过,你可以运行dkms status来检测一下每个内核是不是都安装好了r8125驱动。

问题总算是解决了。 1.按大佬的提示运行dkms status,显示只有6.5.13-5-pve 内核(及更低)的驱动,最新的内核是6.8.4-3-pve. 2.查看日志升级PVE 8.2.2是有报错的,如下。昨晚升级时没看就直接重启了。。。 'make' -j12 KVER=6.8.4-3-pve BSRC=/lib/modules/6.8.4-3-pve modules.....(bad exit status: 2) Error! Bad return status for module build on kernel: 6.8.4-3-pve (x86_64) Consult /var/lib/dkms/realtek-r8125/9.012.04/build/make.log for more information. Error! One or more modules failed to install during autoinstall. Refer to previous errors for more information. dkms: autoinstall for kernel: 6.8.4-3-pve failed! 3.安装最新的9.013.02-1再apt-get upgrade,此时再无上述内核报错 4.重启后正常。个人推测是9.012.04不支持6.8.4-3-pve内核。 能不能搞个自动升级驱动脚本,以上纯属个人猜测,请大佬指正

devome commented 6 months ago

@wangzhu83 有人出个服务器我倒是可以建个debian仓库,那么更新就非常容易了。

dgsx61 commented 4 months ago

请问下,我的主板一个千兆,一个8125,但是默认驱动都是8169,我禁用8169的话千兆口就启动不了,不禁用的话8125会用8169驱动。该怎么办呢?

devome commented 4 months ago

@dgsx61 见https://www.right.com.cn/forum/forum.php?mod=viewthread&tid=8306124

goukey commented 4 months ago

@devome 我看见9.013.02-2更新了.请问更新它的话,只需要dpkg -i新的deb就行?还是说需要重新执行一遍上述步骤?

devome commented 4 months ago

@goukey 确保当前运行内核的headers文件已安装,直接dpkg -i xxxx就行。另外其实这只是为内核6.9和6.10修复bug,并没有本质的更新,不是这两个内核不更新也行。

goukey commented 4 months ago

@goukey 确保当前运行内核的headers文件已安装,直接dpkg -i xxxx就行。另外其实这只是为内核6.9和6.10修复bug,并没有本质的更新,不是这两个内核不更新也行。

谢啦,已经安装,不过没重启,应该没啥影响吧