Request: have realtek RTL8111 work "out of the box"

mmenaz

Renowned Member
Jun 25, 2009
835
25
93
Northern east Italy
Hi, I've a new Gigabyte 990XA-UD3 and the on board nic does not work (seems up, but no traffic flowing, very frustrating and confusing at the beginning).
I've added an intel e1000 pciexpress and it works (setting vmbr0 to use eth1 of course).
Nevertheless my home test proxmox needs a lot of nics and I've limited expansion possibilities / would love to have onboard nic work.
Googling around seems that the correct kernel module for that family nic should be r8168 (not present in proxmox 3.1) while r8169 is loaded instead.
I know proxmox team suggest "real server hardware", nevertheless there are many that want to use Proxmox just for fun, to learn, for their home, etc. and, especially for novice users, install proxmox and have it not work could be a bad start.
here some hw data if useful for Proxmox team to grab drivers from Reaktek and include in the next kernel:
Code:
# lspci | grep Ethernet
03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)

03:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
        Subsystem: Gigabyte Technology Co., Ltd Motherboard
        Flags: bus master, fast devsel, latency 0, IRQ 61
        I/O ports at e000 [size=256]
        Memory at d0004000 (64-bit, prefetchable) [size=4K]
        Memory at d0000000 (64-bit, prefetchable) [size=16K]
        Capabilities: [40] Power Management version 3
        Capabilities: [50] MSI: Enable+ Count=1/1 Maskable- 64bit+
        Capabilities: [70] Express Endpoint, MSI 01
        Capabilities: [b0] MSI-X: Enable- Count=4 Masked-
        Capabilities: [d0] Vital Product Data
        Capabilities: [100] Advanced Error Reporting
        Capabilities: [140] Virtual Channel
        Capabilities: [160] Device Serial Number 01-00-00-00-68-4c-e0-00
        Kernel driver in use: r8169

# dmesg | grep firmware -A 3
r8169 0000:03:00.0: firmware: requesting rtl_nic/rtl8168e-3.fw
r8169 0000:03:00.0: eth0: link down
r8169 0000:03:00.0: eth0: link down
ADDRCONF(NETDEV_UP): eth0: link is not ready

# find  /lib/modules/$(uname -r)/kernel/ -iname '*r816*'
/lib/modules/2.6.32-25-pve/kernel/drivers/net/r8169.ko

# lsmod | grep r81
r8169                  61765  0 
mii                     5392  1 r8169

# dmesg shows at some time:
NETDEV WATCHDOG: eth0 (r8169): transmit queue 0 timed out
r8169 0000:03:00.0: eth0: link up


# pveversion -v
proxmox-ve-2.6.32: 3.1-113 (running kernel: 2.6.32-25-pve)
pve-manager: 3.1-17 (running version: 3.1-17/eb90521d)
pve-kernel-2.6.32-25-pve: 2.6.32-113
pve-kernel-2.6.32-23-pve: 2.6.32-109
lvm2: 2.02.98-pve4
clvm: 2.02.98-pve4
corosync-pve: 1.4.5-1
openais-pve: 1.1.4-3
libqb0: 0.11.1-2
redhat-cluster-pve: 3.2.0-2
resource-agents-pve: 3.9.2-4
fence-agents-pve: 4.0.0-2
pve-cluster: 3.0-7
qemu-server: 3.1-5
pve-firmware: 1.0-23
libpve-common-perl: 3.0-6
libpve-access-control: 3.0-6
libpve-storage-perl: 3.0-13
pve-libspice-server1: 0.12.4-2
vncterm: 1.1-4
vzctl: 4.0-1pve3
vzprocps: 2.0.11-2
vzquota: 3.1-2
pve-qemu-kvm: 1.4-17
ksm-control-daemon: 1.1-1
glusterfs-client: 3.4.0-2

Thanks a lot!
 
Realtek NICs does work out of the box in Proxmox although performance is not that great due to Realtek Chip themselves. Below is one of my 7 machines which has Realtek on board NIC primarily used for management purpose.
root@symmvm04:~# lspci | grep Ethernet
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168 PCI Express Gigabit Ethernet controller (rev 01)
03:05.0 Ethernet controller: D-Link System Inc DGE-530T Gigabit Ethernet Adapter (rev 11) (rev 11)

No customization done on any of them machine. Proxmox was installed as it is and it picked up RealTek and D-Link NIC during installation. Although Proxmox staff suggests to use "Real Server Hardware" purely from stability point of view. Its just not realistic to test the stability of hypervisor like Proxmox with under powered cheap hardware. If Proxmox is installed on such hardware and it crashes, freezes due to non standard hardware, automatically Proxmox will get the blame. A home user, test user must keep this in mind when jumping into a product like Proxmox. Should they have any problem, there is always this wonderful community ready to help. :)


Going back to your original issue, if Proxmox can see yoru NIC and says Link up, it should just work regardless of driver. Without proper driver link should not come up.
 
As you can see, we are not talking to the same hardware, since my lspci says:
RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
while your says:
RTL8111/8168 PCI Express Gigabit Ethernet controller (rev 01)
Second, I'm not a newbie, if I tell you that it does not work even if shows to be up, trust me :)
 
Would love not to have to compile myself, since I would need to do at each kernel update and, being a home user installation, I do often to see new stuff Proxmox provides :)
In any case, I did not know that r8168 is not part of linux kernel.
Googling further I've read that new r8169, but available with newer kernel (3.x), works, so still wondering if Proxmox team can fix this issue backporting r8169 latest version, if does not depend too much on new kernel features.
Btw, I've been shocked seeing how much expensive are multiport adapters by Intel... 4 port gbit is more than 300 euros, I can't afford it! Cheap Realtek gbit single port is about 10 euros, is a pity that hangs my new MB (but worked fine with an older one... sigh).
 
As you can see, we are not talking to the same hardware, since my lspci says:
RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 06)
Looks like i missed the revision number there. My mistake.

Second, I'm not a newbie, if I tell you that it does not work even if shows to be up, trust me
So hard to measure somebodys depth of knowledge over a long distance forum. :)
With your level of expertise you will be able to compile new driver from the site suggested by mir to up and running in no time!
 
And to have it auto build the driver when a new kernel gets installed:
Code:
apt-get install dkms build-essentials pve-headers-2.6.32-25-pve
Code:
cat <<EOF > /usr/src/r8168-8.037.00/dkms.conf
PACKAGE_NAME=r8168
PACKAGE_VERSION=8.037.00
MAKE[0]="'make'"
BUILT_MODULE_NAME[0]=r8168
BUILT_MODULE_LOCATION[0]="src/"
DEST_MODULE_LOCATION[0]="/kernel/updates/dkms"
AUTOINSTALL="YES"
EOF
Code:
dkms add -m r8168 -v 8.037.00
dkms build -m r8168 -v 8.037.00
dkms install -m r8168 -v 8.037.00
 
I've solved thanks to a previous post!
Realtek on board nic, but also pci and pciexpress nics were not working in a strange way, with tcpdump I saw that arp requests were received and answered, but the sent package were "corrupted".
From the machine that pinged proxmox I got something like
Code:
1:58:56.995094 ARP, Request who-has 192.168.99.4 tell 192.168.99.30, length 28
01:58:56.995252 ff:ff:ff:ff:ff:ff > ff:ff:ff:ff:ff:ff, ethertype Unknown (0xffff), length 60: 
        0x0000:  ffff ffff ffff ffff ffff ffff ffff ffff  ................
Then I enabled in the BIOS the IOMMU since was suggested so in a post of another distro, but did not fixed.
Fortunately a Proxmox post explains that that option need to be enabled in Proxmox kernel too!
http://188.165.151.221/threads/13727-Unable-to-connect-to-fresh-installation-of-proxmox
so I edited /etc/default/grub, added "amd_iommu=on" option and issued an update-grub... now on board eth0 works like a charm, and also a pci-express additional nic!
So now my request to proxmox team is:
can you enable IOMMU in the kernel by default, or there are bad things that could happen with it?
 
can you enable IOMMU in the kernel by default, or there are bad things that could happen with it?

It's a kernel default - if the kernel folks don't think it's wise as a default, there's probably a reason for it.
 
And to have it auto build the driver when a new kernel gets installed:
Code:
apt-get install dkms build-essentials pve-headers-2.6.32-25-pve
Code:
cat <<EOF > /usr/src/r8168-8.037.00/dkms.conf
PACKAGE_NAME=r8168
PACKAGE_VERSION=8.037.00
MAKE[0]="'make'"
BUILT_MODULE_NAME[0]=r8168
BUILT_MODULE_LOCATION[0]="src/"
DEST_MODULE_LOCATION[0]="/kernel/updates/dkms"
AUTOINSTALL="YES"
EOF
Code:
dkms add -m r8168 -v 8.037.00
dkms build -m r8168 -v 8.037.00
dkms install -m r8168 -v 8.037.00

Hi Mir or to anybody can help me:

If i want disable dkms for 8.037.00 for enable it with the new version 8.038.00, only is necessary run " dkms del -m r8168 -v 8.037.00" for disable it? or is necessary run something more for disable it?

And after that the old version (8.037.00) is disabled can i delete the respective folder (/usr/src/r8168-8.037.00)?

Anything else I need to know?

Best regards
Cesar
 
It should be: dkms remove -m r8168 -v 8.037.00 -k 2.6.32-27-pve.

There should be no need to remove the old folder after it has been remove, it will not be installed again.
 
It should be: dkms remove -m r8168 -v 8.037.00 -k 2.6.32-27-pve.

There should be no need to remove the old folder after it has been remove, it will not be installed again.

Many thanks Mir for your answer, and please let me to do two more questions and excuse me if i do a very basic questions:
1- If I need to do a downgrade of kernel that dkms don't worked, I guess that dkms will do the work for this downgrade... right?

2- if i run "aptitude full-upgrade", i guess that the kernel header of all kernels that i will install also come?, or need I to run the command of other manner?

Best regards
Cesar
 
Yes, to both answers.

Many thanks for the answers mir!!!:)

It should be: dkms remove -m r8168 -v 8.037.00 -k 2.6.32-27-pve.

And please let me to do a more question:
If i have DRBD ver 8.4.3 installed with dkms, and now i want change the configuration of dkms for it install DRBD ver 8.4.4, how i say to dkms that remove the autoinstall of DRBD ver 8.4.3?

Best regards
Cesar
 
Yes, to both answers.

Hi mir

Today i had that run "aptitude update && aptitude full-upgrade" and dkms does not work, may be because neither the kernel headers was downloaded

what is wrong?

Best regards
Cesar
 
Yes, you need the kernel headers to be able to build kernel modules.

And why i don't have the kernel headers downloaded?, you said that i don't need download manually nothing more for that "dkms" do his work, then i think that i don't need download the kernel headers when i run "aptitude update && aptitude full-upgrade".

What i am doing wrong here?, or what i need to know for that "dkms" do his work?

Best regards
Cesar

Re edited:
1- I have executed your how to as you said in this link:
http://forum.proxmox.com/threads/16...rk-quot-out-of-the-box-quot?p=83844#post83844
but with the difference that i did the compilation manually first and works well, after, i did the configuration of dkms.
 
Last edited:
And why i don't have the kernel headers downloaded?, you said that i don't need download manually nothing more for that "dkms" do his work, then i think that i don't need download the kernel headers when i run "aptitude update && aptitude full-upgrade".

What i am doing wrong here?, or what i need to know for that "dkms" do his work?
This is a packaging issue. Proxmox does not have a meta package to ensure kernel headers are upgraded along with the kernel so lacking that means it is left to the user to remember to download the kernel headers when a kernel upgrade is done.
 
This is a packaging issue. Proxmox does not have a meta package to ensure kernel headers are upgraded along with the kernel so lacking that means it is left to the user to remember to download the kernel headers when a kernel upgrade is done.

Please, let me to do two questions:
1- ie that for that dkms works well, can i run "aptitude install pve-kernel* linux-headers*"?
2- I see a difference (may be important) in your mini how to and this link:
https://gist.github.com/datenimperator/5603638#file-dkms-conf

The difference more important:
You say : MAKE[0]="'make'"
and the web link say: MAKE[0]="'make' modules"
and when i run manually the compilation (that works very well) : ... make modules && make all ...

Then, the "dkms.conf" file, have something wrong?, or both options are valid?

Best regards for my teacher :D (very respectfully)
Cesar
 
Last edited:
Please, let me to do two questions:
1- ie that for that dkms works well, can i run "aptitude install pve-kernel* linux-headers*"?
aptitude install pve-headers-2.6.32-28-pve
aptitude reinstall pve-kernel-2.6.32-28-pve

should fix it
2- I see a difference (may be important) in your mini how to and this link:
https://gist.github.com/datenimperator/5603638#file-dkms-conf
The difference more important:
You say : MAKE[0]="'make'"
and the web link say: MAKE[0]="'make' modules"
and when i run manually the compilation (that works very well) : ... make modules && make all ...

Then, the "dkms.conf" file, have something wrong?, or both options are valid?

Best regards for my teacher :D (very respectfully)
Cesar
make modules is useless since you are compiling outside of the kernel source tree. make without options is sufficient.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!