realtek 8111/8168B网卡在debian下驱动不正常

227 views
Skip to first unread message

Shell Xu

unread,
Apr 27, 2013, 8:38:23 AM4/27/13
to
有线网卡在debian下不能正常联网。具体表现为,接入网线后接通指示灯不亮起。ethtool查看无连接。dmesg显示没有接入。交换机和路由器换过多个,均有此问题。

使用ethtool将模式转换为autoneg no后,联网就正常了。但是模式必须限定为10M,duplex half。其他模式均不能正常工作。

系统是debian testing(wheezy),内核是3.2.41-2,包是linux-image-3.2.0-4-amd64。升级时间是4.6,问题出现事件稍晚一周左右,因此不能完全肯定问题由内核引起,也不能排除此种可能。

由于系统efi引导,更换stable的2.6.32-48内核后无效,无法启动系统。同样因为efi的关系,usbdisk无法获得比硬盘更高的引导优先级,因此目前连usbdisk都无法测试。(当然,也就无法重装)目前正在设法改bios,重启进入liveusb测试。

查阅过相关资料,可能更换realtek的r8168驱动。实际跑了一下r8168-8.032.00和r8168-8.035.00两个版本,均无效。甚至连转换为autoneg no联网都不行了。

系统原装的ubuntu 11.04没有被删除。第一次出现问题后,重启进入原装系统,问题消失。恢复debian后问题也没有出现。过一两天后问题再次出现,进入ubuntu也不能解决问题。

测试过network manager, wicd, ifupdown, ifconfig手工设定,可以肯定与此无关。

设备型号thinkpad e135,网卡lspci如下:

shell@e135:~$ sudo lspci -s 3:0 -vnvn
03:00.0 Ethernet controller [0200]: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller [10ec:8168] (rev 07)
    Subsystem: Lenovo Device [17aa:5105]
    Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
    Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
    Latency: 0, Cache Line Size: 32 bytes
    Interrupt: pin A routed to IRQ 41
    Region 0: I/O ports at 2000 [size=256]
    Region 2: Memory at f0004000 (64-bit, prefetchable) [size=4K]
    Region 4: Memory at f0000000 (64-bit, prefetchable) [size=16K]
    Capabilities: [40] Power Management version 3
        Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=375mA PME(D0+,D1+,D2+,D3hot+,D3cold+)
        Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
    Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Address: 00000000fee0100c  Data: 4159
    Capabilities: [70] Express (v2) Endpoint, MSI 01
        DevCap:    MaxPayload 128 bytes, PhantFunc 0, Latency L0s <512ns, L1 <64us
            ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
        DevCtl:    Report errors: Correctable- Non-Fatal- Fatal- Unsupported-
            RlxdOrd+ ExtTag- PhantFunc- AuxPwr- NoSnoop-
            MaxPayload 128 bytes, MaxReadReq 4096 bytes
        DevSta:    CorrErr- UncorrErr- FatalErr- UnsuppReq- AuxPwr+ TransPend-
        LnkCap:    Port #0, Speed 2.5GT/s, Width x1, ASPM L0s L1, Latency L0 unlimited, L1 <64us
            ClockPM+ Surprise- LLActRep- BwNot-
        LnkCtl:    ASPM Disabled; RCB 64 bytes Disabled- Retrain- CommClk+
            ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
        LnkSta:    Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
        DevCap2: Completion Timeout: Range ABCD, TimeoutDis+
        DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
        LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-, Selectable De-emphasis: -6dB
             Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
             Compliance De-emphasis: -6dB
        LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-, EqualizationPhase1-
             EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
    Capabilities: [b0] MSI-X: Enable- Count=4 Masked-
        Vector table: BAR=4 offset=00000000
        PBA: BAR=4 offset=00000800
    Capabilities: [d0] Vital Product Data
        No end tag found
    Capabilities: [100 v1] Advanced Error Reporting
        UESta:    DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UEMsk:    DLP- SDES- TLP- FCP- CmpltTO- CmpltAbrt- UnxCmplt- RxOF- MalfTLP- ECRC- UnsupReq- ACSViol-
        UESvrt:    DLP+ SDES+ TLP- FCP+ CmpltTO- CmpltAbrt- UnxCmplt- RxOF+ MalfTLP+ ECRC- UnsupReq- ACSViol-
        CESta:    RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
        CEMsk:    RxErr- BadTLP- BadDLLP- Rollover- Timeout- NonFatalErr+
        AERCap:    First Error Pointer: 00, GenCap+ CGenEn- ChkCap+ ChkEn-
    Capabilities: [140 v1] Virtual Channel
        Caps:    LPEVC=0 RefClk=100ns PATEntryBits=1
        Arb:    Fixed- WRR32- WRR64- WRR128-
        Ctrl:    ArbSelect=Fixed
        Status:    InProgress-
        VC0:    Caps:    PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
            Arb:    Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
            Ctrl:    Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
            Status:    NegoPending- InProgress-
    Capabilities: [160 v1] Device Serial Number 8f-00-00-00-68-4c-e0-00
    Kernel driver in use: r8169

dmesg如下。注意这个过程中多次插入网线,没有反应。

shell@e135:~/workspace/r8168$ dmesg | grep eth
[    0.228370] [Firmware Bug]: ACPI: No _BQC method, cannot determine initial brightness
[    0.246838] [Firmware Bug]: ACPI: No _BQC method, cannot determine initial brightness
[    0.983939] r8169 0000:03:00.0: eth0: RTL8168evl/8111evl at 0xffffc9000067e000, 08:9e:01:6b:df:21, XID 0c900800 IRQ 41
[    0.983945] r8169 0000:03:00.0: eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[    4.829457] [Firmware Bug]: ACPI: No _BQC method, cannot determine initial brightness
[   14.353274] r8169 0000:03:00.0: eth0: link down
[   14.355184] ADDRCONF(NETDEV_UP): eth0: link is not ready
[   48.485229] r8169 0000:03:00.0: eth0: link down

我知道这不大应该,不过这封邮件投递到shlug和debian-cn两个maillist。感谢任何对此类问题的解答。

另外。如果问题始终不能解决,我是应该向kernel提交issue呢?还是找厂家换一台呢?

--
无能者无所求,饱食而遨游,泛若不系之舟
blog: http://shell909090.com/blog/
twitter: http://twitter.com/shell909090

SuperCat

unread,
Apr 27, 2013, 10:14:41 AM4/27/13
to sh...@googlegroups.com
Firmware包装过了没? (firmware-realtek)


2013/4/27 Shell Xu <shell...@gmail.com>

--
-- You received this message because you are subscribed to the Google Groups Shanghai Linux User Group group. To post to this group, send email to sh...@googlegroups.com. To unsubscribe from this group, send email to shlug+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN
---
您收到此邮件是因为您订阅了 Google 网上论坛的“Shanghai Linux User Group”论坛。
要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到 shlug+un...@googlegroups.com
要查看更多选项,请访问 https://groups.google.com/groups/opt_out。
 
 

Jianlei Zhang

unread,
Apr 27, 2013, 10:46:00 AM4/27/13
to sh...@googlegroups.com
我有一块8169芯片的pcmcia有线网卡安装在一台ThinkPad T23的笔记本上,系统是Gentoo。

用Kernel自带的8169驱动,可以找到网卡,但是拷贝文件就造成网络卡住无响应。换到官方的驱动解决问题,但是拷贝文件的时候有几率造成系统死机……

Google下8168/8169内核支持的不是很好呢。
--
此致

张建雷 敬上

Shell Xu

unread,
Apr 27, 2013, 11:07:07 AM4/27/13
to shlug
yes,系统上还有一块realtek的无线网卡。如果我不装的话,那块网卡就无法驱动。所以没得选择。
吊诡的是,在另一台公司的电脑上,有同样的硬件。我安装了同样系统和同样内核,除了是32位系统。那台电脑一点事都没有。

Shell Xu

unread,
Apr 27, 2013, 11:08:31 AM4/27/13
to shlug
看起来realtek还真是杀手呢。
broadcom也不是什么好鸟。上一台机器的broadcom差点整死我。开始时用ndiswrapper,CPU爆高。后来终于有了broadcom-sta,结果因为无线网卡坏掉导致机器报废。

Wizard

unread,
Apr 27, 2013, 11:18:34 AM4/27/13
to shlug
恩。。。 不懂了。  

今天我也碰到个网卡的问题,搞不定啊。。。


--
-- You received this message because you are subscribed to the Google Groups Shanghai Linux User Group group. To post to this group, send email to sh...@googlegroups.com. To unsubscribe from this group, send email to shlug+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN
---
您收到此邮件是因为您订阅了 Google 网上论坛的“Shanghai Linux User Group”论坛。
要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到 shlug+un...@googlegroups.com
要查看更多选项,请访问 https://groups.google.com/groups/opt_out。
 
 



--
Wizard

SuperCat

unread,
Apr 27, 2013, 11:21:35 AM4/27/13
to sh...@googlegroups.com
乃可以试试把Ubuntu的相关Firmware文件弄出来放Debian的对应目录下试试看


2013/4/27 Wizard <wizard...@gmail.com>

杨毅涛

unread,
Apr 27, 2013, 12:20:44 PM4/27/13
to sh...@googlegroups.com
是不是可以考虑,下载驱动源码,然后重新编译调试。貌似这类大厂产品,可以找到源码,或者开源的源码的。
听说过去有人为了自己的机器可以用linux,自己写驱动。

Shell Xu

unread,
Apr 27, 2013, 12:58:46 PM4/27/13
to shlug
ubuntu自己的都不正常。。。


在 2013年4月27日下午11:21,SuperCat <superca...@gmail.com>写道:

Shell Xu

unread,
Apr 27, 2013, 12:59:23 PM4/27/13
to shlug
我已经下了,realtek官方的开源源码叫做r8168。就是会搞的彻底不能上网的那个。

Druggo

unread,
Apr 27, 2013, 11:01:31 PM4/27/13
to sh...@googlegroups.com
多装个windows看看,如果还不行,说明卡有问题,和驱动无关吧。

SuperCat

unread,
Apr 28, 2013, 12:20:22 AM4/28/13
to sh...@googlegroups.com
实在不行买个USB有线网卡好了


2013/4/28 Druggo <dru...@gmail.com>

Shell Xu

unread,
Apr 28, 2013, 2:09:39 AM4/28/13
to shlug

原生系统ubuntu

from miui

Shell Xu

unread,
Apr 28, 2013, 2:11:00 AM4/28/13
to shlug

usb2.0最高理论速率480mbps,3.0太贵。

from miui

SuperCat

unread,
Apr 28, 2013, 2:36:54 AM4/28/13
to sh...@googlegroups.com
这个得看需求的嘛……


2013/4/28 Shell Xu <shell...@gmail.com>

Shell Xu

unread,
Apr 28, 2013, 3:11:51 AM4/28/13
to shlug

nas对传。

from miui

liyaoshi

unread,
Apr 28, 2013, 3:19:25 AM4/28/13
to sh...@googlegroups.com
换根网线看看

liyaoshi

unread,
Apr 28, 2013, 3:22:20 AM4/28/13
to sh...@googlegroups.com
还有

[    0.983945] r8169 0000:03:00.0: eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]

你这个可以小点

jumbo frame 每家厂家多不一样的,记得把另外一头也改小点

Shell Xu

unread,
Apr 28, 2013, 4:05:24 AM4/28/13
to shlug
换了三根了。我在家里和公司里分别测试不同的路由器和交换机,用的是不同网线。


在 2013年4月28日下午3:19,liyaoshi <liya...@gmail.com>写道:

Shell Xu

unread,
Apr 28, 2013, 4:06:02 AM4/28/13
to shlug
怎么改呢?这个好像没有内核参数来修改的,另一头更是一台交换机。。。

Qian Hong

unread,
Apr 28, 2013, 7:07:31 AM4/28/13
to sh...@googlegroups.com
2013/4/27 Shell Xu <shell...@gmail.com>:
> dmesg如下。注意这个过程中多次插入网线,没有反应。

我的笔记本也是 r8169 的有线网卡驱动,`modinfo r8169` 有下面这行显示:
parm: debug:Debug verbosity level (0=none, ..., 16=all) (int)

我想到的一点思路是:
1. 卸载驱动模块后重新加载,把调试日志级别设为最高,再反复插拔网线,看看dmesg有没有额外的信息?
2. 保持网线接入状态,写个脚本,每隔20秒钟卸载一次网卡模块,20秒钟后装载一次网卡模块,循环跑一段时间,看看dmesg有没有什么收获?
3. 运行 ethtool -i eth0 有什么输出?注意看 supports-test 是 yes 还是 no,如果是 yes
的话,说明该网卡支持自测,运行 ethtool -t ethXXX offline 进行自测,看看自测能否通过?
4. 既然有另一台除了系统32/64位不同,其他条件几乎一样的机器,有没有可能通过拆硬盘或其他方式调换硬件/系统,试试这个网卡在另一个系统上能否正常工作?

BTW,壳叔这个提问可以入选《提问的智慧 - 附录一 - 古今优秀提问案例选集》 XD

--
Regards,
Qian Hong

-
http://www.winehq.org

liyaoshi

unread,
Apr 28, 2013, 7:13:58 AM4/28/13
to sh...@googlegroups.com
ifconfig eth0 mtu 4096

Shell Xu

unread,
Apr 28, 2013, 11:09:17 AM4/28/13
to shlug
感谢回复。我明天测试一下看看情况再回复。


--
-- You received this message because you are subscribed to the Google Groups Shanghai Linux User Group group. To post to this group, send email to sh...@googlegroups.com. To unsubscribe from this group, send email to shlug+un...@googlegroups.com. For more options, visit this group at https://groups.google.com/d/forum/shlug?hl=zh-CN
---
您收到此邮件是因为您订阅了 Google 网上论坛的“Shanghai Linux User Group”论坛。
要退订此论坛并停止接收此论坛的电子邮件,请发送电子邮件到 shlug+un...@googlegroups.com
要查看更多选项,请访问 https://groups.google.com/groups/opt_out


none_nobody

unread,
Apr 28, 2013, 10:40:10 PM4/28/13
to sh...@googlegroups.com
我来晚了。我有两款这样的卡,都是主板附带的芯片。

Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 03)
Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)

安装 r8169 的驱动就好了。不过要自己下载编译,我内核版本2.6.38-16。如果在3.2 内核编译不过应该不算是问题吧。有源代码,改改就好了么。

none_nobody

unread,
Apr 28, 2013, 10:43:20 PM4/28/13
to sh...@googlegroups.com

none_nobody

unread,
Apr 28, 2013, 10:45:38 PM4/28/13
to sh...@googlegroups.com

none_nobody

unread,
Apr 28, 2013, 10:49:26 PM4/28/13
to sh...@googlegroups.com
这两个都无效的话,还是听钥匙的吧,再不行只有换交换机和网卡了,如果网卡像我也是在主板附带的,那么换主板吧。


这下不晚了,我回去洗洗睡了。

On Monday, April 29, 2013 10:45:38 AM UTC+8, none_nobody wrote:
还有一个PCI-E版本的 ,先试这个,大概可能也许是这个。

Shell Xu

unread,
Apr 28, 2013, 10:54:08 PM4/28/13
to shlug
1. 附带的驱动叫做r8168,内核驱动叫做r8169,两个都不行。后者用非协商模式可以工作,前者彻底不工作。
2. 我在公司里也有一块RTL8111/8168B,工作完全正常。
3. 其实我想换个系统以测试是哪个的问题,系统?还是硬件?不过目前还没做到。
4. 先测试mtu和Qian Hong给出的一系列过程。如果无效考虑liveusb定位问题。

liyaoshi

unread,
Apr 29, 2013, 12:30:09 AM4/29/13
to sh...@googlegroups.com
ubuntu 12.04 3.5.0

02:00.0 Ethernet controller: Realtek Semiconductor C
00: ec 10 68 81 07 05 10 00 02 00 00 02 10 00 00 00
10: 01 e8 00 00 00 00 00 00 04 f0 bf fe 00 00 00 00
20: 0c 00 ff fd 00 00 00 00 00 00 00 00 62 14 49 75
30: 00 00 bc fe 40 00 00 00 00 00 00 00 0a 01 00 00

[   41.746796] r8169 0000:02:00.0: eth0: link down
[   41.746807] r8169 0000:02:00.0: eth0: link down
[   41.747353] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   41.747599] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   43.338236] r8169 0000:02:00.0: eth0: link up
[   43.338749] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

穷人家只有100M的

liyaoshi

unread,
Apr 29, 2013, 12:39:46 AM4/29/13
to sh...@googlegroups.com
还有一种可能就是大户们才会有的麻烦

200瓦的显卡你好不用么? 电源抗不住了

Shell Xu

unread,
Apr 29, 2013, 1:16:40 AM4/29/13
to shlug

那是一台低功耗笔记本。

from miui

liyaoshi

unread,
Apr 29, 2013, 9:43:57 AM4/29/13
to sh...@googlegroups.com
我猜你多数可以用ifconfig eth0 mtu 1500 搞定

Shell Xu

unread,
Apr 29, 2013, 10:13:45 AM4/29/13
to shlug
今日补充。出问题时的mtu就是1500。。。
奇怪。

liyaoshi

unread,
Apr 29, 2013, 10:23:05 AM4/29/13
to sh...@googlegroups.com
我遇到过phy晶振焊接不好的情况
不一定适合你,要不你先刷一把bios?

Shell Xu

unread,
Apr 29, 2013, 11:04:01 AM4/29/13
to shlug
欣喜的告诉大家,问题解决了。
[64046.454518] r8169 0000:03:00.0: eth0: link up
[64046.456350] ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[64057.192208] eth0: no IPv6 routers present

    Speed: 1000Mb/s
    Duplex: Full
    Port: MII

具体解决方法是,给老婆写论文攒人品。

今天一天之内,我除了给老婆写论文装了graphviz外,没做过任何系统调整。因此。。。

Gene Wu

unread,
Apr 29, 2013, 11:49:13 AM4/29/13
to sh...@googlegroups.com, shlug
恭喜LZ人品爆发!我把我用废的SD card给你再爆一次?

Sent from mobile

Shell Xu

unread,
Apr 29, 2013, 12:09:09 PM4/29/13
to shlug
算了,今天我改了四次程序,都是需求问题。每次修改一行代码,然后重新执行。。。
爆个几千的电脑还算值,要爆你的SD卡,还不如直接重买一张。。。

liyaoshi

unread,
Apr 29, 2013, 8:57:06 PM4/29/13
to sh...@googlegroups.com
你跑这毁我们三观来了?

Wizard

unread,
Apr 30, 2013, 12:02:57 AM4/30/13
to shlug
真牛!!!
Wizard

Terry Zheng

unread,
May 2, 2013, 5:33:12 AM5/2/13
to shlug
2011年我在 ThinkPad E40 0578AB3 上装Linux, 自带的RealTek 的RTL8191SEvB, Linux 自带驱动不能用, 官方下载的驱动小版本不对, 编译了之后网卡能驱动, 就是连不上网, 后来就刷了去掉白名单的BIOS, 淘宝上26 块钱买了块Atheros AR9287, 一直用到现在.
前天又把家里的一台ThinkPad E40 0579 的BIOS 给刷了, 同样换上Atheros AR9287, 再装Linux.
+========================+
  Twitter: @Gotnix
  Google+: Terry Zheng
+========================+
Reply all
Reply to author
Forward
0 new messages