![有线连接经常断开](https://linux22.com/image/1002496/%E6%9C%89%E7%BA%BF%E8%BF%9E%E6%8E%A5%E7%BB%8F%E5%B8%B8%E6%96%AD%E5%BC%80.png)
因此,我安装了 ubuntu amd64 16.04。有线连接一直断开。唯一能恢复的方法就是在面板中手动重新连接。但是,一两分钟后,它又断开了。这个问题也发生在 Linux mint cinnamon 18.2 中。但不知何故,在我之前的最小安装 ubuntu 中没有发生这种情况。
如果有帮助的话,我的路由器是华为 HG8245A。
编辑:结果lspci -knn | grep Eth -A3; uname -a
03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller [10ec:8168] (rev 09)
Subsystem: ASUSTeK Computer Inc. P8 series motherboard [1043:8505]
Kernel driver in use: r8169
Kernel modules: r8169
Linux dedi-ubuntu 4.10.0-28-generic #32~16.04.2-Ubuntu SMP Thu Jul 20 10:19:48 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux
编辑:sudo apt install r8168-dkms
第一次的结果,然后我第二次再次运行它。
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following additional packages will be installed:
dkms
The following NEW packages will be installed:
dkms r8168-dkms
0 upgraded, 2 newly installed, 0 to remove and 62 not upgraded.
Need to get 151 kB of archives.
After this operation, 1.374 kB of additional disk space will be used.
Do you want to continue? [Y/n] y\
Get:1 http://id.archive.ubuntu.com/ubuntu xenial-updates/main amd64 dkms all 2.2.0.3-2ubuntu11.3 [66,1 kB]
Get:2 http://id.archive.ubuntu.com/ubuntu xenial/universe amd64 r8168-dkms all 8.041.00-1 [85,0 kB]
Fetched 151 kB in 2s (61,2 kB/s)
Selecting previously unselected package dkms.
(Reading database ... 175107 files and directories currently installed.)
Preparing to unpack .../dkms_2.2.0.3-2ubuntu11.3_all.deb ...
Unpacking dkms (2.2.0.3-2ubuntu11.3) ...
Selecting previously unselected package r8168-dkms.
Preparing to unpack .../r8168-dkms_8.041.00-1_all.deb ...
Unpacking r8168-dkms (8.041.00-1) ...
Processing triggers for man-db (2.7.5-1) ...
Setting up dkms (2.2.0.3-2ubuntu11.3) ...
Setting up r8168-dkms (8.041.00-1) ...
Loading new r8168-8.041.00 DKMS files...
First Installation: checking all kernels...
Building only for 4.10.0-28-generic
Building initial module for 4.10.0-28-generic
Error! Bad return status for module build on kernel: 4.10.0-28-generic (x86_64)
Consult /var/lib/dkms/r8168/8.041.00/build/make.log for more information.
编辑:第二次
Reading package lists... Done
Building dependency tree
Reading state information... Done
r8168-dkms is already the newest version (8.041.00-1).
0 upgraded, 0 newly installed, 0 to remove and 62 not upgraded.
编辑:make.log 是否有帮助
DKMS make.log for r8168-8.041.00 for kernel 4.10.0-28-generic (x86_64)
Min Agu 27 03:14:41 WIB 2017
make: Entering directory '/usr/src/linux-headers-4.10.0-28-generic'
LD /var/lib/dkms/r8168/8.041.00/build/built-in.o
CC [M] /var/lib/dkms/r8168/8.041.00/build/r8168_n.o
/var/lib/dkms/r8168/8.041.00/build/r8168_n.c: In function ‘rtl8168_fix_features’:
/var/lib/dkms/r8168/8.041.00/build/r8168_n.c:4212:30: error: ‘NETIF_F_ALL_CSUM’ undeclared (first use in this function)
features &= ~NETIF_F_ALL_CSUM;
^
/var/lib/dkms/r8168/8.041.00/build/r8168_n.c:4212:30: note: each undeclared identifier is reported only once for each function it appears in
/var/lib/dkms/r8168/8.041.00/build/r8168_n.c: In function ‘rtl8168_start_xmit’:
/var/lib/dkms/r8168/8.041.00/build/r8168_n.c:24599:12: error: ‘struct net_device’ has no member named ‘trans_start’
dev->trans_start = jiffies;
^
scripts/Makefile.build:294: recipe for target '/var/lib/dkms/r8168/8.041.00/build/r8168_n.o' failed
make[1]: *** [/var/lib/dkms/r8168/8.041.00/build/r8168_n.o] Error 1
Makefile:1524: recipe for target '_module_/var/lib/dkms/r8168/8.041.00/build' failed
make: *** [_module_/var/lib/dkms/r8168/8.041.00/build] Error 2
make: Leaving directory '/usr/src/linux-headers-4.10.0-28-generic'
编辑:sudo dpkg -i r8168-dkms_8.043.02-1_all.deb
(Reading database ... 175175 files and directories currently installed.)
Preparing to unpack r8168-dkms_8.043.02-1_all.deb ...
------------------------------
Deleting module version: 8.041.00
completely from the DKMS tree.
------------------------------
Done.
Unpacking r8168-dkms (8.043.02-1) over (8.041.00-1) ...
Setting up r8168-dkms (8.043.02-1) ...
Loading new r8168-8.043.02 DKMS files...
Building only for 4.10.0-28-generic
Building initial module for 4.10.0-28-generic
Done.
r8168:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/4.10.0-28-generic/updates/dkms/
depmod......
Backing up initrd.img-4.10.0-28-generic to /boot/initrd.img-4.10.0-28-generic.old-dkms
Making new initrd.img-4.10.0-28-generic
(If next boot fails, revert to initrd.img-4.10.0-28-generic.old-dkms image)
update-initramfs....
DKMS: install completed.
Processing triggers for initramfs-tools (0.122ubuntu8.8) ...
update-initramfs: Generating /boot/initrd.img-4.10.0-28-generic
W: Possible missing firmware /lib/firmware/i915/kbl_dmc_ver1_01.bin for module i915
答案1
您可以安装供应商驱动程序。由于存储库中没有针对 4.10 内核进行更新xenial
,因此您可以从 进行安装zesty
。
跑步
wget http://mirrors.kernel.org/ubuntu/pool/universe/r/r8168/r8168-dkms_8.043.02-1_all.deb
sudo dpkg -i r8168-dkms_8.043.02-1_all.deb