LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 10-10-2012, 10:41 PM   #1
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Rep: Reputation: 100Reputation: 100
Unhappy 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 :/.
 
Old 10-11-2012, 02:26 AM   #2
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,882

Rep: Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988
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.

Last edited by GazL; 10-11-2012 at 02:27 AM.
 
1 members found this post helpful.
Old 10-11-2012, 10:51 AM   #3
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Original Poster
Rep: Reputation: 100Reputation: 100
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.
 
Old 10-11-2012, 11:26 AM   #4
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,882

Rep: Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988
Changing any occurrences of "modprobe" to"modprobe -b" in the rc files seems to be the most sensible solution to me.
 
Old 10-11-2012, 01:34 PM   #5
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Original Poster
Rep: Reputation: 100Reputation: 100
Ok, will take a look.

Thanks.
 
Old 10-12-2012, 02:15 AM   #6
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Quote:
Originally Posted by GazL View Post
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.
 
Old 10-12-2012, 06:16 AM   #7
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,882

Rep: Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988Reputation: 4988
Quote:
Originally Posted by H_TeXMeX_H View Post
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.

Last edited by GazL; 10-12-2012 at 06:18 AM.
 
1 members found this post helpful.
Old 10-12-2012, 08:06 AM   #8
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,172

Rep: Reputation: 227Reputation: 227Reputation: 227
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".
 
Old 10-12-2012, 08:40 AM   #9
H_TeXMeX_H
LQ Guru
 
Registered: Oct 2005
Location: $RANDOM
Distribution: slackware64
Posts: 12,928
Blog Entries: 2

Rep: Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301Reputation: 1301
Quote:
Originally Posted by GazL View Post
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.
 
Old 10-12-2012, 12:09 PM   #10
guanx
Senior Member
 
Registered: Dec 2008
Posts: 1,172

Rep: Reputation: 227Reputation: 227Reputation: 227
Solved.

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


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Blacklisting automatic driver modules xerxesdaphat Linux - Hardware 1 11-02-2007 02:13 AM
java: java.util.Hashmap doesn't work for a custom object kpachopoulos Programming 2 04-15-2007 03:25 PM
getting sound modules to work on a Thinkpad T20 with a custom 2.6.10 kernel donkeygod Debian 2 03-23-2005 10:04 AM
printer modules not loaded; parallel printer doesn't work blinux1 Linux - Newbie 7 06-24-2004 09:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 03:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration