Ubuntu

Alsa mixer Master Front volume resets to minimum on startup

Reported by Colin Mills on 2009-10-12
74
This bug affects 13 people
Affects Status Importance Assigned to Milestone
alsa-utils (Ubuntu)
High
Daniel T Chen

Bug Description

Binary package hint: alsa-utils

After installing the latest Ubuntu Karmic (64 bit) updates today I find that every time I reboot the system, there is no sound. To remedy the situation I have to open a terminal and enter 'alsamixer'. I reset the master front volume then enter 'sudo alsactl store' in the terminal to save the volume setting and then close alsamixer. The volume remains ok until the next reboot, at which point the alsa master front volume is reset to zero.

This problem was not present in Karmic until I installed the latest updates today.

Psy[H[] (vovik-wfa) wrote :

confirming. After last alsa-utils update:
On alsa start most of the channels are muted, and soundcard switches are reset.
I was able to reproduce this by:
sudo service alsa-utils restart.

tags: added: alsa audio karmic

Ugh. alsa-utils is the original culprit for this symptom and is the
reason the start action was changed in the most recent upload.

For all intents and purposes, across the various Karmic installs that
I have access to, I cannot reproduce this symptom, as PulseAudio
correctly restores the device and stream volumes.

Please verify that reverting the relevant change[0] in the most recent
upload resolves your issue, and then we can move forward with
troubleshooting what's probably a race condition in the invocation of
alsactl store.

[0] http://bazaar.launchpad.net/~ubuntu-core-dev/alsa-utils/ubuntu.new/revision/29
-- note that you just need to comment out that line (353)

Changed in alsa-utils (Ubuntu):
importance: Undecided → Medium
assignee: nobody → Daniel T Chen (crimsun)
status: New → Confirmed
Psy[H[] (vovik-wfa) wrote :

I do not use pulseaudio and do not keep it in my system.

commenting out that line fixes problem.

Daniel T Chen (crimsun) wrote :

On Tue, Oct 13, 2009 at 9:12 AM, Psy[H[] <email address hidden> wrote:
> I do not use pulseaudio and do not keep it in my system.
>
> commenting out that line fixes problem.

Thanks for confirming my suspicions.

Colin, do you also _not_ use PulseAudio?

Colin Mills (cm006a5077) wrote :

Thanks for the help everyone. I gather from the post, that a fix for the alsa-utils bug will be released. Daniel T Chen mentioned that commenting out a line in a file would fix the problem. Is this something that I could do to fix the problem, while the fix is being implemented?

Daniel, I would like to use PulseAudio, if I could only find out how to set it up. In Ubuntu 9.04 I was able to go to 'System->Preferences->Sound' and select PulseAudio. In Ubuntu Karmic I can't see any option for selecting PulseAudio, the new sound control panel makes no mention of PulseAudio at all. Any help or advice would be appreciated.

Psy[H[] (vovik-wfa) wrote :

you can correct this in /etc/init.d/alsa-utils
In 9.10 pulseaudio is set and working by default, with all its features (like generation of latency and cpu eating). There is no need to set it up.

It seems to me that due to the changes recently made to help solve volume restore race conditions, the fact that some derivatives like kubuntu etc don't use pulseaudio was overlooked, and therefore volume restore for them is broken. I will be looking into this today, and hopefully coming up with a fix.

Luke Yelavich (themuso) wrote :

For those affected by this bug, you want to comment out the line
[ ! -f /var/lib/pulseaudio/pulse_a11y_nostart ] && exit $EXITSTATUS

Which shoudl solve the issue temporarily.

I have a few local changes that should be tested that will be pushed out to
the PPA later tonight. In the meantime, we can test if the pulseaudio file
is executable as well, but ultimately, we need to drop the alsactl bits from
udev/rules.d and convert the alsa-utils initscript to an upstart job. The
alsactl store race is definitely happening on reboot/shutdown.

On Oct 13, 2009 6:35 PM, "Luke Yelavich" <email address hidden>
wrote:

It seems to me that due to the changes recently made to help solve
volume restore race conditions, the fact that some derivatives like
kubuntu etc don't use pulseaudio was overlooked, and therefore volume
restore for them is broken. I will be looking into this today, and
hopefully coming up with a fix.

-- Alsa mixer Master Front volume resets to minimum on startup
https://bugs.launchpad.net/bugs/449...
Status in “alsa-utils” package in Ubuntu: Confirmed

Bug description: Binary package hint: alsa-utils After installing the latest
Ubuntu Karmic (64 bit...

Bare in mind that RC freeze is Thursday, so if we do any testing, it will have to be done soon.

Changed in alsa-utils (Ubuntu):
importance: Medium → High
milestone: none → ubuntu-9.10
Daniel T Chen (crimsun) wrote :

Fixed alsa-utils has been pushed to my bzr branch and uploaded to the ubuntu-audio-dev PPA. Please install it once it's available and report whether it resolves the symptom.

Changed in alsa-utils (Ubuntu):
status: Confirmed → Fix Committed
Psy[H[] (vovik-wfa) wrote :

I've tested new package. Result: first restart reported fail, second went ok:

psycho@mindthunder:~/Desktop/Downloads$ sudo service alsa-utils restart
 * Shutting down ALSA... [fail]
 * Setting up ALSA... [ OK ]
psycho@mindthunder:~/Desktop/Downloads$ sudo service alsa-utils restart
 * Shutting down ALSA... [ OK ]
 * Setting up ALSA... [ OK ]

channels were preserved.

On Wed, Oct 14, 2009 at 12:03 AM, Psy[H[] <email address hidden> wrote:
> psycho@mindthunder:~/Desktop/Downloads$ sudo service alsa-utils restart
>  * Shutting down ALSA...                                                 [fail]
>  * Setting up ALSA...                                                    [ OK ]

Right, this first 'fail' is expected due to /var/run/alsa/notsaved*
not existing.

> psycho@mindthunder:~/Desktop/Downloads$ sudo service alsa-utils restart
>  * Shutting down ALSA...                                                 [ OK ]
>  * Setting up ALSA...                                                    [ OK ]
>
> channels were preserved.

Which is the proper and expected result the second go

Daniel T Chen (crimsun) wrote :

On Wed, Oct 14, 2009 at 12:14 AM, I wrote:
> Right, this first 'fail' is expected due to /var/run/alsa/notsaved*
> not existing.

Bah, I meant /var/run/alsa/notstored*, of course.

Alex Shulgin (alex-shulgin) wrote :

Fix the problem for me on Xubuntu (no pulseaudio installed). Thanks!

Alex Shulgin (alex-shulgin) wrote :

Err, I meant the update fixes the problem! :)

Launchpad Janitor (janitor) wrote :

This bug was fixed in the package alsa-utils - 1.0.20-2ubuntu5

---------------
alsa-utils (1.0.20-2ubuntu5) karmic; urgency=low

  * debian/init: Don't do silly things with the PulseAudio check. Just
    make sure that, in the stop target, we don't store levels for a card
    that has already been stored and muted.
    (LP: #449589, #450612, #450652)

 -- Daniel T Chen <email address hidden> Tue, 13 Oct 2009 22:17:12 -0400

Changed in alsa-utils (Ubuntu):
status: Fix Committed → Fix Released
whoop (tiredandnumb) wrote :

I am running xubuntu karmic 32bit with alsa-utils 1.0.20.2ubuntu5 and I am still experiencing this issue

whoop (tiredandnumb) on 2009-10-15
Changed in alsa-utils (Ubuntu):
status: Fix Released → New
Daniel T Chen (crimsun) wrote :

On Thu, Oct 15, 2009 at 12:32 PM, whoop <email address hidden> wrote:
> ** Changed in: alsa-utils (Ubuntu)
>       Status: Fix Released => New

Please reboot, and at the display manager screen, instead of logging
in just switch to a tty and log in there. Then, run 'amixer' and
attach the output here.

whoop (tiredandnumb) wrote :

Note, this machine is set to login automatically..... Don't know if that is a problem. Therefore I restarted, loged out and launched a virtual console and logged in with a different account.

Alex Shulgin (alex-shulgin) wrote :

Hey, I'm having this issue again, after installing pulseaudio (rhythmbox depends on it).

The Master is set to 0 and Front to 20 after system restart. That said, `service alsa-utils restart' does not reset the levels--it keeps the correct values.

How can I debug this?

alejandro (nosferatu2011) wrote :

00:1b.0 Audio device [0403]: Intel Corporation 82801I (ICH9 Family) HD Audio Controller [8086:293e] (rev 03)
 Subsystem: Lenovo Device [17aa:20f2]
 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
 Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
 Latency: 0, Cache Line Size: 32 bytes
 Interrupt: pin A routed to IRQ 22
 Region 0: Memory at f9ef8000 (64-bit, non-prefetchable) [size=16K]
 Capabilities: <access denied>
 Kernel driver in use: HDA Intel
 Kernel modules: snd-hda-intel

alejandro (nosferatu2011) wrote :

02:02.0 Multimedia audio controller [0401]: Cirrus Logic CS 4614/22/24/30 [CrystalClear SoundFusion Audio Accelerator] [1013:6003] (rev 01)
 Subsystem: KYE Systems Corporation Device [1489:7001]
 Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx-
 Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
 Latency: 32 (1000ns min, 6000ns max)
 Interrupt: pin A routed to IRQ 17
 Region 0: Memory at ff9ff000 (32-bit, non-prefetchable) [size=4K]
 Region 1: Memory at ff800000 (32-bit, non-prefetchable) [size=1M]
 Capabilities: <access denied>
 Kernel driver in use: Sound Fusion CS46xx
 Kernel modules: snd-cs46xx

Alex Shulgin (alex-shulgin) wrote :

Recent pulseaudio updates seem to fix the problem for me.

Daniel T Chen (crimsun) wrote :

@Alex
On which version of PA?

Alex Shulgin (alex-shulgin) wrote :

Sorry, I was mistaken--it's not fixed yet. I've just rebooted to see it happen again.

Apparently I have version from ubuntuaudiodev PPA:

$ dpkg-query -s pulseaudio | grep ^Ver
Version: 1:0.9.20-0ubuntu2~~karmic~ubuntuaudiodev1

How can I debug or help to debug the problem?

alejandro (nosferatu2011) wrote :

Please, if you're accessing them from a question on Launchpad, tell us what number solved your problem, or tell us if your problem persists. This document is based on http://drowninginbugs.blogspot.com/2009/10/caveats-for-audio-in-910.html

[0] First of all, apply the updates, nothing more. Maybe your problem has already been resolved without you having to do anything else. Before following the guide and after updating, reboot and so aplicna you ensure that all changes.

[1] Make sure you are using the kernel and not the old Karmic. Run "uname-r". It should say 2.6.31-14-generic or higher. If you get an older version, you may be using an older kernel. Ask for your case.

[2] Make sure slmodemd is not running. Run "pgrep slmodemd. You should not give back anything. If you return something, ask about your particular case.

[3] Install linux-backports-modules-alsa-karmic-generic.
    sudo apt-get install linux-backports-modules-alsa-karmic-generic
Then reboot and see if the sound and run better. If he says that this package does not exist, go to System »Administration» Software Sources. In the Updates tab active "Unsupported Updates (karmic-backports)". Click close and when prompted if you want to reload package information say yes. Then try installing again.

[4] Add the PPA of Ubuntu Audio Development Team and maintained.
    sudo apt-add-ppa repository: ubuntu-audio-dev/ppa
    sudo apt-get update
    sudo apt-get dist-upgrade
Packages should be updated alsa and pulseaudio. then reboot and see if that fixes your problem.

[5] Get a PulseAudio log with these instructions: https: / / wiki.ubuntu.com / PulseAudio / Log
Get also a log of ALSA with these instructions: https: / / wiki.ubuntu.com / DebuggingSoundProblems # Automatic% 20sound% 20Information% 20Collection
Http://paste.ubuntu.com/ paste both logs in and passes the addresses to a question so people can see your particular case and try to help.

Alex Shulgin (alex-shulgin) wrote :

Hi, seems like one of the recent pulseaudio updates from ubuntu-audio-dev PPA fixed the problem for me.

Tom Louwrier (tom-louwrier) wrote :

hi,

Same here, I haven't seen this behaviour for -I think- nearly two weeks now. It seems fixed.
To be honest I must admit that I really can't remember when it went away or what fix I installed. Just Ubuntu Karmic amd64, updated once a day. That's it.

Thanx
Tom

Alex Shulgin (alex-shulgin) wrote :

On Wed, Dec 9, 2009 at 11:48, Tom Louwrier <email address hidden> wrote:
> hi,
>
> Same here, I haven't seen this behaviour for -I think- nearly two weeks now. It seems fixed.
> To be honest I must admit that I really can't remember when it went away or what fix I installed. Just Ubuntu Karmic amd64, updated once a day. That's it.

For me it was like two or three days only, so it must be one of the
two most recent updates in PPA.

--
Regards,
Alex

Alex Shulgin (alex-shulgin) wrote :

> Hi, seems like one of the recent pulseaudio updates from ubuntu-audio-dev PPA fixed the problem for me.

Sorry, it was premature. After restart, the problem is still here.

That time I saw volume not reset to zero after restart was the time I was forced to cold-reset the machine, so it ultimately must be some shutdown script which is zeroing the volume level.

exactt (giesbert) wrote :

hi, i have this problem too. regular ubuntu karmic 9.10 AMD64. volume is always down on restart. all updates applied. proposed repository not enabled.

exactt (giesbert) wrote :

attaching amixer output as requested in previous comment.

i have to admit, that it now magically works. will elaborate further later on...

Alex Shulgin (alex-shulgin) wrote :

On Fri, Dec 4, 2009 at 21:15, alejandro <email address hidden> wrote:
> Please, if you're accessing them from a question on Launchpad, tell us
> what number solved your problem, or tell us if your problem persists.
> This document is based on http://drowninginbugs.blogspot.com/2009/10
> /caveats-for-audio-in-910.html
[snip]
> [5] Get a PulseAudio log with these instructions: https: / / wiki.ubuntu.com / PulseAudio / Log

Sorry, somehow I missed this link.

It seems, there's really some problem on PA shutdown (near the end of the log):
http://paste.ubuntu.com/344935/

D: alsa-sink.c: Read hardware volume: 0: 8% 1: 8%
D: core-subscribe.c: Dropped redundant event due to change event.
D: alsa-sink.c: Read hardware volume: 0: 1% 1: 1%
D: core-subscribe.c: Dropped redundant event due to change event.
I: module-device-restore.c: Storing volume/mute/port for device
sink:alsa_output.pci-0000_00_1b.0.analog-stereo.
I: main.c: Got signal SIGTERM.
I: main.c: Exiting.
...

So, basically something resets hardware volume to 1% during system
shutdown. Though, the volume was read correctly as 53% on PA start
(line 870).

Here's also paste from alsa-info.sh: http://pastebin.ca/1724126
It might be not very useful as the problem is happening on shutdown
and I ran it just from XFCE session.

--
Alex

kronictokr (pstone78) wrote :
Download full text (4.8 KiB)

almost willing to bet fix all sound issues in karmic, unless hardware completely doesnt support it, like SIS graphics

could reverse the process to keep pulse if you wanted

software conflict, this should fix it

since this is a microsoft, i mean software conflict problem, you should be able to use this method on all karmic install no matter what your hardware is. if not, i would suggest backing up your info and starting from the top. again tho, you shouldnt have to. any pakages you already have shouldnt affect the script either, or your install. restores all sound including system sounds. also stops freezing issues that happened when adjusting audio settings.

THIS METHOD CLEARS OUT PULSE COMPLETELY BUT DOES FIX THE SOUND. I TESTED THE SCRIPT ON A FRESH INSTALL EVERYTHING WORKS PERFECT AFTER SUDO NAUTILUS. KEEP READING

sudo apt-get remove libsdl1.2debian-alsa

includes audacious music player, vlc , and ubuntu restricted extras(minus pulse updates :D ).
VVVV VVVVV

sudo aptitude install libdns53 libdns53 linux-headers-2.6.31-16 linux-headers-2.6.31-16-generic linux-image-2.6.31-16-generic ureadahead alsa-oss alsa-base alsa-tools alsa-tools-gui alsa-utils alsa-oss linux-sound-base asoundconf-gtk audacious audacious-plugins audacious-plugins-extra cabextract flashplugin-installer freepats gnome-alsamixer gsfonts-x11 gstreamer0.10-ffmpeg libesd-alsa0 gnome-alsamixer gstreamer0.10-plugins-bad gstreamer0.10-plugins-bad-multiverse gstreamer0.10-plugins-ugly gstreamer0.10-plugins-ugly-multiverse ia32-libs java-common lib32asound2 lib32bz2-1.0 lib32ncurses5 lib32stdc++6 lib32v4l-0 lib32z1 liba52-0.7.4 libao2 libass3 libaudclient2 libaudcore1 libaudid3tag2 libaudio2 libaudutil1 libavcodec52 libavformat52 libavutil49 libbinio1ldbl libbio2jack0 libbio2jack0-dev libcdaudio1 libcddb2 libcelt0 libdc1394-22 libdca0 libdirac0c2a libdvbpsi5 libdvdnav4 libdvdread4 libebml0 libenca0 libfaac0 libfaad0 libffado1 libfftw3-3 libfluidsynth1 libfreebob0 libftgl2 libgconfmm-2.6-1c2 libglademm-2.4-1c2a libglew1.5 libgsm1 libid3tag0 libiptcdata0 libiso9660-5 libjack-dev libjack0 libjack0 liblash2 liblua5.1-0 libmad0 libmatroska0 libmcs1 libmimic0 libmjpegtools-1.9 libmms0 libmodplug0c2 libmowgli1 libmp3lame0 libmp4v2-0 libmpcdec3 libmpeg2-4 libofa0 libpostproc51 libprojectm-data libprojectm2 libquicktime1 libreadline5 libresid-builder0c2a libsad2 libschroedinger-1.0-0 libsdl1.2debian-all libsidplay1 libsidplay2 libsoundtouch1c2 libswscale0 libtwolame0 libvcdinfo0 libvlc2 libvlccore2 libwildmidi0 libx264-67 libxml++2.6-2 libxvidcore4 nspluginwrapper odbcinst1debian1 sun-java6-bin sun-java6-jre sun-java6-plugin ttf-dejavu ttf-dejavu-extra ttf-liberation ttf-mscorefonts-installer ubuntu-restricted-extras unixodbc unrar vlc-data vlc-nox vlc-plugin-pulse linux-backports-modules-2.6.31-16-generic linux-backports-modules-alsa-2.6.31-16-generic linux-backports-modules-alsa-karmic-generic linux-backports-modules-headers-karmic-generic linux-backports-modules-karmic linux-backports-modules-karmic-generic linux-backports-modules-wireless-karmic-generic linux-headers-lbm-2.6.31-16-generic vlc

java will pop up
hit tab enter, tab enter to select yes

this is a BIG script, it will...

Read more...

C de-Avillez (hggdh2) wrote :

@all: please be carefull if you are considering following the instructions in the previous comment. These actions are not supported, and *may* result in a broken system.

Daniel Letzeisen (dtl131) wrote :

>>> after installing pulseaudio (rhythmbox depends on it).

Rbox doesn't need pulse; it just needs gstreamer, which can use pulse or a lot of other audio API's. It sounds like someone got "dependency happy" with pulse stuff.

Daniel T Chen (crimsun) wrote :

This is fixed in pulseaudio and alsa-utils in Lucid.

Changed in alsa-utils (Ubuntu):
milestone: ubuntu-9.10 → none
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers