[Pkg-alsa-devel] Bug#240125: The new broken world of 2.6, ALSA, and hotplug.

Theodore Ts'o Theodore Ts'o <tytso@mit.edu>, 240125@bugs.debian.org
Wed, 31 Mar 2004 11:11:11 -0500


clone 238278 -1
reassign -1 hotplug
retitle -1 hotplug: pci_boot_events should be optional
severity -1 normal
submitter -1 tytso@mit.edu
thanks

On Tue, Mar 30, 2004 at 04:44:43PM -0800, Scott Robinson wrote:
> package alsa-base
> severity 238278 grave
> merge 240125 238278
> thanks
> 
> To condense, the problem is as such:
> 
> Any user with hotplug and and an alsa enabled kernel will run in to multiple
> problems.

This is not the only issue.  Hotplug's behaviour also causes problems
because because it loading every module it can find has all sorts of
downsides, including drawing too much power: a Mini PCI wireless
ethernet card, for example.  On airplanes, starting the Mini PCI
wireless card automatically on boot is also a problem from a
(perceived) safety point of view, since airplane pilots are worried it
may cause interference with the plane's systems.

Yet another problem with hotplug's current behaivour is that it also
loads modules which currently mean that suspending the laptop ===
instant death.

On machines with small amounts of memory, you may also not want to
load a driver just because it's available; you may want to load it
only if you're going to need it.

Yeah, yeah, I could add them all to the blacklist, but then I'd be
blacklisting pretty much every single driver the !@#$#!@ hotplug
script would be trying to load, and this is not particularly
convenient. 

My solution?

--- /etc/hotplug/pci.rc~	2004-03-22 10:22:25.000000000 -0500
+++ /etc/hotplug/pci.rc	2004-03-30 07:40:33.000000000 -0500
@@ -62,7 +62,7 @@
 # See how we were called.
 case "$1" in
   start)
-	pci_boot_events
+	# pci_boot_events
         ;;
   stop)
 	# echo "pci stop -- ignored"

It's not at all clear to me that the hotplug framework is the right
way to deal with automatically loading modules at boot time.  We have
other schemes, such as /etc/modules, which work just as well, if not
better.  (It's much easier to add modules that you *do* want to load
at boot time, as opposed to needing to blacklist every single module
you don't want ---- and in my case, the number of modules that I
*don't* want to load, for power management reasons, ***far*** exceeds
the number of modules that I want loaded automatically.)

I think it would make sense if the hotplug package had a debconf or
/etc/default/hotplug option which allowed the user to choose whether
or not it should let the hotplug wildly install every single driver it
can get its hands on with complete abandon --- this is not necessarily
the right answer, and on laptops, it is almost always the wrong
answer, given the sad, sad, **sad** state of power management in the
2.6 kernel.  

(In fact, normally the reason why I compile a driver as a module
instead of compiling it straight into the kernel is because there's
some very strong reason why it needs to be a module --- for example,
if I load it as a module, I will never be able to suspend my laptop
ever again without rebooting....)

					- Ted