LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Blacklisting modules doesn't work on custom Slackware ARM 14.0 (http://www.linuxquestions.org/questions/slackware-14/blacklisting-modules-doesnt-work-on-custom-slackware-arm-14-0-a-4175431580/)

Linux.tar.gz 10-10-2012 10:41 PM

Blacklisting modules doesn't work on custom Slackware ARM 14.0
 
Hi !

I did what i could, used /etc/modprobe.d/ files and the newer /lib/modprobe.d/, the modules i choose to blacklist are loaded.

I had no problem with the 13.37 release.

My custom version is not supposed to have been modified on these parts of the system.
Seems that the bare 14.0 doesn't have this bug.

And don't know where to begin the debug :/.

GazL 10-11-2012 02:26 AM

Yes, I've discovered this too (though not on arm).

I believe it's the change to kmod that has affected this. The modprobe command now ignores the blacklist unless you specify the -b option, and rc.* files that load a module haven't been changed to run "modprobe -b" rather than "modprobe"

I noticed it when I was trying to blacklist the alsa-oss modules which are loaded from rc.alsa.


I was going to drop Pat a note about it, but was giving the poor chap time to recover after the release.

Linux.tar.gz 10-11-2012 10:51 AM

Ok.
Thanks.

So for those who need a workaround, edit the same files and put:

install module_name /bin/false
instead of
blacklist module_name

After that modprobe will not work, but you can use insmod.

GazL 10-11-2012 11:26 AM

Changing any occurrences of "modprobe" to"modprobe -b" in the rc files seems to be the most sensible solution to me.

Linux.tar.gz 10-11-2012 01:34 PM

Ok, will take a look.

Thanks.

H_TeXMeX_H 10-12-2012 02:15 AM

Quote:

Originally Posted by GazL (Post 4802725)
Yes, I've discovered this too (though not on arm).

I believe it's the change to kmod that has affected this. The modprobe command now ignores the blacklist unless you specify the -b option, and rc.* files that load a module haven't been changed to run "modprobe -b" rather than "modprobe"

I noticed it when I was trying to blacklist the alsa-oss modules which are loaded from rc.alsa.


I was going to drop Pat a note about it, but was giving the poor chap time to recover after the release.

Blacklisting modules works for me on Slackware64 14.0. For example I blacklisted joydev, because my M$ keyboard is detected as a joystick because it has some sliders.

Code:

bash-4.2$ lsmod | grep joydev
bash-4.2$ cat /lib/modprobe.d/joydev.conf
blacklist joydev

It seems to have worked, because it is not loaded.

GazL 10-12-2012 06:16 AM

Quote:

Originally Posted by H_TeXMeX_H (Post 4803639)
Blacklisting modules works for me on Slackware64 14.0. .

Code:

root@ws1:~# lsmod |grep oss
root@ws1:~# cat /etc/modprobe.d/sound.conf
# Ensure that on-board intel sound is always card 0:

options snd slots=snd-hda-intel

#Blacklist Alsa OSS emulation.

blacklist snd_pcm_oss
blacklist snd_mixer_oss
blacklist snd_seq_oss
root@ws1:~# modprobe snd_pcm_oss
root@ws1:~# lsmod |grep oss
snd_pcm_oss            38991  0
snd_mixer_oss          15404  1 snd_pcm_oss
snd_pcm                72128  3 snd_hda_codec,snd_hda_intel,snd_pcm_oss
snd                    57476  10 snd_timer,snd_pcm,snd_hwdep,snd_hda_codec,snd_hda_intel,snd_hda_codec_realtek,snd_mixer_oss,snd_pcm_oss,snd_seq_device,snd_seq
root@ws1:~# rmmod snd_pcm_oss snd_mixer_oss
root@ws1:~# lsmod |grep oss
root@ws1:~# modprobe -b snd_pcm_oss
root@ws1:~# lsmod |grep oss
root@ws1:~#

Recent versions of udev run "modprobe -b" to load modules. Slackware's rc files don't. If udev loads the module then blacklisting will work. If it is loaded by an rc file then it wont.

guanx 10-12-2012 08:06 AM

Also not working here on Slackware 14 x86. This is my "/lib/modprobe.d/blacklist":
Code:

blacklist lp
blacklist plip
blacklist ppdev
blacklist parport_pc
blacklist parport

I made sure that "modprobe lp/plip/parport_pc/..." are commented out. And I found no other related modprobes under "/etc/rc.d".

H_TeXMeX_H 10-12-2012 08:40 AM

Quote:

Originally Posted by GazL (Post 4803785)
Code:

root@ws1:~# lsmod |grep oss
root@ws1:~# cat /etc/modprobe.d/sound.conf
# Ensure that on-board intel sound is always card 0:

options snd slots=snd-hda-intel

#Blacklist Alsa OSS emulation.

blacklist snd_pcm_oss
blacklist snd_mixer_oss
blacklist snd_seq_oss
root@ws1:~# modprobe snd_pcm_oss
root@ws1:~# lsmod |grep oss
snd_pcm_oss            38991  0
snd_mixer_oss          15404  1 snd_pcm_oss
snd_pcm                72128  3 snd_hda_codec,snd_hda_intel,snd_pcm_oss
snd                    57476  10 snd_timer,snd_pcm,snd_hwdep,snd_hda_codec,snd_hda_intel,snd_hda_codec_realtek,snd_mixer_oss,snd_pcm_oss,snd_seq_device,snd_seq
root@ws1:~# rmmod snd_pcm_oss snd_mixer_oss
root@ws1:~# lsmod |grep oss
root@ws1:~# modprobe -b snd_pcm_oss
root@ws1:~# lsmod |grep oss
root@ws1:~#

Recent versions of udev run "modprobe -b" to load modules. Slackware's rc files don't. If udev loads the module then blacklisting will work. If it is loaded by an rc file then it wont.

Oh, I see, I understand now.

guanx 10-12-2012 12:09 PM

Solved.

The config file name must end with ".conf". There had not been such requirement before.


All times are GMT -5. The time now is 07:05 AM.