You are not logged in.

#1 2013-05-23 08:14:34

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

[SOLVED] Volume muted after bootup (alsa)

Hi!
I'm facing this kind of issue: after bootup, my alsa volume is muted. It seems that alsa-state.service is failing...

systemctl status alsa-state.service 
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 mer 2013-05-22 21:44:52 CEST; 3min 22s ago
mag 22 21:43:52 arch systemd[1]: Started Manage Sound Card State (restore and store).

systemctl status alsa-store.service 
alsa-store.service - Store Sound Card State
   Loaded: loaded (/usr/lib/systemd/system/alsa-store.service; static)
   Active: inactive (dead)

systemctl status alsa-restore.service 
alsa-restore.service - Restore Sound Card State
   Loaded: loaded (/usr/lib/systemd/system/alsa-restore.service; static)
   Active: inactive (dead) since mer 2013-05-22 21:44:53 CEST; 4min 11s ago
  Process: 97 ExecStart=/usr/bin/alsactl restore (code=exited, status=19)

mag 22 21:44:53 arch systemd[1]: Started Restore Sound Card State.

I read that alsa-state.service is failing due to "start condition failed", and infact I noticed that in /usr/lib/systemd/system/alsa-state.service there is:
"ConditionPathExists=/etc/alsa/state-daemon.conf"
While in alsa-(re)store.service there is: "ConditionPathExists=!/etc/alsa/state-daemon.conf" (note the "!")
I never changed anything, and i'm encountering this issue on 2 laptops. (one with gnome + pulseaudio, the other with openbox and alsa)

Any idea? journalctl doesn't show anything relevant about the problem. Everything works flawlessly if I manually exec "alsactl restore" when i'm in my session.

Thanks!

Last edited by nierro (2013-05-27 07:51:25)

Offline

#2 2013-05-23 09:05:22

_nico
Member
From: Muenchberg, Germany
Registered: 2013-05-23
Posts: 2
Website

Re: [SOLVED] Volume muted after bootup (alsa)

Hi nierro,
i have the same problem here - since the update yesterday. sad
Apparently a bug in alsa-utils or alsa-lib from 22.05.2013.

Cheers, Nico


WORKAROUND

alsactl restore
### OR
# for me - HDMI output (NVIDIA ION)
amixer sset 'IEC958',1 unmute

Last edited by _nico (2013-05-23 09:08:09)

Offline

#3 2013-05-23 09:13:18

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: [SOLVED] Volume muted after bootup (alsa)

Ok, so we need to report this bug I guess smile

EDIT: yes, that works only one time, next reboot you'll have audio muted again...

Last edited by nierro (2013-05-23 09:14:50)

Offline

#4 2013-05-23 09:14:56

Padfoot
Member
Registered: 2010-09-03
Posts: 381

Re: [SOLVED] Volume muted after bootup (alsa)

Well there you go. I was unaware alsa had systemd units to do this. I have never used them myself. On install I still do:

# alsamixer

and

# alsactl -f /var/lib/alsa/asound.state store

and everything works as expected. I don't see the need for a systemd service to do this.

But then again, I don't have pulseaudio on my system.

Cheers.

Last edited by Padfoot (2013-05-23 09:16:01)

Offline

#5 2013-05-23 09:16:45

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: [SOLVED] Volume muted after bootup (alsa)

Well, are you sure you aren't running alsa-store, alsa-restore and alsa-state.service? Because they're statically built in systemd, so if you have alsa-utils installed, you're running them.

Last edited by nierro (2013-05-23 09:17:31)

Offline

#6 2013-05-23 09:24:23

Padfoot
Member
Registered: 2010-09-03
Posts: 381

Re: [SOLVED] Volume muted after bootup (alsa)

Dare I say it again? Well there you go.... big_smile

# systemctl status alsa-store.service
alsa-store.service - Store Sound Card State
   Loaded: loaded (/usr/lib/systemd/system/alsa-store.service; static)
   Active: inactive (dead)

May 20 19:33:14 Ethan systemd[1]: Starting Store Sound Card State...
May 20 19:33:14 Ethan systemd[1]: Started Store Sound Card State.

# systemctl status alsa-restore.service
alsa-restore.service - Restore Sound Card State
   Loaded: loaded (/usr/lib/systemd/system/alsa-restore.service; static)
   Active: inactive (dead) since Thu 2013-05-23 16:56:31 EST; 2h 24min ago
  Process: 1040 ExecStart=/usr/sbin/alsactl restore (code=exited, status=0/SUCCESS)

# systemctl status alsa-state.service
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 Thu 2013-05-23 16:56:30 EST; 2h 24min ago

I just assumed I did not have these as just running systemctl does not list them in my overall services list.

Looks like they are failing for me too, but I am not having any sound issues whatsoever.

Cheers.

Last edited by Padfoot (2013-05-23 09:25:10)

Offline

#7 2013-05-23 09:31:19

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: [SOLVED] Volume muted after bootup (alsa)

It's not working here... i see you have /usr/sbin/alsactl, while i have /usr/bin/alsactl...may be the issue is caused by the /sbin -> /bin move (i'm using testing, but alsa-utils is the same version)
Btw, alsa-restore.service is working well to you, so you're using these .service (sorry man) ! smile

Offline

#8 2013-05-23 11:12:36

Raynman
Member
Registered: 2011-10-22
Posts: 1,441

Re: [SOLVED] Volume muted after bootup (alsa)

Padfoot wrote:

Looks like they are failing for me too, but I am not having any sound issues whatsoever.

restore succeeded (without it, the manual store you did on install wouldn't have done you much good), store will be run on shutdown, and state is mutually exclusive with store/restore, as indicated by the start conditions mentioned in the OP. So everything is in order there.

Offline

#9 2013-05-23 11:29:11

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Volume muted after bootup (alsa)

https://projects.archlinux.org/svntogit … 6e85ba1965 says the alsa-restore.service patch has been removed https://projects.archlinux.org/svntogit … ec3c50fe0f - maybe that's part of the problem.

Offline

#10 2013-05-23 11:30:46

_nico
Member
From: Muenchberg, Germany
Registered: 2013-05-23
Posts: 2
Website

Re: [SOLVED] Volume muted after bootup (alsa)

-Type=oneshop
+Type=oneshot

Yeah, "oneshop" lol

Last edited by _nico (2013-05-23 11:31:26)

Offline

#11 2013-05-23 11:33:10

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: [SOLVED] Volume muted after bootup (alsa)

Well, but *before* with oneshop ( big_smile ) it worked, now , with the correct "oneshot" it isn't working anymore... that's funny smile

Offline

#12 2013-05-23 11:38:26

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Volume muted after bootup (alsa)

nierro wrote:

Well, but *before* with oneshop ( big_smile ) it worked, now , with the correct "oneshot" it isn't working anymore... that's funny smile

The patch was there to correct the typo, so you never had a 'oneshop'.
I think the patch has been removed, because upstream fixed the typo:

$ cat /usr/lib/systemd/system/alsa-restore.service
#
# 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=Restore Sound Card State
ConditionPathExists=!/etc/alsa/state-daemon.conf
DefaultDependencies=no
After=alsa-state.service
Before=shutdown.target
Conflicts=shutdown.target

[Service]
Type=oneshot
ExecStart=-/usr/bin/alsactl restore
StandardOutput=syslog

Last edited by karol (2013-05-23 11:39:43)

Offline

#13 2013-05-23 11:38:48

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: [SOLVED] Volume muted after bootup (alsa)

I just found out something useful: alsactl store is working well. The problem is alsactl restore: infact i tried to change my volume, then reboot. And obviously I had it muted. But after a "sudo alsactl restore", it recalled the previous (pre-reboot) level. So, the alsa-restore.service isn't working. Why?

EDIT: it's getting better and better... a "sudo systemctl restart alsa-restore.service", after bootup is finalized, will just work flawlessly. So the .service is correct. What else can be?

Last edited by nierro (2013-05-23 11:46:29)

Offline

#14 2013-05-23 11:51:25

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: [SOLVED] Volume muted after bootup (alsa)

It seems that my sound.target is reached *after* the execution of alsa-state.service and alsa-restore.service...is this normal? May be it is someway related...I'll try now with after=sound.target in alsa-state.service...

EDIT: no, it isn't working.

Last edited by nierro (2013-05-23 11:59:44)

Offline

#15 2013-05-23 12:06:22

Raynman
Member
Registered: 2011-10-22
Posts: 1,441

Re: [SOLVED] Volume muted after bootup (alsa)

nierro wrote:

I just found out something useful: alsactl store is working well. The problem is alsactl restore: infact i tried to change my volume, then reboot. And obviously I had it muted. But after a "sudo alsactl restore", it recalled the previous (pre-reboot) level. So, the alsa-restore.service isn't working. Why?

EDIT: it's getting better and better... a "sudo systemctl restart alsa-restore.service", after bootup is finalized, will just work flawlessly. So the .service is correct. What else can be?

pulseaudio also manages volume levels, and it starts with your session (after the restore service). After I installed pulse I (with help of some GUI) messed up its settings and I had a similar issue (alsactl restore after pulse had started would fix it). Removed some pulse config dir in home and everything worked as it should.

But you said you also have this problem on a laptop without pulse, so this might not be it.

Offline

#16 2013-05-23 12:07:33

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: [SOLVED] Volume muted after bootup (alsa)

No, i'm using alsa alone on my netbook, no pulse. I really can't understand what' s happening, unfortunately!

Offline

#17 2013-05-23 12:09:22

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Volume muted after bootup (alsa)

No pulse here either.
nierro, can you please open a bug report for this? Let's see what the devs have to say about this.

Last edited by karol (2013-05-23 12:09:30)

Offline

#18 2013-05-23 12:10:18

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: [SOLVED] Volume muted after bootup (alsa)

Give me 20 min and i will smile

EDIT: done: https://bugs.archlinux.org/task/35438 (sorry for autovoting!)

Last edited by nierro (2013-05-23 12:36:38)

Offline

#19 2013-05-23 12:34:45

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Volume muted after bootup (alsa)

nierro wrote:

Give me 20 min and i will smile

EDIT: done: https://bugs.archlinux.org/index.php?do … k_id=35438

Please edit the link to say just https://bugs.archlinux.org/task/35438 - as it is now, it automatically adds vote.
You also forgot to add summary ;P 'FS#35438 - [alsa-utils] PLEASE ENTER SUMMARY'

Offline

#20 2013-05-23 12:38:27

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: [SOLVED] Volume muted after bootup (alsa)

Thanks or your report, i changed previous link!
Btw i can't edit the summary, i'll comment asking to change it!

Offline

#21 2013-05-23 12:44:30

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: [SOLVED] Volume muted after bootup (alsa)

nierro wrote:

Thanks or your report, i changed previous link!
Btw i can't edit the summary, i'll comment asking to change it!

I meant next time you make a report, please remember to edit the description.
'Add New Bug' link creates this provisional summary

https://bugs.archlinux.org/newtask?proj … -utils%5D+PLEASE+ENTER+SUMMARY

you are expected to edit.
I don't like this design, but most people figured it out (not necessarily on their first try ;P ).

Offline

#22 2013-05-23 12:48:10

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: [SOLVED] Volume muted after bootup (alsa)

This was not my first time, sorry i was in a hurry, and i didn't remember well smile

Offline

#23 2013-05-23 16:40:03

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: [SOLVED] Volume muted after bootup (alsa)

By the way, is there a way to set a custom default level (instead of 0) to workaround temporarily the issue?

EDIT: as easy as "amixer set Master 80% unmute" in .xinitrc! Probably i do not need anymore alsa-(re)store.service smile

Last edited by nierro (2013-05-23 17:15:51)

Offline

#24 2013-05-27 07:50:56

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: [SOLVED] Volume muted after bootup (alsa)

Latest alsa-utils upgrade solved the issue. It added again an udev rule to execute "alsa-restore" every time a sound card is detected (if i understood that good).

Offline

#25 2013-06-14 13:40:22

nierro
Member
From: Milan, Italy
Registered: 2011-09-02
Posts: 849

Re: [SOLVED] Volume muted after bootup (alsa)

I'm writing here again, because alsa-restore.service works fine for me (at least, it restores my volumes), but the unit always returns a failed state:

systemctl status alsa-restore.service 
alsa-restore.service - Restore Sound Card State
   Loaded: loaded (/usr/lib/systemd/system/alsa-restore.service; static)
   Active: inactive (dead) since ven 2013-06-14 15:33:06 CEST; 7min ago
  Process: 83 ExecStart=/usr/bin/alsactl restore (code=exited, status=19)

Am I alone? Or is this "normal" somehow?

Offline

Board footer

Powered by FluxBB