daemon-reload runs alsa-restore.service and others

Bug #1431200 reported by Unit 193
26
This bug affects 11 people
Affects Status Importance Assigned to Milestone
systemd
Fix Released
Medium
systemd (Debian)
Fix Released
Unknown
systemd (Ubuntu)
Fix Released
Medium
Martin Pitt

Bug Description

When systemd is reloaded (manually, upgrades), the volume is reset, likely using alsa-restore.

Tags: systemd-boot
Revision history for this message
In , Pupykin-s (pupykin-s) wrote :

Steps to reproduce:
- became root
- run alsamixer, change master volume
- in another terminal run "systemctl disable qwe.socket"
master volume changes back.

It looks like systemctl disable qwe.socket cause systemctl start alsa-restore.service

Changing sound volume is not what I expected when disabling .socket)

ArchLinux x86_64, kernel 3.18.2-2, systemd 218-1.

Revision history for this message
In , Pupykin-s (pupykin-s) wrote :

qwe.socket does not exist, but it does not matter. Probably systemctl disable reloads target including alsa-* services.

Revision history for this message
In , Pupykin-s (pupykin-s) wrote :

May be the prolem is related to alsa:

/usr/lib/systemd/system/basic.target.wants contains

alsa-restore.service -> ../alsa-restore.service
alsa-state.service -> ../alsa-state.service

How to fix this issue properly?

Revision history for this message
In , Lennart-poettering (lennart-poettering) wrote :

Could you please turn on debug mode in PID with "systemd-analyze set-log-level debug". Then please reproduce the issue and attach the logs generated from PID 1 about this. Thanks!

Revision history for this message
In , Zbigniew Jędrzejewski-Szmek (zbyszek-in) wrote :
Revision history for this message
In , Intelfx100 (intelfx100) wrote :

(In reply to Zbigniew Jedrzejewski-Szmek from comment #4)
> Should be fixed with
> http://cgit.freedesktop.org/systemd/systemd/commit/?id=6e392c9c45.

Thanks for finally reviewing it :)

Is it going to be backported?

Revision history for this message
In , Zbigniew Jędrzejewski-Szmek (zbyszek-in) wrote :

That's really up to distributions. For Fedora, most likely.

Revision history for this message
In , Intelfx100 (intelfx100) wrote :

(In reply to Zbigniew Jedrzejewski-Szmek from comment #6)
> That's really up to distributions. For Fedora, most likely.

I've meant the stable branches (systemd-stable).

Revision history for this message
In , Zbigniew Jędrzejewski-Szmek (zbyszek-in) wrote :

(In reply to Ivan Shapovalov from comment #7)
> (In reply to Zbigniew Jedrzejewski-Szmek from comment #6)
> > That's really up to distributions. For Fedora, most likely.
>
> I've meant the stable branches (systemd-stable).

Yes.

Revision history for this message
Martin Pitt (pitti) wrote :

This can be seen in journalctl -f when doing daemon-reload:

Mär 12 08:33:48 donald systemd[1]: Reloading.
Mär 12 08:33:48 donald systemd[1]: Unit type .busname is not supported on this system.
Mär 12 08:33:48 donald systemd[1]: Started Set Up Additional Binary Formats.
Mär 12 08:33:48 donald systemd[1]: Mounted Configuration File System.
Mär 12 08:33:48 donald systemd[1]: Started Commit a transient machine-id on disk.
Mär 12 08:33:48 donald systemd[1]: Started Various fixups to make systemd work better on Debian.
Mär 12 08:33:48 donald systemd[1]: Starting Tell Plymouth To Write Out Runtime Data...
Mär 12 08:33:48 donald systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
Mär 12 08:33:48 donald systemd[1]: Started Manage Sound Card State (restore and store).
Mär 12 08:33:48 donald systemd[1]: Starting Restore Sound Card State...
Mär 12 08:33:48 donald systemd[1]: Started Recovery mode menu.

summary: - restores volume on daemon-reexec
+ daemon-reload runs alsa-restore.service and others
Changed in systemd (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
assignee: nobody → Martin Pitt (pitti)
Changed in systemd (Debian):
status: Unknown → New
Martin Pitt (pitti)
tags: added: systemd-boot
Changed in systemd (Ubuntu):
status: Triaged → In Progress
importance: Medium → High
Revision history for this message
Martin Pitt (pitti) wrote :

After that happens, can you please give me the output of "systemctl status alsa-restore.service" and "ls -la /var/lib/alsa"?

Revision history for this message
Unit 193 (unit193) wrote :

● alsa-restore.service - Restore Sound Card State
   Loaded: loaded (/lib/systemd/system/alsa-restore.service; static; vendor preset: enabled)
   Active: inactive (dead) since Fri 2015-03-13 05:18:58 EDT; 11s ago
  Process: 20877 ExecStart=/usr/sbin/alsactl -E HOME=/var/run/alsa restore (code=exited, status=0/SUCCESS)
 Main PID: 20877 (code=exited, status=0/SUCCESS)

Mar 13 05:18:58 Alpha systemd[1]: Starting Restore Sound Card State...
Mar 13 05:18:58 Alpha systemd[1]: Started Restore Sound Card State.

total 20
drwxr-xr-x 2 root root 4096 Mar 12 18:27 .
drwxr-xr-x 76 root root 4096 Mar 7 21:27 ..
-rw-r--r-- 1 root root 6849 Mar 12 18:27 asound.state
-rw-r--r-- 1 root root 11 Aug 20 2014 asound.state.lock

Last bit is interesting.

Revision history for this message
Martin Pitt (pitti) wrote :

For the record, I don't see the behaviour from comment 1 with current systemd any more.

Revision history for this message
Martin Pitt (pitti) wrote :

I tried with apt-get install --reinstall systemd udev, several "systemctl daemon-reexec" and "daemon-reload", but I just don't get this bug any more. Unit193, do you?

Changed in systemd (Ubuntu):
status: In Progress → Incomplete
importance: High → Medium
Revision history for this message
Joe Barnett (thejoe) wrote :

I still see the green screen problem (marked as dup of this bug). although it happens on non-systemd upgrades...

Revision history for this message
Martin Pitt (pitti) wrote :

@Joe: unduplicating then, following up on your original bug

Revision history for this message
Unit 193 (unit193) wrote :

I see this on neither of the two systems I had seen it on. Looks like a recent upload fixed it.

Revision history for this message
Martin Pitt (pitti) wrote :

Thanks for confirming. Tentatively closing for now. If anyone still sees this, please yell.

Changed in systemd (Ubuntu):
status: Incomplete → Fix Released
Changed in systemd (Debian):
status: New → Confirmed
Changed in systemd:
importance: Unknown → Medium
status: Unknown → Fix Released
Changed in systemd (Debian):
status: Confirmed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.