You are not logged in.

#1 2024-10-21 08:44:22

pbo
Member
Registered: 2021-09-20
Posts: 9

[SOLVED/WORKAROUND] wireplumber/pipewire boot volume levels

Hello,

in my system i have 3 sound cards:

  • internal sound card (disabled in bios)

  • pci sound card (the one I use)

  • pci/hdmi sound card (from the graphic card)

❯ cat /proc/asound/cards         
 0 [NVidia         ]: HDA-Intel - HDA NVidia
                      HDA NVidia at 0xf7080000 irq 18
 1 [Creative       ]: HDA-Intel - HDA Creative
                      HDA Creative at 0xf7104000 irq 19
02:00.1 Audio device: NVIDIA Corporation GP106 High Definition Audio Controller (rev a1)
        Subsystem: ASUSTeK Computer Inc. Device 85a4
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel
05:00.0 Audio device: Creative Labs CA0132 Sound Core3D [Sound Blaster Recon3D / Z-Series / Sound BlasterX AE-5 Plus] (rev 01)
        Subsystem: Creative Labs SB1570 SB Audigy Fx
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel

i use the command

sudo alsactl store

to store the volume levels, and let the service alsa-restore.service restore them at boot.
but it isn't restoring the volume levels, returning (extract from "journalctl | grep alsa"):

ott 21 07:23:56 blackdot (udev-worker)[411]: controlC0: Process '/usr/bin/alsactl restore /dev/snd/controlC0' failed with exit code 2.
ott 21 07:23:57 blackdot (udev-worker)[419]: controlC1: Process '/usr/bin/alsactl restore /dev/snd/controlC1' failed with exit code 2.
ott 21 07:23:57 blackdot systemd[1]: Manage Sound Card State (restore and store) was skipped because of an unmet condition check (ConditionPathExists=/etc/alsa/state-daemon.conf).

but if i run

sudo alsactl store

when the system is booted, it works and the levels are restored.

what do I need to do/check/edit to make it works at boot?

edit: apparently all volume levels get restored, except the "Front" that is set at 70% and muted, but when "storing"  I usually set it at 100% and unmuted.
edit2: asound.state: https://0x0.st/Xl3x.txt

Thanks

Last edited by pbo (2024-11-06 08:04:51)

Offline

#2 2024-10-21 15:07:16

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,193

Re: [SOLVED/WORKAROUND] wireplumber/pipewire boot volume levels

As a sanity check, is alsa-restore.service enabled?

waller@odin/~% systemctl status alsa-restore.service 
● alsa-restore.service - Save/Restore Sound Card State
     Loaded: loaded (/usr/lib/systemd/system/alsa-restore.service; static)
     Active: active (exited) since Sun 2024-10-20 13:55:48 PDT; 18h ago
 Invocation: e82d885d2df748f3b0d3530fcb871227
    Process: 661 ExecStart=/usr/bin/alsactl restore (code=exited, status=0/SUCCESS)
   Main PID: 661 (code=exited, status=0/SUCCESS)
   Mem peak: 1.7M
        CPU: 8ms

Oct 20 13:55:48 odin systemd[1]: Starting Save/Restore Sound Card State...
Oct 20 13:55:48 odin systemd[1]: Finished Save/Restore Sound Card State.
ewaller@odin/~% 

Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2024-10-21 16:00:02

pbo
Member
Registered: 2021-09-20
Posts: 9

Re: [SOLVED/WORKAROUND] wireplumber/pipewire boot volume levels

ewaller wrote:

As a sanity check, is alsa-restore.service enabled?

waller@odin/~% systemctl status alsa-restore.service 
● alsa-restore.service - Save/Restore Sound Card State
     Loaded: loaded (/usr/lib/systemd/system/alsa-restore.service; static)
     Active: active (exited) since Sun 2024-10-20 13:55:48 PDT; 18h ago
 Invocation: e82d885d2df748f3b0d3530fcb871227
    Process: 661 ExecStart=/usr/bin/alsactl restore (code=exited, status=0/SUCCESS)
   Main PID: 661 (code=exited, status=0/SUCCESS)
   Mem peak: 1.7M
        CPU: 8ms

Oct 20 13:55:48 odin systemd[1]: Starting Save/Restore Sound Card State...
Oct 20 13:55:48 odin systemd[1]: Finished Save/Restore Sound Card State.
ewaller@odin/~% 
❯ systemctl status alsa-restore        
● alsa-restore.service - Save/Restore Sound Card State
     Loaded: loaded (/usr/lib/systemd/system/alsa-restore.service; static)
     Active: active (exited) since Mon 2024-10-21 17:23:01 CEST; 33min ago
 Invocation: 77796766661c421a8511a997854d4889
    Process: 558 ExecStart=/usr/bin/alsactl restore (code=exited, status=0/SUCCESS)
   Main PID: 558 (code=exited, status=0/SUCCESS)
   Mem peak: 1.7M
        CPU: 9ms

ott 21 17:23:01 blackdot systemd[1]: Starting Save/Restore Sound Card State...
ott 21 17:23:01 blackdot systemd[1]: Finished Save/Restore Sound Card State.

yes it is.

Offline

#4 2024-10-23 14:08:27

pbo
Member
Registered: 2021-09-20
Posts: 9

Re: [SOLVED/WORKAROUND] wireplumber/pipewire boot volume levels

little progress: had an intuition, removed pipewire/wireplumber and checked alsamixer at start and surprisingly the levels are good.
so now the question is, the level gets restored by alsa-restore: who reset/mute my front then?

Last edited by pbo (2024-10-23 14:36:21)

Offline

#5 2024-10-23 16:06:03

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 23,172

Re: [SOLVED/WORKAROUND] wireplumber/pipewire boot volume levels

generally wireplumber will reapply its own volume over whatever the store does. it "should" properly remember the states you've set but there have been quite a few bugs around this in recent releases. Maybe try killing the cache https://wiki.archlinux.org/title/WirePl … t_settings or forcibly changing the volume of the wireplumber node: https://wiki.archlinux.org/title/WirePl … e_property

Generally important, which tool are you using to set the volume/mute state in the first place? You're strongly adviced to use something that talks to wireplumber, like wpctl or pulseaudio volume managers.

Online

#6 2024-10-23 18:37:15

pbo
Member
Registered: 2021-09-20
Posts: 9

Re: [SOLVED/WORKAROUND] wireplumber/pipewire boot volume levels

V1del wrote:

generally wireplumber will reapply its own volume over whatever the store does. it "should" properly remember the states you've set but there have been quite a few bugs around this in recent releases. Maybe try killing the cache https://wiki.archlinux.org/title/WirePl … t_settings or forcibly changing the volume of the wireplumber node: https://wiki.archlinux.org/title/WirePl … e_property

Generally important, which tool are you using to set the volume/mute state in the first place? You're strongly adviced to use something that talks to wireplumber, like wpctl or pulseaudio volume managers.

Hi,

yes tried delete settings multiple times.
I'm using primarily pavucontrol, except for the unmute, because all appears unmuted, but the Front channel in lasamixer is muted.

in the meantime another step forward: the problem appears only if I set the profile to "Analog stereo duplex" on pavucontrol, if I set to to 5.1 everything get remembered correctly.

Offline

#7 2024-11-06 07:44:34

pbo
Member
Registered: 2021-09-20
Posts: 9

Re: [SOLVED/WORKAROUND] wireplumber/pipewire boot volume levels

just for completion in case someone need it, I posted on the wireplumber issue tracker:

https://gitlab.freedesktop.org/pipewire … issues/737

and this is the response:

The issue here is likely that the sound card is not properly being managed by the Alsa-Card-Profile (ACP) mechanism, most likely because the expectation of the ACP profile is not matching the expectation of the driver.
You could write rules to disable ACP for that card, or more simply configure it to use the "Pro Audio" profile and then there should be no more interference.
There is also the option of writing a better ACP profile for that specific card, or even better a UCM profile, but it is not trivial.

Offline

Board footer

Powered by FluxBB