WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: modprobe blacklist not working  (Read 9380 times)

Offline mb

  • Jr. Member
  • **
  • Posts: 69
modprobe blacklist not working
« on: December 18, 2011, 02:45:06 PM »
I am trying to blacklist the module snd_intel8x0m as it is causing problems with snd_intel8x0. i have in the file /etc/modprobe.conf; blacklist snd-intel8x0m, blacklist snd_intel8x0m and blacklist intel8x0m. Yet (sometimes, it seems) it still loads. I also tried creating /etc/modprobe.d/blacklist.conf in case this should be used instead- no change. Same goes for firewire_ohci and firewire_core.

Am i putting in the name right? AFAICT it should just be whatever is in lsmod, but with '-' replacing '_'. Correct? If the name isn't the issue then what might it be??

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: modprobe blacklist not working
« Reply #1 on: December 18, 2011, 02:49:14 PM »
Use blacklist boot code see FAQ http://distro.ibiblio.org/tinycorelinux/faq.html
10+ Years Contributing to Linux Open Source Projects.

Offline tweetyhack

  • Newbie
  • *
  • Posts: 42
Re: modprobe blacklist not working
« Reply #2 on: January 19, 2012, 01:18:07 PM »
I tried the the boot option blacklist=pcsprk,ppdev,parport,parport_pc but that doesn't seem to work. I also created /etc/modprobe.d/blacklist.conf with contents:
blacklist pcspkr
blacklist ppdev
blacklist parport
blacklist parport_pc

That does not work either. Any ideas?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14794
Re: modprobe blacklist not working
« Reply #3 on: January 19, 2012, 01:29:20 PM »
blacklist=module1 blacklist=module2, etc

eg blacklist=ssb blacklist=bcma blacklist=b43

Offline tweetyhack

  • Newbie
  • *
  • Posts: 42
Re: modprobe blacklist not working
« Reply #4 on: January 19, 2012, 02:47:54 PM »
ahh, muy bueno! Thanks Juanito! I still like my format better, short and simple :). I know archlinux does it that way. Can't be too hard to implement right?
if(",".exist){
  modules = blacklist.split(",")
  modules.each{
    not load each module
 }
}else{
  not load single module
}
« Last Edit: January 19, 2012, 02:52:43 PM by tweetyhack »

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11581
Re: modprobe blacklist not working
« Reply #5 on: January 19, 2012, 04:04:59 PM »
Assuming it does impact the startup script too badly, this might be worth implementing, considering
that the line length limit for boot codes is 256 characters. Changing to a comma separated format
would save 10 characters for each additional module blacklisted. While this might not sound like a
big deal, it could make a difference for someone using several UUIDs at 36 characters a piece.

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 11043
Re: modprobe blacklist not working
« Reply #6 on: January 20, 2012, 02:52:42 AM »
Is that python? In a boot script?

Yes, if you have many modules to blacklist, please post a patch for a comma delimited format. But if you go over a few modules, it still won't be enough, and it would be better to remaster your blacklist file in.
The only barriers that can stop you are the ones you create yourself.

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
Re: modprobe blacklist not working
« Reply #7 on: January 22, 2012, 05:51:38 AM »
Here would be a patch that should allow to have comma delimited blacklists (in addition to the multiple blacklist boot codes option):
Code: [Select]
--- tc-config-orig
+++ tc-config
@@ -101 +101,3 @@
-               echo "blacklist $i" >> /etc/modprobe.d/blacklist.conf
+               echo "$i" | tr ',' '\n' | while read j ; do
+                       echo "blacklist $j" >> /etc/modprobe.d/blacklist.conf
+               done

That means that "blacklist=first blacklist=second blacklist=third blacklist=fourth" and "blacklist=first,second,third blacklist=fourth" should both create the same '/etc/modprobe.d/blacklist.conf'.

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: modprobe blacklist not working
« Reply #8 on: January 25, 2012, 01:10:29 PM »
Patch accepted. Thanks.
10+ Years Contributing to Linux Open Source Projects.