You are not logged in.

#1 2012-05-29 08:47:17

roguewolf
Member
From: UK
Registered: 2012-05-28
Posts: 32

[SOLVED] ALSA Sound Muted on Reboot / Logoff-On

Hi,

I'm new to Arch but have some knowledge of Linux in general.  I'm wanting to use Arch as a way of getting more clued up on how Linux works 'under-the-hood'.

I have an issue with ALSA which, after reading up on it in the Arch Wiki, I'm not sure how to solve. I'm hoping that someone can point me in the right direction.

ALSA itself seems to be working fine.  I can run 'alsamixer', press F6 to select my soundcard and un-mute and increase the volume and I get sound.  I've saved the settings to ~/.asoundrc.

If I reboot or log off and back on, however, the ALSA settings are reset.

If I run:

amixer -c 0 sset 'Master' 50% unmute &> /dev/null

I get sound again.  I've tried adding the above line to rc.local but sound is still muted and 0% volume after a reboot.

Could anyone suggest why this might be?

Last edited by roguewolf (2012-06-04 06:56:59)

Offline

#2 2012-05-29 08:52:43

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: [SOLVED] ALSA Sound Muted on Reboot / Logoff-On

Install "alsa-utils":

sudo pacman -S alsa-utils

Then set your volumes to where you would like them using whatever mixer, then do:

sudo alsactl store

Then made sure that "alsa" is in your DAEMONS array in /etc/rc.conf

That should do the trick. wink

Offline

#3 2012-05-29 08:54:25

tkdncty2
Member
Registered: 2012-05-24
Posts: 24

Re: [SOLVED] ALSA Sound Muted on Reboot / Logoff-On

-Set the desired volume in alsamixer

-Use the command
alsactl store

open /etc/rc.conf and add alsa to the daemons.

This is from the wiki page https://wiki.archlinux.org/index.php/Alsa and it worked for me.

Last edited by tkdncty2 (2012-05-29 08:55:03)

Offline

#4 2012-05-29 09:01:13

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: [SOLVED] ALSA Sound Muted on Reboot / Logoff-On

Also, "alsa" in your DAEMONS array should be as far left as possible.  Here is mine for reference:

DAEMONS=(syslog-ng dbus hwclock alsa network crond slim)

Don't worry about the stuff you don't need, just make sure that alsa is at least before your login manager.

Offline

#5 2012-05-29 09:04:35

roguewolf
Member
From: UK
Registered: 2012-05-28
Posts: 32

Re: [SOLVED] ALSA Sound Muted on Reboot / Logoff-On

Wow, thanks for the very quick replies smile

I made sure to read through the ALSA Wiki page after installation (and before posting here) so should already have done as you have suggested but, just to be sure:

I double-checked and I already have alsa-utils installed.

I re-ran:

sudo alsactl store

I've also double-checked to make sure that 'alsa' is in my DAEMONS array and it is:

DAEMONS=(syslog-ng dbus network crond alsa gdm)

But still no sound after logoff/on sad

Offline

#6 2012-05-29 09:06:10

roguewolf
Member
From: UK
Registered: 2012-05-28
Posts: 32

Re: [SOLVED] ALSA Sound Muted on Reboot / Logoff-On

Thanks headkase, just rebooting after moving 'alsa' in front of 'network' in my DAEMONS array...

Last edited by roguewolf (2012-05-29 09:10:51)

Offline

#7 2012-05-29 09:07:38

roguewolf
Member
From: UK
Registered: 2012-05-28
Posts: 32

Re: [SOLVED] ALSA Sound Muted on Reboot / Logoff-On

...but still no sound.

Could it be something like Pulse Audio over-riding the ALSA settings?

Last edited by roguewolf (2012-05-29 09:10:34)

Offline

#8 2012-05-29 09:14:55

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: [SOLVED] ALSA Sound Muted on Reboot / Logoff-On

Try removing or renaming your ~/.asoundrc file.  What mixer are you using?  I use "xfce4-mixer" as my desktop environment is Xfce 4.10.  That one I select the sound hardware in, I have more than one, then after doing that do the alsactl store command.

Edit: also, logoff/login isn't enough for the ALSA daemon: you have to reboot.  All that daemon does is store the volume on shutdown and restore it on bootup.

Edit2: do alsactl store right after setting everything up in amixer.  If that doesn't work perhaps try another mixer?

Last edited by headkase (2012-05-29 09:18:13)

Offline

#9 2012-05-29 09:34:01

roguewolf
Member
From: UK
Registered: 2012-05-28
Posts: 32

Re: [SOLVED] ALSA Sound Muted on Reboot / Logoff-On

Thanks again headkase.

I've renamed the ~/.asoundrc to ~/.asoundrc_bak and done a full reboot but still no sound.

I'm not sure what mixer I'm using? I'm just right-clicking on the gnome volume control and selecting 'Sound Preferences'.  I do have PulseAudio Volume Control installed and that shows movement on the 'volume bar' when I do something which should make a sound (e.g. pressing left arrow in terminal).  But no sound is actually emitted (unless I run the amixer command from my original post).

Offline

#10 2012-05-29 09:39:02

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: [SOLVED] ALSA Sound Muted on Reboot / Logoff-On

Yeah, I'm sorry I don't know what to suggest from here.  I'm, as said, using Xfce 4.10 and I am using just ALSA with that and the given instructions do work for myself.  Now, I do know like you say that GNOME uses Pulse Audio.  So the best place to start for yourself from here would be that page on the Wiki:

PulseAudio

I'm unfamiliar with Pulse, and don't use it, so hopefully if nothing stands-out to you on the Wiki then perhaps someone else will be able to help.

Offline

#11 2012-05-29 09:49:09

roguewolf
Member
From: UK
Registered: 2012-05-28
Posts: 32

Re: [SOLVED] ALSA Sound Muted on Reboot / Logoff-On

No need to apologise, I really appreciate the help.

I am reasonably sure that it's some sort of conflict between ALSA and Pulse Audio.  It seems odd that adding the alsamixer line to rc.local isn't working as it works when running manually and, if I understand correctly from the Wiki, rc.local is the last thing to run after login.  That's makes me suspect that Pulse is overwriting the ALSA settings.

I have read through the Pulse Audio Wiki entry and there's a section specifically dealing with Pulse overwriting the ALSA settings but I've added the suggested code to .xinitrc but to no avail.  I even thought about removing Pulse Audio altogether but it seems that GNOME requires it.

I'm not tied to the GNOME interface so, if I can't sort this out I might have a look at the other options.  XFCE seems pretty cool so I might give that a try smile

Thanks again for your help, glad to see that my problem doesn't seem to be due to any stupid newbie error on my part (hopefully!).

Last edited by roguewolf (2012-05-29 09:50:08)

Offline

#12 2012-05-29 10:02:53

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: [SOLVED] ALSA Sound Muted on Reboot / Logoff-On

You're welcome, sorry I couldn't get it resolved with you.  Xfce is a very light desktop environment - I use it mostly because it is compatible with Compiz.  If you do go with it check that out too!  Lot's of pretty bell's 'n whistles.. wink

Offline

#13 2012-05-29 11:58:45

debdj
Member
Registered: 2012-01-19
Posts: 163

Re: [SOLVED] ALSA Sound Muted on Reboot / Logoff-On

try removing pulseaudio if thats installed...

Offline

#14 2012-05-29 12:15:56

roguewolf
Member
From: UK
Registered: 2012-05-28
Posts: 32

Re: [SOLVED] ALSA Sound Muted on Reboot / Logoff-On

Thanks debdj.  Is that possible with GNOME?  If I try to remove pulseaudio I get a message advising that 'gnome-setting-daemon requires pulseaudio'.

Offline

#15 2012-05-29 12:54:29

debdj
Member
Registered: 2012-01-19
Posts: 163

Re: [SOLVED] ALSA Sound Muted on Reboot / Logoff-On

Sorry, I didnt notice you're using gnome.

Have you tried this?
https://wiki.archlinux.org/index.php/Pu … A_settings

Offline

#16 2012-05-29 12:56:47

roguewolf
Member
From: UK
Registered: 2012-05-28
Posts: 32

Re: [SOLVED] ALSA Sound Muted on Reboot / Logoff-On

No worries.

I had noticed that section of the PulseAudio Wiki and tried what was suggested but unfortunately that didn't work.

Offline

#17 2012-05-29 13:01:10

roguewolf
Member
From: UK
Registered: 2012-05-28
Posts: 32

Re: [SOLVED] ALSA Sound Muted on Reboot / Logoff-On

@headkase

I've removed GNOME and Pulse Audio and installed Xfce and guess what, I have persistent sound!

Thanks again for your help smile

Offline

#18 2012-05-29 13:05:17

headkase
Member
Registered: 2011-12-06
Posts: 1,986

Re: [SOLVED] ALSA Sound Muted on Reboot / Logoff-On

Right on, you're welcome! smile

Offline

#19 2013-09-27 19:40:56

archie0
Member
Registered: 2012-02-26
Posts: 144

Re: [SOLVED] ALSA Sound Muted on Reboot / Logoff-On

Had the same problem on Gnome. Installing alsa-utils fixed it.

Offline

#20 2013-09-28 13:47:52

fsckd
Forum Fellow
Registered: 2009-06-15
Posts: 4,173

Re: [SOLVED] ALSA Sound Muted on Reboot / Logoff-On

archie0, see the wiki article for ALSA and Forum Etiquette: Old Threads / Necro-Bumping. Closing.


aur S & M :: forum rules :: Community Ethos
Resources for Women, POC, LGBT*, and allies

Offline

Board footer

Powered by FluxBB