Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
https://wiki.archlinux.org/title/Bug_reporting_guidelines
Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.
REPEAT: Do NOT report bugs for outdated packages!
FS#35438 - [alsa-utils] Sound muted after bootup
Attached to Project:
Arch Linux
Opened by Federico (nierro) - Thursday, 23 May 2013, 12:25 GMT
Last edited by Tobias Powalowski (tpowa) - Monday, 27 May 2013, 07:06 GMT
Opened by Federico (nierro) - Thursday, 23 May 2013, 12:25 GMT
Last edited by Tobias Powalowski (tpowa) - Monday, 27 May 2013, 07:06 GMT
|
DetailsDescription: Since 1.0.27.1 alsa-restore.service fails during bootup, and my sound volume is set to 0. It won't fail if executed after startup (eg: in my x session).
journalctl show nothing, while systemctl status: http://pastie.org/7947550 . I have two laptops, one with pulseaudio and one without. The same problem is happening in both. alsa-store.service works instead, because if i manually change my sound volume, after a reboot it is set to 0, but after a "systemctl restart alsa-restore.service" , previous level is restored. Additional info: * alsa-utils 1.0.27.1-1 Steps to reproduce: Reboot. Sound volume will be set to 0. |
This task depends upon
Closed by Tobias Powalowski (tpowa)
Monday, 27 May 2013, 07:06 GMT
Reason for closing: Fixed
Additional comments about closing: 1.0.27.1-2
Monday, 27 May 2013, 07:06 GMT
Reason for closing: Fixed
Additional comments about closing: 1.0.27.1-2
[Unit]
Description=Getty on %I
Documentation=man:agetty(8) man:systemd-getty-generator(8)
Documentation=http://0pointer.de/blog/projects/serial-console.html
After=systemd-user-sessions.service plymouth-quit-wait.service
# If additional gettys are spawned during boot then we should make
# sure that this is synchronized before getty.target, even though
# getty.target didn't actually pull it in.
Before=getty.target
IgnoreOnIsolate=yes
# On systems without virtual consoles, don't start any getty. (Note
# that serial gettys are covered by serial-getty@.service, not this
# unit
ConditionPathExists=/dev/tty0
[Service]
# the VT is cleared by TTYVTDisallocate
ExecStart=-/sbin/agetty --noclear --autologin [username] %I 38400 linux
Type=idle
Restart=always
RestartSec=0
UtmpIdentifier=%I
TTYPath=/dev/%I
TTYReset=yes
TTYVHangup=yes
TTYVTDisallocate=yes
KillMode=process
IgnoreSIGPIPE=no
# Unset locale for the console getty since the console has problems
# displaying some internationalized messages.
Environment=LANG= LANGUAGE= LC_CTYPE= LC_NUMERIC= LC_TIME= LC_COLLATE= LC_MONETARY= LC_MESSAGES= LC_PAPER= LC_NAME= LC_ADDRESS= LC_TELEPHONE= LC_MEASUREMENT= LC_IDENTIFICATION=
# Some login implementations ignore SIGTERM, so we send SIGHUP
# instead, to ensure that login terminates cleanly.
KillSignal=SIGHUP
[Install]
Alias=getty.target.wants/getty@tty1.service
EOF
This is the same as getty@.service with the "--autologin [username]" option added to ExecStart line. The autologin@.service had previously been enabled with the following commands:
# systemctl daemon-reload
# systemctl disable getty@tty1
# systemctl enable autologin@tty1
Running the commands in near-reverse order restores sound levels on reboots with alsa-lib and alsa-utils 1.0.27.1-1.
# systemctl daemon-reload
# systemctl disable autologin@tty1
# systemctl enable -f getty@tty1
# systemctl stop autologin@tty1
# systemctl reboot
alsa-restore.service - Restore Sound Card State
Loaded: loaded (/usr/lib/systemd/system/alsa-restore.service; static)
Active: inactive (dead) since Fri 2013-05-24 17:04:35 MSK; 10min ago
Process: 275 ExecStart=/usr/bin/alsactl restore (code=exited, status=0/SUCCESS)
But on my main PC with Asus Xonar D1 soundcard I've got this:
alsa-restore.service - Restore Sound Card State
Loaded: loaded (/usr/lib/systemd/system/alsa-restore.service; static)
Active: inactive (dead) since Fri 2013-05-24 17:40:54 MSK; 4min 57s ago
Process: 280 ExecStart=/usr/bin/alsactl restore (code=exited, status=19)
No pulseaudio in both cases.
FS#31163. When I run `sudo journalctl -a | grep alsa`, I get:May 23 22:25:47 arch alsactl[172]: /usr/bin/alsactl: load_state:1729: No soundcards found...
# cd /usr/lib/systemd/system
# mkdir sound.target.wants
# mv basic.target.wants/alsa-{restore,state}.service sound.target.wants/
# reboot
EDIT: See my comment below.
So it will be fixed soon, great news!
sound.target is always reached the first time *any* sound hardware is detected. Adding those units to sound.target.wants normally would create a strict ordering which would start alsa-restore.service *before* sound.target, which obviously isn't what we want. However, the alsa services have DefaultDependencies=no set, which essentially removes the strict ordering and -- by happy accident -- systemd happens to start them right after sound.target is reached.
I moved the unit files back to basic.target.wants and added After=sound.target, which actually works on my system and seems more correct. @nierro, I'm not sure why it didn't work for you.
However, there is another problem if a system has more than one sound device. Since sound.target is reached when the *first* audio device is detected, we have no way of ordering alsa-restore.service after *all* audio devices are loaded. Looking through the commit history of alsa-utils, I see that in the past this was handled by having a udev rule that ran 'alsactl restore' every time a sound card was hotplugged (http://git.alsa-project.org/?p=alsa-utils.git;a=blob;f=alsactl/90-alsa-restore.rules.in;hb=HEAD). This was recently removed, for some reason. Maybe the maintainer could shed some light on this?
I have not the time to fix it right now, but if you would add it manually and report if everything is ok afterwards, we know that this is the issue.
Thanks.
Here gnome3 and pulseaudio.
prepare() {
cd $pkgname-$pkgver
echo 'udevrules_DATA=90-alsa-restore.rules' >> alsactl/Makefile.am
autoreconf -fi
}
After installing and rebooting, the rule appears to work fine.