You are not logged in.

#1 2014-06-22 02:29:43

Shadow_Reaper13
Member
From: Westopolis
Registered: 2014-03-13
Posts: 40

[SOLVED] Alsa is always muted on reboot

Hi everyone, I am having this annoying issue since some time ago:

Every time I boot my computer, the netbook integrated speaker is muted, if I connect my earphones there's sound, but the speaker is muted.

Here's an alsamixer screenshot:

capturadepantalla-210614-225943.php

Auto-Mute is disabled and I've already tried this and this and nothing worked. I even tried to put "amixer sset Master playback 100%+ unmute" on a script at startup and that didn't worked either. I really need help with this because even the Xfce4 panel applet for sound does indicate that the speaker is fully working but when I go to alsamixer it's like the image I posted, the speaker control is set to 0.

Any light on this will be well appreciated, I hope you can help me.

Thanks in advance, Shadow_Reaper13

Last edited by Shadow_Reaper13 (2014-06-24 20:28:11)

Offline

#2 2014-06-22 03:41:30

ralvez
Member
From: Canada
Registered: 2005-12-06
Posts: 1,718
Website

Re: [SOLVED] Alsa is always muted on reboot

try "alsactl store" to save the settings after you set the controller values with "alsamixer".

R.

Offline

#3 2014-06-22 07:53:36

IncredibleLaser
Member
From: Germany, NRW
Registered: 2008-07-16
Posts: 158

Re: [SOLVED] Alsa is always muted on reboot

Are you using Pulseaudio? If yes, you should not use alsamixer. Also see if "alsa-store" and "alsa-restore.service" are enabled if you don't use Pulseaudio as Pulse saves its volume levels by itself and restores them on user login.

EDIT: does your netbook have an Intel HDA chip? I as well had this problem recently and read someone else having it on reddit. I think this is that the netbook "thinks" headphones are plugged in after boot, regardless if they are or not, and mutes speakers accordingly (though you have disabled automute). I don't know if that was what fixed it, but ever since I played around with hdajackretask, my sound works nearly as expected (except that I can't use the shitty built-in microphone).

Last edited by IncredibleLaser (2014-06-22 07:58:35)

Offline

#4 2014-06-22 09:40:28

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [SOLVED] Alsa is always muted on reboot

amixer certainly works, I've been using it for many years.

Offline

#5 2014-06-22 21:36:11

Shadow_Reaper13
Member
From: Westopolis
Registered: 2014-03-13
Posts: 40

Re: [SOLVED] Alsa is always muted on reboot

ralvez wrote:

try "alsactl store" to save the settings after you set the controller values with "alsamixer".

R.

I already did this but alsa doesn't seem to be able to restore my settings on boot up. Here's the "systemctl status alsa-state alsa-restore alsa-store" output:

● alsa-state.service - Manage Sound Card State (restore and store)
   Loaded: loaded (/usr/lib/systemd/system/alsa-state.service; static)
   Active: inactive (dead)
           start condition failed at dom 2014-06-22 17:30:38 ART; 56min ago
           ConditionPathExists=/etc/alsa/state-daemon.conf was not met

jun 22 17:30:38 EXO-X352 systemd[1]: Started Manage Sound Card State (resto...).

● alsa-restore.service - Restore Sound Card State
   Loaded: loaded (/usr/lib/systemd/system/alsa-restore.service; static)
   Active: inactive (dead) since dom 2014-06-22 17:30:40 ART; 56min ago
  Process: 270 ExecStart=/usr/bin/alsactl restore (code=exited, status=0/SUCCESS)
Main PID: 270 (code=exited, status=0/SUCCESS)

jun 22 17:30:38 EXO-X352 systemd[1]: Starting Restore Sound Card State...
jun 22 17:30:40 EXO-X352 systemd[1]: Started Restore Sound Card State.

● alsa-store.service - Store Sound Card State
   Loaded: loaded (/usr/lib/systemd/system/alsa-store.service; static)
   Active: inactive (dead)
Hint: Some lines were ellipsized, use -l to show in full.

Offline

#6 2014-06-22 21:42:01

Shadow_Reaper13
Member
From: Westopolis
Registered: 2014-03-13
Posts: 40

Re: [SOLVED] Alsa is always muted on reboot

IncredibleLaser wrote:

Are you using Pulseaudio? If yes, you should not use alsamixer. Also see if "alsa-store" and "alsa-restore.service" are enabled if you don't use Pulseaudio as Pulse saves its volume levels by itself and restores them on user login.

EDIT: does your netbook have an Intel HDA chip? I as well had this problem recently and read someone else having it on reddit. I think this is that the netbook "thinks" headphones are plugged in after boot, regardless if they are or not, and mutes speakers accordingly (though you have disabled automute). I don't know if that was what fixed it, but ever since I played around with hdajackretask, my sound works nearly as expected (except that I can't use the shitty built-in microphone).

Yes I do use PulseAudio, but I don't know why shouldn't I use alsamixer, I always did it without any issue. You can see the alsa-store and alsa-restore status above. I have no idea about the sound chip, maybe you can tell me how to know which one I have, anyway I didn't have this problem before neither in Xubuntu nor in Arch, which is my default system right now.

Offline

#7 2014-06-23 22:49:33

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [SOLVED] Alsa is always muted on reboot

I have the same issue for some time already. The speaker channel is always set to 0 on reboot. I worked around this by adding the following line to my autostart file:

sleep 10 && amixer -c 0 set Speaker 100% & 

Offline

#8 2014-06-23 22:58:56

Shadow_Reaper13
Member
From: Westopolis
Registered: 2014-03-13
Posts: 40

Re: [SOLVED] Alsa is always muted on reboot

orschiro wrote:

I have the same issue for some time already. The speaker channel is always set to 0 on reboot. I worked around this by adding the following line to my autostart file:

sleep 10 && amixer -c 0 set Speaker 100% & 

I'll try this out and report back. Thanks for answering.

Offline

#9 2014-06-24 07:27:33

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [SOLVED] Alsa is always muted on reboot

You need to check which amixer control names you actually *have* - e.g. I *don't* have one called just "Speaker".

I have "Speaker CLFE", etc. instead. Take a look at what you have:

amixer | grep mixer

Offline

#10 2014-06-24 10:25:52

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] Alsa is always muted on reboot

If you have snd_hda_intel module loaded (lsmod | grep hda), you have hda compliant hardware in use. To disable/change jack sensing hdajackretask or hda-verb can be used.

There are two schemes how sound settings are altered with alsa systemd services. Create a file /etc/alsa/state-daemon.conf and reboot to try the other.

As for using amixer, this is still a workaround. Pulseaudio or anything else for that matter should not alter the state of the sound mixer[s_], if you do not want it to. There should be settings for [re]storing sound settings in PAs configuration. Before you try to find out, make sure that PA is responsible.

Offline

#11 2014-06-24 19:37:09

Shadow_Reaper13
Member
From: Westopolis
Registered: 2014-03-13
Posts: 40

Re: [SOLVED] Alsa is always muted on reboot

brebs wrote:

You need to check which amixer control names you actually *have* - e.g. I *don't* have one called just "Speaker".

I have "Speaker CLFE", etc. instead. Take a look at what you have:

amixer | grep mixer

Hello, the output of

amixer | grep mixer

is this:

Simple mixer control 'Master',0
Simple mixer control 'Capture',0

but when I use the command oschiro gave me up, replacing "Speaker" with "Master" like this:

sleep 10 && amixer -c 0 set Master 100%

Nothing happens, because the Master slider is full as the image I posted shows. In return, when I use it exactly as oschiro said, with "Speaker":

sleep 10 && amixer -c 0 set Speaker 100%

It works and I have sound again, but only if I execute manually. If it's executed on startup it does not work and I don't know why.

Here's my .xinitrc so you can see if there's something wrong with it:

#!/bin/sh
#
# ~/.xinitrc
#
# Executed by startx (run your window manager from here)

if [ -d /etc/X11/xinit/xinitrc.d ]; then
  for f in /etc/X11/xinit/xinitrc.d/*; do
    [ -x "$f" ] && . "$f"
  done
  unset f
fi

# exec gnome-session
# exec startkde
exec startxfce4
# ...or the Window Manager of your choice
#exec xbindkeys
#exec /home/shadow-reaper/.kblayout.sh
#exec /home/shadow-reaper/.audio-fix.sh
sleep 10 && amixer -c 0 set Speaker 100% &

Thanks for answering!

Last edited by Shadow_Reaper13 (2014-06-24 19:39:01)

Offline

#12 2014-06-24 19:58:30

brebs
Member
Registered: 2007-04-03
Posts: 3,742

Re: [SOLVED] Alsa is always muted on reboot

Put all commands **before** the exec line, because nothing will get run after it.

Looks like you need "-c 0", so add that to my earlier command:

amixer -c 0 | grep mixer

Offline

#13 2014-06-24 20:12:59

Shadow_Reaper13
Member
From: Westopolis
Registered: 2014-03-13
Posts: 40

Re: [SOLVED] Alsa is always muted on reboot

brebs wrote:

Put all commands **before** the exec line, because nothing will get run after it.

Looks like you need "-c 0", so add that to my earlier command:

amixer -c 0 | grep mixer

Now I like it:

Simple mixer control 'Headphone',0
Simple mixer control 'Speaker',0
Simple mixer control 'PCM',0
Simple mixer control 'Mic',0
Simple mixer control 'Mic Boost',0
Simple mixer control 'Beep',0
Simple mixer control 'Capture',0
Simple mixer control 'Auto-Mute Mode',0
Simple mixer control 'Digital',0
Simple mixer control 'Internal Mic',0
Simple mixer control 'Internal Mic Boost',0

I'm rebooting to test the change in .xinitrc, I'll report back with the result.

Offline

#14 2014-06-24 20:26:27

Shadow_Reaper13
Member
From: Westopolis
Registered: 2014-03-13
Posts: 40

Re: [SOLVED] Alsa is always muted on reboot

Shadow_Reaper13 wrote:
brebs wrote:

Put all commands **before** the exec line, because nothing will get run after it.

Looks like you need "-c 0", so add that to my earlier command:

amixer -c 0 | grep mixer

Now I like it:

Simple mixer control 'Headphone',0
Simple mixer control 'Speaker',0
Simple mixer control 'PCM',0
Simple mixer control 'Mic',0
Simple mixer control 'Mic Boost',0
Simple mixer control 'Beep',0
Simple mixer control 'Capture',0
Simple mixer control 'Auto-Mute Mode',0
Simple mixer control 'Digital',0
Simple mixer control 'Internal Mic',0
Simple mixer control 'Internal Mic Boost',0

I'm rebooting to test the change in .xinitrc, I'll report back with the result.

Great news! It worked!!

Thanks for ansewring to you all. I would prefer this worked just like it is supossed to do and did just until 3 or 4 weeks, but well, al least it's something. I'm marking this as solved.

Offline

#15 2014-06-25 05:43:03

orschiro
Member
Registered: 2009-06-04
Posts: 2,136
Website

Re: [SOLVED] Alsa is always muted on reboot

Just to clarify, you now also use the workaround sleep 10 && amixer -c 0 set Speaker 100%, correct?

In that case I woudn't consider this solved but just a workaround since the real cause of the issue is still there, somewhere...

It would be much appreciated, if someone has an idea what the real cause of the issue is.

Offline

#16 2014-06-25 11:45:09

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] Alsa is always muted on reboot

Try to isolate the problem source then. If it happens without pulseaudio installed/enabled, then alsa[s_] [applications] or its services are responsible.
As I already wrote, try the other scheme for alsa-state.service. This should save the state on just before every shutdown.

Offline

#17 2014-06-26 00:48:15

Shadow_Reaper13
Member
From: Westopolis
Registered: 2014-03-13
Posts: 40

Re: [SOLVED] Alsa is always muted on reboot

orschiro wrote:

Just to clarify, you now also use the workaround sleep 10 && amixer -c 0 set Speaker 100%, correct?

In that case I woudn't consider this solved but just a workaround since the real cause of the issue is still there, somewhere...

It would be much appreciated, if someone has an idea what the real cause of the issue is.

Yeah, I put that line on my .xinitrc, so yes, it isn't a solution but just a workaround for this problem. Since the sound is there at startup I marked this as solved but I really want to properly resolve this. Feel free to colaborate with any ideas for this.

Offline

#18 2014-06-26 00:57:13

Shadow_Reaper13
Member
From: Westopolis
Registered: 2014-03-13
Posts: 40

Re: [SOLVED] Alsa is always muted on reboot

emeres wrote:

Try to isolate the problem source then. If it happens without pulseaudio installed/enabled, then alsa[s_] [applications] or its services are responsible.
As I already wrote, try the other scheme for alsa-state.service. This should save the state on just before every shutdown.

Hello, I didn't try this out because I don't exactly know how to disable pulseaudio (I don't want to uninstall it) and test if it is the root of the problem. On the other hand I don't know the schemes you are mentioning to affect the alsa configuration.

Offline

#19 2014-06-26 08:32:22

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] Alsa is always muted on reboot

You can uninstall it temporarily, that would be the simplest method. Configuration should stay in place, the global one can be backed up.

Shadow_Reaper13 wrote:

On the other hand I don't know the schemes you are mentioning to affect the alsa configuration.

Then take a look inside alsa-state.service:

cat /usr/lib/systemd/system/alsa-state.service                                   [06.26--10:29:23][1]
#
# Note that two different ALSA card state management schemes exist and they
# can be switched using a file exist check - /etc/alsa/state-daemon.conf .
#

[Unit]
Description=Manage Sound Card State (restore and store)
ConditionPathExists=/etc/alsa/state-daemon.conf
DefaultDependencies=no
After=sysinit.target
Before=shutdown.target
Conflicts=shutdown.target

[Service]
Type=simple
ExecStart=-/usr/bin/alsactl -s -n 19 -c rdaemon
ExecStop=-/usr/bin/alsactl -s rkill save_and_quit

Offline

#20 2014-06-27 01:56:09

chx
Member
Registered: 2011-05-28
Posts: 101

Re: [SOLVED] Alsa is always muted on reboot

Reporting the same issue. amixer -c 0 set Speaker 100% gave sound back.

Offline

#21 2014-06-27 02:19:38

nomorewindows
Member
Registered: 2010-04-03
Posts: 3,408

Re: [SOLVED] Alsa is always muted on reboot

Pulseaudio does some strange things with alsa.  Pulseaudio also disables audio hardware when it goes into dummy output mode.  Releasing all audio programs usually gets us back up and running.  But pulseaudio will mute speakers if the headphones are plugged in, and mute headphones if they are unplugged.  On startup, speakers are lowest volume in alsamixer when pulseaudio gets ahold of them.  OSS would let me use my headphones and speakers at the same time.  Could possibly do that with hdarejacktask (I have that installed).  Pulseaudio was the way that I was finally able to get my microphone working.

Last edited by nomorewindows (2014-06-27 02:24:43)


I may have to CONSOLE you about your usage of ridiculously easy graphical interfaces...
Look ma, no mouse.

Offline

#22 2014-08-22 11:38:44

lmnsqshr
Member
From: Germany
Registered: 2013-10-21
Posts: 20

Re: [SOLVED] Alsa is always muted on reboot

Hi,

I'm having the exact same issue as the OP. I also use pulseaudio and manually changed back the "Speaker" volume in alsamixer to 100%.
I didn't try the workaround solution as I want to know WHY this happens. I hope you guys can help.


I did the following:

* Remove pulseaudio with '# pacman -R pulseaudio pulseaudio-alsa'
* Reboot the system
* Check the speaker-volume in alsamixer: It's 100%

So I'm guessing the issue is caused by pulseaudio?


What can I do next? I hope, it's ok for OP if I use his thread for my question.

Offline

#23 2014-08-22 11:56:48

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] Alsa is always muted on reboot

Check if modules for restoring are activated and loaded.

Offline

#24 2014-08-22 12:35:38

lmnsqshr
Member
From: Germany
Registered: 2013-10-21
Posts: 20

Re: [SOLVED] Alsa is always muted on reboot

emeres wrote:

Check if modules for restoring are activated and loaded.

With '$ pacmd list-modules' I can find these modules (among many others):

* module-default-device-restore
* module-card-restore
* module-device-restore
* module-stream-restore
* module-device-manager

Here's a snippet of the output:

    index: 0
        name: <module-device-restore>
        argument: <>
        used: -1
        load once: yes
        properties:
                module.author = "Lennart Poettering"
                module.description = "Automatically restore the volume/mute state of devices"
                module.version = "5.0"
    index: 1
        name: <module-stream-restore>
        argument: <>
        used: -1
        load once: yes
        properties:
                module.author = "Lennart Poettering"
                module.description = "Automatically restore the volume/mute/device state of streams"
                module.version = "5.0"
    index: 2
        name: <module-card-restore>
        argument: <>
        used: -1
        load once: yes
        properties:
                module.author = "Lennart Poettering"
                module.description = "Automatically restore profile of cards"
                module.version = "5.0"

(...)

    index: 14
        name: <module-default-device-restore>
        argument: <>
        used: -1
        load once: yes
        properties:
                module.author = "Lennart Poettering"
                module.description = "Automatically restore the default sink and source"
                module.version = "5.0"

(...)

    index: 25
        name: <module-device-manager>
        argument: <do_routing=1>
        used: -1
        load once: yes
        properties:
                module.author = "Colin Guthrie"
                module.description = "Keep track of devices (and their descriptions) both past and present and prioritise by role"
                module.version = "5.0"

Offline

#25 2014-08-22 12:55:41

emeres
Member
Registered: 2013-10-08
Posts: 1,570

Re: [SOLVED] Alsa is always muted on reboot

lmnsqshr wrote:
emeres wrote:

Check if modules for restoring are activated and loaded.

With '$ pacmd list-modules' I can find these modules (among many others):

* module-default-device-restore
* module-card-restore
* module-device-restore
* module-stream-restore
* module-device-manager

Well? Disable them and reboot, see if it helps. You should check your configuration for that matter, pacmd probably lists all available modules, not only the loaded ones. Also I would disable them one by one, to figure out which one is responsible, should that be it.

Last edited by emeres (2014-08-22 13:59:38)

Offline

Board footer

Powered by FluxBB