Master audio muted on each reboot with Xubuntu Jaunty

Asked by CyrusCT on 2009-04-24

Every time I restart Xubuntu 9.04 Jaunty (both i386 and amd64 version), my master audio control is muted. I have to manually open the mixer, un-mute and drag the control from zero to my desired volume level - every time I restart, whether I saved my last session or not.

I am not getting this problem with regular Ubuntu 9.04 Jaunty installs, only with Xubuntu 9.04 Jaunty installs.

I am experiencing this problem on both of my computers (Dell Inspiron 1420n and Samsung Q1Ultra), so I don't think it's hardware related. I did not have this problem with Xubuntu 8.10 Intrepid. I started using 9.04 Jaunty when it went Beta, which is when I first noticed the problem. Downloading updates and re-installing does not fix the problem. I thought for sure it would be fixed by the final release.

Has anyone else been experiencing this?

Does anybody know how to fix this.

Question information

Language:
English Edit question
Status:
Solved
For:
Ubuntu Edit question
Assignee:
No assignee Edit question
Solved by:
CyrusCT
Solved:
2009-04-28
Last query:
2009-04-28
Last reply:
2009-04-28
AsstZD (eskaer-spamsink) said : #1

Yes, I'm experience this on Ubuntu 9.04 with Xfce desktop.

CyrusCT (cyrusct) said : #2

Thanks AsstZD, it helps knowing that I'm not alone in this.

I still haven't found a fix, but I have made some progress:

Selecting one of the Pulse versions of which sound-card definition the mixer controls causes the mixer to still control the Pulse version after restarting.

Unfortunately, the volume level keeps resetting, so this only fixes the muting part of the problem. I still have to drag the volume control up to an audible level every time I restart.

Does anybody know how to make Xubuntu Jaunty automatically remember the previous volume level on restart?

Leaf (paulbubbles) said : #3

I have two 64 bit boxes one running ubuntu (gnome) which is fine and one running mythbuntu which has the same problem.

ie Sound mutes on reboot and volume reduced from 100 to 3. Running alsa on mythbuntu and pulse on ubuntu. Mythbuntu uses the xfce desktop, not sure if this is relevant.

CyrusCT (cyrusct) said : #4

Thanks Leaf,

I have noticed the problem in both 64-bit and 32-bit installations. If the problem is also affecting Mythbuntu, then I suspect that it is related to a component common to both Mythbuntu and Xubuntu, most likely xfce4-mixer.

One thing that I have noticed is that if I adjust the volume to an audible level and restart, then I have the audio at an audible level for the noise(s) played at the GDM login, but then once it finishes starting after I login, the audio is at an inaudible level again.

I still haven't found a fix for this.

Leaf (paulbubbles) said : #5

CyrusCT, I noticed a similar thing on reboot, sound is fine until the Myth frontend is started

CyrusCT (cyrusct) said : #6

It seems like it should be possible for someone to write a script that could be added to the startup items as a work-around until this is fixed.

Unfortunately, I don't know how to do that yet, but I'll see if I can figure something out and post it back here if I do.

Meanwhile, does anybody have a solution? Does anybody already have a work-around implemented?

CyrusCT (cyrusct) said : #7

I found what is supposed to be a work-around:

ayates@http://ubuntuforums.org/showthread.php?t=1119935&page=2
          There is a script in /etc called rc.local that is executed by the init process. You can put commands in there that you want done at startup. Just add the line "alsactl restore" to it and it will be executed at startup. Add the line to rc.local, unmute the sound, do the command "alsactl store", and reboot and see if that fixes it.

Attempting to run the last step does not work for me:

$ alsactl store
alsactl: save_state:1541: Cannot open /var/lib/alsa/asound.state for writing: Permission denied
$ sudo alsactl store
E: core-util.c: Home directory /home/cyrusct not ours.

So what I did then was I changed the priveledged from read only to read and write for the group and for others for /var/lib/alsa/asound.state after which point I was able to successfully store the command.

While this worked for most users in the thread where I found it, it does not work on my systems.

I still need a fix/work-around

Leaf (paulbubbles) said : #8

Found the issue with Mythbuntu, under the Myth Front End setup ie Utilities/Setup - Setup - General - Audio (ie 3rd screen in) the Mixer Device had been set to /dev/mixer instead of ALSA:Default. This was done by the upgrade to 9.04 switching it back to ALSA:Mixer resolves the issue.

Not sure now if this is actually a different problem to others in this thread or if something similar could be happening with Xubuntu.

Leaf (paulbubbles) said : #9

Sorry for ALSA:Mixer above read ALSA:Default. I couldn't find a way to edit the answer

CyrusCT (cyrusct) said : #10

Thanks Leaf,

I'm glad you have a solution, and I think you just put me on the right track to finding mine too.

Unfortunately, Xubuntu doesn't have the same configuration methodology, and I haven't found the equivalent I need yet.

I looked in Settings - Setting Editor - xfce4-mixer and found the settings for my sound configuration, but the option for /dev/mixer vs. ALSA:Default doesn't seen to be something that is set here, and I don't know where else to look.

I may have to edit the configuration files manually in my text editor if I can't find a GUI to make the edits. Do you know what text files were edited when you fixed yours?

If anybody knows how to access the Xubuntu equivalent to Myth Front End setup ie Utilities/Setup - Setup - General - Audio that would be greatly appreciated.

Leaf (paulbubbles) said : #11

On mythbuntu this setting is stored in a mysql database not in a text file which is why I think this may be 2 different issues, sorry I should have made that clearer.

ALSA config files are /etc/asound.conf and ~/.asound.rc but I'm not sure that this is where the mixer device would be set.

CyrusCT (cyrusct) said : #12

Thanks Leaf,

I don't actually have asound.conf or .asound.rc files in those or any other folders. I did find a workaround (not a fix) using /var/lib/alsa/asound.state and /sbin/alsactl which is probably due to the difference between Mythbuntu and Xubuntu.

Below are the details of the work-around I used. I tried to make this part n00b friendly so as to avoid any future explanations.

##### WORK-AROUND FOR AUDIO PROBLEM #####

1.) Manually adjust the mixer settings to something that is a good default for your audio needs. These settings will be loaded every time you restart your computer.

2.) Change the file permissions for /var/lib/alsa/asound.state to enable read/write access for the group/others (open the folder in Thunar, then right-click the file, select properties, and go to the Permissions tab). If you don't do this, then the next step will give you a permission denied error.

3.) Open up a terminal and enter the command "alsactl store" (without the quotes). This stores your mixer settings in /var/lib/alsa/asound.state for later use.

4.) From The Xubuntu/Xfce menu, go to Settings and open Sessions and Startup. Go to the Application Autostart tab and click the Add button.

5.) Enter the command "alsactl restore" (without the quotes) and the name and description of your choice. This causes the "alsactl restore" command to automatically run when you start your computer. The command restores you mixer settings from /var/lib/alsa/asound.state where you saved them earlier.

I'm going to click "Problem Solved" instead of "I Still Need an Answer" because even though this is a work-around and not a true solution, it is sufficient for my needs, and I no longer need an answer.

Again many thanks to Leaf for leading me in the right direction.

ken sease (seasekr2) said : #14

I have the same problem in my jaunty upgrade from intrepid 32 bit. if the fix of saving settings by initiating "alsactl" is done what if you have your sound muted and you want to boot it that way?

Daniel Hill (daniel-hill) said : #15

Hi, I'm having the same problem with Standard Ubuntu Jaunty,
I've just started trying to look for the problem in /etc/init.d/alsa-utils, lines 60-90 look promising

ken sease (seasekr2) said : #16

Dan, those lines do look interesting. I am not much of a code guy but hopefully you are. My problem seems to be intermittent too. It is usually occurring only during a re-boot, which makes sense. I generally just let my laptop go to sleep when I close the lid and then I don't see the problem. Have you tried commenting out any of that section to see what transpires?

ken sease (seasekr2) said : #17

After my upgrade to Jaunty from Intrepid I acquired two volume controls on the panel. One is called "Master" and the other "Output". If you slide one the other moves as well. Not sure why that installed because I didn't ask for it anywhere during the process. Maybe this is related to the auto muting problem, not sure. FYI

Daniel Hill (daniel-hill) said : #18

ok this bug has been marked solved, when it clearly hasn't.
sorry no luck with the scripts

Daniel Hill (daniel-hill) said : #19

ok using sysv-rc-conf reveals that the alsa-utils script ISN'T being run at boot

The bug is definitely NOT SOLVED. I fully updated my Xubuntu 9.04 and the system is muted after every restart, just as it is described.

I have an HP NX9420 Laptop.
82801G (ICH7 Family) High Definition Audio Controller, driver snd-hda-intel.

bturig (ubuntu-bryonurig) said : #21

I resolved this problem by following CyrusCT advice above to fix my diskless mythbuntu client, but found that /var/lib/alsa/asound.state did not exist nor did the program alsactl. So I installed alsa-utils via Synaptic (or from the terminal "sudo apt-get install alsa-utils"). I then adjusted my mixer settings, and stored them using "sudo alsactl store" from the terminal.

Note: this also fixed a mythtv sound control problem, because after I installed alsa-utils it exposed /dev/dsp to my frontend.

jaero (jaero) said : #22

Not a fix, but my hack is like this. I created a startup script containing:

#!/bin/sh

sleep 1
amixer sset Master 50% on

ken sease (seasekr2) said : #23

I had this problem when I did an "upgrade" to Jaunty. Due to other issues that I caused I had to do a fresh install of Jaunty and the problem went away. Did you do an upgrade or fresh install?

jaero (jaero) said : #24

Fresh install, first tried 64bit xubuntu 9.04, then i386 version. But after few days it happens on both. Maybe its cause is one of the updates...

ken sease (seasekr2) said : #25

I've been running a couple of weeks on the new fresh 32 bit Jaunty install and have not seen any sound or video problems return. I have done all of the updates that were available. Hopefully someone can nail down what triggers the problem to start. Thanks.

CyrusCT (cyrusct) said : #26

ken sease:
     While I can't nail it down, I may be able to provide a starting point for the process:
     I recently did a fresh install for a 32-bit system, using WUBI, and had no problem. I upgraded that system to the Karmic Alpha and still no problem. Then I added some repositories and installed my usual set of packages that I use beyond what is installed by default. At that time, the problem came back. I think it might be related to additional mixers being installed. I use ALSA, OSS and Pulse.

To multiple:
     I agree that this is NOT solved, however I was presented a choice between "I Still Need an Answer" and "Problem Solved" neither of which were appropriate. "Problem Solved" still seems less inappropriate to me since there are now a number of hacks and tweaks useful in circumventing the problem.

Additional information:
     On my main system (64-bit), the mixer settings are now being saved when I shutdown, but if I take "alsactl restore" out of my startup, then I still get mute on each reboot.

Zedi (buzedin) said : #27

I believe I have exactly the same bug. I'm running Jaunty and my card is -> "| Card: HDA Intel | Chip\codec: Realtek ALC880". But my problem appeared only after I had to remove, purge & reinstall GDM. So it is something to do with gnome panel (99% sure). Anyway it's nothing major, I just made a habit to unmute master volume, first thing after every booting & learn not to expect drums at booting.

Haynie Barlowe (bossting) said : #28

I'm also having this problem with my Jaunty 9.04 XUBUNTU, the volume control keeps going to 0% en muting also.
And on every reboot or restart i have 2 manualy reset the volume (unmute and slide up the volume)

In desperate need of a solution

even on my new ACER laptop Travelmate 7730 G - 6B4G25Mn with XUBUNTU 64AMD having same problem

Hi,

Please try this workaround procedure:

1. Open Terminal from "Applications->Accessories->Terminal"

2. copy-paste the following command into the Terminal:

gksudo gedit /etc/init.d/alsa-utils

3. Replace the following line (which is line 372 in the /etc/init.d/alsa-utils file):

mute_and_zero_levels "$TARGET_CARD" || EXITSTATUS=1

with the following line:

# mute_and_zero_levels "$TARGET_CARD" || EXITSTATUS=1

So you need to comment out that line to prevent the script from muting your soundcard during boot.

4. Reboot and recheck mixer settings

Hope it helps,

Regards,

Mark

Regards,

Mark

jaero (jaero) said : #30

Looks like it's working. I'll be testing it for few more reboots. Because I was "cleaning" packages, removing ton of them and now the mixer is sometimes ok, sometimes muted. I'll see if it will hold for some time...

Zedi (buzedin) said : #31

Thanks Mark! It's solved.
Regards,
Zedi

Zedi (buzedin) said : #32

Thanks Mark! It's solved.
Regards,
Zedi

Radu (ybres0) said : #33

Can confirm that Mark's solution works very good. Nice job.

Jamie Kitson (jamie-kitson) said : #34

Me too! On Karmic btw.

Thanks!

Jamie Kitson (jamie-kitson) said : #35

So is this a bug in the package that will be fixed?

jaero (jaero) said : #36

My upgrade to Karmic brought this bug back, too. Maybe Cyrus or someone else could remove the SOLVED state and push it somewhere for solving in the packages...

CyrusCT (cyrusct) said : #37

jaero,

Given the choice between "Problem Solved" and "I still need an answer" I
still think "Problem solved" is more appropriate for answers.launchpad.net.
If you want me to transfer this to bugs.launchpad.net then someone's
going to have to tell me how. I didn't report this as a bug because I
don't know what what package the problem corresponds to, and as such, I
don't have any output files to attach for a bug report, whould would
mean an "Incomplete" status.

If you care to complete a bug report, I would be happy to confirm the
bug for you.

On 11/25/2009 12:48 PM, jaero wrote:
> Your question #68564 on Ubuntu changed:
> https://answers.launchpad.net/ubuntu/+question/68564
>
> jaero posted a new comment:
> My upgrade to Karmic brought this bug back, too. Maybe Cyrus or someone
> else could remove the SOLVED state and push it somewhere for solving in
> the packages...
>
>

jaero (jaero) said : #38

That's right, problem is solved, this is not about bug reports. I thought you were more experienced with launchpad than me, so I wrote that. And now we need someone, who can fill the real bug report :)

Crimbo (ckhatton) said : #39

Mark, you're a star!