Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 143013 - unable to stop usb audio being hotplugged
Summary: unable to stop usb audio being hotplugged
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-06 14:05 UTC by MAL
Modified: 2006-08-08 02:11 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description MAL 2006-08-06 14:05:50 UTC
This may just be a lack of understanding on my part, but if so, some documentation needs updating.  The situation is this:

I have my motherboard sound card and a usb-audio USB phone, the motherboard configured as card 0 in /etc/modules.d/alsa and the usb as 1.

From a no-modules-loaded state, /etc/init.d/alsasound start loads them in the right order and all is fine.
Again, from a no-modules-loaded state, if I plug the USB phone in, the modules for the phone are automatically loaded, which although not what I want, is understandable given hotplug is built into the kernel and the hotplug package is emerged on my system (not my choice, it's a dependency of libgphoto2).  The hotplug init script isn't started however.

However, when I boot my PC with the phone plugged in, the modules are automatically loaded before the alsa init script runs, so my USB phone is always card 0 and the motherboard sound card 1.

I know I could probably fix this by swapping the cards and using some alsa magic to set card 1 as default, or removing hotplug support from the kernel, but they're workarounds.

According to the udev guide (http://www.gentoo.org/doc/en/udev-guide.xml), it should be coldplug automatically loading modules for items already plugged into my machine at boot.  I don't even have coldplug installed.

What, if anything, can I do to stop modules being automatically loaded for items at boot?
Comment 1 MAL 2006-08-06 14:06:13 UTC
emerge --info

Portage 2.1-r1 (default-linux/x86/2006.0, gcc-3.4.6, glibc-2.3.6-r4, 2.6.17-gentoo-r4 i686)
=================================================================
System uname: 2.6.17-gentoo-r4 i686 AMD Athlon(tm) 64 Processor 3200+
Gentoo Base System version 1.6.15
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.3.5-r2, 2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.5.22
virtual/os-headers:  2.6.11-r2
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-march=athlon64 -msse2 -O2 -fomit-frame-pointer -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/kde/3.4/env /usr/kde/3.4/share/config /usr/kde/3.4/shutdown /usr/kde/3.5/env /usr/kde/3.5/share/config /usr/kde/3.5/shutdown /usr/share/X11/xkb /usr/share/config /usr/share/texmf/dvipdfm/config/ /usr/share/texmf/dvips/config/ /usr/share/texmf/tex/generic/config/ /usr/share/texmf/tex/platex/config/ /usr/share/texmf/xdvi/"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-march=athlon64 -msse2 -O2 -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig distlocks metadata-transfer parallel-fetch sandbox sfperms strict userfetch userpriv usersandbox"
GENTOO_MIRRORS="http://gentoo.blueyonder.co.uk http://www.mirrorservice.org/sites/www.ibiblio.org/gentoo/"
LANG="en_GB.UTF-8"
LC_ALL="en_GB.utf8"
MAKEOPTS="-j1"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude='/distfiles' --exclude='/local' --exclude='/packages'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/local/portage"
SYNC="rsync://rsync.gentoo.org/gentoo-portage"
USE="x86 3dnow 3dnowext S3TC X X509 a52 aac aalib acl acpi alsa amd amuled apache2 asf audiofile avi berkdb bitmap-fonts bluetooth bonobo bzip2 cdb cdda cddb cdio cdr chroot clamav crypt cscope cups curl dga directfb disablexmb dlloader dmx dri dts dv dvd dvdr dvdread edl eds effects emboss encode esd ethereal exif expat fbcon ffmpeg firefox flac fmod foomaticdb freetype gb gd gdbm geoip gif gimpprint glut gmail gmp gnokii gphoto2 gpm gps gstreamer gtk gtk2 gtkhtml guile idn imagemagick imap imlib imlib2 inkjar isdnlog jack java jpeg jpeg2k lcms libcaca libg++ libgda libwww live lua lzo lzw mad maildir mailwrapper matroska md5sum mhash mikmod mjpeg mmx mmxext mng mod motif mozcalendar mozdevelop mozilla mozsvg mozxmlterm mp3 mpeg mpeg2 mpeg4 mplayer msn mysql nas ncurses network nls nowin nptl nptlonly nsplugin ntlm nvidia oav ogg openal opengl oss pam pcntl pcre pdf pdflib perl pic plugin png ppds pppd python qt qt3 qt4 quicktime readline real reflection remote rtc rtsp ruby samba scanner screen sdl session shorten shout slang slp sms sox speex spell spl sse ssl stencil-buffer stream svg svga sysfs tcltk tcpd tga theora tiff truetype truetype-fonts type1 type1-fonts udev unicode usb utf8 v4l v4l2 vcd vidix visualization vlm vorbis win32codecs wma wmf wxgtk1 wxwindows xanim xface xine xinerama xml xml2 xmms xorg xosd xpm xprint xrandr xv xvid xvmc yahoo yv12 zlib elibc_glibc input_devices_keyboard input_devices_mouse input_devices_evdev kernel_linux userland_GNU video_cards_nvidia video_cards_matrox video_cards_mga video_cards_vga video_cards_vesa"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LDFLAGS, LINGUAS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 2 SpanKY gentoo-dev 2006-08-06 19:52:18 UTC
alsa says if you want to be sure of the card numbers being set, you should add the proper kernel/module parameters at boot/module load time;
snd-emu10k1.index=0 snd-intel8x0.index=1

if you dont want coldplugging, edit /etc/conf.d/rc
Comment 3 MAL 2006-08-07 02:01:34 UTC
Thanks for the info, but RC_COLDPLUG is set to no in /etc/conf.d/rc

Should that not disable this?
Comment 4 SpanKY gentoo-dev 2006-08-07 16:42:39 UTC
that should afaik, but Roy would know for sure
Comment 5 Roy Marples (RETIRED) gentoo-dev 2006-08-08 02:11:53 UTC
It should, but on in udev-096-r1 and later