-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[BUG] Failed to use SOF on HP zbook 15 G6 #1985
Comments
@elorriaux that looks like a known issue where an external NVIDIA GPU is used, the log is similar to #1658 @kv2019i I think you fixed this with #1731, but can it be back-ported to 5.5-stable? |
@plbossart thanks Pierre for the quick answer. Actually you're wright my IT disabled the intel graphics card, I did not pay attention to that. If I reactivate it I can go through that error but my X server does not work anymore, and my other distro does not boot anymore. So I will probably have to I was also wrong regarding the firmware, the next error is that sof-cfl.ri is missing. |
@plbossart Ack, this is fixed by upstream commit "ASoC: SOF: Intel: hda: allow operation without i915 gfx" . This is currently not queued even for 5.6, so only in 5.7 queue. Mark wasn't happy recently with the volume of changes to 5.5, so not sure if this is accepted. There is going to be a fair amount of patches, so maybe this is still worth it. UPDATE: @plbossart I'll try the patches on top of 5.5.y and if seems good, I'll send a mail to alsa-devel about this. Not 100% what's the Mark preferred process to pick up older patches for stable, but I'll follow what Jaroslav did (the most recent example I could find). |
@plbossart @elorriaux Hmm, backport to 5.5.y is not really straightforward. A minimum set requires many more patches than the one mentioned. I backported three patches, but then realized that the upstream fix depends on the refactored machine selection code (in 5.5.y, bus probe is done after machine driver selection, so the upstream logic to ignore lack of i915 won't work). Backport to 5.5.y within limits of stable kernel rules (all patches need to be in upstream, <100 lines), does not seem feasible. |
@kv2019i I think we need to start thinking about a 5.5 SOF branch, it'd still be useful for a number of people who have non-functional devices. You can argue that 5.6 is just around the corner though but some distros will stick with 5.5. Some will even stick with 5.4 LTS. |
Hi, I tried to configure bumblebee to keep intel built-in grapĥics card enabled and it solves my initial error, I can go further but it fails to load the firmware (I symlinked sof-cfl.ri tp sof-cfl.ri): dmesg | grep audio ls /lib/firmware/intel/sof/sof-cfl.ri -alrt (firmware version 1.4.2) |
@elorriaux you sure about the symlink? If the file was in the right location it'd be a different error... |
@plbossart That's the first thing I checked. You are confirming that I should continue to check in that direction. I guess that read permission on cof-cnl.ri should be sufficient? I simply took sof-cnl-v1.4.2.ri from https://github.com/thesofproject/sof/releases and copied it to /lib/firmware/intel/sof/sof-cnl.ri and then created a sof-cfl.ri symlink. I'll try to copy it directly with the right name without symlink. |
@elorriaux try to use the go.sh script, it does all the symlinks for you |
Reinstalled all the firmwares with the go.sh script, not exactly the same error msg: dmesg | grep audio |
@elorriaux what was the script output ? You will need to run as root/sudo as it will be installing files under /lib/firmware (or wherever your distro places system firmware) |
everything was done with root account. ./go.sh ls -alrt /lib/firmware/intel/sof If you pay attention on dmesg logs, the usage of the script to install firmware causes one additional line compared to the firmware install I did manually: [ 4.131533] sof-audio-pci 0000:00:1f.3: error: codec #0 probe error, ret: -2 |
Forgot to add a listing to the directory where the link is pointing at: ls -alrt /lib/firmware/intel/sof/v1.4.2/intel-signed/ |
4 seconds, which means early boot... Do you have an initramfs? It's possible you may need to add the /lib/firmware/intel/sof and /lib/firmware/intel/sof-tplg folders inside the initramfs. root ignores read/write permissions and so should the kernel module itself. |
maybe a red-herring but do you compile all SOF stuff as modules? if you use built-ins the request_firmware won't work. Also the error you have shows a problem with HDMI, so are you sure you are using the intel card? |
Ouch, you @elorriaux seem to be hitting many issues. Thanks for trying and reporting back. You could try reloading "modprobe -r snd_sof_pci ; modprobe snd_sof_pci" after the system has booted. If the issue is with firmware files missing from initramfs, that should work around that. @plbossart wrote:
#0 is still the external HDA codec. I'm afraid this is a case of #1807 I've been waiting for the reporter of that one to try my patch: Or both symptoms are explained by what @plbossart described, e.g. not building SOF as module. That could explain the errors. |
@paulstelian97 good remark, I don't use initramfs but I can include the firmware when compiling the kernel @plbossart No I was not using modules, I'll search in that direction. And yes I was using the intel card, when intel card is disabled in the BIOS, I'm getting the error described at the beginning of the bug: [ 4.125485] sof-audio-pci 0000:00:1f.3: error: init i915 and HDMI codec failed as soon as I enable hybrid graphics and add i915.enable_guc=2 to the kernel line I can go through that. |
@elorriaux To remove any timing or resource dependency, can you first blacklist snd-sof-pci, then after boot do a manual modprobe snd-sof-pci. |
Another trick @elorriaux is to add the attached file as /etc/modprobe.d/sof-dyndbg.conf, that will generate a longer dmesg trace and help us figure out what's going on. don't copy/paste the results, attach a file or provide a link, thanks! |
So, using modules instead of built in kernel solved the question, no need to blacklist the module. The firmware seems to be successfully loaded, there remains one error, I don't know if it's critical. [ 6.110301] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100 At the end I have no sound and no mic, I've upgraded pulseaudio to version 13.99.1, alsa 1.2.2. From now I don't know in which direction I should search. @plbossart: here is the dmesg log with dynamic debug (had to add CONFIG_DYNAMIC_DEBUG) in my kernel. Other strange thing, I used to build snd-hda-intel in the kernel to get sound, now I'm trying to load it as a module but I can't get sound after the module is loaded, and the dmesg states that snd-hda-intel is trying to use SOF for DMIC... [ 2027.208939] snd_hda_intel 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100 |
@elorriaux that's progress you now boot successfully and detect HDAudio cards ([ 6.119405] sof-audio-pci 0000:00:1f.3: hda codecs found, mask 5 Can you try and do aplay -l and arecord -l, you should now see playback and capture devices. and should be able to play/capture using the -Dhw:0,x devices (replace x by what you see). Let's take pulseaudio separately. |
ah and also don't use snd-hda-intel, it cannot be used for capture. You need SOF to deal with the digital mics. |
@plbossart for snd-hda-intel I was just trying to get sound while sof is not operational. When loading snd-sof-pci, I don't have any interface: ~ # aplay -l |
@elorriaux I don't know what to tell you except: please retry and check that you did remove blacklists or did a manual modprobe snd-sof-pci |
@elorriaux wrote:
Did you run these as root (seems so but just checking)? On most distros, only members of "audio" group can access the ALSA device nodes so "aplay -l" as a normal user will not report any soundcards. But as root it should work. The log in https://github.com/thesofproject/sof/issues/2623#issuecomment-609033760 seems good, no errors anymore, firmware is loaded and probe works for the all codecs. When you load snd-sof-pci, could you still send the output of "alsa-info.sh". There's still something we are missing. |
@plbossart I did so many attempts ;) I've even tried to upgrade to a 5.6.2 kernel without more success. Loading snd-sof-pci when booting or after booting does not change anything. My blacklist is empty (my system does not load snd-hda-intel automatically) @kv2019i yes I ran scripts as root and my users ares in audio group alsa-info: http://alsa-project.org/db/?f=b47e6e3b699a29d2769da51f8cd0acfa65807468 Is there a live distro with recent enough kernel and which is known to work for such a hardware? |
@elorriaux wrote:
With newer kernel's there is a mechanism to decide automatically which driver to choose. You can force a specific choice by putting to e.g. /etc/modprobe.d/blacklist-dsp.conf
|
@elorriaux wrote:
Ack, this confirms the driver load did not complete. You have no PCM devices:
In your dynamic-dbg log, it would seem init of snd_soc_skl_hda_dsp machine driver does not happen at all. It also seems the module is not loaded based on your alsa-info output. A few things to try:
I'm not aware of other HP zbook15g6 users that have tried SOF, so there are no verified to work cases. You could try Fedora Rawhide Live, but it's a bit of a stretch as there is nothing wrong in your current config that would explain the problems. |
@kv2019i : you are actually pointing at something I've investigated yesterday after looking at that thread https://github.com/thesofproject/sof/issues/2275 So yes snd-soc-skl_hda_dsp is enabled and compiled as module. My blacklist.conf is empty, and if I don't load modules by myself, nothing is loaded for audio devices (snd-hda-intel). Here is a dmesg log, where I modprobe snd-sof-pci after X login, and then modprobe snd-soc-skl_hda_dsp. And alsa-info: http://alsa-project.org/db/?f=45578fbc786fd50fc89363ac494a38c27be525ac Since installing gentoo is just like starting from a white page, I would not be surprised that I forgot something... I forgot to mention that I've also tried to generate a kernel with the genkernel tool which results in a generic kernel conf as the one which is used in gentoo live dvd. I'll try to have a look to Fedora live... Since I really don't see where to look. |
@plbossart I suspect it is related to the option proposed by @kv2019i here #1917 (comment) |
@plbossart I confirm, removing it solves errors in dmesg. I've even been thinking that everything -rcwas working fine with that kernel and options snd_sof_intel_hda_common use_common_hdmi=Y... but after a few minutes it froze... |
@elorriaux D'oh, ok -- I think I figured what is still missing. It seems alsa-ucm-1.2.2 is missing one patch that is needed on systems with external GPU. The patch was merged on March 5 to alsa-ucm to git, so I was under assumption it is in 1.2.2, but alas, I did not check, now I did it is not there. But that explains why Pulseaudio keeps on trying to open the HDMI3 device on your system. Here's the patch that is missing: You can either take latest alsa-ucm-conf from git master, or just take the Hdmi.conf file and copy it to /usr/share/alsa/ucm2/sof-hda-dsp/Hdmi.conf Without this, you get problems with Pulseaudio (independently from the #1917 setting of codec_mask). |
@kv2019i I repackaged alsa-ucm-conf from git to get the right Hdmi.conf. But I've not been able to get a pulseaudio log, it freezes almost immediately and pulseaudio log is empty :/ |
Ack, thanks @elorriaux . Did you have the HDMI codec filtered out with codec_mask (i.e. #1917 (comment) ) when you did the test? |
@kv2019i arg no, I forgot to reactivate it after #1985 (comment) Anyway I uncommented it and it continues to freeze, most of the time right after I load sound modules. However during one attempt, I managed to get logs before freezing (I still don't have identified why some attempts are able to last longer than others before freezing). In dmesg there are 3 lines that do not appear regarding hdmi devices |
@elorriaux Ok thanks! The logs now good. Pulseaudio no longer gets fooled with the non-existent i915 HDMI nodes, so this is good. Now the "only" thing left are the freezes. There's something positive to report on that front in that we have now reproduced this on another machine that we have in the team, which makes the debug faster: |
@kv2019i I feel a little bit less alone ;) Is the firmware available for testing purpose? |
@elorriaux wrote:
Heh indeed - you've really hit a multitude of issues with your machine. There are rc candidate releases of the firmware at https://github.com/thesofproject/sof/releases (upto rc4 now), but unfortunately your system only works with production signed firmwares and the rc candidates won't work. So you'll have to wait a bit longer. |
Yesterday I thought that I fixed this problem on my laptop (see #2065 (comment) for the "solution"). I have working microphone and speakers, but my system freezes randomly. There are too many comments for this issue so I'm confused a little (in what setup, when, etc. someone's computer freezes). My observations are:
My setup is described in the first comment of #2065. I also have an additional display connected through HDMI port. Sometimes my computer freezes when I change settings with alsamixer. Other times I'm simply listening to music on youtube (chrome + pulseaudio) and after a while (like 40 minutes after booting my computer) music stops playing. After that I have 5-20 seconds (so I can type I could compile and try newer sof firmware or something but to be honest I'm sick and tired of fixing sound on my Linux laptop. Maybe next week I will try again (with different firmware or try to make it more reproducible and less random). |
@dzikages555 : stop compiling and searching, just wait for signed binaries of sof 1.5 ;) You cannot go really further at the moment. |
@elorriaux wrote:
Ack on that. I'm afraid @dzikages555 you hit one more issue. We have a fix coming in FW, but you'll have to wait until release of the signed firmware. See #1985 (comment) for the history. |
@elorriaux @dzikages555 and others, signed v1.5 firmware is now available for testing: |
@kv2019i test in progress, no freeze so far. Should I keep these lines? #options snd_sof_intel_hda_common codec_mask=0x1 I currently have discrete GPU disabled, I also have to test if everything is OK once I will re-enable it. |
@elorriaux wrote:
Thanks for the quick test and good to hear the results so far. As for the parameters, if HDMI is working, you can keep them commented out.
Ack, it should work much the same way with discrete GPU enabled. HDMI audio will not go via SOF anymore, but that should be it. |
@kv2019i seems to work with discrete GPU too |
Thank you @elorriaux for testing once more. I'll go ahead and close this bug now. |
@kv2019i Actually not fully tested, I don't know what I did exactly when I tried with discrete GPU, but nvidia drivers do not work with 5.7 kernels yet, so difficult to conclude. The patch I've tried do not allow me to get my X server working with nvidia and 5.7 kernel. I can only confirm that it works with intel GPU |
@kv2019i I can confirm it works. Thank you guys! My setup is:
Digital microphone is working. Headphones and speakers are working. No freezes with v1.5 firmware. |
Small feedback, everything seems to work without freezes. The only issue concerns the digital mic level, it works but it's almost impossible to hear anything unless I push the speaker level to the maximum, and the sound level is still very very low. I remember in the early tests with SOF 1.4 that I was able to record and listen correctly to my voice when testing the mic. Does anybody has an idea where this issue can come from ? I'm still using SOF 1.5, haven't tried 1.5.1 yet, I don't know if it can change something. |
@elorriaux we had "amplifying" eq on the dmic path, then it was removed (for some reason), and then we put it back.... So you might have this time-wise "middle ground" topology without the amplification, or then there is just some volume component in low volume in the dmic path. You should be able to load newer/older topologies without signing, so if you have time, you could try out the latest corresponding topology for your platform from sof repositories. So you could just copy over the old topology and see what happens. |
@juimonen thanks for the answer, I've just updated to 1.5.1 and it looks like to work fine ! |
Hello, I don't know if I should continue this thread or open another one. There is still a small glitch on my system, from time to time, without being able to identify the root cause, my speaker stops working. I've never been able to find a way to get back the sound when it happens, I just know that the mic is still working as people can still hear me during meetings. The only way to get back the speaker working correctly is to shut down the machine (reboot does not solve anything). For a long time I was running kernel 5.7.7 and SOF 1.5.1. I've updated my kernel to 5.10.27 and SOF 1.6.1 and the problem persists. This is quite difficult to investigate since I don't have anything in dmesg and that it occurs randomly, the laptop can work for days without any trouble... Are there similar experiences / issues? I could not find any info in issues. |
this should be added as a new issue @elorriaux The fact that the speakers don't work but the mic does makes me think there is a codec configuration issue or something. When SOF fails it typically fails big. Also we reset the DSP and re-download the firmware on each suspend-resume or reboot, so requiring a power cycle looks like a problem on the amplifier side. |
Describe the bug
dmesg reports:
[ 4.122285] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if info 0x040100
[ 4.122812] sof-audio-pci 0000:00:1f.3: Digital mics found on Skylake+ platform, using SOF driver
[ 4.123269] sof-audio-pci 0000:00:1f.3: enabling device (0000 -> 0002)
[ 4.123798] sof-audio-pci 0000:00:1f.3: warning: No matching ASoC machine driver found
[ 4.124252] sof-audio-pci 0000:00:1f.3: DSP detected with PCI class/subclass/prog-if 0x040100
[ 4.124851] sof-audio-pci 0000:00:1f.3: use msi interrupt mode
[ 4.125485] sof-audio-pci 0000:00:1f.3: error: init i915 and HDMI codec failed
[ 4.126042] sof-audio-pci 0000:00:1f.3: error: failed to probe DSP -19
[ 4.126496] sof-audio-pci 0000:00:1f.3: error: sof_probe_work failed err: -19
Impact
Cannot use built-in mic on this laptop
Environment
Screenshots or console output
lspci -nn
00:00.0 Host bridge [0600]: Intel Corporation 8th Gen Core Processor Host Bridge/DRAM Registers [8086:3ec4] (rev 07)
00:01.0 PCI bridge [0604]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor PCIe Controller (x16) [8086:1901] (rev 07)
00:04.0 Signal processing controller [1180]: Intel Corporation Xeon E3-1200 v5/E3-1500 v5/6th Gen Core Processor Thermal Subsystem [8086:1903] (rev 07)
00:12.0 Signal processing controller [1180]: Intel Corporation Cannon Lake PCH Thermal Controller [8086:a379] (rev 10)
00:14.0 USB controller [0c03]: Intel Corporation Cannon Lake PCH USB 3.1 xHCI Host Controller [8086:a36d] (rev 10)
00:14.2 RAM memory [0500]: Intel Corporation Cannon Lake PCH Shared SRAM [8086:a36f] (rev 10)
00:15.0 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH Serial IO I2C Controller #0 [8086:a368] (rev 10)
00:15.1 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH Serial IO I2C Controller thesofproject/sof#1 [8086:a369] (rev 10)
00:16.0 Communication controller [0780]: Intel Corporation Cannon Lake PCH HECI Controller [8086:a360] (rev 10)
00:17.0 SATA controller [0106]: Intel Corporation Cannon Lake Mobile PCH SATA AHCI Controller [8086:a353] (rev 10)
00:1b.0 PCI bridge [0604]: Intel Corporation Cannon Lake PCH PCI Express Root Port thesofproject/sof#17 [8086:a340] (rev f0)
00:1c.0 PCI bridge [0604]: Intel Corporation Cannon Lake PCH PCI Express Root Port thesofproject/sof#3 [8086:a33a] (rev f0)
00:1c.4 PCI bridge [0604]: Intel Corporation Cannon Lake PCH PCI Express Root Port thesofproject/sof#5 [8086:a33c] (rev f0)
00:1d.0 PCI bridge [0604]: Intel Corporation Cannon Lake PCH PCI Express Root Port thesofproject/sof#9 [8086:a330] (rev f0)
00:1d.5 PCI bridge [0604]: Intel Corporation Cannon Lake PCH PCI Express Root Port thesofproject/sof#14 [8086:a335] (rev f0)
00:1f.0 ISA bridge [0601]: Intel Corporation Device [8086:a30e] (rev 10)
00:1f.3 Multimedia audio controller [0401]: Intel Corporation Cannon Lake PCH cAVS [8086:a348] (rev 10)
00:1f.4 SMBus [0c05]: Intel Corporation Cannon Lake PCH SMBus Controller [8086:a323] (rev 10)
00:1f.5 Serial bus controller [0c80]: Intel Corporation Cannon Lake PCH SPI Controller [8086:a324] (rev 10)
00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection (7) I219-LM [8086:15bb] (rev 10)
01:00.0 VGA compatible controller [0300]: NVIDIA Corporation TU117GLM [Quadro T1000 Mobile] [10de:1fb9] (rev a1)
01:00.1 Audio device [0403]: NVIDIA Corporation Device [10de:10fa] (rev a1)
02:00.0 Non-Volatile memory controller [0108]: ADATA Technology Co., Ltd. XPG SX8200 Pro PCIe Gen3x4 M.2 2280 Solid State Drive [1cc1:8201] (rev 03)
03:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader [10ec:525a] (rev 01)
05:00.0 PCI bridge [0604]: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] [8086:15ea] (rev 06)
06:00.0 PCI bridge [0604]: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] [8086:15ea] (rev 06)
06:01.0 PCI bridge [0604]: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] [8086:15ea] (rev 06)
06:02.0 PCI bridge [0604]: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] [8086:15ea] (rev 06)
06:04.0 PCI bridge [0604]: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 4C 2018] [8086:15ea] (rev 06)
07:00.0 System peripheral [0880]: Intel Corporation JHL7540 Thunderbolt 3 NHI [Titan Ridge 4C 2018] [8086:15eb] (rev 06)
3b:00.0 USB controller [0c03]: Intel Corporation JHL7540 Thunderbolt 3 USB Controller [Titan Ridge 4C 2018] [8086:15ec] (rev 06)
70:00.0 Non-Volatile memory controller [0108]: Sandisk Corp WD Black 2018/PC SN720 NVMe SSD [15b7:5002]
71:00.0 Network controller [0280]: Intel Corporation Wi-Fi 6 AX200 [8086:2723] (rev 1a)
The text was updated successfully, but these errors were encountered: