Blacklisting a kernel module

This forum is dedicated to advanced help and support :

Ask here your questions about advanced usage of Mageia. For example you may post here all your questions about network and automated installs, complex server configurations, kernel tuning, creating your own Mageia mirrors, and all tasks likely to be touchy even for skilled users.

Blacklisting a kernel module

Postby DiBosco » May 22nd, '19, 18:59

Folks,

Trying to follow these instructions:

http://baby-panda.github.io/linux/RTS5229_driver/

When I try to remove rtsx_pci I can do so, *but* when I do this:
Code: Select all
lspci -v | grep rts


I get this:
Code: Select all
       I/O ports at 5000 [size=64]
        I/O ports at 5088 [size=8]
        I/O ports at 5094 [size=4]
        I/O ports at 5080 [size=8]
        I/O ports at 5090 [size=4]
        I/O ports at 5060 [size=32]
        I/O ports at 5040 [size=32]
        I/O ports at 4000 [size=256]
        Kernel driver in use: rts5229
        Kernel modules: rtsx_pci, rts5229


Even when i have removed the rtsx_pci module with rmmod.

I can't run update-initramfs -u as we don't seem to have that command.

I tried this:

Code: Select all
init u ramfs


But it tells me too many arguments/

I tried adding:

rdblacklist=rtsx_pci

To "Append" in the boot options in Control Centre, but to no avail.

Can anyone tell me how I can stop rtsx_pci loading please?

Oh, I even tried adding:

Code: Select all
blacklist rtsx_pci


to

blacklist-compat.conf

But that didn't help either.

to blacklist-mga.conf

Is anyone able to tell me what to do to stop rtsx_pci loading please?

Many thanks.
DiBosco
 
Posts: 256
Joined: Aug 31st, '11, 10:22

Re: Blacklisting a kernel module

Postby ITA84 » May 22nd, '19, 19:22

What's the output of the following command?

Code: Select all
/sbin/lsmod | grep rts
ITA84
 
Posts: 116
Joined: Mar 5th, '13, 18:15

Re: Blacklisting a kernel module

Postby DiBosco » May 22nd, '19, 19:30

ITA84 wrote:What's the output of the following command?

Code: Select all
/sbin/lsmod | grep rts

Code: Select all
/sbin/lsmod | grep rts
rts5229               319488  0
DiBosco
 
Posts: 256
Joined: Aug 31st, '11, 10:22

Re: Blacklisting a kernel module

Postby doktor5000 » May 22nd, '19, 19:53

DiBosco wrote:When I try to remove rtsx_pci I can do so, *but* when I do this:
Code: Select all
lspci -v | grep rts
[...]
        Kernel driver in use: rts5229
        Kernel modules: rtsx_pci, rts5229


Even when i have removed the rtsx_pci module with rmmod.


Which is perfectly normal. lspci will show you kernel modules that would be suitable for that device, by going over the modalias information of each kernel module. That's the line "Kernel modules:"
Only the line "Kernel driver in use:" actually reflects the information from lsmod and shows what kernel module is currently loaded for that device.
For some context information you may want to read https://wiki.archlinux.org/index.php/Modalias

On a related note, blacklisting a module does not prevent you or an application from running e.g. modprobe rtsx_pci which would still load that module, even if you blacklisted it.
And rdblacklist=rtsx_pci only applies to the initrd, but if that module is not in the initrd, then this has no effect. Same as for update-initramfs -u (which would translate to dracut -f).

Apart from that, this is close to a typical X/Y problem. Maybe next time simply ask something like:
"I've got this card reader, and need to load a kernel module for it to make it work.
And I've found this howto on github.io, can somebody help me translate this to Mageia"
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 14767
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany

Re: Blacklisting a kernel module

Postby DiBosco » May 23rd, '19, 13:16

OK, thanks for the info. :)

Apart from that, this is close to a typical X/Y problem. Maybe next time simply ask something like:
"I've got this card reader, and need to load a kernel module for it to make it work.
And I've found this howto on github.io, can somebody help me translate this to Mageia"


OK, point taken! Is this the place to ask for that very help or should I start a new thread?

If this is the place, then:

After the latest kernel update I recompiled and followed the instructions again.

As before I get the module in use as what I compiled, which seems good.

mcc tells me the module for RTS5229 is rts5229.

In the hard disk section of browse hardware it tells me I have sda (my SSD) sdb which is a jtag debugger (!) and sdc which is use Module: ‎rts5229.

So it seems like I am close, but I still get nothing showing up at all when I plug in an SD card. Not even with

Code: Select all
 journalctl -af


If I should open a new thread, I will delete this post and start a new one. Hope this information is enough to point me in the right direction.

Thanks :)








Thanks.
DiBosco
 
Posts: 256
Joined: Aug 31st, '11, 10:22

Re: Blacklisting a kernel module

Postby doktor5000 » May 24th, '19, 12:22

DiBosco wrote:Is this the place to ask for that very help or should I start a new thread?

Well, you already did, not much point in creating a new thread for this.
Cauldron is not for the faint of heart!
Caution: Hot, bubbling magic inside. May explode or cook your kittens!
----
Disclaimer: Beware of allergic reactions in answer to unconstructive complaint-type posts
User avatar
doktor5000
 
Posts: 14767
Joined: Jun 4th, '11, 10:10
Location: Leipzig, Germany


Return to Advanced support

Who is online

Users browsing this forum: No registered users and 1 guest

cron