You are not logged in.

#1 2016-09-05 16:48:41

Gradient
Member
Registered: 2013-05-19
Posts: 101

[Solved] Unable to blacklist a kernel module

I am trying to use the module r8168 for my Ethernet card instead of the r8169 module.

I added blacklist r8169 in /etc/modprobe.d/blacklist.conf.

It seems to work as lsmod | grep r81 shows only that r8168 is loaded. But, I get this

$ lspci -v
03:00.2 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller (rev 06)
        Subsystem: ASUSTeK Computer Inc. Device 200f
        Flags: bus master, fast devsel, latency 0, IRQ 10
        I/O ports at e000 [size=256]
        Memory at f0004000 (64-bit, prefetchable) [size=4K]
        Memory at f0000000 (64-bit, prefetchable) [size=16K]
        Capabilities: <access denied>
        Kernel modules: r8169

It seems like the r8169 modules is still there somehow. How can I make my Ethernet card use the module I installed manually (r8168).

(I have also tried adding the blacklist file in mkinitcpio.conf as the wiki says, but it didn't work.)

Last edited by Gradient (2016-09-05 22:34:46)

Offline

#2 2016-09-05 18:15:23

loqs
Member
Registered: 2014-03-06
Posts: 19,183

Re: [Solved] Unable to blacklist a kernel module

man 8 lspci wrote:

       Driver Kernel driver currently handling  the  device  (optional,  Linux
              only).

       Module Kernel  module  reporting  that  it  is  capable of handling the
              device (optional, Linux only).

If the driver was loaded would expect to see

	Kernel driver in use: r8169
        Kernel modules: r8169

Offline

#3 2016-09-05 18:33:22

Gradient
Member
Registered: 2013-05-19
Posts: 101

Re: [Solved] Unable to blacklist a kernel module

Yes, I only see

Kernel modules: r8169

Why isn't the r8168 module there and in use?

Offline

#4 2016-09-05 18:39:22

loqs
Member
Registered: 2014-03-06
Posts: 19,183

Re: [Solved] Unable to blacklist a kernel module

Gradient wrote:

Why isn't the r8168 module there and in use?

The r8168 module is not provided by the kernel package.  The lack of driver detection would indicate to me you have not installed a package providing that module or it does not match the kernel version in use.

Offline

#5 2016-09-05 18:40:47

Head_on_a_Stick
Member
From: The Wirral
Registered: 2014-02-20
Posts: 9,003
Website

Re: [Solved] Unable to blacklist a kernel module

https://wiki.archlinux.org/index.php/Ne … 11.2F8168B

https://www.archlinux.org/packages/?name=r8168

EDIT: Sorry loqs

Last edited by Head_on_a_Stick (2016-09-05 18:41:30)


Jin, Jîyan, Azadî

Offline

#6 2016-09-05 19:07:53

Gradient
Member
Registered: 2013-05-19
Posts: 101

Re: [Solved] Unable to blacklist a kernel module

I installed the r8168 package, then

# modprobe r8168

Then, I can see it is loaded :

$ lsmod | grep r81
r8168                 491520  0

It seems like it is loaded correctly (and r8169 is not). But I still see

$ lspci -v
03:00.2 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8101/2/6E PCI Express Fast/Gigabit Ethernet controller (rev 06)
        Subsystem: ASUSTeK Computer Inc. Device 200f
        Flags: bus master, fast devsel, latency 0, IRQ 10
        I/O ports at e000 [size=256]
        Memory at f0004000 (64-bit, prefetchable) [size=4K]
        Memory at f0000000 (64-bit, prefetchable) [size=16K]
        Capabilities: <access denied>
        Kernel modules: r8169

Why is it still not recognized?

Offline

#7 2016-09-05 19:27:04

loqs
Member
Registered: 2014-03-06
Posts: 19,183

Re: [Solved] Unable to blacklist a kernel module

Gradient wrote:

Why is it still not recognized?

It would appear that the r8168 module has not supplied a Modalias that would cause the kernel to associate it with the network device in question.
Are you certain the r8168 module supports that device?

Offline

#8 2016-09-05 22:34:21

Gradient
Member
Registered: 2013-05-19
Posts: 101

Re: [Solved] Unable to blacklist a kernel module

Maybe you are right that r8168 does not support my device. I am not sure how to know if it does.

Anyway, I was able to get my problem fixed and it was not related to the driver. I reverted to the default driver.

I needed to disable Predictable Interfaces Names as described in the wiki. So I did

# ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules

and my problem was solved. I can now use that interface. I don't really understand why it did not work with new predictable names. If someone has any more information on this, I would be interested.

Thanks for your help!

EDIT:

Reverting again to predictable names works. So I am back to my initial setup and everything works...

Last edited by Gradient (2016-09-06 05:16:26)

Offline

#9 2017-02-08 02:56:48

heriipurnama
Member
Registered: 2016-08-12
Posts: 2
Website

Re: [Solved] Unable to blacklist a kernel module

its work for me

$ lspci -v
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10)
    Subsystem: Lenovo Device 3854
    Flags: bus master, fast devsel, latency 0, IRQ 255
    I/O ports at 4000 [size=256]
    Memory at 94104000 (64-bit, non-prefetchable) [size=4K]
    Memory at 94100000 (64-bit, non-prefetchable) [size=16K]
    Capabilities: <access denied>   <--this
    Kernel modules: r8169
$ sudo modprobe r8169
[sudo] password for heriipurnama:
$ lsmod | grep r81
r8169                  77824  0
mii                    16384  1 r8169
$ lspci -v
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 10)
    Subsystem: Lenovo Device 3854
    Flags: bus master, fast devsel, latency 0, IRQ 131
    I/O ports at 4000 [size=256]
    Memory at 94104000 (64-bit, non-prefetchable) [size=4K]
    Memory at 94100000 (64-bit, non-prefetchable) [size=16K]
    Capabilities: <access denied>     <--this
    Kernel driver in use: r8169            <--this
    Kernel modules: r8169
$ dmesg | grep r8169
[ 2870.352802] r8169 Gigabit Ethernet driver 2.3LK-NAPI loaded
[ 2870.358835] r8169 0000:01:00.0 eth0: RTL8168g/8111g at 0xffffc900014b2000, c8:5b:76:22:fe:67, XID 10900800 IRQ 131
[ 2870.358847] r8169 0000:01:00.0 eth0: jumbo features [frames: 9200 bytes, tx checksumming: ko]
[ 2870.364976] r8169 0000:01:00.0 enp1s0: renamed from eth0
[ 2870.439434] r8169 0000:01:00.0 enp1s0: link down
$ ifconfig
enp1s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether c8:5b:76:22:fe:67  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

itw work for me

Offline

#10 2017-02-08 10:23:16

x33a
Forum Fellow
Registered: 2009-08-15
Posts: 4,587

Re: [Solved] Unable to blacklist a kernel module

@heriipurnama,

please don't necrobump solved threads.

https://wiki.archlinux.org/index.php/Co … bumping.22

Closing.

Offline

Board footer

Powered by FluxBB