Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
hotplug blacklist doesn't work with pcspkr
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
blurp
Tux's lil' helper
Tux's lil' helper


Joined: 21 Oct 2004
Posts: 102

PostPosted: Thu Feb 01, 2007 6:29 am    Post subject: hotplug blacklist doesn't work with pcspkr Reply with quote

I used to disable the annonying system beeper by having a line
Code:
pcspkr
in /etc/hotplug/blacklist.

After upgrading to gentoo-sources-2.6.19-r5 with initrd, that annonying module keeps getting loaded for no reason. There is no dependency on that module at all as I can always
Code:
rmmod pcspkr

immediately after login appears. However, doing this after every laptop boot is as annoying as the beeper itself. Help!

I'm using hotplug-20040923-r2 and hotplug-base-20040401.
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1611
Location: U.S.A.

PostPosted: Fri Feb 02, 2007 4:00 am    Post subject: Reply with quote

Can't you just mute the pc speaker using your mixer app, or alsamixer, or alsaconf, or manually in /etc/asound.state? Or if you are using a desktop environment (ie. gnome or kde) don't they have the ability to configure the "system bell", to include turning it off?
Back to top
View user's profile Send private message
blurp
Tux's lil' helper
Tux's lil' helper


Joined: 21 Oct 2004
Posts: 102

PostPosted: Fri Feb 02, 2007 4:22 am    Post subject: Reply with quote

No, the pcspkr is not related to the ALSA modules, so the mixer stuff have no effect.

Currently my "automatic" solution is to append
Code:
rmmod pcspkr
to /etc/conf.d/local.start. It is a solution, but not neat. The module gets loaded and unloaded again - so there's a beep during bootup.

Ultimately, being true to the opensource spirit, i would like to find out what is wrong (with kernel or hotplug, hence the title) and if this is a known bug or something. But i don't have the know-how to find out if this is a bug --- i don't even know how to start...

edit: location of local.start.


Last edited by blurp on Fri Feb 02, 2007 6:18 am; edited 1 time in total
Back to top
View user's profile Send private message
yabbadabbadont
Advocate
Advocate


Joined: 14 Mar 2003
Posts: 4791
Location: 2 exits past crazy

PostPosted: Fri Feb 02, 2007 4:36 am    Post subject: Reply with quote

I think recent versions of udev have been ignoring all attempts to blacklist stuff... :(

Rebuild your kernel and configure it manually. Leave out support for the standard pc speaker. (or do what I did, don't connect the speaker to the motherboard :D)
_________________
Bones McCracker wrote:
On the other hand, regex is popular with the ladies.
Back to top
View user's profile Send private message
blurp
Tux's lil' helper
Tux's lil' helper


Joined: 21 Oct 2004
Posts: 102

PostPosted: Fri Feb 02, 2007 4:49 am    Post subject: Reply with quote

yabbadabbadont wrote:
I think recent versions of udev have been ignoring all attempts to blacklist stuff... :(

Rebuild your kernel and configure it manually. Leave out support for the standard pc speaker. (or do what I did, don't connect the speaker to the motherboard :D)


its unlikely to be udev because my last emerge on udev according to emerge.log is more than 90 days old and the pcspkr thing came only with the new kernel upgrade a few days ago...

i don't know where the stupid module gets loaded --- can't find it in dmesg.

well, recompiling the kernel would be a last resort... and... i wish i could plug out the speaker from my laptop. but then again, sometimes (in very rare circumstances) the speaker is actually useful...
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Fri Feb 02, 2007 4:57 am    Post subject: Reply with quote

blurp wrote:
its unlikely to be udev because my last emerge on udev according to emerge.log is more than 90 days old and the pcspkr thing came only with the new kernel upgrade a few days ago...
Is "Automatic kernel module loading" under "Loadable module support --->", listed as CONFIG_KMOD=y in the file .config in the root of the source tree, set in the configuration of the kernel which is displaying this behavior? If so, try building a kernel with it unset.
Back to top
View user's profile Send private message
Bones McCracker
Veteran
Veteran


Joined: 14 Mar 2006
Posts: 1611
Location: U.S.A.

PostPosted: Fri Feb 02, 2007 5:46 am    Post subject: Reply with quote

I assume you're not talking about POST beeps. (Because I don't think I have any beeping going on during boot-up.)
Back to top
View user's profile Send private message
blurp
Tux's lil' helper
Tux's lil' helper


Joined: 21 Oct 2004
Posts: 102

PostPosted: Fri Feb 02, 2007 5:59 am    Post subject: Reply with quote

BoneKracker wrote:
I assume you're not talking about POST beeps. (Because I don't think I have any beeping going on during boot-up.)


I'm not talking about POST beeps. There is a beep once the module loads automagically moments after initrd (I have RC_PARALLEL_STARTUP = "true"). A second beep occurs once after the login screen in gdm appeared. The module is indeed loaded, as verified with lsmod, but the pcspkr line is still intact in /etc/hotplug/blacklist.

I'm currently trying out desultory's suggestion because I'm curious whether the bootup process would be broken if that option is not enabled. :P yes, i'm recompiling the kernel...
Back to top
View user's profile Send private message
blurp
Tux's lil' helper
Tux's lil' helper


Joined: 21 Oct 2004
Posts: 102

PostPosted: Fri Feb 02, 2007 6:40 am    Post subject: Reply with quote

desultory wrote:
Is "Automatic kernel module loading" under "Loadable module support --->", listed as CONFIG_KMOD=y in the file .config in the root of the source tree, set in the configuration of the kernel which is displaying this behavior? If so, try building a kernel with it unset.


ok, i removed that option and the pcspkr module still gets loaded automatically. A check:
Code:
 ~ # gunzip -c /proc/config.gz | grep KMOD
# CONFIG_KMOD is not set
CONFIG_X86_P4_CLOCKMOD=m
 ~ # lsmod | grep pcspkr
pcspkr                  1408  0


But I observed this: during the first reboot into the new kernel, there was no beep (I think pcspkr wasn't loaded). I couldn't verify because I forgot to remove that rmmod line in local.start. Also, ipw2100 was not loaded as well. But after i removed that rmmod line and did a reboot, the annoying beep came back and somehow ipw2100 returned as well. I could see ipw2100 being initiated at boot (before INIT: Entering runlevel: 5) when the lines "net.eth2" appeared. This was absent in the first boot.

IIRC, the same thing happened during the first boot of the new kernel upgrade (with CONFIG_KMOD set): ipw2100 wasn't there.

Here is my rc-update -s:
Code:
               acpid |      default graphical nonetwork       
           alsasound |      default graphical                 
            bootmisc | boot                                   
             checkfs | boot                                   
           checkroot | boot                                   
               clock | boot                                   
         consolefont | boot                                   
        cpufrequtils | boot                                   
               cupsd |      default graphical                 
                dbus |              graphical                 
               fcron |      default graphical                 
               fnfxd |              graphical                 
                fuse |      default graphical                 
                 gpm |      default graphical                 
                hald |              graphical                 
              hdparm | boot                                   
            hostname | boot                                   
             hotplug |      default graphical                 
             keymaps | boot                                   
         laptop_mode | boot                                   
               local |      default graphical nonetwork       
          localmount | boot                                   
             modules | boot                                   
              net.lo | boot                                   
              pcmcia | boot                                   
           rmnologin | boot                                   
              smartd |      default graphical                 
           syslog-ng |      default graphical                 
             urandom | boot                                   
                 xdm |              graphical                 


desultory: may i know what does unsetting CONFIG_KMOD do? It doesn't seem that there is any difference in my case.
Back to top
View user's profile Send private message
desultory
Bodhisattva
Bodhisattva


Joined: 04 Nov 2005
Posts: 9410

PostPosted: Fri Feb 02, 2007 7:57 am    Post subject: Reply with quote

blurp wrote:
ok, i removed that option and the pcspkr module still gets loaded automatically. A check:
Code:
 ~ # gunzip -c /proc/config.gz | grep KMOD
# CONFIG_KMOD is not set
CONFIG_X86_P4_CLOCKMOD=m
 ~ # lsmod | grep pcspkr
pcspkr                  1408  0
Is pcspkr still blacklisted in your hotplug configuration?

blurp wrote:
But I observed this: during the first reboot into the new kernel, there was no beep (I think pcspkr wasn't loaded). I couldn't verify because I forgot to remove that rmmod line in local.start. Also, ipw2100 was not loaded as well. But after i removed that rmmod line and did a reboot, the annoying beep came back and somehow ipw2100 returned as well. I could see ipw2100 being initiated at boot (before INIT: Entering runlevel: 5) when the lines "net.eth2" appeared. This was absent in the first boot.

IIRC, the same thing happened during the first boot of the new kernel upgrade (with CONFIG_KMOD set): ipw2100 wasn't there.
Is depmod run after the modules autoload? It is the closest thing to a logical connection which has thusfar come to mind.

blurp wrote:
desultory: may i know what does unsetting CONFIG_KMOD do? It doesn't seem that there is any difference in my case.
When set, CONFIG_KMOD allows the kernel to load modules when the kernel determines that they are needed, unset would logically be the inverse condition. My reasoning was that perhaps, for whatever reason, the kernel had determine that the speaker module was needed and loaded it.

blurp wrote:
i don't know where the stupid module gets loaded --- can't find it in dmesg.
Try something like: grep -ir2 speaker /var/log/, there should be mention of it somewhere in /var/log/kernel/.
Back to top
View user's profile Send private message
bunder
Bodhisattva
Bodhisattva


Joined: 10 Apr 2004
Posts: 5947

PostPosted: Fri Feb 02, 2007 8:00 am    Post subject: Reply with quote

why not recompile and remove the speaker from there? its under input devices > miscellaneous.

cheers
_________________
Neddyseagoon wrote:
The problem with leaving is that you can only do it once and it reduces your influence.

banned from #gentoo since sept 2017
Back to top
View user's profile Send private message
blurp
Tux's lil' helper
Tux's lil' helper


Joined: 21 Oct 2004
Posts: 102

PostPosted: Fri Feb 02, 2007 11:24 am    Post subject: Reply with quote

desultory wrote:
Is pcspkr still blacklisted in your hotplug configuration?

yes, it is.

desultory wrote:
Is depmod run after the modules autoload? It is the closest thing to a logical connection which has thusfar come to mind.

I don't know - I used genkernel and enabled initramfs. I suppose it does because genkernel is supposed to automate everything?

desultory wrote:
blurp wrote:
i don't know where the stupid module gets loaded --- can't find it in dmesg.
Try something like: grep -ir2 speaker /var/log/, there should be mention of it somewhere in /var/log/kernel/.

yeah, now i see something in the logs that is related to PC speaker; but I can't make head of why it is loaded.

desultory wrote:
blurp wrote:
desultory: may i know what does unsetting CONFIG_KMOD do? It doesn't seem that there is any difference in my case.
When set, CONFIG_KMOD allows the kernel to load modules when the kernel determines that they are needed, unset would logically be the inverse condition. My reasoning was that perhaps, for whatever reason, the kernel had determine that the speaker module was needed and loaded it.

OK, I experimented a little since I realised ipw2100 is also somewhat mysteriously loaded even when blacklisted in hotplug. This is what I have found - I have been enabling RC_COLDPLUG for the longest time and it is the one that is causing pcspkr and ipw2100 and other dunno what modules to be loaded. Once I set RC_COLDPLUG to "no", pcspkr, ipw2100, etc are not loaded.

This may sound oxymoron, but
Q: Is COLDPLUG supposed to ignore the hotplug blacklist?

I found two more things:

1. CONFIG_KMOD. If I unset it, Gnome will be unable to mount an external USB flash drive even though usb_storage is automatically loaded.
2. RC_COLDPLUG. If I set to "no", then no automounting occurs at all. usb_storage is not in lsmod.

Can someone point me to the relevant docs to /etc/conf.d/rc? Think I can learn a lot about the gentoo system bootup process.
Back to top
View user's profile Send private message
blurp
Tux's lil' helper
Tux's lil' helper


Joined: 21 Oct 2004
Posts: 102

PostPosted: Fri Feb 02, 2007 11:25 am    Post subject: Reply with quote

bunder wrote:
why not recompile and remove the speaker from there? its under input devices > miscellaneous.

cheers

I suppose I can do that for the last 3 kernel recompilation, but... I think I can learn more about gentoo linux through this dig. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum