Sound card works with ALSA, but not showing in volume mixer

0

After a system upgrade I noticed I had no sound. In the volume mixer I see that my integrated sound card is not shown, while another one (HDMI) is.

I managed to find that the device name is CARD=MID using aplay -L and I can indeed hear sound when I perform this:

$ for dev in `aplay -L | grep "CARD=MID"`; do aplay -D $dev /usr/share/sounds/alsa/Front_Right.wav 2> /dev/null && echo $dev; done
default:CARD=MID
sysdefault:CARD=MID

I can also hear sound with speaker-test, without any arguments.

In alsamixer the card is as well shown, it appears as the default one (HDA Intel MID), and I can adjust the volume from there when I play sound with aplay or speaker-test.

In order to get the sound card work in the system, I stopped pulseaudio and removed the local configuration files at ~/.config/pulse/, but nothing changed on restart.

I think that the system upgrade could have left some sound configuration in a broken state, but I don't know where to look into.

Edit:

I attach the output of lsof -n /dev/snd/* in some situations.

With pulseaudio stopped:

$ lsof -n /dev/snd/*
$

with pulseaudio running:

$ lsof -n /dev/snd/*
COMMAND    PID    USER   FD   TYPE DEVICE SIZE/OFF  NODE NAME
pulseaudi 3463 etuardu   16u   CHR 116,14      0t0 13058 /dev/snd/controlC1
pulseaudi 3463 etuardu   23u   CHR 116,14      0t0 13058 /dev/snd/controlC1
$

while playing sound with speaker-test:

$ lsof -n /dev/snd/*
COMMAND    PID    USER   FD   TYPE DEVICE SIZE/OFF  NODE NAME
pulseaudi 3463 etuardu   16u   CHR 116,14      0t0 13058 /dev/snd/controlC1
pulseaudi 3463 etuardu   23u   CHR 116,14      0t0 13058 /dev/snd/controlC1
speaker-t 3481 etuardu  mem    CHR  116,2          13523 /dev/snd/pcmC0D0p
speaker-t 3481 etuardu    3r   CHR 116,33      0t0  2850 /dev/snd/timer
speaker-t 3481 etuardu    4u   CHR  116,2      0t0 13523 /dev/snd/pcmC0D0p
speaker-t 3481 etuardu    5u   CHR  116,5      0t0 11209 /dev/snd/controlC0
$

etuardu

Posted 2018-11-29T01:06:56.640

Reputation: 547

"volume mixer" means alsamixer or pavucontrol? – Ipor Sircer – 2018-11-29T01:36:40.860

I meant the gui volume mixer of my desktop environment (gnome control center / audio). I installed pavucontrol and the card is not shown there neither. On the other hand it is visible and working in alsamixer. – etuardu – 2018-11-29T02:03:21.983

Then it seems to be a pulseaudio bug, or some application take your soundcard when pulseaudio starts, so it cannot bind to it. Try restarting pulseaudio with -v -v -v parameters to see what's going on. (update your question with this output) – Ipor Sircer – 2018-11-29T02:15:04.447

This is the output of pulseaudio -v -v -v when started: https://pastebin.com/raw/jjCdB3iN

– etuardu – 2018-11-29T02:31:55.183

D: [pulseaudio] module-udev-detect.c: /devices/pci0000:00/0000:00:1b.0/sound/card0 is busy: yes, so one app is already using your soundcard. – Ipor Sircer – 2018-11-29T02:41:17.343

Try lsof -n /dev/snd/* to find out which. – Ipor Sircer – 2018-11-29T02:44:57.043

I edited the question to add its output – etuardu – 2018-11-29T14:04:08.283

I don't know what is speaker-t with pid 3481, but kill it, and remove it from autostart. – Ipor Sircer – 2018-11-29T14:14:58.637

Or remove it completely: dpkg --remove $(dpkg -S \realpath /proc/3481/exe`)` – Ipor Sircer – 2018-11-29T14:15:59.850

It is speaker-test, I run it on purpose in order to test the speakers (similar to aplay, it plays pink noise) and killed it afterwards. It seems to use /dev/snd/controlC0. Even when the device is not used according to lsof, for some reasons pulseaudio does not handle it when I restart it – etuardu – 2018-11-29T14:20:11.053

No answers