1

I have a StarTech network card (details below) but don't see how to install it. After downloading the zip file and extracting, there's a Makefile file and a src folder. The readme is useless for Windows only. Makefile lists some incomplete hints at how to install. How do?

Note: sudo apt update, sudo apt upgrade, sudo reboot did not pickup the driver. The network card has a network cable plugged in with lights flashing.

Download Contents:

user@hostname:~/Desktop/r8169-6.011.00$ ls
Makefile  readme  src 

From Makefile:

all: clean modules install

modules: $(MAKE) -C src/ modules

clean: $(MAKE) -C src/ clean

install: $(MAKE) -C src/ install

Network Card Info:
1-Port PCI Gigabit Ethernet Network Card
Part # ST1000BT32
Support Webpage: https://www.startech.com/en-us/networking-io/st1000bt32
Driver Download: https://sgcdn.startech.com/005329/media/sets/realtek_Gigabit_linux-unix-novel_Drivers/[Realtek]%20Linux-Unix-Novell%20Gigabit%20PCI%20Network%20Card.zip

musicman1979
  • 1,147
  • 1
  • 9
  • 26
  • What happens when you run make && make install? You may have to run make install with sudo (make && sudo make install). That might work. – cocomac Feb 02 '22 at 00:02
  • It appears the command make is intended to be used here. It's not working for me but that may be an incompatibility issue with the older MSI system board MS-7522. adding the -C src/ install did not seem to matter and sudo make install from the directory seemed to find the src folder on it's own. – musicman1979 Feb 02 '22 at 00:26
  • 5
    You've not provided any OS & release details; nor if using a LTS release which kernel stack you're using; as drivers are actually kernel modules; the stack chosen may influence requirements. I don't see the chipset details provided in the page you provided, but I'd still not expect any kernel modules to be needed for most releases; but you gave no specific details (what chipset is on the card; your paste implies it's r8169; and what OS/release are you using?) – guiverc Feb 02 '22 at 02:15
  • The readme file gives you full instructions on how to install that driver. – Terrance Feb 02 '22 at 02:22
  • 1
    Please provide your version of Ubuntu. Also, please provide the output of the following commands: lsmod | grep r816 and uname -rv – mchid Feb 02 '22 at 04:48
  • 1
    I found an updated version of this driver directly from Realtek but I believe it's only good through kernel 5.6 and not beyond. Also, if the kernel driver works fine, it might not be necessary to install this driver (the default driver may run better). However, it has a complete and accurate readme. The make sequence is slightly different. First, disable the kernel module: sudo rmmod r8169 then run the make sequence: sudo make clean modules then sudo make install then sudo depmod -a then sudo modprobe r8169 – mchid Feb 02 '22 at 04:53

2 Answers2

2

The download you provided is listed as the r8169 driver. The Realtek r8169 module is provided by the default linux kernel (it's pre-installed).

First, run the following command to check if the module is in use:

lsmod | grep r816

If the module is listed, you are done. Use the next step to list your devices. If the module is not listed, proceed to the next step and then continue.

Next, run the following command to list your current devices:

ifconfig -a

Then, use the following commands to enable the kernel module (driver) and to list your devices:

sudo modprobe  r8169
ifconfig -a

Finally, you should see an additional ethernet device listed.


############################################################

METHOD 2:

Use the following method if the default driver doesn't work:

If you have problems with the kernel module, you can download the driver directly from Realtek.

Click here to visit the website

Select "GBE Ethernet LINUX driver r8169 for kernel up to 5.6" to download.

Then, install the dependencies:

sudo apt update
sudo apt install build-essential linux-headers-generic linux-headers-$(uname -r)

Next, cd into the same directory as the download and then run the following commands:

mkdir r8169
cd r8169
tar xvf ../r8169*bz2 --strip-components 1

If you get a "not found" error for the following command, just ignore and proceed.

sudo modprobe -r r8169
sudo make clean modules
sudo make install
sudo depmod -a
sudo modprobe r8169

Check to see if the module is loaded:

lsmod | grep r8169

List your devices:

ifconfig -a

############################################################

The drawback of installing the driver manually is that you will have to reinstall the driver after any future kernel update.

Otherwise, you will need to use the following instructions to manually update the driver.

After you boot up using a new kernel, cd back into your r8169 directory and then run the following commands:

sudo modprobe -r r8169
sudo make clean
sudo make clean modules
sudo make install
sudo depmod -a
sudo modprobe r8169

However, as mentioned by @Terrance, you can avoid this problem by converting the driver to DKMS which will automatically install during future updates.

When following the instructions, don't forget to use the corresponding driver name r8169 and also the correct version number of your downloaded driver.

mchid
  • 43,546
  • 8
  • 97
  • 150
  • Good solid answer! +1 You can however, convert a downloaded driver into DKMS. https://askubuntu.com/a/1334101/231142 – Terrance Feb 02 '22 at 21:49
  • Awesome. I knew that was possible but never took the time to learn or figure it out. – mchid Feb 02 '22 at 22:54
  • Upon further inspection, it appears the downloaded version exactly matches the kernel version. – mchid Feb 03 '22 at 01:24
  • The dkms.conf file also needs some tweaking for this one. Again, the kernel version exactly matches this so it isn't necessary to use dkms for this but for a different version, it might help to use /usr/bin/make instead of make in the dkms.conf file. – mchid Feb 03 '22 at 01:57
  • Also, since the instructions for this uses make clean modules you would have to use /usr/bin/make -C usr/ modules for MAKE and do the same for CLEAN – mchid Feb 03 '22 at 02:00
  • Feel free to use my instructions there and change them as need be to match the driver here. I think it would be cool! – Terrance Feb 03 '22 at 03:04
  • @Terrance This one is r8169 and I think the make sequence is completely different than r8168. In this one, the main makefile links the commands to a build script. It's kind of weird compared to other realtek sources I've seen. – mchid Feb 04 '22 at 22:53
  • Well, I have a file server here that has both a r8168 and r8169 in it. I could test it out and see how well it works for dkms carry over. I do have to run a fix on it after kernel updates because it will bind the r8168 card to the r8169 driver since it is still there and not blacklisted. – Terrance Feb 04 '22 at 23:36
  • @Terrance The thing is that it really doesn't make a difference with the r8169 driver because after you build it, it states: good news! the kernel version in use is the exact same version so the built version will not be used . . . or something similar. – mchid Feb 04 '22 at 23:41
  • OK, fair enough. :) – Terrance Feb 04 '22 at 23:46
  • @Terrance I might check out the r8168 and see what happens though. – mchid Feb 05 '22 at 04:50
  • 1
    You'll have to let me know. I am lovin the r8168 driver on my RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller as when I was using the r8169 for no reason whatsoever, the network would die, I would then have to actually hard power cycle my tower by killing all power to it. Then the NIC would work again for a while. Ever since going with the actual r8168 driver and blacklisting the r8169, no issues whatsoever. :) – Terrance Feb 05 '22 at 05:11
0

Why do you want to install something? In-tree kernel driver r8169 supports this card out of the box. There may just be the situation that your distro uses r8168 for RTL8168 PCIe cards and has r8169 blacklisted. Then manually check with a "modprobe r8169" and remove the blacklisting afterwards.

hkall
  • 39