Intrepid Sound Fix
Nigel Henry
cave.dnb2m97pp at aliceadsl.fr
Tue Nov 18 00:47:10 UTC 2008
On Monday 17 November 2008 21:00, Karl Larsen wrote:
> Frans wrote:
> > On Mon, 17 Nov 2008 08:49:31 -0700, Karl Larsen wrote:
> >> Karl Larsen wrote:
> >>> Steve Flynn wrote:
> >>>> On Sun, Nov 16, 2008 at 11:41 PM, Karl Larsen <k5di at zianet.com> wrote:
> >>
> >> I just discovered how the Alsamixer gets re-set to no sound. I
> >> wanted to just re-boot to Grub but Intrepid stopped and would not go
> >> past the init step of turning off alsa. I watched it for a few minutes
> >> and hit the power off.
> >
> > Could you please post the _exact_ error message?
> >
> >> Later I booted up and no sound. Even the sound devise on the upper
> >> edge of the screen had a red cross. You fix this by turning the master
> >> up and then right clicking it and turning it on. But still no sound.
> >>
> >> I started alsamixer and sure enough it was turned down to zero. So
> >> turned that back up.
> >>
> >> Conclusion: There is something wrong with the re-boot script and it
> >> needs to be fixed or, there is something wrong with the alsamixer
> >> software.
> >>
> >> Karl
> >
> > I don't think it is something wrong in the "re-boot script". I think if
> > you shutdown you'll get the same error. I think the problem is in a
> > script that stops alsa. Anyhow, not being able to shutdown properly seems
> > to me quite serious.
> >
> > A workaround just for getting sound on reboot might be to use 'alsactl
> > store' when you have sound (see 'man alsactl'). With luck the 'good'
> > alsamixer settings will get restored when the system boots the next time.
>
> I tested it Frans on my laptop Intrepid and the re-boot did the
> trick of changing alsa settings and it did it again! It appears that
> alsactl does work to put a file of the current alsamixer settings called
> asound.state into /var/lib/alsa/ but it was not used to re-set alsamixer.
>
> Karl
>
> > Good luck!
> >
> > -Frans
Hi Karl, and a good evening at 23:07 PM here in Northern France.
NoOp posted a couple of links that I found interesting, mainly the second one.
When I reboot Ubuntu 8.10, Alsa hangs for about 5secs, but if I do an "sudo
ifdown" before the reboot,Alsa doesn't hang at all on the reboot.
One of the posts on the link below gave a clue.
https://bugs.launchpad.net/ubuntu/+source/alsa-utils/+bug/274995
This reply in particular was interesting.
<quote>
J wrote on 2008-10-19: (permalink)
The trick works inserting "ifconfig wlan0 down" (or the active network
interface in use) at the begining of the stop) section
of /etc/init.d/alsa-utils.
I'm sure it's not network-manager related, my laptop also hangs uninstalling
the package and starting wifi via wicd.
Btw, if your alsa-mixer is always mute at system start, and does not remember
the last settings, the trick also fixes it.
<end quote>
I've already tested what was suggested above, and my 5sec delay for Alsa on
reboot is reduced to as good as nothing.
OK. Now to edit the /etc/init.d/alsa-utils shellscript.
Open a terminal, then sudo gedit, and navigate to /etc/init.d/alsa-utils.
So far so good. Go to "Edit" > "Preferences" in Gedit, and check the box under
"Line Numbers, which says "Display line numbers". Close the window. Now click
on the "Search" menu on Gedit, and then on "Go to line". Enter in the box
353, and you should end up with the cursor on line 353, which should read
stop).
Use the right arrow to scroll along to the end of stop), then click enter. Do
a few spaces which will take you to the start of the next lines
Now I don't know if you have a wired, or a wireless connection, but you will
need to add one of the following 2 lines to the /etc/init.d/alsa-utils
script.
ifconfig eth0 down
ifconfig wlan0 down
This is how it should look after adding one of the 2 lines above.
stop)
ifconfig eth0 down
EXITSTATUS=0
TARGET_CARD="$2"
case "$TARGET_CARD" in
""|all) TARGET_CARD=all ; log_action_begin_msg "Shutting down ALSA" ;;
Save the changes, exit the editor, and reboot.
Now when rebooted your Alsamixer settings should now be how you left them
before rebooting. "Hopefully".
All the best.
Nigel.
More information about the ubuntu-users
mailing list