[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Alsa needs reconfiguration after every reboot

On Thursday 21 December 2006 12:24, Bill wrote:

> > On Mon, Dec 18, 2006 at 02:21:05PM -0800, Bill wrote:
> > > Hi folks,
> > >
> > > I have alsa installed and working properly.
> > >
> > > I configure it with alsaconf.
> > >
> > > Everytime I reboot, I have to reconfigure it again with alsaconf.
> > >
> > > It's only a few keypresses but annoying.
> > >
> > > Is this a known issue?
> > >
> > > What can I do to stabilize the situation and make the config permanent?
> On Wed, 2006-20-12 at 16:53 +1300, Chris Bannister wrote:
> > Alsaconf should be putting the module in /etc/modules. Is it there?
> Hi,
> No. Only a few modules are present:
> ide-cd
> ide-disk
> ide-generic
> psmouse
> At boot (alsaconf not yet run) lsmod reveals:
> snd_emu10k1           105764  1
> snd_rawmidi            23232  1 snd_emu10k1
> snd_ac97_codec         84000  1 snd_emu10k1
> snd_ac97_bus            2304  1 snd_ac97_codec
> snd_pcm_oss            35456  1
> snd_mixer_oss          16640  1 snd_pcm_oss
> snd_pcm                72164  3 snd_emu10k1,snd_ac97_codec,snd_pcm_oss
> snd_seq_device          7916  2 snd_emu10k1,snd_rawmidi
> snd_timer              22276  2 snd_emu10k1,snd_pcm
> snd_page_alloc          9800  2 snd_emu10k1,snd_pcm
> snd_util_mem            4544  1 snd_emu10k1
> snd_hwdep               8900  1 snd_emu10k1
> snd                    50500  9
> snd_emu10k1,snd_rawmidi,snd_ac97_codec,snd_pcm_oss,snd_mixer_oss,snd_pcm,sn
>d_seq_device,snd_timer,snd_hwdep soundcore               9440  2 snd
> I confess I am not up to speed on the current methods of module
> management. As I understand it, modules are supposed to load on an as
> needed basis. Shouldn't alsaconf have added the appropriate modules
> to /etc/modules? Insmod and modprobe were more my speed but are
> deprecated these days with regard 2.6 kernels. What is current or better
> toolwise?
> It's no prob to add a line or six to /etc/modules.
> But which modules?
> Will snd_emu10k1 chain load all the others?
> Any others I need to add from the list above?
> Any other files I need to modify?
> I really appreciate the help
>  b.

As you havn't had any replies since I received your post at 12:24 I may as 
well poke my nose in.

Can you post a bit of info. Which Debian version, and kernel are you using? 
For the kernel type uname -r. Which desktop? I ask because I'm using KDE. 
Does typing as user, cat /proc/asound/cards show only one soundcard as card0? 
Which soundcard do you have?

Your lsmod after bootup, and before messing with alsaconf seems fine.

I've had various problems with sound since I started with Linux, and computers 
in 2003. Fedora Core, Debian, Slackware, and Gentoo have all presented their 
own problems with sound, but with a bit of perseverence, and help from 
different lists/forums these have all been fixed. 

When you bootup what does alsamixer show as user on the CLI (Konsole). Are any 
controls, like master, pcm, or front down at zero? If you are using KDE, 
KDE's Kmix has a habit of messing with alsamixers settings when KDE is logged 
into. Just for info, the fix for this is. Open Kmix/Settings/Configure K Mix, 
and uncheck the "Restore volumes on login" box. Ironically I've just looked 
at this on Etch, and the box is checked, and I have no problems, but have had 
problems with this on other distro's, so it's worth a look.

Unfortunately when you fix something, you don't always write down what fixed 
it, but try after booting up, and su'ed to root /etc/init.d/alsa-utils stop, 
then, /etc/init.d/alsa-utils start , then see if you can get any sounds. 
these commands just stop, and restart alsa

there is another command /etc/init.d/alsa unload , which removes the alsa 
modules, followed by /etc/init.d/alsa reload, which logically reloads them, 
but if you have other alsa modules listed in /etc/modules, the reload command 
will not reload them. You will have to do that manually, as I've just found 
out, and have had to modprobe snd-usb-audio for my usb midi keyboard 

The 2 alsactl commands that are usefull are.
alsactl store  (this is run when you shutdown, and stores alsamixers settings)
alsactl restore (this is run when you bootup, and restores alsamixers settings 
to the state that they were when you shutdown)

It's worth trying the "alsactl restore" command as root, after booting up, and 
before messing with alsaconf.

I'm a bit out of ideas at the moment, but have put my lsmod, and /etc/modules 
below. Bear in mind that the /etc/modules entries are for my setup, and 
depending on which kernel I'm booted up with, some of these entries are no 
longer necessary. The bootup messages will just show these as skipped, 
already loaded.

snd_usb_audio          60224  0
snd_usb_lib            11904  1 snd_usb_audio
snd_emu10k1_synth       6400  0
snd_emux_synth         31744  1 snd_emu10k1_synth
snd_seq_virmidi         6912  1 snd_emux_synth
snd_seq_midi_emul       6912  1 snd_emux_synth
snd_seq_oss            29184  0
snd_seq_midi            8224  0
snd_seq_midi_event      7168  3 snd_seq_virmidi,snd_seq_oss,snd_seq_midi
snd_seq                45200  8 
snd_emu10k1            81412  2 snd_emu10k1_synth
snd_ac97_codec         65656  1 snd_emu10k1
snd_util_mem            4480  2 snd_emux_synth,snd_emu10k1
snd_hwdep               8736  2 snd_emux_synth,snd_emu10k1
snd_pcm                79624  3 snd_usb_audio,snd_emu10k1,snd_ac97_codec
snd_timer              22148  3 snd_seq,snd_emu10k1,snd_pcm
snd_page_alloc          9604  2 snd_emu10k1,snd_pcm
usbcore               105080  4 snd_usb_audio,snd_usb_lib,uhci_hcd
snd_rawmidi            22176  4 
snd_seq_device          8332  7 
snd                    48612  14 
soundcore               9312  1 snd

And /etc/modules

bttv tuner=38 automute=0
tda9887 port2=0 pal=I

Some of the modules listed above no longer need to be specifically loaded 
depending on which kernel you are booting from, but there is no harm in their 
remaning on the list, as bootup will just skip them if already loaded. Doh! I 
think I've already mentioned that.

If any of this stuff is of any use, it's given with the best of intentions.


Reply to: