ALSA sound problems and Kubuntu sound stack

Ubuntu Version:

Kubuntu 24.04 LTS

Desktop Environment (if applicable):

KDE Plasma 5.27.12

Problem Description:

I can´t use two programs that use audio at the same time. For example if i have a VirtualBox machine using ALSA Audio and open Firefox, i can´t reproduce any web that use audio in Firefox. Or if i open first Firefox and latter VirtualBox using ALSA Audio, audio doesn’t work on that virtual machine.

Another case is if i play a song with aplay and latter try to play a video with VLC, the VLC video don´t have sound. Or if i play a video with VLC and latter try to play a music file with aplay give me the error:

ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave
aplay: main:834: audio open error: Device or resource busy

Viewing the packages installed on the system i assume that audio stack in Kubuntu is:
ALSA ← Pipewire ← pipewire-pulse|wireplumber

Look like programs that use ALSA Audio don´t work together with programs that use Pipewire or Pulseaudio (through pipewire-pulse wrapper)

Relevant System Information:

Kernel version: 6.8.0-57-generic
Processor: Intel® Core™ i7-9850H CPU @ 2.60GHz

Screenshots or Error Messages:

No audio from app, crash or don´t work. Many of them throw me:

ALSA lib pcm_dmix.c:1000:(snd_pcm_dmix_open) unable to open slave

and usually open but don´t work fine. For example puNES that open but get stuck and don´t work.

What I’ve Tried:

My only workaround is don´t mix apps. If in the app allow me change the output i do(like VirtualBox), but in many others apps can´t select the audio output.


that could be aplay issue. some programs like audacious could select frontend, but maybe also backend like pipewire or some jackd(in some form) missing for some more audio orientation. But there could be also pulseaudio server on pipewire side and even more libasound2-plugins historic sound APIs like oss emulation for some historic content. Probably but also some caused historic hw problems maybe from aplay orientation… Sound issues is Cosmic Space and mixer is part time job of its Cosmic issues often also present in some kernel modules with often generic nature of kernel devs or its executables presentation for hw…

The dmix implementation is a hardware multiplexer and alsa will try to directly use it on your soundcard.

Normally you would be multiplexing through a sound server like pulse or pipewire, I guess your card simply doesn’t support dmix on the hardware level, just make sure to point your apps to use pulse or pipewire, or if you are 100% sure your card supports dmix multiplexing file a bug against alsa to get the driver fixed…

1 Like

No Promisises but this used to work for me:
I created a file in /etc/modprobe.d/default.conf
It reads as:

options snd_hda_intel index=1

Reboot to see the change. And is it any better?

Not only aplay, some console emulator like puNES or Higan gave me similar error. I put aplay because i suppose that it’s the more generic simple tool.

Good point. Doesn’t work quite right, because i have 2 cards that share driver. I’ve try to refine following this ALSA Wiki. I’ve edited /etc/modprobe.d/alsa-base.conf and add the line options snd-hda-intel index=1,0 vid=0x10de,0x8086 pid=10fa,0xa348 to put Intel audio device before NVidia.

Now some apps like puNES and Higan works. Although sometimes Intel device don´t appear, only Nvidia, so audio don´t work. And i still can’t use ALSA Audio together with programs that use Pipewire or Pulseaudio.

I don’t know if support or not hardware dmix. Sound card it’s an integrated chipset that come on Lenovo P53. lspci info at the end of the post.

Is there any way to force all apps use pipewire or pulse?

Additional Audio hardware info:
I have 2 audio devices. Intel

Audio device [0403]: Intel Corporation Cannon Lake PCH cAVS [8086:a348] (rev 10) (prog-if 80)
        Subsystem: Lenovo Cannon Lake PCH cAVS [17aa:2297]
        Flags: bus master, fast devsel, latency 64, IRQ 194, IOMMU group 15
        Memory at 6041108000 (64-bit, non-prefetchable) [size=16K]
        Memory at 6041000000 (64-bit, non-prefetchable) [size=1M]
        Capabilities: <access denied>
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel, snd_sof_pci_intel_cnl

and Nvidia HDMI audio (i suppose)

Audio device [0403]: NVIDIA Corporation Device [10de:10fa] (rev a1)
        Subsystem: Lenovo Device [17aa:2297]
        Flags: bus master, fast devsel, latency 0, IRQ 17, IOMMU group 2
        Memory at ee000000 (32-bit, non-prefetchable) [size=16K]
        Capabilities: <access denied>
        Kernel driver in use: snd_hda_intel
        Kernel modules: snd_hda_intel

Thanks everyone for the help.

This is sadly a per-app thing, but yes VLC definitely allows you to pick pulse as output, mpv too and you should find such an option in most apps using audio devices…

2 Likes

Sorry after several test i’ve notice that is wrong. Instead of this line:
options snd-hda-intel index=1,0 vid=0x10de,0x8086 pid=10fa,0xa348
must be:

options snd cards_limit=2
options slots=snd-hda-intel,snd-hda-intel
options snd-hda-intel index=1,0
alias snd-card-0 snd-hda-intel
alias snd-card-1 snd-hda-intel

VID and PID option it’s only for snd-usb-audio.

I correct it in case it can be useful for someone.

1 Like

This topic was automatically closed after 30 days. New replies are no longer allowed.