Repository navigation
sof errors on Lenovo Yoga C940 with cpu Cannon Lake i9-9880H [BUG] #2020
Copy link
Copy link
Closed
Labels
CFLApplies to Coffee Lake platformApplies to Coffee Lake platformCommunityend-user or distro-reported issuesend-user or distro-reported issuesHDAApplies to HD-Audio bus for codec connectionApplies to HD-Audio bus for codec connectionbugSomething isn't workingSomething isn't workinguserspace
Description
Sound is working erratically
dmesg | grep sof-audio-pci
[ 4.570817] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[ 4.571127] sof-audio-pci 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[ 4.571142] sof-audio-pci 0000:00:1f.3: enabling device (0000 -> 0002)
[ 4.571357] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[ 4.765849] sof-audio-pci 0000:00:1f.3: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
[ 4.770549] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
[ 4.813221] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 5
[ 4.813223] sof-audio-pci 0000:00:1f.3: using HDA machine driver skl_hda_dsp_generic now
[ 4.815551] sof-audio-pci 0000:00:1f.3: unexpected ipc interrupt raised!
[ 4.815554] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
[ 4.939261] sof-audio-pci 0000:00:1f.3: Firmware info: version 1:4:2-66a5a
[ 4.939263] sof-audio-pci 0000:00:1f.3: Firmware: ABI 3:11:0 Kernel ABI 3:12:0
[ 4.939550] sof-audio-pci 0000:00:1f.3: firmware boot complete
[ 4.944470] sof-audio-pci 0000:00:1f.3: Topology: ABI 3:11:0 Kernel ABI 3:12:0
[ 4.944474] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp3 Tx not handled
[ 4.945672] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name codec0_in not handled
[ 4.945674] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp2 Tx not handled
[ 4.946676] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name codec1_in not handled
[ 4.946680] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name iDisp1 Tx not handled
[ 4.947568] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name codec0_out not handled
[ 4.947570] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name Analog CPU Playback not handled
[ 4.948487] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name codec1_out not handled
[ 4.948488] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name Digital CPU Playback not handled
[ 4.948490] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name codec2_in not handled
[ 4.948491] sof-audio-pci 0000:00:1f.3: warning: widget type 7 name Alt Analog CPU Playback not handled
[ 4.948494] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name codec2_out not handled
[ 4.948496] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name Analog CPU Capture not handled
[ 4.949477] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp1_out not handled
[ 4.949479] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name Digital CPU Capture not handled
[ 4.950620] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp2_out not handled
[ 4.950622] sof-audio-pci 0000:00:1f.3: warning: widget type 0 name Alt Analog CPU Capture not handled
[ 4.951550] sof-audio-pci 0000:00:1f.3: warning: widget type 1 name iDisp3_out not handled
[ 4.964808] sof-audio-pci 0000:00:1f.3: ASoC: Parent card not yet available, widget card binding deferred
[ 12.078072] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
[ 12.213026] sof-audio-pci 0000:00:1f.3: firmware boot complete
[ 33.018026] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
[ 33.148565] sof-audio-pci 0000:00:1f.3: firmware boot complete
[ 1063.565722] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
[ 1063.699750] sof-audio-pci 0000:00:1f.3: firmware boot complete
[ 1305.411469] sof-audio-pci 0000:00:1f.3: error: no reply expected, received 0x0
[ 1305.545349] sof-audio-pci 0000:00:1f.3: firmware boot complete
Integrated microphone not working at all.
Tried a few fixes that worked fron Yoga c940 IceLake but not working for the Cannon Lake version.
Been trying for months.
Environment
* Kernel: Linux 5.6.4-arch1-1 #1 SMP PREEMPT Mon, 13 Apr 2020 12:21:19 +0000 x86_64 GNU/Linux
* SOF: arch linux, sof-firmware 1.4.2-1
Similar report:
https://bugzilla.redhat.com/show_bug.cgi?id=1772498
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
CFLApplies to Coffee Lake platformApplies to Coffee Lake platformCommunityend-user or distro-reported issuesend-user or distro-reported issuesHDAApplies to HD-Audio bus for codec connectionApplies to HD-Audio bus for codec connectionbugSomething isn't workingSomething isn't workinguserspace
Activity
plbossart commentedon Apr 15, 2020
@aleksfadini the errors in the dmesg log are misleading, ignore them.
Can you please provide a link to the results of alsa-info ?
Also please try and capture at the hw level
arecord -Dhw:0,6 -c4 -r48000 -fS32_LE -d 10 mytest.wav
aplay -Dhw:0,0 mytest.wav
And please list what you have in /usr/share/alsa/ucm and /usr/share/alsa/ucm2.
Thanks!
aleksfadini commentedon Apr 16, 2020
Thank you for looking into this.
In reverse order:
Hw capture:
alsa-info attached
alsa.txt
plbossart commentedon Apr 16, 2020
ok, let's retry, looks like you only have 2 mics. We should be able to verify this with the following command:
amixer -Dhw:0 info
You should see something in there that list cfg-dmic:2 ?
arecord -Dhw:0,6 -c2 -r48000 -fS32_LE -d 10 testFile.wav
aplay -Dhw:0,0 testFile.wav
aleksfadini commentedon Apr 17, 2020
Thanks a lot for following up!
You are correct about 2 mics:
Recording and playing both worked!
What does it mean?
I apologize if that means I did not configure pulse right.
Apparently changing the volume through pulse (via polybar) crashes the system, and apps that usually work with mic do not seem to detect the microphone (gnome record, zoom, skype). Could you help me find a solution?
I installed arch on 4 other new machines and the same setup with pulse works out of the box.
Also, when I use bitwig (a music production software) somehow the cpu gets clogged immediately, where on other machines it has very little load. Jack, cadence or qjackctl do not seem to work.
To get any sound, I am adding this to my /etc/modprobe.d/alsa-base.conf:
options snd_hda_intel enable=1 index=1Which might do nothing because I also blacklisted these modules in blacklist.conf:
As suggested in the arch wiki https://wiki.archlinux.org/index.php/Lenovo_Yoga_c940
And I'm using this in my /etc/pulse.default.pa:
Pulseaudio calls the speakers "Cannon Lake PCH cAvs Speakers". Alsamixer on terminal shows bars with names of "PGA1.0 1", "PGA2.0 1","PGA3.0 1", "PGA4.0 1", "PGA7.0 1", "PGA8.0 1","PGA9.0 1". (sof-hda-dsp, Realtek ALC298). I don't understand any of this (why skip PGA 5 and 6?? what are those?)
The Lenovo Yoga c940 has 4 speakers, 2 of which seem to be the only working in Linux. I just learned now that it has "only" 2 mics... Why 2? Why "only"?
Sorry for the excess of information, but i've been tinkering for a couple of months trying to figure this out. I'm very confused. Any help is appreciated immensely!
PS If we solve this I'd be happy to update the arch wiki, which is not current and refers to a different CPU model.
plbossart commentedon Apr 17, 2020
ok, so the good news is that your hardware and drivers work fine, it's only PulseAudio configuration issues.
I think your /etc/pulse/client.pa should be:
load-module module-alsa-sink device=hw0,0 channels=2
load-module module-alsa-source device=hw:0,6 channels=2
You may have 4 speakers but the PCM device only supports 2, the 4 speakers are handled by the HDaudio codec.
And likewise since you have 2 mics you should not configure the PCM device to work with 4...
Those steps should be unnecessary if UCM was used? Can you confirm which version of alsa-lib you have, you need 1.2.2.1 to handle ucm2 and share the pulseaudio -vvv log (without the default.pa modified)? You may have to set autospawn=no to make this work.
aleksfadini commentedon May 6, 2020
Thank you for following up. I have been trying to learn more about this for 15 days and I'm still clueless.
My alsa-lib is 1.2.2-1 (from arch current repo).
I reinstalled pulseaudio, so I have the default etc/pulse/default.pa and no client.pa (although I also tried to configure default.pa as you suggested and did not help).
Pulse spawning is set to no.
This is my pulseaudio -vvv:
The problems that I have are:
1- mic not working
2- changing volume through i3/hotkey/polybar freezes the whole system (same config works on other 4 machines). If I press vol up or down three times in a row, mouse disappears (what's that!?) and audio keeps rising or lowering to max or min according to key pressed multiple times.
3- jackdbus cannot start, with various options I get something similar to this:
I am really clueless, everything works on other new machines, but this is a yoga Lenovo with 8 cores i9880h processor and I got this precisely for music production... I tried many things (including hdajackretask) but I'm not sure. I'm ok giving up on the 4 speakers to use only 2, but I need to fix the problems that entail changing volume and making jack work. In my experience something seems off from the kernel/alsa side of things.
Thank you for looking into this.
juimonen commentedon May 7, 2020
@aleksfadini your pulseaudio is still auto-spawning....
check that /etc/pulse/client.conf has autospawn = no
If you your system is using systemd you might also need to:
systemctl --user stop pulseaudio.socket && systemctl --user stop pulseaudio
then you should be able to start pulseaudio and get logs...
to make things as before, replace word "stop" with "start" in the above command
This is how it works at least in ubuntu 20.04.
aleksfadini commentedon May 8, 2020
Why did you say my pulseaudio is still auto-spawning? I don't think it is. I can kill it and it stays killed looking at the processes.
juimonen commentedon May 8, 2020
@aleksfadini so this was to help you get the pulseaudio logs, if someone was asking those. In your previous comments you have pulse logs, which don't say anything because pulseaudio is not starting properly as it is detecting previous running instance and bailing out.
Disabling pulse will not make your audio system work, it will just help to create some pulse/ucm related logs as you can start it properly from command line (that's what I meant with "working" in my comment).
3 remaining items
kv2019i commentedon Jun 3, 2020
@aleksfadini Could you take these out:
load-module module-alsa-sink device=hw0,0 channels=4
load-module module-alsa-source device=hw:0,6 channels=4
The log has no other errors than:
E: [pulseaudio] module.c: Failed to load module "module-alsa-sink" (argument: "device=hw:0,0 channels=4"): initialization failed.
E: [pulseaudio] module.c: Failed to load module "module-alsa-source" (argument: "device=hw:0,6 channels=4"): initialization failed.
Other than that, in this log, it states you have a headset connected and pulseaudio routes capture to that:
D: [pulseaudio] module-alsa-card.c: Jack 'Mic Jack' is now plugged in
D: [pulseaudio] device-port.c: Setting port [In] Headphones2 to status yes
D: [pulseaudio] device-port.c: Setting port [In] Mic to status yes
So you it will record from the headset, not the integrated digital microphone. If you don't in fact have a headset connected, alsa-info output would be useful. The related ALSA mixer control is "Headphone Mic Jack".
juimonen commentedon Jun 3, 2020
@aleksfadini I have pretty similar device x1 yoga (probably with i7) and stock ubuntu 20.04 and for me internal mic and sounds seems to work out of the box... I'm not sure about the differences to arch linux..
aleksfadini commentedon Jun 21, 2020
@kv2019i
I took out those two lines (although they were recommended in the arch linux page https://wiki.archlinux.org/index.php/Lenovo_Yoga_c940#Audio) and still have all the issues. Never had a headset connected.
What log can I provide to investigate this?
danielcherubini commentedon Jun 22, 2020
I’m the author of that arch c940 page. I have just this week started to have issues again. I’m not sure what’s going on, so I defaulted back to using Intel audio drivers. I’ll try and debug it this week. But if what I’m reading above is correct then the alsa config in pulseaudio has stopped working.
What’s weird is in pulse audio preferences I can see the volume bars moving, meaning sound is getting to pulse, but probably not to alsa. So either I upgraded alsa and created an issue, or something else.
aleksfadini commentedon Jun 22, 2020
Hi Daniel, thank you for the write up of the arch c940 page (it really helped!).
First off, my c940 is the 15' with i9 CoffeLake processor, so some things were always different. But yes, this week everything became worse even on other machines. I have no idea if it is sof, alsa, the kernel or pulseaudio but it's a whole mess.
Could you explain how are you using Intel audio drivers exactly?
I can provide any logs that any of you guys who understand this need. Let me know.
danielcherubini commentedon Jun 23, 2020
I rolled back Alsa and its other packages back to 2.2.2 and everythings working again
sudo pacman -U /var/cache/pacman/pkg/alsa-lib-1.2.2-1-x86_64.pkg.tar.zst /var/cache/pacman/pkg/alsa-plugins-1:1.2.2-2-x86_64.pkg.tar.zst /var/cache/pacman/pkg/alsa-topology-conf-1.2.2-2-any.pkg.tar.zst /var/cache/pacman/pkg/alsa-ucm-conf-1.2.2-1-any.pkg.tar.zst /var/cache/pacman/pkg/alsa-utils-1.2.2-1-x86_64.pkg.tar.zst /var/cache/pacman/pkg/lib32-alsa-lib-1.2.2-1-x86_64.pkg.tar.zstkv2019i commentedon Jun 24, 2020
@danielcherubini Can you post your "alsa-info" output as well? On @aleksfadini 's machine, it seems Mic is reported to be connected, so Pulseaudio will by default record from there (and not the integrated digital mic):
https://github.com/thesofproject/sof/files/4484793/alsa.txt
...
control.16 {
iface CARD
name 'Mic Jack'
value true
We can't really fix this in SOF driver&firmware, so for this specific problem, I'd recommend filing to ALSA bugtracker where the codec driver issues are tracked.
For @danielcherubini , the new problems you've seen, that sounds like something else. I know Jaroslav from Fedora has done many cleanups to UCM code , so I'd suspect some regression with those changes and the Pulseaudio version in Arch. If you reproduce the problem, we'd need reproduce steps, alsa-info output, pulseaudio verbose log and kernel log to analyze.
kv2019i commentedon Dec 8, 2020
@aleksfadini Is this issue still occuring for you? Based on the last updates, the remaining issue is in the codec driver and better handled in ALSA bugtracker/list.
aleksfadini commentedon Dec 8, 2020
@kv2019i Yes, still having the same issues. Would you know how how/where I can report the issues properly?
plbossart commentedon Dec 8, 2020
@aleksfadini you may want to look at https://thesofproject.github.io/latest/getting_started/index.html#debugging-audio-issues-on-intel-platforms
kv2019i commentedon Dec 8, 2020
@aleksfadini Based on comment @danielcherubini made, there was some Arch specific issue with ALSA and/or Pulseaudio and it was resolved by rolling back the versions. Your issue does sound similar as we've already verified that audio works at the kernel/driver level, so this is likely to be a Arch specific issue.
Have you tried a recent Fedora or Ubuntu live image?
aleksfadini commentedon Dec 8, 2020
@kv2019i I can definitely try that, just to rule out Arch specific issues. Will do.
plbossart commentedon Jun 10, 2021
no update in 6+ months, closing.