Snapd has no slot named “audio-playback”

I am trying to play a video from YouTube using the mir-kiosk and wpe-webkit-mir-kiosk, but there is no sound while the video plays. I tried playing a local video file with mpv kiosk but ran into the same issue.

I have traced the problem to there being no slot for audio-playback in snapd. I checked the connections using “snap connections snapd” and found no slots for audio-playback. There is a plug wpe-webkit-mir-kiosk:pulseaudio in wpe-webkit-mir-kiosk, but the slot is empty:

I also looked into pulseaudio and installed the snap, but I don’t know how to connect it to wpe-webkit-mir-kiosk this is what I tried this:

but wpe-webkit-mir-kiosk has no plug for pulseaudio and I don’t know how to add it.

How do I go about solving this issue? I am on Ubuntu core 20 and quite new to snaps and Ubuntu core.

Hey, thanks for bringing this up.

The pulseaudio interface (not the snap) was deprecated over a year ago in favor of audio-playback. The wpe-webkit-mir-kiosk snap (and many others) changed to use audio-playback.

The pulseaudio snap should also have had the same change, and looking at it, the change was made on the edge and beta channels but hasn’t yet made it to stable. (That seems to have taken surprisingly long, I’ll see if I can find out why.)

I don’t have the kit to hand to test fully, but I think you’ll find that the following will work:

snap refresh --beta pulseaudio
snap connect wpe-webkit-mir-kiosk:audio-playback pulseaudio:audio-playback

Please let us know if that works.

@alan_g Thanks for the reply.
I ran the commands you mentioned, but still there is no audio.
I am quite new to snaps and Ubuntu core, so pardon my ignorance. The issue I think is that there is no audio-playback slot in snapd.

I was trying to use pulseaudio as a work around but the main issue is the above mentioned one. I am also attaching the connections of pulseaudio and wpe-webkit-mir-kiosk just in case they are of help.

I just want audio playback form wpe-webkit-mir-kiosk. I don’t mind if it’s through pulseaudio or audio-playback
Also I am running ubuntu core on ThinkCentre M53 with a pentium processor, in case that helps
Thanks in advance for your help.

Did the commands succeed (run without an error message)?

It could be that audio isn’t routed to the device you expect. IIRC there’s a “pulsemixer” snap that will allow you to manage this:

snap install pulsemixer
sudo pulsemixer

No. That just means you need a slot from something else. In this case, the pulseaudio snap.

Yes, the commands did run without any error.
I already checked with pulsemixer and tried both an analog headphone and USB one, but no sound in either.

So far as setting up the snaps interfaces goes, that ought to be all that’s needed.

To double check: pulsemixer will show the USB headphone by name (if not, then the devices isn’t being detected at all and won’t work, maybe there’s a poor connection). Did you see it? Have you tried setting it to be the default?

Thank you! You are a life saver. I had been at it for the past two days.
Setting to default for the USD audio device did the trick. The analog output still doesn’t work though. It’s audio level bar is also colorless unlike the USB audio device.

Any clue what could be up with that?

Sorry, that goes beyond my understanding of PulseAudio configuration. But you’re probably now in a better place to google for help as that’s widely used.

Good luck!

I’m having this same problem on CORE os with my Intel mini PC… I followed these same steps and installed the pulseaudio mixer and realized… that the top line where it shows the build-in audio analog stereo is MUTED. I just hit the “m” key and all of a sudden I’m getting audio from the build-in audio jack on the motherboard. HDMI audio out to the tv is not detected with “F3” looking at the cards. It only sees the built-in motherboard audio card output, but it works.

Try opening up the pulsemixer app again and just hit “m” for mute. It should have full colors in the top 2 bars which is the actual sound card out. Warning, it looks like you used the mouse wheel and set the audio to be 150% over normal, so it might blow your speakers out. I recommend you turn that back down to 100% using the mouse wheel or keyboard.

Now my bigger question is… how do we get CORE to NOT default mute audio when installing, and 2nd, how do we get audio to HDMI so it can play out the tv as well? I saw another post about a possible commented config.txt file in uboot… but when I install CORE os, that folder is empty.

you can ship pulseaudio-utils as a stage package in your application snap … then use code like below to parse pactl list sinks:

… to detect the sink or source you want by i.e. the vendor or product ID and use something like:

to toggle the mute state … i’d also recommend using pactl set-default-sink <name> to force the correct output device on startup of your application …

Update: I found by accident that in pulsemixer utility, if you hit F3 and go to the Cards page, hit the “Enter” key on the keyboard, it actually lists all the audio devices seen on the computer. You can then choose HDMI manually and the TV will start playing sounds.