Sound muted after boot

Bug #352732 reported by Alexander Hunziker
430
This bug affects 89 people
Affects Status Importance Assigned to Milestone
PulseAudio
Invalid
Undecided
Unassigned
alsa-utils (Ubuntu)
Fix Released
Undecided
Daniel T Chen
Declined for Jaunty by Brian Murray
Nominated for Karmic by Singpolyma
Nominated for Lucid by Singpolyma
Nominated for Maverick by Daniel Añez Scott

Bug Description

After every boot, the master channel of my sound card is muted. I see there's bugs 316430 and 299093 which describe a similar problem, but they are both marked as fixed and I have Jaunty updated with the latest packages, so I'm maybe having another issue?

This is on a Thinkpad T60 laptop, with an Intel onboard sound chip:

hunzikea@AlexT60:/proc/asound$ cat cards
 0 [Intel ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xee400000 irq 17

I'll attach the outputs of /var/lib/alsa/asound.state and amixer -Dhw:0 directly after boot, and after resetting the volume to something decent.

---------------
Status (from #81):
IDT/Sigmatel HDA: fixed in Lucid
Analog Devices: work in progress

Revision history for this message
Alexander Hunziker (alex-hunziker) wrote :
Revision history for this message
Alexander Hunziker (alex-hunziker) wrote :
Revision history for this message
Alexander Hunziker (alex-hunziker) wrote :
Revision history for this message
Alexander Hunziker (alex-hunziker) wrote :
affects: ubuntu → alsa-driver (Ubuntu)
Revision history for this message
Alexander Hunziker (alex-hunziker) wrote :

Upon sudo invoke-rc.d alsa-utils, the mixer levels seem to get saved and restored successfully. What else can I check here?

I noticed that in System->Administration->Services, "Audio settings management" had been unticked, though ticking it did not solve the problem.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

I can confirm this problem in my Jaunty, too. However, it's not always reproducible: sometimes the audio is properly restored after boot, and sometimes is muted. The problem appears in Jaunty; working perfectly in Intrepid.

$ cat /proc/asound/cards
 0 [VT82xx ]: HDA-Intel - HDA VIA VT82xx
                      HDA VIA VT82xx at 0xdfdfc000 irq 17

Changed in alsa-driver (Ubuntu):
status: New → Confirmed
Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Seems to be a problem in the udev rule. I've patched the /etc/init.d/alsa-utils script this way:

case "$1" in
  start)
        date > /root/alsa-utils.log # Log the script startups
        EXITSTATUS=0
        TARGET_CARD="$2"
[...]

So I can see when the script has been started. And I see that the /root/alsa-utils.log is never created, so the script is never started.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

I can't confirm that the problem is in the udev rule. I manually created:

  $ cd /etc/rc2.d
  $ sudo ln -s ../init.d/alsa-utils S40alsa-utils

so now alsa-utils is always called at boot time. However, the mixer is still muted when I go into GNOME.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Today, I turn on the computer and I see the sound muted again. Alsamixer shows the device muted, too.

After doing "sudo /lib/udev/alsa-utils" in a terminal prompt, the device gets unmuted.

I attach two screenshots (before and after running "sudo /lib/udev/alsa-utils", respectively).

Revision history for this message
Ricardo Pérez López (ricardo) wrote :
Revision history for this message
Alexander Hunziker (alex-hunziker) wrote :

I can confirm that executing "sudo /lib/udev/alsa-utils" unmutes my soundcard.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

More info, step by step:

1. I boot the computer.
2. When GDM appears, I go into VT1 (Ctrl-Alt-F1) and log into my user.
3. If I do "alsamixer -Dhw:0" or "alsamixer -c0", I get all the channels unmuted.
4. If I then do "alsamixer", I get only one muted PulseAudio channel, and the following error messages in the console:
  I: caps.c: Limited capabilities successfully to CAP_SYS_NICE.
  I: caps.c: Dropping root privileges.
  I: caps.c: Limited capabilities successfully to CAP_SYS_NICE.
5. Since then, If I repeat "alsamixer -Dhw:0" or "alsamixer -c0", I get the Master channel muted.
6. To unmute the Master channel previously muted on step #5, I need to do "sudo /lib/udev/alsa-utils". After that, all the channels gets unmuted and all works OK.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

OK, now I can see the problem. I't my fault. We had two files, ~/.asoundrc and ~/.asoundrc.asoundconf. The last one contained the following:

  pcm.!default { type pulse }
  ctl.!default { type pulse }

The above was causing troubles. I'd just removing the two files, and now it seems to works well.

Alexander, can you check the presence of the above two files? Try removing them, and tell me if that works.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Bad luck: today I booted the computer again, and I still had the Master channel muted. I don't know what else I can do :(

Revision history for this message
Alexander Hunziker (alex-hunziker) wrote :

I did have a home-grown ALSA config file, though system-wide in /etc/asound.conf containing the same config as yours. Removing did indeed *not* solve the problem.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

I'd just booted my computer this morning, and again I had a Master channel muted. This bug is definitely NOT solved for me.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Since I enabled the "Audio settings management" in System->Administration->Services some days ago, I can't reproduce the problem. Maybe a coincidence?

Revision history for this message
Alexander Hunziker (alex-hunziker) wrote :

Ricardo: I'm not sure you are experiencing the same bug. For me, the sound is *always* muted. Also enabling the "Audio settings management" in the services did not improve things for me, as I said above.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Well, this morning again I had a Master channel muted, even with the "Audio settings management" enabled. Now I'm officially confused.

Daniel, I don't know what can I do in order to debug the problem. Can you take a quick look, please?

Revision history for this message
ski (skibrianski) wrote :

I'm having the same problem as Alexander - sound on the main speakers NEVER works. Master channel gives no output, but headphone jack works just fine. HP mini 1035nr. Fresh install of jaunty RC1, upgraded to latest. It seems like sometimes alsa starts with audio muted on both the Master and PCM channels, but running alsamixer and restoring to 100 does no good. Please let me know what info would be useful to have.

Revision history for this message
cbrmichi (cbrmichi) wrote :

i got the same problem here. i can turn my sound on again by booting windows... so where can be the problem?

Revision history for this message
ski (skibrianski) wrote :

In my case the problem was solved using this:
  https://bugs.launchpad.net/ubuntu/+source/linux/+bug/318942

But I'm not sure if everyone experiencing this bug is using a hp mini nettop (or if it might work for you anyway). Good luck!

Revision history for this message
Singpolyma (singpolyma) wrote :

I have this problem as well.

Whenever I boot, the master channel is turned all the way down and muted. I can unmute and turn it up and then it works fine until I reboot.

Revision history for this message
Singpolyma (singpolyma) wrote :

GDM has sound to make the "login ready" sound.

If I run alsamixer instantly on starting my window manager (dwm) I see that all my volume settings are correct.

Moments later they are wrong.

It is not the gnome-settings-daemon... it does it even with that off.

I am beginning to suspect the pulseaudio daemon, but don't know how to configure it.

Revision history for this message
Singpolyma (singpolyma) wrote :

Confirmed the problem is PulseAudio.

Used http://idyllictux.wordpress.com/2009/04/21/ubuntu-904-jaunty-keeping-the-beast-pulseaudio-at-bay/ (well, almost, had to put exit at the top of /etc/init.d/pulseaudio, because update-rc.d wouldn't cooperate, and ran asoundconf reset-default-card at the end and left GNOME sound settings on "autodetect") ... now pulseaudio never starts and my volume settings remain the way I want them ! :D

Revision history for this message
Montblanc (montblanc) wrote :

The same is happening with KDE too. Volume gets muted every 60 seconds or something. Disabling pulseaudio following this guide helped:
http://idyllictux.wordpress.com/2009/04/21/ubuntu-904-jaunty-keeping-the-beast-pulseaudio-at-bay/

Revision history for this message
Jimmy Buck (jimmybuck) wrote :

Same thing is happening to me with my Intel HDA chipset.

If I stay within Gnome, everything seems to work fine. But if I set my default session to XBMC (possible in the latest builds of XBMC), the master channel is at 0% when I boot up sometimes.

I haven't tried building XBMC with Pulse Audio disabled yet. That was my next plan of action.

Revision history for this message
Alfredas Beinartas (fuxialis) wrote :

Disabling alsa-utils in System -> Administration -> Services solves the problem for me

Revision history for this message
Alexander Hunziker (alex-hunziker) wrote :

I can confirm that after booting, but before logging in, my master channel is *not* yet muted, as it should be. So it's something in the Gnome login process with mutes it, PulseAudio is a prime suspect ;-)

Revision history for this message
Jimmy Buck (jimmybuck) wrote :

Disregard my previous comment about staying in Gnome doesn't exhibit the problem. It definitely does.

I did, however, find that it doesn't happen when forcing a reboot instead of using the menu in Gnome to reboot. If I do a 'sudo reboot', the sound isn't muted when coming back up.

Either way, using the guide a few posts above mine to disable Pulse fixed the problem for me.

Revision history for this message
ptn (tn-pablo) wrote :

Same issue here. I followed http://idyllictux.wordpress.com/2009/04/21/ubuntu-904-jaunty-keeping-the-beast-pulseaudio-at-bay/ but it didn't help, I enabled alsa-utils in Services but still nothing. My ~/.asoundrc* files didn't have the lines mentioned, so I didn't try deleting them.

I miss the login sound...

Revision history for this message
Alexander Hunziker (alex-hunziker) wrote :

I confirm what Jimmy Buck already said: when you shutdown your system in a forced way (or if it crashes, as it was in my case), the sound is not muted after a reboot. It looks like something mutes the channels upon shutdown, and then re-mutes them upon login. That's why the master channel is unmuted after boot, but gets muted at login.

Revision history for this message
smurf (luca-dgh) wrote :

If this can have some interest I found that adding /lib/udev/alsa-utils in "sessions" can solve the problem, but what happens is:
1) the splash image that I added with the Gnome utility appears
2) the login sound start (I put a large sound, about 30 seconds)
3) during the execution the login sound stop for 3-4 seconds
4) the login sound restart until the end

Please note that I enabled the automatic login for my account

Revision history for this message
ptn (tn-pablo) wrote :

I can confirm that the sound is not muted when booting after a system crash.

Changed in pulseaudio:
status: Unknown → New
Revision history for this message
Gavin Graham (gavingraham) wrote :

For me, manually running /etc/init.d/alsa-utils restart will unmute the sound.

Revision history for this message
ptn (tn-pablo) wrote : Re: [Bug 352732] Re: [jaunty] Sound muted after boot

Mmmm that didn't do it for me:

    $ sudo /etc/init.d/alsa-utils restart
    * Shutting down ALSA...
     [OK ]
     * Setting up ALSA...

and still no sound. I also tried:

$ sudo alsa reload
lsof: WARNING: can't stat() fuse.gvfs-fuse-daemon file system /home/ptn/.gvfs
      Output information may be incomplete.
/sbin/alsa: Warning: Processes using sound devices: 4127(pulseaudio)
4169(mixer_applet2).
Unloading ALSA sound driver modules: snd-hda-intel snd-pcm-oss
snd-mixer-oss snd-pcm snd-timer snd-page-alloc (failed: modules still
loaded: snd-hda-intel snd-pcm snd-timer snd-page-alloc).
Loading ALSA sound driver modules: snd-hda-intel snd-pcm-oss
snd-mixer-oss snd-pcm snd-timer snd-page-allocWARNING: All config
files need .conf: /etc/modprobe.d/blacklist, it will be ignored in a
future release.
WARNING: All config files need .conf: /etc/modprobe.d/blacklist, it
will be ignored in a future release.

 and didn't work either.

On Sat, May 30, 2009 at 18:38, Gavindi <email address hidden> wrote:
> For me, manually running /etc/init.d/alsa-utils restart will unmute the
> sound.
>
> --
> [jaunty] Sound muted after boot
> https://bugs.launchpad.net/bugs/352732
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Gavin Graham (gavingraham) wrote : Re: [jaunty] Sound muted after boot

Hi PTN,

Yeah my bad. Upon further investigation, my suggestion wasn't working as I thought it was....

Keep looking....

Revision history for this message
Gavin Graham (gavingraham) wrote :

Ok,
I've found a fix that works for me. I was find that if I didn't shut down my computer gracefully (and there letting /etc/init.d/alsa-utils run it's stop procedure) that the sound levels would be set and un-muted on next boot.

Therefore, I commented out line 372 in /etc/init.d/alsa-utils:

# mute_and_zero_levels "$TARGET_CARD" || EXITSTATUS=1

Now when I reboot gracefully, the sound levels are correct. I would suspect that there is a bit a race condition happening. I am supposing the alsa-utils script is being called twice and as the levels have been "muted and zero'd" the first time around, the second time around sees the zero'd levels get saved as the Alsa state.

I think the udev and rc.d is invoking the script twice......

This is however just a theory, but it makes sense!!! (I Hope)

Revision history for this message
ptn (tn-pablo) wrote : Re: [Bug 352732] Re: [jaunty] Sound muted after boot

I love you, Gavindi, that worked!

I'd like to run more tests though, because I only tried restarting.
Will do that ASAP.

On Mon, Jun 1, 2009 at 19:47, Gavindi <email address hidden> wrote:
> Ok,
> I've found a fix that works for me. I was find that if I didn't shut down my computer gracefully (and there letting /etc/init.d/alsa-utils run it's stop procedure) that the sound levels would be set and un-muted on next boot.
>
> Therefore, I commented out line 372 in /etc/init.d/alsa-utils:
>
> # mute_and_zero_levels "$TARGET_CARD" || EXITSTATUS=1
>
> Now when I reboot gracefully, the sound levels are correct. I would
> suspect that there is a bit a race condition happening. I am supposing
> the alsa-utils script is being called twice and as the levels have been
> "muted and zero'd" the first time around, the second time around sees
> the zero'd levels get saved as the Alsa state.
>
> I think the udev and rc.d is invoking the script twice......
>
> This is however just a theory, but it makes sense!!! (I Hope)
>
> --
> [jaunty] Sound muted after boot
> https://bugs.launchpad.net/bugs/352732
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Revision history for this message
Mattia Guidi (matguidi) wrote : Re: [jaunty] Sound muted after boot

Gavindi's solution works, in the sense that if I comment that line I have all volumes up after the desktop is loaded. But the strange thing is that it makes the "login sound" disappear. Summing up, this is how it works for me:

1) with the line un-commented (default situation)
- "drum sound" at the beginning
- "login sound" at desktop loading
- master channel muted

2) with the line commented (Gavindi's solution)
- "drum sound"
- NO "login sound"
- master channel unmuted

This seems a real puzzle. How to get out from it?

Revision history for this message
ptn (tn-pablo) wrote : Re: [Bug 352732] Re: [jaunty] Sound muted after boot

For me, that would be:

1) with the line un-commented (default situation)
- "drum sound" at the beginning
- NO "login sound" at desktop loading
- master channel muted

2) with the line commented (Gavindi's solution)
- "drum sound"
- "login sound"
- master channel unmuted

To add to Gavindi's theory, I have a weird situation in 1) that I get
the drum hits prompting for a user+pwd, but then I don't get the login
sound. This would happen no matter if I had turned my laptop off with
the volume muted or not. Now, if I turn it off with the volume off, I
don't get not even the drums, as it should be.

On Tue, Jun 2, 2009 at 04:35, Spaced <email address hidden> wrote:
> Gavindi's solution works, in the sense that if I comment that line I
> have all volumes up after the desktop is loaded. But the strange thing
> is that it makes the "login sound" disappear. Summing up, this is how it
> works for me:
>
> 1) with the line un-commented (default situation)
> - "drum sound" at the beginning
> - "login sound" at desktop loading
> - master channel muted
>
> 2) with the line commented (Gavindi's solution)
> - "drum sound"
> - NO "login sound"
> - master channel unmuted
>
> This seems a real puzzle. How to get out from it?
>
> --
> [jaunty] Sound muted after boot
> https://bugs.launchpad.net/bugs/352732
> You received this bug notification because you are a direct subscriber
> of the bug.
>

Daniel T Chen (crimsun)
affects: alsa-driver (Ubuntu) → pulseaudio (Ubuntu)
Changed in pulseaudio (Ubuntu):
assignee: nobody → Daniel T Chen (crimsun)
status: Confirmed → Fix Committed
Revision history for this message
Gavin Graham (gavingraham) wrote : Re: [jaunty] Sound muted after boot

Can you please let us know what the fix was?

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package pulseaudio - 1:0.9.15-3ubuntu1

---------------
pulseaudio (1:0.9.15-3ubuntu1) karmic; urgency=low

  [ Daniel T Chen ]
  * debian/patches/0001_change_resample_and_buffering.patch: Bump
    default resampler to ffmpeg. We cannot peg the cpu, and we cannot
    have audio anomalies, so this change _should_ be regression-free
    but needs extensive testing (LP: #376374).
  * debian/patches/0090_fix_sw_mute_desync.patch: Backport from
    git HEAD to resolve sw vol becoming muted on logout
    (LP: #315971, #352732)

  [ Luke Yelavich ]
  * Merge from Debian unstable, remaining changes:
    - epoch (my stupid fault :S)
    - Don't build against, and create jack package. Jack is not in main
    - use ffmpeg resampler to work better with lack of PREEMPT in jaunty's
      -generic kernel config, also change buffer size
    - Add alsa configuration files to route alsa applications via pulseaudio
    - Move libasound2-plugins from Recommends to Depends
    - Add pm-utils sleep hook to suspend (and resume) users' pulseaudio
      daemons
    - patch to fix source/sink and suspend-on-idle race
    - Make initscript more informative in the default case of per-user
      sessions
    - add status check for system wide pulseaudio instance
    - create /var/run/pulse, and make restart more robust
    - LSB {Required-*,Should-*} should specify hal instead of dbus,
      since hal is required (and already requires dbus)
    - indicate that the system pulseaudio instance is being started from the init
      script
    - Install more upstream man pages
    - Link to pacat for parec man page
    - check whether pulseaudio is running before preloading the padsp library
    - Add DEB_OPT_FLAG = -O3 as per recommendation from
      pulseaudio-discuss/2007-December/001017.html
    - cache /usr/share/sounds/ubuntu/stereo/ wav files on pulseaudio load
    - disable glitch free (use tsched=0)
    - Generate a PO template on build
    - add special case to disable pulseaudio loading if accessibility/speech
      is being used
    - the esd wrapper script should not load pulseaudio if pulseaudio is being
      used as a system service
    - add a pulseaudio apport hook
    - fix some typos in README.Debian
    - drop padevchooser(Recommends) and pavucontrol (Suggests)
    - drop libasyncns-dev build dependency, its in universe
    - add libudev-dev as a build-dependency

 -- Luke Yelavich <email address hidden> Tue, 09 Jun 2009 10:47:05 +1000

Changed in pulseaudio (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Daniel, Luke:

Could you please provide an updated binary package for Jaunty via PPA or something similar? It could be great in order to test the fix on Jaunty.

If not, what about backporting the 0090_fix_sw_mute_desync.patch to the current pulseaudio 1:0.9.14-0ubuntu20 on Jaunty?

Thanks in advance.

Revision history for this message
Jared Wiltshire (jaredwiltshire) wrote :

Well I tried installing the Karmic package in Jaunty and the sound was still muting on boot.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

I'm not a great programmer, but I tried backporting the 0090_fix_sw_mute_desync.patch to pulseaudio 0.9.14 (it's a small set of changes). After rebooting, all seems to works OK, although I need to do a deeper investigation due to the erratic and random nature of this issue in my system (i.e. sometimes the sound is muted after boot, sometimes not).

I'll take a look during several days.

Revision history for this message
Jimmy Buck (jimmybuck) wrote :

Has anyone tried Luke Yelavich's PPA? He just updated the Pulseaudio package a few days ago.

Revision history for this message
Jimmy Buck (jimmybuck) wrote :

Sorry for the bug spam, I forgot to include the URL to the PPA.

https://launchpad.net/~themuso/+archive/ppa

Revision history for this message
Jared Wiltshire (jaredwiltshire) wrote :

Yes I am using Luke's PPA package now and still have the problem.

I have used the /etc/init.d/alsa-utils editing workaround successfully.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

@Jimmy:

That's exactly what I was looking for. Thanks! I'm using it now and things are going well for now.

@Jared:

Have you tried to login with a freshly new user account?

Revision history for this message
Jared Wiltshire (jaredwiltshire) wrote :

No I didnt try with a new user account.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Unfortunately, after turn on my computer today, the sound goes muted again when goes into the desktop. Obviously this fix doesn't solve the issue (I'm using .

According to that and the fact that another user claims the same, I'll reopen this bugreport.

Changed in pulseaudio (Ubuntu):
status: Fix Released → Confirmed
Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Sorry for the wrapped comment. I mean "I'm using the latest packages from Luke's PPA".

Revision history for this message
Jared Wiltshire (jaredwiltshire) wrote :

I dont think Luke's PPA has 0090_fix_sw_mute_desync.patch in it yet. The Karmic package from the Ubuntu repositories should though and i am still getting the problem with that.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

@Jared:

I can see the following in my /usr/share/doc/pulseaudio/changelog.Debian.gz:

pulseaudio (1:0.9.15-3ubuntu1~ppa2) jaunty; urgency=low

  * libltdl-dev -> libltdl7-dev

 -- Luke Yelavich <email address hidden> Sun, 14 Jun 2009 09:36:29 +1000

pulseaudio (1:0.9.15-3ubuntu1~ppa1) jaunty; urgency=low

  * Update to latest karmic package
  * Add extra patches from Colin Guthri's stable patches git branch:
[...]
  * 0090_fix_sw_mute_desync.patch: Drop, as this is backported code that is
    included in the above patches.
  * Also drop debian/patches/0001-alsa-allow-configuration-of-fallback-device-strings-.patch

 -- Luke Yelavich <email address hidden> Sun, 14 Jun 2009 09:18:58 +1000

Moreover, the source code contains the patch renamed to 0106-core-make-sure-soft-mute-status-stays-in-sync-with.patch.

So yes: the Luke's PPA packages has the patch applied, although it doesn't work for me.

Revision history for this message
David Leal (dgleal) wrote :

@Ricardo

Just to put things in perspective, I'm on Karmic and the mute problems disappeared. I wonder if there is another unrelated problem with your system? Do you have a spare partition on your machine where you can test a fresh Karmic install?

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

@David

Unfortunately I can't install another OS without a complete hard disk reorganization :(.

I'll try to do something and investigate it further. Besides that, I'm not the only user affected by this issue that thinks it's not fixed with the fix_sw_mute_desync patch.

Thanks anyway.

Revision history for this message
Ricardo Pérez López (ricardo) wrote :

Another reboot, and again the sound is muted. However, this morning's startup works perfectly, with unmuted sound. An erratic behavior.

Revision history for this message
Detlef Lechner (detlef-lechner) wrote :

I notice the same error.
My apport bug report is to be found in bug # 395594.

Revision history for this message
Alexander Hunziker (alex-hunziker) wrote :

I have upgraded to Ubuntu Karmic, and the problem persists - i have to unmute sound after every boot.

Revision history for this message
Artur Rona (ari-tczew) wrote :

Yep, I can confirm this bug. Sound is muted on startup.

$ apt-cache policy pulseaudio
pulseaudio:
  Zainstalowana: 1:0.9.16~test4-0ubuntu6
  Kandydująca: 1:0.9.16~test4-0ubuntu6
  Tabela wersji:
 *** 1:0.9.16~test4-0ubuntu6 0
        500 http://pl.archive.ubuntu.com karmic/main Packages
        100 /var/lib/dpkg/status

$ apt-cache policy alsa-base
alsa-base:
  Zainstalowana: 1.0.20+dfsg-1ubuntu4
  Kandydująca: 1.0.20+dfsg-1ubuntu4
  Tabela wersji:
 *** 1.0.20+dfsg-1ubuntu4 0
        500 http://pl.archive.ubuntu.com karmic/main Packages
        100 /var/lib/dpkg/status

Revision history for this message
RomanIvanov (ivanov-jr) wrote :

Could you please suggest a work around for a while.

I use "/usr/bin/amixer -q set Master 100% unmute" to unmute volume, But I failed to automate this by: startup application,.bash.rc, /etc/rc.local, .. . Still in search for the solution to run this command automatically.

Revision history for this message
Chris Yate (chrisyate) wrote :

I am using Debian "testing" and I am getting exactly this problem -- volumes muted after reboot. This is definitely because of the /etc/init.d/alsa-utils script getting executed twice. To discover this, I did the following:

Copy /usr/sbin/alsactl to /usr/sbin/alsactl.exe
Create new /usr/sbin/alsactl something like the following:

#!/bin/bash
echo `date` "Running alsactl $1 $2 $3" >> /var/log/alsactl
alsactl_exe $1 $2 $3

This means alsactl creates a log file with the date on every execution.

Created 'real files' in /etc/rcS.d and /etc/rc[06].d folders (copies of /etc/init.d/alsa-utils) with logging going to /var/log/alsactl.

As a side issue, in order to try and fix this I also have rc.local running alsactl restore.

See attached file alsactl -- this illustrates the problem. /etc/rc0.d/K50alsa-utils runs twice on shutdown. The second time around, the volumes have been zeroed and channels muted; this then gets written to the asound.state file.

Strangely, rc.local also gets executed twice on startup.

I know I'm not using Ubuntu but this is the only thread I've found (with a lot of searching) that has the same issue. Any ideas why my init.d scripts are running twice?!

Cheers

Chris

Revision history for this message
Gyroscope352 (gyroscope352) wrote :

Hey, guys. I have a few workarounds for this, and they're quite simple, so rejoice!

The first one is SUPER easy. just sudo gedit ~/.xinitrc and add this line:

amixer -c 0 sset Master,0 100%

Now, even though you still have the muting problem, your pc will run this command on boot to unmute it. Easy as pie.

There is another, more complicated way to do this as well. The above only works if you have a normal Linux startup session, e.g. GNOME. If your startup session is, say, XBMC, as mine was, that solution won't work. You have to go to further lengths, that is, disabling PulseAudio altogether. <a href="http://idyllictux.wordpress.com/2009/04/21/ubuntu-904-jaunty-keeping-the-beast-pulseaudio-at-bay/">This blog post</a> details how to go about this. It's still pretty easy, just unnecessary if the simple command above works for you.

Good luck!

Whitson

Revision history for this message
Gyroscope352 (gyroscope352) wrote :

Crap! I'm sorry. My last comment had a typo. The command you add to .xinitrc SHOULD be:

exec amixer -c 0 sset Master,0 100%

Revision history for this message
Bernhard (b.a.koenig) wrote :

I actually don't have this problem anymore. It's fixed for me now, must have been in one of the karmic updates.

Revision history for this message
actionparsnip (andrew-woodhead666) wrote :

Had to edit out:

mute_and_zero_levels "$TARGET_CARD" || EXITSTATUS=1

Mines on line 378. Someone in #ubuntu has it on 379

in /etc/init.d/alsa-utils

and rebooted, worked a treat

Revision history for this message
DH (dave-higherform) wrote :

I was able to solve this issue on karmic beta via other means...

I found a K50alsa-utils symlink to /etc/init.d/alsa-utils in /etc/rc0.d/ and /etc/rc6.d/ . Once I redirected those symlinks to an empty file, my sound settings are correctly restored throughout the boot and login process.

Not sure how those rc*.d symlinks got created in my karmic install... isnt rc*.d a kde thing? If so, it was probably when I installed amarok14, amarok 2.2, or amarok-nightly and its dependencies.

HTH, I struggled with this throughout my use of Jaunty, but its fixed permanently now.

Revision history for this message
Daniel T Chen (crimsun) wrote : Re: [Bug 352732] Re: [jaunty] Sound muted after boot

They're created at package creation time by dh_installinit(1). It's
interesting that removing them resolves the issue for you. Can you
verify that they're in fact storing muted settings? You may need to
modify /etc/init.d/alsa-utils to write timestamps out to a file in
/var/tmp or something...

Revision history for this message
NoOp (glgxg) wrote : Re: [jaunty] Sound muted after boot

@actionparsnip - comment #67: worked for me on my karmic installs. Thanks.

Revision history for this message
loonypatrol (loonypatrol) wrote :

I'm currently on Karmic but have had this problem since Jaunty. Commenting out the mute_and_zero_levels line (thread comments 38 and 67) worked for me as well. Thanks!

Revision history for this message
Ashish Narmen (ashish.narmen) wrote :

This bug affects me as well. I have made the changes suggested by Gavindi and hoping that it works.
Thanks a lot
The sound configuration is
cat /proc/asound/cards
 0 [Intel ]: HDA-Intel - HDA Intel
                      HDA Intel at 0xd3200000 irq 16

Revision history for this message
Singpolyma (singpolyma) wrote :

In Karamic I commented out line 378 of /etc/init.d/alsa-utils, and my sound is no longer muted after I log in.

However, I still get no actual sound output until I kill X and log back in.

Singpolyma (singpolyma)
summary: - [jaunty] Sound muted after boot
+ [jaunty,karmic] Sound muted after boot
Revision history for this message
Singpolyma (singpolyma) wrote : Re: [jaunty,karmic] Sound muted after boot

After I have killed X and logged back in, if I then run sudo /lib/udev/alsa-utils, my sound gets muted again

tags: added: jaunty
tags: added: karmic mute pulseaudio sound
Revision history for this message
Singpolyma (singpolyma) wrote :

If I comment out the lines in /etc/init.d/alsa-utils starting at 361 which read:

   preinit_levels "$TARGET_CARD" || EXITSTATUS=1
   if ! restore_levels "$TARGET_CARD" ; then
      sanify_levels "$TARGET_CARD" || EXITSTATUS=1
      restore_levels "$TARGET_CARD" >/dev/null 2>&1 || :
   fi

Then I can run sudo /lib/udev/alsa-utils without my sound re-muting (btw, it doesn't mute in the mixer... it just stops working until I kill X again). Unfortunately this commenting-out does not solve the on-cold-boot problem.

Revision history for this message
phanyx (phanyx-deactivatedaccount) wrote :

I faced this problem, when I installed xubuntu-desktop over my gnome-ubuntu. Curious thing is, that in default gnome sound worked perfectly fine, i. e. it wasn't muted on startup.

Fortunately, the commenting-379-line workaround worked for me.

Revision history for this message
André Gaul (andrenarchy) wrote :

This issue may be a problem in pulseaudio. I managed to get it to work as expected by replacing the line

load-module module-device-restore

in /etc/pulse/default.pa with

#load-module module-device-restore

Perhaps you have to logout, kill all pulseaudio daemons, login, adjust volumes, logout and login again to see if it works.

Revision history for this message
Singpolyma (singpolyma) wrote :

RE#77 that fixed my problem :D

Revision history for this message
Daniel T Chen (crimsun) wrote :

The PA bit is just a red herring; I've already fixed it in alsa-utils.

affects: pulseaudio (Ubuntu) → alsa-utils (Ubuntu)
Changed in alsa-utils (Ubuntu):
status: Confirmed → Fix Released
Revision history for this message
Singpolyma (singpolyma) wrote :

RE#79 if the pulseaudio bit is a red herring, how does the fix work for alsa-utils (since only the PA change actually worked for me...)

Revision history for this message
Daniel T Chen (crimsun) wrote :

See #38. The issue is that we should not be muting the sound anymore; the workaround was for broken linux. So, instead of papering over the issue, we deal with the powerdown symptoms as they appear. IDT/Sigmatel HDA codecs already have such a fix in Lucid; Analog Devices are in progress.

Revision history for this message
GNUbee40 (docnino) wrote :

Re #81: Dear Mr. Chen. Thanx for your efforts! However, I don't understand what you're saying. Powerdown symptoms?
When and how was this fixed? I still have no sound on login. Using the fix #38 will work ONLY for the Master level and PCM level which are successfully restored on boot. But all other settings still get muted including front and headphones, which means - all output is still muted. Thus, running "alsactl restore" on every login is the only functioning workaround for me right now.
If I understand you right this won't be fixed before April 2010?
Is Pulseaudio the culprit in all this?

Revision history for this message
Tony Kernan (ackernan) wrote :

Making the change in #77 helped me. I had a problem of the sound being muted when I rebooted or exited my window manager.

Revision history for this message
Olli Niemikorpi (mr-oole) wrote :

I had also the problem that the master channel was muted in every boot (i have intel hda)

I confirm that making the change proposed by #77 solved also my problem. Maybe a "howto: fix intel hda muted on startup" should be created to wiki or ubuntu forums?

Revision history for this message
Olli Niemikorpi (mr-oole) wrote :

I discovered #38 and #77 methods in Karmic. #77 works as confirmed earlier. #38 doesn't work solely, but that method works together with #77 (actually I'm not sure whether #38 method has any action to Karmic sound settings). #77 seems to be an easy way to get audio unmuted in Karmic, at least for me and for some others that have reported here in a way like that..

BTW: For me, method #77 doesn.t enable "drum" sound at the beginning. The login sound is enabled as well as master channel set to the previous "shutdown level". Actually, this is not a great problem, but an interesting dilemma..

Revision history for this message
Mark Rice (ricemark20) wrote :

I had the same problem as #76, where default ubuntu (gnome) sound was fine, but after installing xubuntu-desktop
over it, the sound was muted.

I found #77 works alone, without #38 in Karmic.

Revision history for this message
Justyn Butler (justyn) wrote :

I ran into this bug suddenly today on a standard Karmic gnome installation that was working fine before. I've no idea what I did for it to suddenly start happening, I didn't do an upgrade and I didn't install xubuntu-desktop like in some other comments.

I can confirm that #38 (commenting out "mute_and_zero_levels "$TARGET_CARD" || EXITSTATUS=1") did not work for me.

However #77 (commenting out "load-module module-device-restore" in PA config) has fixed my problem. I don't know what the other consequences of using this fix are.

Revision history for this message
Justyn Butler (justyn) wrote :

I realize I did not mention my audio chipset in my above post.
I can't clearly see what it is, except that it is not Intel audio.
It is an AMD 780G board, using the IEC958 (SPDIF) output.

Revision history for this message
Olli Niemikorpi (mr-oole) wrote :

Hi Justyn,

What's the output for "Audio device" if you type lspci in the terminal and press enter?

For me, it says
00:14.2 Audio device: ATI Technologies Inc SBx00 Azalia (Intel HDA)

I have Asus M3A MB (ATI 770) but it seems to exhibit as Intel HDA as "lspci" says..

Olli

Revision history for this message
Antonio J. de Oliveira (ajoliveira) wrote :

Hi

I just run into this on a fresh Karmic install, #77 cured the problem, in spite I applied 38. I found that the problem was on the pulse audio mixer, I could unmute and crank up all volumes at the alsa mixer without anything happening. Bug 456013 may be the expression of the same symptoms.

Antonio

Revision history for this message
alwaysanewbie (glennh) wrote :

#77 worked for me on my Karmic as well.

Thanx!

Revision history for this message
Tony Lill (ajlill) wrote :

I'll add my vote for #77 as well. Before I tried this solution, I ran the following experiment: I got all my settings the way I wanted them. I started alsamixer to monitor the settings, then I killed /usr/bin/pulseaudio. When the daemon restarted, it muted the audio. This tells me the problem is entirely in pulsaudio.

Now I had thought I had fixed the problem for a couple of weeks by setting alsa-utils to run at system startup. Whatever bug pulseaudio gets up its arse just comes and goes to reasons currently unknown, so just because it goes away when you fiddle with alsa-utils doesn't mean you've found the problem.

The issue with alsa-utils, as far as I can tell, is that ubuntu sets up the stop script to run, which saves settings and mutes, without setting up the start script to run. You need both or neither. Deleting the line that mutes doesn't really fix this. It happens to work when you re-boot because the hardware probably doesn't get reset. I'll bet that booting to another operating system with different settings or possibly even powercycling will cause other, harder to diagnose problems.

Revision history for this message
papukaija (papukaija) wrote :

Bug 514713 is not a dupplicate of this bug since I'm running Karmic and I have no sound on login.

Revision history for this message
Olli Niemikorpi (mr-oole) wrote :

Papukaija: Take a look to #38, #77 and #81. Fix has already been released for a bug related to alsa-utils, but it seems that we deal with a pulseaudio bug in Karmic affecting to mute sound with Intel HDA.

Try #77. Hope it works.

Revision history for this message
papukaija (papukaija) wrote :

The workaround from comment 77 seems to work, my card is however an Analog Devices card and not an Intel card.

Revision history for this message
testonerosso (testonerosso-safemail) wrote :

I think I've found a simpler way to fix the problem of setting the audio at a desidered level at start up.
I used the "aslactl" function with a custom file (http://manpages.ubuntu.com/manpages/gutsy/man1/alsactl.1.html).
 I set the options as I liked , then I typed from a terminal : aslactl store -f /filename...
this will create a file with the otions setted as I wanted .
then I added at start up the command : aslactl restore -f /filename...

and it works all the times.

Revision history for this message
papukaija (papukaija) wrote :

Your workaround increases desktop's loading time :(

Revision history for this message
testonerosso (testonerosso-safemail) wrote :

I use an old thinkpad x20 with 196mb and I can tell you that the desktop loading time did not change. I have other performance problem later on but not at starting

Revision history for this message
papukaija (papukaija) wrote :

Anyway, the workaround from comment 77 is working for me and is imo a simpler temporary fix.

Revision history for this message
Brian (x-brian) wrote :

Workaround from #77 fixed this for me in Karmic 9.10. In Jaunty I had killed pulse but it came back on upgrade to Karmic, though I don't seem to be having any troubles from it in Karmic save this. Now that I commented that line in /etc/pulse/default.pa I get the drum sound before login, the login sound, and the volume on both are at the same level they were on logout. Seems to work fine! :^)

I have an Intel HDA sound controller (82801G).

Revision history for this message
Kacela (robert-jochim) wrote :

Using Karmic 9.10 - Same issue as previously described here - volume is muted upon rebooting.

Workaround outlined in #77 worked for me. Start-up sound is now back and the volume remains where I left it during it's previous session. I tested shutting the machine down hard and shutting down gracefully; sound is at normal levels upon rebooting after both. Thanks @André Gaul

Revision history for this message
Tomi Hukkalainen (tpievila) wrote :

Had this problem since Karmic, persisted after upgrading to Lucid. Fix in #77 solved the problem.

Revision history for this message
Johnny Bilek (johnnyvw) wrote :

Just wanted to pile on. #77 without #38 works for my Latitude CPx with Karmic. #38 kind of worked. It didn't boot up muted, but would change the volume levels to 38% master and 75% PCM (I keep them at 54%/50%).

I changed #38 back and applied #77. Yay!

Revision history for this message
Johnny Bilek (johnnyvw) wrote :

Oops, forgot... I'm using Xubuntu Karmic. This was an upgrade from 8.10, to 9.04, 9.10.

Revision history for this message
Kent deVillafranca (kdevilla) wrote :

I'm on an MSI X340. Didn't have this problem in Karmic, but did after upgrading to Lucid (the "Speaker" setting in alsamixer would drop to the lowest level possible on every boot). The advice from post #77 fixed it. I had also previously raised the levels back to normal in alsamixer and did a "sudo alsactl store", which may or may not have done anything to help.

Revision history for this message
psgoodrich. (psgoodrich) wrote :

Getting Ubuntu Lucid Lynx 10.04 to play audio on EeePC. This worked for me.

Thanks to André Gaul at

https://bugs.launchpad.net/ubuntu/+source/alsa-utils/+bug/352732/comments/77

who wrote --

"This issue may be a problem in pulseaudio. I managed to get it to work as expected by replacing the line
load-module module-device-restore
in /etc/pulse/default.pa with
#load-module module-device-restore
Perhaps you have to logout, kill all pulseaudio daemons, login, adjust volumes, logout and login again to see if it works."

Being new to linux, at first, I couldn't modify -- /etc/pulse/default.pa

because I didn't have "ownership permission" so first I had to go to

http://ubuntuguide.org/wiki/Ubuntu:Lucid to find out how to

http://ubuntuguide.org/wiki/Ubuntu#How_to_change_files.2Ffolders_permissions

You need to open Terminal (located in the Accessories group)

then type --

sudo chown system_username /location_of_files_or_folders

(My user name is "u" so substiture your user name for "u")

so I typed --

sudo chown u /etc/pulse/default.pa

(My user name is "u" so substiture your user name for "u")

this allows you to use "gedit" (located in the Accessories group) or another word processor to modify the file by adding the "#" to the

"load-module module-device-restore" line

You may search for this combination by type <Ctrl>-F then filling in --
load-module module-device-restore

Before you make any changes to "default.pa" copy it to the Desktop "just in case"

After I made the changes, I right clicked on "default.pa" and changed all the permissions back to "Read Only".

Restart Ubuntu and, if you are as lucky as I was, you will have sound!

Hope this helps, but feel free to contact me if you get stuck. Gesundheit. Doktor Krankheit.

Revision history for this message
Andrea Amoroso (heiko81) wrote :

I have the same problem with Ubuntu Maverick alpha 2..at startup the volume is always off..

Revision history for this message
Andrea Amoroso (heiko81) wrote :

The solution proposed in #38 worked from me, except for the fact that the alsa-utils file is under /sbin and not /etc/init.d..again, Ubuntu Maverick alpha 2..

Revision history for this message
Antonio J. de Oliveira (ajoliveira) wrote :

Hell will freeze when I will do the move to Maverick. Lucid is already an enormous headache. I have this fixed, maybe it was the following:

***************
Therefore, I commented out line 372 in /etc/init.d/alsa-utils:
# mute_and_zero_levels "$TARGET_CARD" || EXITSTATUS=1

in /etc/pulse/default.pa with
#load-module module-device-restore
*********************************

because nobody at the right level cared for this one since jaunty. an this is a pita...

papukaija (papukaija)
summary: - [jaunty,karmic] Sound muted after boot
+ Sound muted after boot
tags: added: lucid maverick
removed: mute sound
Revision history for this message
Jamie Kitson (jamie-kitson) wrote :

Yep, fixed this issue as #38 says in Karmic and had to do the same in /sbin/ after upgrading to Lucid.

Revision history for this message
Berthold (bsc1976) wrote :

Following instructions in #106 fixed muted sound in ubuntu 10.04 on a HP dv6700. Thx

Revision history for this message
Detlef Lechner (detlef-lechner) wrote :

The error persists in Maverick.
'~$ uname -a; Linux MD97600 2.6.35-22-generic #35-Ubuntu SMP Sat Oct 16 20:36:48 UTC 2010 i686 GNU/Linux'

Revision history for this message
Kenny Bülow Larsen (kennyvonbulow) wrote :

The errior persists in 11.04
uname -a
2.6.38-10-generic-pae #46-Ubuntu SMP Tue Jun 28 16:54:49 UTC 2011 i686 i686 i386 GNU/Linux

Revision history for this message
RobinJ (robinj) wrote :
Revision history for this message
mikewhatever (mikewhatever) wrote :

Still unfixed in Lucid 10.04.3. Had to use the workaround as outlined is #106.

Revision history for this message
László Monda (mondalaci) wrote :

It's a 3 years old bug which really should have been fixed by now. Instead of using workarounds I'd like to understand what's the root cause of the issue and get it fixed.

I've done as written in #63 to track this down and got:

2012-05-15 01:51:58 Running alsactl store
2012-05-15 12:11:28 Running alsactl restore
2012-05-15 12:11:28 Running alsactl restore 1
2012-05-15 12:11:28 Running alsactl restore 0
[muted and manually corrected]
2012-05-16 04:21:32 Running alsactl store
2012-05-16 15:01:49 Running alsactl restore
2012-05-16 15:01:49 Running alsactl restore 1
2012-05-16 15:01:49 Running alsactl restore 0
[muted and manually corrected]
2012-05-17 03:27:04 Running alsactl store
2012-05-17 12:41:22 Running alsactl restore 1
2012-05-17 12:41:22 Running alsactl restore 0
2012-05-17 12:41:22 Running alsactl restore
[muted and manually corrected]

According to /etc/init/alsa-restore.conf and /etc/init/alsa-store.conf instead of "restore 1", "restore 0" and "restore" only "restore" should be executed, right?

If anyone has any idea about the above or about the root cause of this issue please don't hesitate to share. This is a disturbing sucker that should be eliminated.

Revision history for this message
László Monda (mondalaci) wrote :

Minor correction: In my previous comment I erroneously wrote /etc/init/alsa-{re}store.conf instead of /etc/init/alsa-{re}store.

In the meantime I commented out the "load-module module-device-restore" line in /etc/pulse/default.pa according to #77. Unlike for others it didn't fix the issue for me.

It's also important to mention that sometimes the volume level gets restored correctly and other times it doesn't so this issue seems too be non-deterministic.

At this point I'm not sure what the culprit is. Given that alsactl gets called by Upstart this seems like it's an ALSA issue but PulseAudio related tweaks resolved this issue for some which suggests me that it may be a PulseAudio issue.

I've just reported https://bugtrack.alsa-project.org/alsa-bug/view.php?id=5586 to the ALSA bugtracker.

papukaija (papukaija)
tags: added: natty oneiric
removed: jaunty karmic maverick pulseaudio
papukaija (papukaija)
description: updated
description: updated
Revision history for this message
keesp (cees-pieters) wrote :

I had the same issue with Xubuntu 12 (and earlier). As I didn't need advanced audio possibilities I removed PulseAudio and used alsamixer alone. That seemed to do the trick. If it is a bug, i think it has to do with pulseaudio and not alsa

Revision history for this message
Commoner (commoner51) wrote :

I had the same problem with Ubuntu 12.04. Fix in #77 solved it.

Revision history for this message
maxim (maximn) wrote :

Using Xubuntu 12.04.1, muted sound after boot/login to XFCE. Using workaround in comment #77, problem does not occur.

Revision history for this message
vsespb (vi1tsr) wrote :

same in ubuntu 10.04 (except sound not muted, but set to lower level), fixed by #77

Revision history for this message
dino99 (9d9) wrote :

EOL reached or very close. Time to use some newer version.

Changed in pulseaudio:
importance: Unknown → Undecided
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.