Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
No audio w/USB Audio Interface and PipeWire [SOLVED]
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Multimedia
View previous topic :: View next topic  
Author Message
Cygon
Tux's lil' helper
Tux's lil' helper


Joined: 05 Feb 2006
Posts: 114
Location: Germany

PostPosted: Wed Jun 26, 2024 1:06 pm    Post subject: No audio w/USB Audio Interface and PipeWire [SOLVED] Reply with quote

Classic story: I did a fresh install of Gentoo onto a new SSD (because... reasons.) and I can't seem to figure out what I missed, but I'm not getting audio anymore. My previous system was Gentoo + KDE + PulseAudio and worked for years. Curiously, audio works out of the box when I boot the current LiveUSB w/GUI image (I assume it uses PipeWire), but there's no sound when I boot my fresh install (Gentoo + KDE + PipeWire).

The sound card is an SSL2 USB audio interface. It implements the standard USB HID audio specification, nothing exotic.

My kernel detects it:

Code:
# cat /proc/asound/cards
 0 [S2             ]: USB-Audio - SSL 2
                      Solid State Logic SSL 2 at usb-0000:00:14.0-2, high speed
 1 [CAM            ]: USB-Audio - WEB CAM
                      WCM_USB WEB CAM at usb-0000:00:14.0-11.4.2, high speed


And it would appear that PipeWire, on some level, is aware of the device, too:

Code:
# pw-cli list-objects
...
        id 40, type PipeWire:Interface:Device/3
                object.serial = "40"
                factory.id = "14"
                client.id = "35"
                device.api = "alsa"
                device.description = "SSL 2"
                device.name = "alsa_card.usb-Solid_State_Logic_SSL_2-00"
                device.nick = "SSL 2"
                media.class = "Audio/Device"
...
        id 46, type PipeWire:Interface:Node/3
                object.serial = "46"
                object.path = "alsa:pcm:0:hw:S2:playback"
                factory.id = "18"
                client.id = "35"
                device.id = "40"
                priority.session = "1000"
                priority.driver = "1000"
                node.description = "SSL 2 Stereo Line"
                node.name = "alsa_output.usb-Solid_State_Logic_SSL_2-00.HiFi__hw_S2__sink"
                node.nick = "SSL 2"
                media.class = "Audio/Sink"
...


Setup-wise, I've looked up and down the PipeWire page in the Gentoo wiki. I enabled the "Verbose procfs contents" in my kernel (and recompiled and installed and rebooted), I've set "sound-server" on "media-video/pipewire" and disabled "daemon" on "media-sound/pulseaudio". I copied /usr/share/pipewire/pipewire.conf to /etc/pipewire/pipewire.conf (and double-checked and rebooted). The pipewire process is running (should wireplumber also be running?):

Code:
$ ps axuw | grep -i pipe
cygon     3677  0.0  0.0  43892  9472 ?        S<l  14:13   0:00 /usr/bin/pipewire
cygon     3679  0.0  0.0  20152  4864 ?        S<l  14:13   0:00 /usr/bin/pipewire -c pipewire-pulse.conf
root      5405  0.0  0.0   9272  2048 pts/0    S+   14:51   0:00 grep --color=auto -i pipe


When I boot, I hear one click while the kernel messages are scrolling through (I assume it's the USB init) and another when I log in to KDE (I assume that's when the PipeWire process launches).

But KMix shows only a "SSL 2 - Extension Unit" that is permanently at 0% volume, muted and cannot be unmuted.

Can anyone think of something I could have missed?
I'm happy to provide any other information that may help troubleshooting my issue.


Last edited by Cygon on Wed Jun 26, 2024 7:52 pm; edited 1 time in total
Back to top
View user's profile Send private message
Cygon
Tux's lil' helper
Tux's lil' helper


Joined: 05 Feb 2006
Posts: 114
Location: Germany

PostPosted: Wed Jun 26, 2024 1:19 pm    Post subject: Reply with quote

Oh, before anyone asks, my login user is in the pipewire, usb and audio groups.

The Gentoo wiki page on PipeWire recommends not being in the audio group to avoid issues when switching users, but since I'm not switching users, I kept it.

EDIT: Using 'aplay' from media-sound/alsa-utils does play sound. So the issue is limited to PipeWire, maybe its configuration file. I already tried /usr/share/pipewire/minimal.conf because it defines an audio sink (and rebooted once after changing), but no success so far.
Back to top
View user's profile Send private message
Cygon
Tux's lil' helper
Tux's lil' helper


Joined: 05 Feb 2006
Posts: 114
Location: Germany

PostPosted: Wed Jun 26, 2024 6:52 pm    Post subject: Reply with quote

I seem to have made a big, wrong assumption: that, using PipeWire, I could banish all PulseAudio from my system.

In the PipeWire FAQ, there's a tidbit:

Quote:
* What Audio API Do You Recommend To Use?

The situation is a bit like GUI toolkits. There are many, each with different use cases. Nobody uses the native display server protocols directly (X11, Wayland) but always through an abstraction layer (GTK, Qt, etc).
We recommend that you continue to use PulseAudio, JACK and ALSA API's for now.


That gave me a hunch. kde-apps/kmix, kde-plasma/plasma-pa (which I hadn't even installed so far) and more all have "pulseaudio" flags and PipeWire emulates PulseAudio, too. So this probably means that my PipeWire config doesn't merely look like it's okay, it probably is okay but none of my installed applications, including KMix, can interface with PipeWire, they're all written against PulseAudio.

The kde-plasma/plasma-pa (PulseAudio settings plugin for kde-plasma/systemsettings) says "Failed to play sound: no such driver" when I try to pay a test sound.

Recompiling my shiny PipeWire system with the "pulseaudio" USE flag now...[/quote]
Back to top
View user's profile Send private message
Cygon
Tux's lil' helper
Tux's lil' helper


Joined: 05 Feb 2006
Posts: 114
Location: Germany

PostPosted: Wed Jun 26, 2024 8:00 pm    Post subject: Reply with quote

Yes, that was indeed it. PulseAudio is still mandatory with PipeWire.

Code:
# /etc/portage/make.conf
...
# Audio
USE="${USE} pipewire pulseaudio"
...


Code:
# /etc/portage/package.use/pipewire

media-video/pipewire extra sound-server -pipewire-alsa
media-sound/pulseaudio -daemon


Code:
# /etc/portage/sets/basic-desktop-set

kde-plasma/plasma-desktop
kde-plasma/systemsettings

# PulseAudio applet. I thought I could get away without this...
kde-plasma/plasma-pa


Code:
# ps axuw | grep -i pipe

cygon     3721  0.0  0.0  50716 14624 ?        S<l  21:48   0:00 /usr/bin/pipewire
cygon     3723  0.0  0.0  27992  8192 ?        S<l  21:48   0:00 /usr/bin/pipewire -c pipewire-pulse.conf
root      4488  0.0  0.0   9272  2048 pts/0    S+   21:59   0:00 grep --color=auto -i pipe



Everything else left at defaults. /usr/share/pipewire/pipewire.conf NOT copied to /etc/pipewire/pipewire.conf because no customization was needed (I delete minimal.conf again -- in fact I deleted every trace of pipewire, alsa and pulseaudio and re-emerged the involved packages to get a clean install).

Also, no alsa-utils, pavucontrol or anything needed. Just the "pipewire" and "pulseaudio" USE flags w/defaults, USB audio enabled in the kernel and kde-plasma/plasma-pa installed in addition to kde-plasma/systemsettings to turn off audio devices I don't use.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Multimedia All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum