[Vostro 5490, Realtek ALC3204, Speaker, Internal] Pulseaudio fails to detect card

Bug #1886696 reported by Yakir Levi
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
linux (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

I have ubuntu Ubuntu 20.04 LTS installed, together with windows (dual boot) on my laptop.
There is no sound at all, seems like Pulseaudio / Alsa dont recognize the sound card:

$ pacmd list-cards
0 card(s) available.

dmesg shows errors of sof-audio-pci:

$ dmesg

[ 13.313523] sof-audio-pci 0000:00:1f.3: error: hw params ipc failed for stream 2
[ 13.313524] sof-audio-pci 0000:00:1f.3: ASoC: 0000:00:1f.3 hw params failed: -22
[ 13.313525] HDA Analog: ASoC: hw_params FE failed -22
[ 13.313883] sof-audio-pci 0000:00:1f.3: error: ipc error for 0x60010000 size 20
[ 13.313884] sof-audio-pci 0000:00:1f.3: error: hw params ipc failed for stream 2
[ 13.313884] sof-audio-pci 0000:00:1f.3: ASoC: 0000:00:1f.3 hw params failed: -22
[ 13.313885] HDA Analog: ASoC: hw_params FE failed -22
[ 13.314249] sof-audio-pci 0000:00:1f.3: error: ipc error for 0x60010000 size 20
[ 13.314249] sof-audio-pci 0000:00:1f.3: error: hw params ipc failed for stream 2
[ 13.314250] sof-audio-pci 0000:00:1f.3: ASoC: 0000:00:1f.3 hw params failed: -22
[ 13.314250] HDA Analog: ASoC: hw_params FE failed -22
.....
[10706.102325] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
....

pci device:
$ lspci -nnk
...
00:1f.3 Multimedia audio controller [0401]: Intel Corporation Device [8086:02c8]
 Subsystem: Dell Device [1028:0959]
 Kernel driver in use: sof-audio-pci
 Kernel modules: snd_hda_intel, snd_sof_pci
...

There was actually already a sound problem when I had ubuntu 18.04 - The sound worked after ubuntu got up, but then at some point the sound just died, with some different messages on dmesg. I upgraded the kernel and ubuntu version in hope it will solve the problem, but seems like it only got worse.

Sound works in windows on the same laptop without issues.

My attempts so far, which didnt yield anything
1. reinstall and upgrae linux-firmware. currently 'linux-firmware/focal-updates,focal-updates,now 1.187.1 all [installed]'
2. adding those line to /etc/modprobe.d/alsa-base.conf:
 options snd-hda-intel model=auto
 options snd-hda-intel dmic_detect=0

also, when I run 'alsa force-reload' the system just totally crashes, forcing me to press the power button to shut it off.

Extra info
------------

$ inxi -Fxlpoz

System: Kernel: 5.4.0-40-generic x86_64 bits: 64 compiler: gcc v: 9.3.0 Desktop: Gnome 3.36.2
           Distro: Ubuntu 20.04 LTS (Focal Fossa)
Machine: Type: Laptop System: Dell product: Vostro 5490 v: N/A serial: <filter>
           Mobo: Dell model: 05P6R7 v: A00 serial: <filter> UEFI: Dell v: 1.5.1 date: 01/14/2020
Battery: ID-1: BAT0 charge: 40.7 Wh condition: 40.7/42.0 Wh (97%) model: SMP DELL VM73283 status: Full
CPU: Topology: Quad Core model: Intel Core i5-10210U bits: 64 type: MT MCP arch: Kaby Lake rev: C L2 cache: 6144 KiB
           flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 33599
           Speed: 600 MHz min/max: 400/4200 MHz Core speeds (MHz): 1: 600 2: 600 3: 600 4: 600 5: 600 6: 600 7: 600 8: 600
Graphics: Device-1: Intel UHD Graphics vendor: Dell driver: i915 v: kernel bus ID: 00:02.0
           Display: x11 server: X.Org 1.20.8 driver: modesetting unloaded: fbdev,vesa
           resolution: 1920x1080~60Hz, 1920x1080~60Hz, 1920x1080~60Hz
           OpenGL: renderer: Mesa Intel UHD Graphics (CML GT2) v: 4.6 Mesa 20.0.4 direct render: Yes
Audio: Device-1: Intel vendor: Dell driver: sof-audio-pci bus ID: 00:1f.3
           Sound Server: ALSA v: k5.4.0-40-generic
Network: Device-1: Intel Wireless-AC 9462 driver: iwlwifi v: kernel port: 4000 bus ID: 00:14.3
           IF: wlp0s20f3 state: up mac: <filter>
           Device-2: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet vendor: Dell driver: r8169 v: kernel port: 3000
           bus ID: 01:00.0
           IF: enp1s0 state: down mac: <filter>
Drives: Local Storage: total: 476.94 GiB used: 173.69 GiB (36.4%)
           ID-1: /dev/nvme0n1 vendor: Toshiba model: KBG40ZNS512G NVMe 512GB size: 476.94 GiB

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: pulseaudio 1:13.99.1-1ubuntu3.3
ProcVersionSignature: Ubuntu 5.4.0-40.44-generic 5.4.44
Uname: Linux 5.4.0-40-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.3
Architecture: amd64
AudioDevicesInUse: Error: command ['fuser', '-v', '/dev/snd/by-path', '/dev/snd/controlC0', '/dev/snd/hwC0D0', '/dev/snd/hwC0D2', '/dev/snd/pcmC0D5p', '/dev/snd/pcmC0D4p', '/dev/snd/pcmC0D3p', '/dev/snd/pcmC0D1c', '/dev/snd/pcmC0D1p', '/dev/snd/pcmC0D0c', '/dev/snd/pcmC0D0p', '/dev/snd/pcmC0D7c', '/dev/snd/pcmC0D6c', '/dev/snd/seq', '/dev/snd/timer'] failed with exit code 1:
CasperMD5CheckResult: skip
CurrentDesktop: ubuntu:GNOME
Date: Tue Jul 7 14:36:30 2020
DistributionChannelDescriptor:
 # This is the distribution channel descriptor for the OEM CDs
 # For more information see http://wiki.ubuntu.com/DistributionChannelDescriptor
 canonical-oem-somerville-bionic-amd64-20190418-59+beaver-osp1+X00
InstallationDate: Installed on 2019-10-29 (251 days ago)
InstallationMedia: Ubuntu 18.04 "Bionic" - Build amd64 LIVE Binary 20190418-12:10
SourcePackage: pulseaudio
Symptom: audio
Symptom_Card: sof-hda-dsp - sof-hda-dsp
Symptom_Jack: Speaker, Internal
Title: [Vostro 5490, Realtek ALC3204, Speaker, Internal] Pulseaudio fails to detect card
UpgradeStatus: Upgraded to focal on 2020-06-25 (11 days ago)
dmi.bios.date: 01/14/2020
dmi.bios.vendor: Dell Inc.
dmi.bios.version: 1.5.1
dmi.board.name: 05P6R7
dmi.board.vendor: Dell Inc.
dmi.board.version: A00
dmi.chassis.type: 10
dmi.chassis.vendor: Dell Inc.
dmi.modalias: dmi:bvnDellInc.:bvr1.5.1:bd01/14/2020:svnDellInc.:pnVostro5490:pvr:rvnDellInc.:rn05P6R7:rvrA00:cvnDellInc.:ct10:cvr:
dmi.product.family: Vostro
dmi.product.name: Vostro 5490
dmi.product.sku: 0959
dmi.sys.vendor: Dell Inc.
modified.conffile..etc.pulse.default.pa: [modified]
mtime.conffile..etc.pulse.default.pa: 2020-07-02T14:15:41.001282

Revision history for this message
Yakir Levi (yakirl) wrote :
Revision history for this message
Yakir Levi (yakirl) wrote :

Ok so I guess it's true what they say, when you go to the doctor you suddenly feel well.
I was debugging this issue for quite some time, and just after I submitted the bug I found the trick. This is basically just a workaround, the bug is still real.

So as the guy here: https://forums.linuxmint.com/viewtopic.php?f=48&t=311714&start=20 explains, the sof driver is still new and buggy, so the best workaround is to disable it and roll back to intel driver.
But apperantly 'snd_hda_intel.dmic_detect=0' is depracted in newer versions. So what I did was to change in '/etc/default/grub' the line:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
to:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash snd-intel-dspcfg.dsp_driver=1"

and then run 'sudo update-grub' and reboot

Also, Im not sure it mandatory but I left those 2 lines in /etc/modprobe.d/alsa-base.conf :
options snd-hda-intel model=auto
options snd-hda-intel snd-intel-dspcfg.dsp_driver=1

After the reboot, there were no dmesg errors, but still snd-hda-intel was down, so I had to manually do:
$ sudo modprobe snd-hda-intel

And it works.
By the way this bug: https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1864871?comments=all looks kinda similar but still not the same. I tried before to edit /etc/pulse/default.pa as suggested but this messes up my pulseaudio daemon, as I saw in systemctl, so I reversed it.

I shared in details to help anyone that encounter similar problems, and maybe to get some feedback about the workaround. Everything seems to work now (didnt check mic)

affects: ubuntu → pulseaudio (Ubuntu)
Revision history for this message
Hui Wang (hui.wang) wrote :

@Yakir,

the dmesg in the #1 is not a complete one, could you please upload a new one (remove the "snd-intel-dspcfg.dsp_driver=1").

BTW, could you please try the kernel older than 5.4.0-40.44-generic like 5.4.0-39/38/37/...

affects: pulseaudio (Ubuntu) → linux (Ubuntu)
Changed in linux (Ubuntu):
status: New → Incomplete
Revision history for this message
Yakir Levi (yakirl) wrote :

@Hui

There is longer version of dmesg in the data that automatically collected, so I assumed it's good, but anyway I attach here a full dmesg log after system startup.

I also repeat that alsa recognizes the devices:
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sofhdadsp [sof-hda-dsp], device 0: HDA Analog (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 1: HDA Digital (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 3: HDMI1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 4: HDMI2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 5: HDMI3 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0

but pulseaudio doesnt:
$ pacmd list-cards
0 card(s) available.

Whats the reason to downgrade the kernel? I have never tried it and actually afraid it will mess up my system (or sound again...). Not sure how to do it also.

Revision history for this message
Hui Wang (hui.wang) wrote :

Did you install the alsa-ucm-conf?

please run sudo apt-get update; sudo apt install libasound2; sudo apt install linux-firmware; sudo apt install alsa-ucm-conf; reboot

Then could you still see the error log from dmesg:

    12.043001] HDMI3: ASoC: hw_params FE failed -22
[ 12.043377] sof-audio-pci 0000:00:1f.3: error: ipc error for 0x60010000 size 20
[ 12.043378] sof-audio-pci 0000:00:1f.3: error: hw params ipc failed for stream 1
[ 12.043378] sof-audio-pci 0000:00:1f.3: ASoC: 0000:00:1f.3 hw params failed: -22
[ 12.043379] HDMI3: ASoC: hw_params FE failed -22

Revision history for this message
Yakir Levi (yakirl) wrote :

@Hui
Yes, all those packages are already installed and at the latest version. I probably installed it during my attempts to fix the issue.

$ sudo apt list | egrep "alsa-ucm|libasound2|linux-firmware" | grep installed
alsa-ucm-conf/focal-updates,focal-updates,now 1.2.2-1ubuntu0.1 all [installed]
libasound2-data/focal-updates,focal-updates,now 1.2.2-2.1ubuntu1 all [installed,automatic]
libasound2-plugins/focal,now 1.2.2-1ubuntu1 amd64 [installed,automatic]
libasound2/focal-updates,now 1.2.2-2.1ubuntu1 amd64 [installed]
linux-firmware/focal-updates,focal-updates,now 1.187.1 all [installed]

Revision history for this message
Hui Wang (hui.wang) wrote :

@Yakir,

At least from the dmesg in the #4, the sof-firmware loaded on your machine is not correct, this is the log on your machine:
[ 4.139814] sof-audio-pci 0000:00:1f.3: Firmware info: version 1:1:0-6cc8d
[ 4.139816] sof-audio-pci 0000:00:1f.3: Firmware: ABI 3:7:0 Kernel ABI 3:10:0
[ 4.140055] sof-audio-pci 0000:00:1f.3: firmware boot complete

This is the log on other machine installed the same 20.04 environment:
[ 2.744592] sof-audio-pci 0000:00:1f.3: Firmware info: version 1:1:0-fcf6c
[ 2.744594] sof-audio-pci 0000:00:1f.3: Firmware: ABI 3:11:0 Kernel ABI 3:13:0
[ 2.744942] sof-audio-pci 0000:00:1f.3: firmware boot complete

I doubt the kernel loaded the old firmware (18.04 firmware) on your machine.

Revision history for this message
Hui Wang (hui.wang) wrote :

@Yakir,

BTW, I happened have a vostro 5490, and tried to install the windows10 on it and compare the audio between ubuntu linux and windows10, but I never enable the audio successfully on windows10, could you please share where to download the windows audio driver for this machine or there is a windows10 iso dedicated to this machine?

Revision history for this message
Yakir Levi (yakirl) wrote :

Ok, so as to the sof fw version, I checked a bit and saw some things that unclear to me.
I compared the content of my '/lib/firmware/intel/sof' with that of the linux-firmware package from here: https://launchpad.net/ubuntu/+source/linux-firmware/1.187.1 (same as my version) and there are differences.
* tplg dir is missing in my folder
* I find occurences of the version fcf6c in those file:
   Binary file signed/debug/sof-icl.ldc matches
   Binary file signed/sof-icl-signed-intel.ri matches
   Binary file sof-icl.ri.orig matches
  and occurences 6cc8d of in those files:
   Binary file cnl/intel/sof-cnl-v1.3-6cc8da10.ri matches
   Binary file sof-cfl.ri matches
   Binary file sof-cml.ri matches
   Binary file sof-cml.ri.orig matches
   Binary file sof-cnl.ri matches
   Binary file sof-whl.ri matches
So it seems like there was a mix between the 2 version when I updated linux-firmware. What do you suggest to do here?

As to the windows issue - I didnt do anything special. I downloaded the standard windows using the usb creation tool from here if I recall: https://www.microsoft.com/en-us/software-download/windows10
and installed it.
For the drivers I used their online tools: https://www.dell.com/support/home/en-il/product-support/product/vostro-14-5490-laptop/drivers . It is very useful, I also
ran the hardware test to check everything. You should also download the SupportAssist software.
I attached a snap of my audio driver version, which is the same as the one in the link above as you can see.

Revision history for this message
Hui Wang (hui.wang) wrote :

To reinstall a clean linux-firmware:

sudo mv /lib/firmware/intel/sof ~/
sudo mv /lib/firmware/intel/sof-tplg ~/

sudo apt install linux-firmware --reinstall

reboot and check if audio works? if there is anything wrong, you could restore the orignal sof and sof-tplg from ~/, if the new firmware works, you could delete the ~/sof and ~/sof-tplg

Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for linux (Ubuntu) because there has been no activity for 60 days.]

Changed in linux (Ubuntu):
status: Incomplete → Expired
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.