Bug 43270 - wrong driver for wifi RTL8111/8168B
Summary: wrong driver for wifi RTL8111/8168B
Status: CLOSED CODE_FIX
Alias: None
Product: Drivers
Classification: Unclassified
Component: Network (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Francois Romieu
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-05-21 18:11 UTC by Rodrigue Villetard
Modified: 2013-05-29 22:10 UTC (History)
7 users (show)

See Also:
Kernel Version: 3.2.0-24-generic
Subsystem:
Regression: No
Bisected commit-id:


Attachments
dmesg result (176.82 KB, text/plain)
2012-05-24 03:55 UTC, Rodrigue Villetard
Details
dmesg output directly after a reboot (55.38 KB, application/octet-stream)
2012-12-31 11:38 UTC, Tim Edwards
Details

Description Rodrigue Villetard 2012-05-21 18:11:42 UTC
Symptoms : Wireless connection ultra slow, but working

r8169 module was loaded in modprobe, but r8168 was needed for better performances.

lspci lines:
01:00.0 Network controller: Intel Corporation Centrino Advanced-N 6230 (rev 34)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)

OS: ubuntu 12.04 64bit (new install)
Hardware: samsung series 5 NP530U3B-A02FR

see also :
* https://bugs.launchpad.net/ubuntu/+source/linux/+bug/998200

* http://askubuntu.com/questions/96343/internet-unusably-slow-with-realtek-semiconductor-co-ltd-rtl8111-8168b-card

* http://amk1.wordpress.com/2009/06/09/realtek-8168-module-issue/

* https://bugzilla.kernel.org/show_bug.cgi?id=14807

Driver I used to get it work : LINUX driver for kernel 2.6.x and 2.4.x (Support x86 and x64)
 8.029.00 2012/3/29 @ http://www.realtek.com/downloads/downloadsView.aspx?Langid=1&PNid=13&PFid=5&Level=5&Conn=4&DownTypeID=3&GetDown=false


regards
Rodrigue
Comment 1 Francois Romieu 2012-05-22 14:26:14 UTC
(In reply to comment #0)
> Symptoms : Wireless connection ultra slow, but working
> 
> r8169 module was loaded in modprobe, but r8168 was needed for better
> performances.

You should send the XID line from the output of dmesg to
identify the chipset.

-- 
Ueimor
Comment 2 Francois Romieu 2012-05-23 22:53:44 UTC
(In reply to comment #1)
> (In reply to comment #0)
> > Symptoms : Wireless connection ultra slow, but working
> > 
> > r8169 module was loaded in modprobe, but r8168 was needed for better
> > performances.
> 
> You should send the XID line from the output of dmesg to
> identify the chipset.

By the way why are you talking of wireless device ?

None of the in-kernel r8169 driver nor Realtek's 8.0.29 -now updated to 8.0.30-
8168 driver is a wireless driver : they are both gigabit ethernet drivers.

-- 
Ueimor
Comment 3 Rodrigue Villetard 2012-05-24 03:55:04 UTC
Created attachment 73369 [details]
dmesg result

Here is my dmesg
Comment 4 Rodrigue Villetard 2012-05-24 04:04:58 UTC
weird…


Yes I’m talking about wireless, here is the lspci line from which I decided to change driver :

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

as you said, there is no mention of wireless (I didn’t noticed) !



But, the r8168 driver fixes my wireless problem.


Maybe you could help me but, none of lspci or lsusb show me wireless device.

there is a lot of my system files on launchpad where I first report a bug : https://bugs.launchpad.net/ubuntu/+source/linux/+bug/998200


thank you for pointing this out

regards
Rodrigue
Comment 5 Rodrigue Villetard 2012-05-24 04:06:10 UTC
omg, please forgive my english…
Comment 6 Francois Romieu 2012-05-24 06:15:54 UTC
(In reply to comment #3)
> Created an attachment (id=73369) [details]
> dmesg result
> 
> Here is my dmesg

Your device is some flavor of 8168evl. You will need some fairly recent
driver and you may consider installing the relevant 8168 firmware as well.

Can you build a v3.4 ?

-- 
Ueimor
Comment 7 Rodrigue Villetard 2012-05-24 07:28:51 UTC
>
> Can you build a v3.4 ?
> 
> -- 
> Ueimor

Hi, I’ve tried with the 3.4 rc6 (via ubuntu mainstreams builds) and it didn’t worked.

If you think the recent 3.4 final release can solve this problem, I’ll try it.
Comment 8 Martin Capitanio 2012-08-08 17:39:22 UTC
FYI:

**wol broken**
vmlinuz-3.4.6-2.fc17.x86_64
vmlinuz-3.5.0-2.fc17.x86_64
ubuntu-12.04 vmlinuz-3.2.0-27-generic

[   12.620339] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[   12.620573] r8169 0000:02:00.0: irq 41 for MSI/MSI-X

[   12.621068] r8169 0000:02:00.0: eth0: RTL8168c/8111c at 0xffffc9000067e000, XXX, XID 1c4000c0 IRQ 41

----

**ok in all ubuntu/fedora kernels**
sources:

http://packages.debian.org/sid/r8168-dkms
or
http://code.google.com/p/r8168/

$ wget http://r8168.googlecode.com/files/r8168-8.031.00.tar.bz2
$ sudo ./autorun.sh 
Check old driver and unload it.
rmmod r8169
Build the module and install
Backup r8169.ko
rename r8169.ko to r8169.bak
DEPMOD 3.5.0-2.fc17.x86_64
load module r8168
Completed.

[ 4301.046025] r8168 Gigabit Ethernet driver 8.031.00-NAPI loaded
[ 4301.046174] r8168 0000:02:00.0: irq 41 for MSI/MSI-X
[ 4301.047060] eth%d: RTL8168C/8111C at 0xffffc9000067e000, XXX, IRQ 41
[ 4301.072252] r8168: This product is covered by one or more of the following patents: US5,307,459, US5,434,872, US5,732,094, US6,570,884, US6,115,776, and US6,327,625.
[ 4301.072254] eth0: Identified chip type is 'RTL8168C/8111C'.
[ 4301.072257] r8168  Copyright (C) 2012  Realtek NIC software team <nicfae@realtek.com> 
[ 4301.072257]  This program comes with ABSOLUTELY NO WARRANTY; for details, please see <http://www.gnu.org/licenses/>. 
[ 4301.072257]  This is free software, and you are welcome to redistribute it under certain conditions; see <http://www.gnu.org/licenses/>. 
[ 4301.133054] r8168: p6p1: link down
[ 4301.133884] IPv6: ADDRCONF(NETDEV_UP): p6p1: link is not ready
[ 4302.696051] r8168: p6p1: link up
[ 4302.697609] IPv6: ADDRCONF(NETDEV_CHANGE): p6p1: link becomes ready
[ 4303.138027] r8168: p6p1: link up
Comment 9 Martin Capitanio 2012-08-08 18:02:01 UTC
(sorry #8 is another issue)
filled https://bugzilla.kernel.org/show_bug.cgi?id=45751
Comment 10 Tim Edwards 2012-08-23 07:20:50 UTC
I have a Samsung Series 5 NP530U3C laptop with the RTL8111/8168B PCI express NIC. Using Ubuntu 12.04 by default the r8169 drive is loaded, which causes problems detecting whether the network cable is plugged in or not. After installing the r8168 driver using http://packages.debian.org/sid/r8168-dkms I no longer have these problems.


sudo lspci | grep Ethernet
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168B PCI Express Gigabit Ethernet controller (rev 06)
Comment 11 Anthony Wong 2012-12-18 08:57:35 UTC
Hi Francois, I see the status of this bug is still NEEDINFO, is there any other info you need to fix this bug?
Comment 12 Francois Romieu 2012-12-29 23:43:41 UTC
(In reply to comment #11)
> Hi Francois, I see the status of this bug is still NEEDINFO, is there any
> other
> info you need to fix this bug?

It would be worth for Rodrigue to try 8168evl support on a really, really recent
kernel. Say 3.7.1 and:
1. d64ec841517a25f6d468bde9f67e5b4cffdc67c7
2. e0c075577965d1c01b30038d38bf637b027a1df3
3. 9ecb9aabaf634677c77af467f4e3028b09d7bcda

Tim should send its 816x device XID (see dmesg) and kernel version for a start.

Thanks.

-- 
Ueimor
Comment 13 Tim Edwards 2012-12-31 11:38:26 UTC
Created attachment 90031 [details]
dmesg output directly after a reboot

Linux timnb.dyndns.info 3.2.0-35-generic #55-Ubuntu SMP Wed Dec 5 17:42:16 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux

[    1.568507] r8168 Gigabit Ethernet driver 8.031.00-NAPI loaded
[    1.568532] r8168 0000:02:00.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
[    1.568604] r8168 0000:02:00.0: setting latency timer to 64
[    1.568686] r8168 0000:02:00.0: irq 42 for MSI/MSI-X
[    1.569023] eth%d: RTL8168E-VL/8111E-VL at 0xffffc90000c3e000, e8:03:9a:de:db:59, IRQ 42

Full dmesg output in attachment. If you need any more info let me know.
Comment 14 Francois Romieu 2012-12-31 20:02:35 UTC
(In reply to comment #13)
[...]
> [    1.569023] eth%d: RTL8168E-VL/8111E-VL at 0xffffc90000c3e000,
> e8:03:9a:de:db:59, IRQ 42

It could be related to power management but 3.2.0.35 includes the relevant
r8169 8168evl fixes (assuming your 8168 firmware is up-to-date as well).

Do you experience the same link recovery problem with the stock r8169
driver on 3.7-rc1 ?

-- 
Ueimor
Comment 15 Tim Edwards 2013-01-06 16:00:29 UTC
- apt-get remove r8168-dkms
- Install 3.7.0-rc1 from http://kernel.ubuntu.com/~kernel-ppa/mainline/. Kernel dump on boot up.
- Install 3.7.1 from http://kernel.ubuntu.com/~kernel-ppa/mainline/. This time boot-up works fine.
- modprobe 8169
- Plugged in ethernet cable, tested transferring files
- Unplugged cable, NetworkManager saw the cable as being unplugged
- Re-inserted cable, started transfer of a large file (9GB). Saw speeds up to 40MByte/s, which is probably limited by the hard disk in the computer being transferred to.
- Un-plugged and re-inserted the cable. It detected that the cable was un-plugged but not that it had been re-inserted.
- Un-plugged/re-inserted again. Same problem - it still shows as 'unplugged' in NetworkManager
- I needed to do rmmod r8169; modprobe r8169 to get cable detection working again.

So unfortunately this bug isn't fixed, the NIC just doesn't work properly with the r8169 module.
Comment 16 AceLan Kao 2013-01-29 09:33:15 UTC
There is a new driver on realtek website[1] and it works for me.
Just run the autorun.sh and let it do all the magic.

BTW, I copied some firmware from latest linux-firmware[2] to /lib/firmware/rtl_nic, but I'm not sure if I remove them clearly.

1. http://www.realtek.com.tw/Downloads/downloadsView.aspx?Langid=1&PNid=13&PFid=5&Level=5&Conn=4&DownTypeID=3&GetDown=false#2
2. git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
Comment 17 Francois Romieu 2013-01-30 23:32:36 UTC
(In reply to comment #15)
[...]
> - Plugged in ethernet cable, tested transferring files

(1)

> - Unplugged cable, NetworkManager saw the cable as being unplugged
> - Re-inserted cable, started transfer of a large file (9GB). Saw speeds up to
> 40MByte/s, which is probably limited by the hard disk in the computer being
> transferred to.

(2)

> - Un-plugged and re-inserted the cable. It detected that the cable was
> un-plugged but not that it had been re-inserted.

(3)

/me scratches head.

Can you send ethtool eth0, mii-tool -vv eth0 and complete dmesg at (1), (2),
(3) with a rough estimate of the plug / unplug events as kernel timestamp ?

Thanks.

-- 
Ueimor
Comment 18 Francois Romieu 2013-01-30 23:42:46 UTC
(In reply to comment #16)
> There is a new driver on realtek website[1] and it works for me.
> Just run the autorun.sh and let it do all the magic.
> 
> BTW, I copied some firmware from latest linux-firmware[2] to
> /lib/firmware/rtl_nic, but I'm not sure if I remove them clearly.

Realtek's drivers don't care: they do not use the firmware loader.

Please send the XID or a complete dmesg with the stock kernel so that
I know which chipset you experience problems with.

-- 
Ueimor
Comment 19 Francois Romieu 2013-01-30 23:44:29 UTC
(In reply to comment #15)
> - apt-get remove r8168-dkms
> - Install 3.7.0-rc1 from http://kernel.ubuntu.com/~kernel-ppa/mainline/.
> Kernel
> dump on boot up.
> - Install 3.7.1 from http://kernel.ubuntu.com/~kernel-ppa/mainline/. This
> time
> boot-up works fine.

It does not seem to include any of the patches that appear in comment #12. 

It may be worth trying.

-- 
Ueimor
Comment 20 AceLan Kao 2013-01-31 02:42:02 UTC
Francois, here comes the logs
In dmesg, I plugin the cable at second 311, and unplug it at 331, and re-plugin it at 359. Can't get connected, from ifconfig, there are RX flows, but RX bytes is 0.

BTW, the device id is 10ec:8168 (rev 0c)

ubuntu@ubuntu-Vostro-V131 ~/workspace/hp/r8168 % cat ethtool.log
Settings for eth0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Half 1000baseT/Full 
        Supported pause frame use: No
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full 
                                100baseT/Half 100baseT/Full 
                                1000baseT/Full 
        Advertised pause frame use: Symmetric Receive-only
        Advertised auto-negotiation: Yes
        Link partner advertised link modes:  10baseT/Half 10baseT/Full 
                                             100baseT/Half 100baseT/Full 
                                             1000baseT/Full 
        Link partner advertised pause frame use: No
        Link partner advertised auto-negotiation: Yes
        Speed: 1000Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Supports Wake-on: pumbg
        Wake-on: g
        Current message level: 0x00000033 (51)
                               drv probe ifdown ifup
        Link detected: yes

ubuntu@ubuntu-Vostro-V131 ~/workspace/hp/r8168 % cat mii-tool.log
Using SIOCGMIIPHY=0x8947
eth0: negotiated 1000baseT-FD flow-control, link ok
  registers for MII PHY 32: 
    1000 79ed 001c c800 0de1 c1e1 006d 2801
    4828 0200 3800 0000 0000 0000 0000 2000
    0000 0000 0000 0000 0000 0000 0000 0000
    2188 0043 302c 0002 6223 0000 0000 0000
  product info: vendor 00:07:32, model 0 rev 0
  basic mode:   autonegotiation enabled
  basic status: autonegotiation complete, link ok
  capabilities: 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD
  advertising:  1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD flow-control
  link partner: 1000baseT-FD 100baseTx-FD 100baseTx-HD 10baseT-FD 10baseT-HD

ubuntu@ubuntu-Vostro-V131 ~/workspace/hp/r8168 % cat dmesg.log
[  311.957443] r8169 0000:02:00.0: eth0: link up
[  315.969334] type=1400 audit(1359599418.675:28): apparmor="DENIED" operation="capable" parent=1 profile="/usr/sbin/cupsd" pid=1122 comm="cupsd" pid=1122 comm="cupsd" capability=36  capname="block_suspend"
[  331.217115] r8169 0000:02:00.0: eth0: link down
[  335.448112] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[  359.670562] r8169 0000:02:00.0: eth0: link up
[  359.670935] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

ubuntu@ubuntu-Vostro-V131 ~/workspace/hp/r8168 % uname -a
Linux ubuntu-Vostro-V131 3.8.0-2-generic #6-Ubuntu SMP Fri Jan 25 22:03:57 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Comment 21 Francois Romieu 2013-01-31 22:46:23 UTC
(In reply to comment #20)
[...]
> In dmesg, I plugin the cable at second 311, and unplug it at 331, and
> re-plugin
> it at 359. Can't get connected, from ifconfig, there are RX flows, but RX
> bytes
> is 0.

This one is new: it really looks like it immediately detected the link

Do all "ethtool -S eth0" counters stay at 0 ?

> BTW, the device id is 10ec:8168 (rev 0c)

Thanks but it does not tell the specific chipset revision. A line of your
dmesg should contain an "XID" string. Please send this line or attach the
whole untruncated file.

Thanks.

-- 
Ueimor
Comment 22 Tim Edwards 2013-02-01 11:13:33 UTC
In comment 19 you said the 3.7.1 Ubuntu mainline kernel I tested with doesn't have the fix, but in comment 12 you said a 3.7.1 kernel should have it? 

The Ubuntu mainline kernels should be unmodified from the original kernel.org source so if you can tell me which version has the fix I'll do the tests again with that?
Comment 23 AceLan Kao 2013-02-04 01:59:59 UTC
Francois,

Here are the logs.

ubuntu@ubuntu-Vostro-V131 ~/workspace/hp/r8168 % cat XID.log
[    1.305823] r8169 0000:02:00.0: eth0: RTL8168b/8111b at 0xffffc90000656000, 78:45:c4:3f:33:e1, XID 0c000800 IRQ 42

ubuntu@ubuntu-Vostro-V131 ~/workspace/hp/r8168 % cat ethtool_S.log
NIC statistics:
     tx_packets: 104
     rx_packets: 0
     tx_errors: 0
     rx_errors: 0
     rx_missed: 0
     align_errors: 0
     tx_single_collisions: 0
     tx_multi_collisions: 0
     unicast: 0
     broadcast: 0
     multicast: 0
     tx_aborted: 0
     tx_underrun: 0

I'll try the latest kernel and report to you again.
Comment 24 Francois Romieu 2013-02-04 23:26:11 UTC
(In reply to comment #22)
> In comment 19 you said the 3.7.1 Ubuntu mainline kernel I tested with doesn't
> have the fix, but in comment 12 you said a 3.7.1 kernel should have it? 

In comment #12 I meant that one needed a 3.7.1 and some extra patches whose
id were given. These patches are not included in the stable 3.7.x branch.

You can get the extra patches as :
https://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=patch;h=9ecb9aabaf634677c77af467f4e3028b09d7bcda
https://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=patch;h=d64ec841517a25f6d468bde9f67e5b4cffdc67c7
https://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=patch;h=e0c075577965d1c01b30038d38bf637b027a1df3

Please follow this ordering when applying to 3.7.1. The patches can be
applied with 'patch -p1 < frobnitz.patch' in the kernel source tree
(wget -O - "https://....." | patch -p1 can be used as well).

-- 
Ueimor
Comment 25 Francois Romieu 2013-02-04 23:45:10 UTC
(In reply to comment #23)
> Francois,
> 
> Here are the logs.
> 
> ubuntu@ubuntu-Vostro-V131 ~/workspace/hp/r8168 % cat XID.log
> [    1.305823] r8169 0000:02:00.0: eth0: RTL8168b/8111b at
> 0xffffc90000656000,
> 78:45:c4:3f:33:e1, XID 0c000800 IRQ 42

Either it is misdetected or it is a very mildly recent chipset.

Please attach a complete 'ethtool -d eth0' after a few tx packets.
It will provide an internal registers dump (it won't if the chipset is
misdetected).

> ubuntu@ubuntu-Vostro-V131 ~/workspace/hp/r8168 % cat ethtool_S.log
> NIC statistics:
>      tx_packets: 104
>      rx_packets: 0

There's something very wrong. Can you send a complete dmesg and a
/proc/interrupts with the stock kernel and driver ?

Thanks.

-- 
Ueimor
Comment 26 AceLan Kao 2013-02-20 03:51:42 UTC
Hi,

'ethtool -d eth0' returns
Unknown RealTek chip (mask: 0x4c000000)

And there are some sensitive information in the dmesg, so I only paste the related parts here.
[    1.340371] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[    1.340416] r8169 0000:02:00.0: (unregistered net_device): unknown MAC, using family default
[    1.340511] r8169 0000:02:00.0: irq 42 for MSI/MSI-X
[    1.340649] r8169 0000:02:00.0: eth0: RTL8168b/8111b at 0xffffc90000656000, 78:45:c4:3f:33:e1, XID 0c000800 IRQ 42
[    1.340650] r8169 0000:02:00.0: eth0: jumbo features [frames: 4080 bytes, tx checksumming: ko]
[    7.866672] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   11.758874] r8169 0000:02:00.0: eth0: link down
[   11.759127] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   11.759327] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   11.760082] type=1400 audit(1361331208.703:9): apparmor="STATUS" operation="profile_load" name="/usr/bin/evince" pid=1040 comm="apparmor_parser"
[   11.760116] r8169 0000:02:00.0: eth0: link down
[   11.761813] type=1400 audit(1361331208.703:10): apparmor="STATUS" operation="profile_load" name="/usr/lib/telepathy/mission-control-5" pid=1042 comm="apparmor_parser"
[   11.765063] type=1400 audit(1361331208.707:11): apparmor="STATUS" operation="profile_load" name="/usr/bin/evince//launchpad_integration" pid=1040 comm="apparmor_parser"
[   11.814728] ppdev: user-space parallel port driver
[   12.376903] init: plymouth-stop pre-start process (1322) terminated with status 1
[   14.035880] r8169 0000:02:00.0: eth0: link up
[   14.036102] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

And the /proc/interrupts
           CPU0       CPU1
  0:         42          0   IO-APIC-edge      timer
  1:          3          0   IO-APIC-edge      i8042
  8:          1          0   IO-APIC-edge      rtc0
  9:          0          0   IO-APIC-fasteoi   acpi
 12:          4          0   IO-APIC-edge      i8042
 16:         37          2   IO-APIC-fasteoi   ehci_hcd:usb1
 23:         37          2   IO-APIC-fasteoi   ehci_hcd:usb2
 40:       8177        104   PCI-MSI-edge      ahci
 41:        470          9   PCI-MSI-edge      xhci_hcd
 42:        133          8   PCI-MSI-edge      eth0
 43:         24          0   PCI-MSI-edge      mei
 44:        305      15102   PCI-MSI-edge      i915
 45:         34        167   PCI-MSI-edge      snd_hda_intel
NMI:         23         21   Non-maskable interrupts
LOC:      14975      12426   Local timer interrupts
SPU:          0          0   Spurious interrupts
PMI:         23         21   Performance monitoring interrupts
IWI:          0          0   IRQ work interrupts
RTR:          1          0   APIC ICR read retries
RES:       5336       2752   Rescheduling interrupts
CAL:        203        311   Function call interrupts
TLB:       1326        930   TLB shootdowns
TRM:          0          0   Thermal event interrupts
THR:          0          0   Threshold APIC interrupts
MCE:          0          0   Machine check exceptions
MCP:          2          2   Machine check polls
ERR:          0
MIS:          0
Comment 27 AceLan Kao 2013-02-20 03:53:59 UTC
BTW, I just try to use the latest 3.8 kernel, and the r8169 driver works well.
Do you want me to try other version of kernels to clarify the issue?
Comment 28 Francois Romieu 2013-02-20 06:37:33 UTC
(In reply to comment #27)
> BTW, I just try to use the latest 3.8 kernel, and the r8169 driver works
> well.

Nice.

> Do you want me to try other version of kernels to clarify the issue ?

The snippet below in comment #26 tells that the 816x chipset was not
correctly detected:

[    1.340416] r8169 0000:02:00.0: (unregistered net_device): unknown MAC,
using family default

You may send the same information as in comment #26 for this (so far) working
kernel so that I identify the involved chipset for future problem reports.

Thanks.

-- 
Ueimor
Comment 29 AceLan Kao 2013-02-20 07:29:24 UTC
$ uname -a
Linux XXXXXXXXXX 3.8.0-030800-generic #201302181935 SMP Tue Feb 19 00:36:19 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

$ sudo ethtool -d eth0
Unknown RealTek chip (mask: 0x4c000000)

$ dmesg | egrep "r8169|eth0"
[    0.727948] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[    0.736151] r8169 0000:02:00.0: irq 42 for MSI/MSI-X
[    0.736303] r8169 0000:02:00.0 eth0: RTL8168g/8111g at 0xffffc90000650000, 78:45:c4:3f:33:e1, XID 0c000800 IRQ 42
[    0.736305] r8169 0000:02:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[   11.298488] r8169 0000:02:00.0 eth0: unable to load firmware patch rtl_nic/rtl8168g-1.fw (-2)
[   11.306163] r8169 0000:02:00.0 eth0: link down
[   11.306190] r8169 0000:02:00.0 eth0: link down
[   11.306210] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   13.608394] r8169 0000:02:00.0 eth0: link up
[   13.608402] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready

$ cat /proc/interrupts 
           CPU0       CPU1       
  0:         16          0   IO-APIC-edge      timer
  1:          3          2   IO-APIC-edge      i8042
  8:          1          0   IO-APIC-edge      rtc0
  9:          0          0   IO-APIC-fasteoi   acpi
 12:          7          0   IO-APIC-edge      i8042
 16:        432         14   IO-APIC-fasteoi   ehci_hcd:usb1
 23:        448         14   IO-APIC-fasteoi   ehci_hcd:usb2
 40:       4881        263   PCI-MSI-edge      xhci_hcd
 41:      20701        103   PCI-MSI-edge      ahci
 42:      13201         23   PCI-MSI-edge      eth0
 43:         25          0   PCI-MSI-edge      mei
 44:       1052      32571   PCI-MSI-edge      i915
 45:         83          0   PCI-MSI-edge      snd_hda_intel
NMI:         77         28   Non-maskable interrupts
LOC:      77287      61079   Local timer interrupts
SPU:          0          0   Spurious interrupts
PMI:         77         28   Performance monitoring interrupts
IWI:          0          0   IRQ work interrupts
RTR:          2          0   APIC ICR read retries
RES:       5656       2700   Rescheduling interrupts
CAL:        171        333   Function call interrupts
TLB:       1249       1110   TLB shootdowns
TRM:          0          0   Thermal event interrupts
THR:          0          0   Threshold APIC interrupts
MCE:          0          0   Machine check exceptions
MCP:         12         12   Machine check polls
ERR:          0
MIS:          0
Comment 30 Francois Romieu 2013-02-21 22:40:10 UTC
(In reply to comment #29)
> $ uname -a
> Linux XXXXXXXXXX 3.8.0-030800-generic #201302181935 SMP Tue Feb 19 00:36:19
> UTC
> 2013 x86_64 x86_64 x86_64 GNU/Linux
> 
> $ sudo ethtool -d eth0
> Unknown RealTek chip (mask: 0x4c000000)
> 
> $ dmesg | egrep "r8169|eth0"
> [    0.727948] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
> [    0.736151] r8169 0000:02:00.0: irq 42 for MSI/MSI-X
> [    0.736303] r8169 0000:02:00.0 eth0: RTL8168g/8111g at 0xffffc90000650000,
> 78:45:c4:3f:33:e1, XID 0c000800 IRQ 42

Ok, the 8168g needs a 3.6 or more recent kernel and some reverts before 3.8
may have helped as well.

> [    0.736305] r8169 0000:02:00.0 eth0: jumbo features [frames: 9200 bytes,
> tx
> checksumming: ko]
> [   11.298488] r8169 0000:02:00.0 eth0: unable to load firmware patch
> rtl_nic/rtl8168g-1.fw (-2)

You don't use the firmware btw. It should not be needed as long as things
go well though.

Does someone still experience unfixed problems with version 3.8 of the kernel ?

-- 
Ueimor
Comment 31 AceLan Kao 2013-02-22 04:55:21 UTC
Hi,

I try to use 3.6 kernel and it works.
You mention some commit on comment #12, 
do you think those 3 commit can enable the chip correctly?
I'm going to give it a try.
Comment 32 Tim Edwards 2013-02-24 15:32:46 UTC
Using Ubuntu 'mainline' kernel 3.8.0-030800-generic (from http://kernel.ubuntu.com/~kernel-ppa/mainline/v3.8-raring/) I repeated the same test as in comment #15, plus a few extra plug-in/check connection/unplug cycles. I didn't see the problem occur and AFAICT it's fixed.

Thanks for your help with this!
Comment 33 AceLan Kao 2013-02-25 05:54:33 UTC
The commits mentioned in comment #12 is not working.
I try to apply them to ubuntu kernel 3.5.0-25.38, but the ethernet still can't get connected. The RX bytes is 0 as usual.
Comment 34 Francois Romieu 2013-05-29 22:10:10 UTC
(In reply to comment #33)
> The commits mentioned in comment #12 is not working.
> I try to apply them to ubuntu kernel 3.5.0-25.38, but the ethernet still
> can't
> get connected. The RX bytes is 0 as usual.

No surprise here: you own a 8168g and there is no support for the 8168g in 3.5.x.

-- 
Ueimor

Note You need to log in before you can comment on or make changes to this bug.