0

Linux noob here (starting out). I had a couple successful install trials before and now I am settling on with one configuration. I have now failed to get my network card to work.

Desktop PC, very old system - AMD Phenom II 955, Gigabyte GA-MA790XT-UD4P

The driver I am interested in is this: GBE Ethernet LINUX driver r8168 for kernel up to 5.17

for a background: I had used USB-Ethernet dongle to try out some of the r8168 install tutorials and dnf upgrade had updated my kernel from fresh install's 5.17 to 5.18. -> I thus suspect kernel inconsistencies but how to rework this ?

The kernel is using r8169 drivers (lspci -v), which I know doesn't work for my system! Using the driver's included autorun.sh did work for fedora 35 (I believe like half a year ago) and I have also successfully been able to install the r8168 drivers previously on Ubuntu.

Doing "$ sudo ./autorun.sh" from the folder gets me this output:

Check old driver and unload it
Build the module and install
make[2]: *** /lib/modules/5.18.5-200.fc36.x86_64/build: No such file or directory. Stop.
make[1]: *** [Makefile:158: clean] Error 2
make: *** [Makefile:48: clean] Error 2

Thus I somehow need to force the Fedora to use r8168 instead, but I can't figure out how - WITHOUT having internet access (duh, because the GBE Ethernet card is not working). AND I want this solution to work afterwards with no USB-Ethernet dongle.

I checked the that location and it lists the build file, but opening 'build' pops-up a dialog:

The link "build" is broken. 
This link cannot be used because its target "usr/src/kernels/5.18.5-200.fc36.x86_64" doesn't exist

EDIT:

Managed to install kernel-devel for 5.18.6-200* and all dependencies. Now when running driver's autorun.sh I get this output:

Check old driver and unload it.
Build the module and install
/home/am/Documents/r8168-8.050.03/src/r8168_n.c: In function ‘rtl8168_mac_loopback_test’:
/home/am/Documents/r8168-8.050.03/src/r8168_n.c:3717:17: error: implicit declaration of function ‘pci_dma_sync_single_for_device’; did you mean ‘dma_sync_single_for_device’? [-Werror=implicit-function-declaration]
 3717 |                 pci_dma_sync_single_for_device(tp->pci_dev,
      |                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      |                 dma_sync_single_for_device
/home/am/Documents/r8168-8.050.03/src/r8168_n.c: In function ‘rtl8168_init_board’:
/home/am/Documents/r8168-8.050.03/src/r8168_n.c:26448:14: error: implicit declaration of function ‘pci_set_dma_mask’ [-Werror=implicit-function-declaration]
26448 |             !pci_set_dma_mask(pdev, DMA_BIT_MASK(64)) &&
      |              ^~~~~~~~~~~~~~~~
/home/am/Documents/r8168-8.050.03/src/r8168_n.c:26449:14: error: implicit declaration of function ‘pci_set_consistent_dma_mask’ [-Werror=implicit-function-declaration]
26449 |             !pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(64))) {
      |              ^~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:288: /home/am/Documents/r8168-8.050.03/src/r8168_n.o] Error 1
make[2]: *** [Makefile:1842: /home/am/Documents/r8168-8.050.03/src] Error 2
make[1]: *** [Makefile:154: modules] Error 2
make: *** [Makefile:41: modules] Error 2

Any great ideas to try out ?


The closest topics covering this I found were:

This doesn't state how the install was actually done, thus I have no idea how to apply this.

This ASSUMES I can access internet to do dnf upgrade's and stuff - no-go.

6
  • sudo dnf install kernel-devel and try again. Commented Jun 27, 2022 at 17:34
  • @ArtemS.Tashkinov but that requires internet access. Which i don't have without USB-Ethernet dongle. Any way to get it installed without internet access ?
    – crypton
    Commented Jun 28, 2022 at 16:01
  • Download and rpm -ivh kernel-5.18.6-100.fc35.x86_64.rpm kernel-core-5.18.6-100.fc35.x86_64.rpm kernel-modules-5.18.6-100.fc35.x86_64.rpm kernel-devel-5.18.6-100.fc35.x86_64.rpm from the mirror of your choice. Why are using an OS you've got so many troubles with is beyond me. You could install Windows and live happily ever after. It's beyond me why people create problems for themselves. I've had 0 problems with Windows over the past two decades. We are not at the age of Windows 98SE which blue screened every hour. Commented Jun 28, 2022 at 17:27
  • 1) There's not 'so many troubles' just that one driver is cumbersome to install with newer kernel version (I had it installing very easy some time ago. autorun.sh and that's it) 2) Reasons for going onto Linux are various. You could argue that slapping a Windows in and calling it a day should be the most pragmatic way, but for me, for one reason, this is a learning experience, although sometimes quite a difficult one. I'm resurrecting an old system, I don't expect things to work first go - that would be different with more modern machine (2010+). Updating my question with new information.
    – crypton
    Commented Jun 29, 2022 at 20:16
  • If the kernel doesn't support your old PC, that's a bug worth filing. Speaking of your new errors, kernel 5.18.x might have changes which have rendered your driver incompatible. You can try to find and install kernel 5.17.x, or find an updated driver. Commented Jun 30, 2022 at 3:35

1 Answer 1

0

As I can't approve comments as answers...

Posting that booting/reverting back to at least 5.17.5 kernel version made the (latest at this time) Realtek driver work.

Seems I have a bug to report.

Thanks @Artem for suggestions and help in the comments.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .