Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] Duplicate audio profile after migrating to pipewire (Read 1225 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED] Duplicate audio profile after migrating to pipewire

Hello, I decided to move to pipewire and it turned out great on both my thinkpad and desktop. However, there is this weird thing that is happening with the audio on the desktop. For some reason the audio profiles have duplicates and causes my modules in dwm to not change the volume correctly. I am not sure if it is pipewire that is doing this but two audio profiles tend to be on every time I boot and I have to manually turn off one of the profiles. This wouldn't be an issue but on the next boot, it will either turn on again or turn off all of the profiles and would have to turn one on manually again (I am using GP104 High Definition Audio Controller). Any one knows how to delete the duplicate audio profiles? I have tried looking everywhere and it looks like no one has had this problem. Thanks for reading! I will attach a screenshot with pavucontrol showing the audio profiles.


Re: Duplicate audio profile after migrating to pipewire

Reply #1
I tried installing pavucontrol, and it showed 2 profiles which I also see in alsamixer, one for my sound card and the other for my hdmi output (spdif in alsamixer) from my graphics card

Turning off the audio card profile then trying to turn it on again, pavucontrol crashed with this message, and trying to restart it gave this result again as it crashed as soon as the window started to appear.

Code: [Select]
$ pavucontrol
**
ERROR:devicewidget.cc:100:void DeviceWidget::setVolume(const pa_cvolume&, bool): assertion failed: (v.channels == channelMap.channels)
Bail out! ERROR:devicewidget.cc:100:void DeviceWidget::setVolume(const pa_cvolume&, bool): assertion failed: (v.channels == channelMap.channels)
Aborted

Then while trying to write this and listening to some music on soundcloud the desktop froze up and the music went like a stuck record, repeating the same bit over and over. (Amazing digital streaming could recreate this classic problem!)
So I uninstalled pavucontrol and everything seems OK again.
I have these alsa and pipe packages, also the alsa service is enabled:
Code: [Select]
$ pacman -Qs alsa
local/alsa-card-profiles 1:0.3.40-1
    Low-latency audio/video router and processor - ALSA card profiles
local/alsa-lib 1.2.6.1-1
    An alternative implementation of Linux sound support
local/alsa-plugins 1:1.2.6-1
    Additional ALSA plugins
local/alsa-tools 1.2.5-1
    Advanced tools for certain sound cards
local/alsa-topology-conf 1.2.5.1-1
    ALSA topology configuration files
local/alsa-ucm-conf 1.2.6.2-2
    ALSA Use Case Manager configuration (and topologies)
local/alsa-utils 1.2.6-1
    Advanced Linux Sound Architecture - Utilities
local/alsa-utils-openrc 20210505-2 (openrc-world)
    OpenRC alsa-utils init script
local/pipewire-alsa 1:0.3.40-1
    Low-latency audio/video router and processor - ALSA configuration
local/zita-alsa-pcmi 0.3.2-3.1
    The successor of clalsadrv, provides easy access to ALSA PCM devices.
$ pacman -Qs pipe
local/gst-plugin-pipewire 1:0.3.40-1
    Multimedia graph framework - pipewire plugin
local/libpipeline 1.5.4-1
    a C library for manipulating pipelines of subprocesses in a flexible and convenient way
local/pipewire 1:0.3.40-1
    Low-latency audio/video router and processor
local/pipewire-alsa 1:0.3.40-1
    Low-latency audio/video router and processor - ALSA configuration
local/pipewire-jack 1:0.3.40-1
    Low-latency audio/video router and processor - JACK support
local/pipewire-pulse 1:0.3.40-1
    Low-latency audio/video router and processor - PulseAudio replacement
local/pipewire-v4l2 1:0.3.40-1
    Low-latency audio/video router and processor - V4L2 interceptor
local/pipewire-zeroconf 1:0.3.40-1
    Low-latency audio/video router and processor - Zeroconf support
local/wireplumber 0.4.5-2
    Session / policy manager implementation for PipeWire
Possibly my alsa setup is conflicting with pavucontrol and / or some other packages / setup are required to support it, but it was apparently problematic for me during this brief test.

Re: Duplicate audio profile after migrating to pipewire

Reply #2
I removed pavucontrol and the probelm still persists. I had pulseaudio before the switch which could be a factor. As a backup, I have pulsemixer installed and the audio profile problem is still there. It is probably something more to it that I am not understanding.

Re: Duplicate audio profile after migrating to pipewire

Reply #3
The error I had seems to be a known current bug:
https://gitlab.freedesktop.org/pipewire/pipewire/-/issues/1442
Also there is a ~/.config/pulse directory which can be deleted apparently, perhaps why pavucontrol initially worked then didn't at all after I altered the settings.
Using startx here, my .xinitrc starts pipewire and pipewire-pulse, when I tried pipewire-media-session it worked in here, but wireplumber wouldn't work properly, so I put it in the desktop startup applications with a 1 second delay as I figured it probably needed the other items to be properly running first. It worked fine then. (wireplumber is the new replacement for pipewire-media-session but either can be installed and used at present.)
Code: [Select]
/usr/bin/pipewire &
/usr/bin/pipewire-pulse &
#/usr/bin/wireplumber &
#/usr/bin/pipewire-media-session &
exec mate-session

 

Re: Duplicate audio profile after migrating to pipewire

Reply #4
What are the odds, I swapped pipewire-media-session with wireplumber and the duplicates just disappeared. What is weird is that I have lightdm on the desktop so I use .profile to set pipewire, pipewire-pulse, and now wireplumber (they are all in a script that is called in .profile) and it worked fine until I rebooted. When I logged back in, the audio didn't work and there were graphical problems when launching pavucontrol and other things like geany. You mentioned that you put wireplumber in desktop startup apps which gave me the idea that perhaps putting it as the last thing in my .profile would do the trick. Thankfully it did and now the problem is solved. Thank you for the insight but it still baffles me why installing wireplumber removes the duplicate audio profiles.