3

Hello I have installed 16.04.2 and I am trying to install the realtek driver. I have tried installing it by apt-get, but it fails and exits on starting the compile. Here is the log of the make:

  DKMS make.log for r8168-8.041.00 for kernel 4.8.0-36-generic (x86_64)
Thu Feb 16 21:25:44 PST 2017
make: Entering directory '/usr/src/linux-headers-4.8.0-36-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:289: 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:1491: 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.8.0-36-generic'

Any help is appreciated as I have no idea how to fix this. Thanks.

2 Answers2

4

You can install a patched for the 4.8 kernel driver from Yakkety this way:

wget http://mirrors.kernel.org/ubuntu/pool/universe/r/r8168/r8168-dkms_8.042.00-2_all.deb
sudo dpkg -i r8168-dkms_8.042.00-2_all.deb
Pilot6
  • 90,100
  • 91
  • 213
  • 324
  • OP is using 4.8. – Pilot6 Feb 18 '17 at 09:36
  • I thought 16.04 came with 4.4. Maybe they changed that in 16.04.2? OP says it came with 4.8. Live and learn. – heynnema Feb 18 '17 at 13:18
  • 16.04.2 iso has the 4.8 kernel. – Pilot6 Feb 18 '17 at 13:21
  • After following @Pilot6 instructions you need to blacklist r8169 and mii. Then you need to go into connections and fiddle with IPv4 (or something like that) and set DHCP to automatic (or something like that) then it works. Sorry Internet Protocol is one of my weak points. – WinEunuuchs2Unix Apr 11 '17 at 01:15
0

Found a good work arround by installing a module by hand. Just download the module source from here: http://www.realtek.com.tw/downloads/downloadsView.aspx?Langid=1&PNid=13&PFid=5&Level=5&Conn=4&DownTypeID=3&GetDown=false#2

Just take the LINUX driver for kernel up to 4.7 which will also work for 4.8 kernels. You can simply start autorun.sh and it will compile and install the kernel module for you ethernet adapter.