Deepin15.11无线网卡驱动由r8169更新为r8168
Tofloor
poster avatar
ethan16
deepin
2019-08-12 02:07
Author
【背景】
自己的PC只安装了Deepin,有2个问题很烦,其他用起来都挺便利的,代码也写得多了一些。这2个很烦的问题,今天都解决了,一起来记录一下。

【问题】
问题一:Chrome浏览器播放视频画面卡顿。
这个问题解决比较顺利,搜了一下,根据帖子 https://blog.csdn.net/DiDongDongDi/article/details/88976719  的指导一下子就解决了。
关键点是从 chrome://flags/ 中通过关键字 hardware 搜出 WebRTC H.264 software video encoder/decoder 配置,然后Disable,重启Chrome就解决了。


问题二:用Chrome访问网页,经常性丢包导致网页访问失败。压轴的在后头~~
解决:
1、最初是查看了论坛帖子  https://bbs.deepin.org/post/153154  了解了大致的思路,可是帖子路径中的驱动没有我本地使用的 r8168 ,无奈只得止步。
说明:可能是因为某些敏感的原因,瑞昱公司的官网访问非常困难,且一直无法下载官网的驱动。只得放弃了

2、徘徊了一阵,后来搜索帖子,发现有人将r8168的源码放到github上了,很幸运,我也从github上搜索到了,赶紧clone下来。自己也fork了一份备份。
https://github.com/mtorromeo/r8168.git

3、刚开始拿到该源码直接去 执行,报错很多。
$ sudo ./autorun.sh

4、铺垫了这么多,其实就是诉诉苦,同时表达下解决问题后的喜悦。^_^ 今天彻底解决了这个问题,现在再也不会丢包了。操作过程如下(前提是本地已经clone了前述的源码):
参考了帖子,最终解决了问题。https://blog.csdn.net/u011727617/article/details/48735859
①查看本地的网卡驱动。网卡类型与Deepin加载的驱动不匹配。
$ lspci -v
......
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 09)
        Subsystem: Lenovo RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
        Flags: bus master, fast devsel, latency 0, IRQ 16
        I/O ports at e000 [size=256]
        Memory at d0004000 (64-bit, prefetchable) [size=4K]
        Memory at d0000000 (64-bit, prefetchable) [size=16K]
        Capabilities:
        Kernel driver in use: r8169
        Kernel modules: r8169


②查找驱动的路径,重命名驱动文件
$ modinfo r8169
filename:       /lib/modules/4.15.0-29deepin-generic/kernel/drivers/net/ethernet/realtek/r8169.ko

$ cd /lib/modules/4.15.0-29deepin-generic/kernel/drivers/net/ethernet/realtek/
$ sudo mv r8169.ko r8169.ko.bak

③删除驱动
$ lsmod |grep r8169
r8169                  86016  0
mii                    16384  1 r8169

$ sudo rmmod r8169
再查看一次,已经没有 r8169 驱动了。
$ lsmod |grep r8169

④安装新驱动,重启生效。先进入已clone代码的路径,然后直接执行 autorun.sh 就行了。很简便啦
$ sudo ./autorun.sh
Check old driver and unload it.
Build the module and install
symbolmap: 00000001: invalid section
At main.c:160:
- SSL error:02001002:system library:fopen:No such file or directory: ../crypto/bio/bss_file.c:74
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: ../crypto/bio/bss_file.c:81
sign-file: certs/signing_key.pem: No such file or directory
DEPMOD 4.15.0-29deepin-generic
load module r8168
Updating initramfs. Please wait.
update-initramfs: Generating /boot/initrd.img-4.15.0-29deepin-generic
WARNING: Setting CRYPTSETUP in /etc/initramfs-tools/initramfs.conf is deprecated and will stop working in the future. Use /etc/cryptsetup-initramfs/conf-hook instead.
setupcon is missing. Please install the 'console-setup' package.
W: plymouth: The plugin label.so is missing, the selected theme might not work as expected.
W: plymouth: You might want to install the plymouth-themes package to fix this.
I: The initramfs will attempt to resume from /dev/sda8
I: (UUID=4d8bacc9-f171-41b3-b300-f9d6c4d8b373)
I: Set the RESUME variable to override this.
Completed.


$reboot            #重启生效

⑤重启完成后,再次访问页面,后台持续ping网站,不再有丢包

终于可以愉快地玩耍了 ^_^
Reply Favorite View the author
All Replies
avatar
Feng Yu
deepin
2019-08-12 03:16
#1
https://packages.debian.org/stretch/r8168-dkms
debian不是有r8168的驱动么?而且还是带dkms支持的
Reply View the author
avatar
jianguo922
deepin
2019-08-12 04:31
#2
360安全浏览器也不错
Reply View the author
avatar
ethan16
deepin
2019-08-12 04:44
#3
https://bbs.deepin.org/post/181829
https://packages.debian.org/stretch/r8168-dkms
debian不是有r8168的驱动么?而且还是带dkms支持的 ...

之前没有在这里找,都是baidu搜一把,看了几页的记录都没找到有用的信息。github还靠谱点儿
Reply View the author
avatar
ethan16
deepin
2019-08-12 04:45
#4
https://bbs.deepin.org/post/181829
360安全浏览器也不错

用谷歌习惯了,360也支持Deepin呢?
Reply View the author
avatar
Feng Yu
deepin
2019-08-12 05:44
#5
https://bbs.deepin.org/post/181829
之前没有在这里找,都是baidu搜一把,看了几页的记录都没找到有用的信息。github还靠谱点儿 ...

靠谱的是google,google搜索debian r8168驱动,第一个就是debian官方仓库
Reply View the author
avatar
unable
deepin
2020-05-15 04:31
#6
https://bbs.deepin.org/post/181829
https://packages.debian.org/stretch/r8168-dkms
debian不是有r8168的驱动么?而且还是带dkms支持的 ...

这个应该怎么用呀
Reply View the author
avatar
unable
deepin
2020-05-15 04:40
#7
https://bbs.deepin.org/post/181829
https://packages.debian.org/stretch/r8168-dkms
debian不是有r8168的驱动么?而且还是带dkms支持的 ...

下载了直接安装么/
Reply View the author
avatar
unable
deepin
2020-05-15 05:04
#8
删除r8169后,检查更新,就又自动回来了,什么情况。
Reply View the author
avatar
ethan16
deepin
2020-08-10 02:10
#9
https://bbs.deepin.org/post/181829
删除r8169后,检查更新,就又自动回来了,什么情况。

是不是驱动卸载不彻底,我的没有自动回来的情况。
Reply View the author