Closed Denisuu closed 2 years ago
I also submitted an issue for this thesofproject/linux#3465 . I also have the same type of device as you, HP Chromebook 14a (BLOOGLET)
So I think thesofproject/linux#3465 is different, as it looks like we are missing an ingredient (suspect codec??) driver/config upstream (and hence the SOF driver is not fully being bound). This issue is different as driver binding takes place but the FW fails to load.
@Denisuu I suspect this is the FW failing to be verified by the signing mechanism. i.e. the key used to validate is different to the key used to sign the FW you have tried. Each SOF release is signed with two keys (production and community) giving us two binaries for each target (same version and functionality,but signed with different keys) can you try both FWs to rule out the wrong key. You may need to manually copy the FW files here to test this.
So I think thesofproject/linux#3465 is different, as it looks like we are missing an ingredient (suspect codec??) driver/config upstream (and hence the SOF driver is not fully being bound). This issue is different as driver binding takes place but the FW fails to load.
I think it's different because he ran this script sof-audio-setup as instructed in the audio section of the Breath docs. Can you confirm this? @J0shuaT
I suspect this is the FW failing to be verified by the signing mechanism. i.e. the key used to validate is different to the key used to sign the FW you have tried. Each SOF release is signed with two keys (production and community) giving us two binaries for each target (same version and functionality,but signed with different keys) can you try both FWs to rule out the wrong key. You may need to manually copy the FW files here to test this.
Previously I tried the packages below, then the ones for Ubuntu Jammy through the same site because they go up to 1.9.1 Binary package “firmware-sof-signed”
I don't quite understand what I need to do now? Do I get the latest 2.0 package from here: Thesofproject releases then follow the documentation here? thesofproject.github.io Where do I need to manually copy FW files?
@Denisuu yes, please follow the docs. Also please take a look here https://github.com/thesofproject/sof-bin/tree/main/v2.0.x/sof-v2.0
The sof-bin repo has scripts to update and install releases. There are Intel signed and community signed FW binaries.
IIUC the SOF kernel will detect a chromebook and try the community signed FW rather than trying the link in /lib/firmware/intel/sof/sof-glk.ri.
You may need to manually overwrite the community sof-glk.ri (under the community directory) and the soft link sof-glk.ri with the version from sof-bin you want to force using a different signed binary.
@Denisuu I am actually running Ubuntu with Mr. Chromeboxes test firmware. The audio was like this out-of-the-box.
@lgirdwood Ok, I read the documentation and entered the commands below. Audio still doesn't work, did I do something wrong?
Would any of these invironments be prefered to do the testing on?
Commands I entered:
git clone https://github.com/thesofproject/sof-bin.git
cd sof-bin/
mv ~/sof-bin/v2.0.x/sof-v2.0/community/* ~/sof-bin/v2.0.x/sof-v2.0/
rm -r ~/sof-bin/v2.0.x/sof-v2.0/community/
rm -r ~/sof-bin/v2.0.x/sof-v2.0/intel-signed/
cd v2.0.x/
sudo rsync -a sof-v2.0 /lib/firmware/intel/
sudo ln -s sof-v2.0 /lib/firmware/intel/sof
sudo ln -s sof-tplg-v2.0 /lib/firmware/intel/sof-tplg
sudo rsync tools-v2.0/* /usr/local/bin
sudo init 6
sudo dmesg
dmesg snippit:
[ 7.481664] snd_hda_intel 0000:00:0e.0: attach allowed to drvr sof-audio-pci-intel-apl [internal device]
[ 8.941696] pci 0000:00:0e.0: attach allowed to drvr sof-audio-pci-intel-apl [internal device]
[ 8.941728] sof-audio-pci-intel-apl 0000:00:0e.0: DSP detected with PCI class/subclass/prog-if info 0x040100
[ 8.942055] sof-audio-pci-intel-apl 0000:00:0e.0: DSP detected with PCI class/subclass/prog-if 0x040100
[ 8.942183] sof-audio-pci-intel-apl 0000:00:0e.0: bound 0000:00:02.0 (ops i915_audio_component_bind_ops)
[ 8.961116] sof-audio-pci-intel-apl 0000:00:0e.0: attach allowed to drvr snd_soc_skl [internal device]
[ 8.968125] sof-audio-pci-intel-apl 0000:00:0e.0: use msi interrupt mode
[ 8.976912] sof-audio-pci-intel-apl 0000:00:0e.0: attach allowed to drvr snd_hda_intel [internal device]
[ 8.979009] sof-audio-pci-intel-apl 0000:00:0e.0: hda codecs found, mask 4
[ 8.981088] sof-audio-pci-intel-apl 0000:00:0e.0: Direct firmware load for intel/sof/sof-glk.ri failed with error -2
[ 8.981094] sof-audio-pci-intel-apl 0000:00:0e.0: error: request firmware intel/sof/sof-glk.ri failed err: -2
[ 8.981099] sof-audio-pci-intel-apl 0000:00:0e.0: you may need to download the firmware from https://github.com/thesofproject/sof-bin/
[ 8.981101] sof-audio-pci-intel-apl 0000:00:0e.0: error: failed to load DSP firmware -2
[ 8.989379] max98357a MX98357A:00: GPIO lookup for consumer sdmode
[ 8.989382] max98357a MX98357A:00: using ACPI for GPIO lookup
[ 8.989385] acpi MX98357A:00: GPIO: looking up sdmode-gpios
[ 8.989387] acpi MX98357A:00: GPIO: looking up sdmode-gpio
[ 8.989390] acpi MX98357A:00: GPIO: _DSD returned MX98357A:00 0 0 0
[ 8.989466] gpio gpiochip1: Persistence not supported for GPIO 15
[ 8.995230] sof-audio-pci-intel-apl 0000:00:0e.0: error: sof_probe_work failed err: -2
[ 8.981088] sof-audio-pci-intel-apl 0000:00:0e.0: Direct firmware load for intel/sof/sof-glk.ri failed with error -2 [ 8.981094] sof-audio-pci-intel-apl 0000:00:0e.0: error: request firmware intel/sof/sof-glk.ri failed err: -2 [ 8.981099] sof-audio-pci-intel-apl 0000:00:0e.0: you may need to download the firmware from https://github.com/thesofproject/sof-bin/ [ 8.981101] sof-audio-pci-intel-apl 0000:00:0e.0: error: failed to load DSP firmware -2
Can you try and copy and test (one by one) the sof-glk.ri files (from the sof-bin rep, intel-signed and community-signed directories) to /lib/firmware/intel/sof/
This will allow the SOF driver to try both the intel and community signed GLK FW binaries.
There's no issue loading the community firmware on GLK Chromebooks, it works fine here on mine. The issue appears to be isolated to models using the the da7219+max98357a combo; ones using rt5682+max98357a are working (at least for main speaker output).
Can you try and copy and test (one by one) the sof-glk.ri files (from the sof-bin rep, intel-signed and community-signed directories) to
/lib/firmware/intel/sof/
This will allow the SOF driver to try both the intel and community signed GLK FW binaries.
@lgirdwood I just tried the intel-signed files, same thing. What do you mean one by one? You mean mixing intel-signed and community signed. That's a lot of possible combinations!
There's no issue loading the community firmware on GLK Chromebooks, it works fine here on mine. The issue appears to be isolated to models using the the da7219+max98357a combo; ones using rt5682+max98357a are working (at least for main speaker output).
@MrChromebox I think it might be all devices that have da7219
.
CASTA doesn't have working audio either. It gives exactly the same output as BLOOGLET when showing the contents of /proc/asound/cards
I'm going to switch to Manjaro on your custom firmware again for testing because I'm not sure if I should run Milkydeveloper's script each time I make a change. I uncommented line 20, tried with and without the script each time.
I don't even get to see the dummy output on Breath I always get: Establishing connection to PulseAudio. Please wait...
The kernel still request a firmware under /lib/firmware/intel/sof/sof-glk.ri, so I suspect that you are using an old kernel. New kernel will request /lib/firmware/intel/sof/community/sof-glk.ri
Direct firmware load for intel/sof/sof-glk.ri failed with error -2
request firmware intel/sof/sof-glk.ri failed err: -2
I just flashed mr.Chromebox UEFI firmware and installed Manjaro and updated to the latest kernel. Tried installing sof-bin
community as mentioned above. Then tried installing the latest sof-firmware
from AUR.
Still no output device! :(
sof-firmware and kernel version:
[denisuu@BLOOGLET ~]$ pacman -Qi sof-firmware | grep Version
Version : 2.0-1
[denisuu@BLOOGLET ~]$ uname -r
5.16.2-2-rt19-MANJARO
[denisuu@BLOOGLET ~]$ lsb_release -r
Release: 21.2.4
cards:
/proc/asound/cards
doesn't show: sof-glkda7219ma - sof-glkda7219max
like it does on stock ChromeOS kernel.
[denisuu@BLOOGLET ~]$ cat /proc/asound/cards
0 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0x91418000 irq 122
Snippit of dmesg:
[denisuu@BLOOGLET ~]$ sudo dmesg | grep -e sof- -e glk -e snd -e hda
[ 2.752550] Modules linked in: snd_compress syscopyarea ac97_bus cros_ec_typec(+) sysfillrect processor_thermal_device_pci_legacy(+) sysimgblt processor_thermal_device snd_pcm_dmaengine snd_hwdep i2c_i801(+) fb_sys_fops fjes(-) intel_lpss_pci(+) processor_thermal_rfim typec snd_pcm cec i2c_smbus processor_thermal_mbox lpc_ich tpm_tis_spi intel_lpss processor_thermal_rapl roles cros_usbpd_notify rfkill tpm_tis_core intel_gtt intel_rapl_common idma64 dwc3_pci snd_timer agpgart intel_soc_dts_iosf tpm i2c_hid_acpi cros_ec_lpcs snd intel_vbtn int3403_thermal cros_ec chromeos_tbmc soc_button_array sparse_keymap i2c_hid elants_i2c rng_core soundcore elan_i2c int340x_thermal_zone video int3400_thermal acpi_thermal_rel cros_kbd_led_backlight intel_pmc_bxt mac_hid coreboot_table drm uinput crypto_user fuse bpf_preload ip_tables x_tables ext4 crc32c_generic crc16 mbcache jbd2 mmc_block serio_raw atkbd libps2 sdhci_pci crc32c_intel cqhci i8042 sdhci xhci_pci mmc_core xhci_pci_renesas serio
[ 2.921116] snd_hda_intel 0000:00:0e.0: DSP detected with PCI class/subclass/prog-if info 0x040100
[ 3.224460] i915 0000:00:02.0: [drm] Finished loading DMC firmware i915/glk_dmc_ver1_04.bin (v1.4)
[ 3.281825] snd_hda_intel 0000:00:0e.0: bound 0000:00:02.0 (ops i915_audio_component_bind_ops [i915])
Full dmesg:
@lgirdwood I just tried the intel-signed files, same thing. What do you mean one by one? You mean mixing intel-signed and community signed. That's a lot of possible combinations!
Sorry, I mean trying both sof-glk.ri files for the SOF version you want. One is signed by the Intel key and the other by the community key. This would help and rule out signing issues.
@Denisuu your last dmesg contains nothing related to SOF, possibly due to another bug
RIP: 0010:cros_ec_check_features+0xa/0xa0
You may want to do a blacklist snd-sof-pci-intel-apl, reboot, dmesg -C, modprobe snd-sof-pci-intel-apl, that way we can see what's really going on.
Also add this file sof-dyndbg.conf.txt as /etc/modprobe.d/sof-dyndbg.conf prior to the reboot, it'll show a more verbose dmesg log.
@Denisuu I have the same problem. I am running Ubuntu with Mr. Chromeboxes UEFI test firmware, and /proc/asound/cards
, shows this:
0 [PCH ]: HDA-Intel - HDA Intel PCH HDA Intel PCH at 0x91418000 irq 124
@lgirdwood I tried both, so I don't think it's a signing issue. @J0shuaT Thanks for checking and sharing your dmesg.
@plbossart I did all the steps as described. I also blacklisted kvm
and kvm_intel
because the machine won't fully shut-down, it hangs on 'kvm: exiting hardware virtualization'
Here' s the output of dmesg: modprobe snd-sof-pci-intel-apl
This doesn't look great either, it's a big red block in my dmesg.
[ 2.752388] BUG: kernel NULL pointer dereference, address: 0000000000000364
[ 2.752392] #PF: supervisor read access in kernel mode
[ 2.752394] #PF: error_code(0x0000) - not-present page
@Denisuu @J0shuaT please attach your dmesg logs, it's horrible if you copy/paste in GitHub
@plbossart Here: https://pastebin.com/G5rDaEBn
@plbossart Here: https://pastebin.com/G5rDaEBn
I meant use the GitHub "attach files' below the comment box. and sorry but no there is still nothing related to SOF in there.
@plbossart Here: https://pastebin.com/G5rDaEBn
I meant use the GitHub "attach files' below the comment box. and sorry but no there is still nothing related to SOF in there.
I am supposed to attach the dmesg as .txt file?
The same here, still nothing sof related in dmesg.
Could it be because it detects the wrong cards?
Manjaro & Ubuntu (Mr.Chromebox UEFI):
[denisuu@BLOOGLET ~]$ cat /proc/asound/cards
0 [PCH ]: HDA-Intel - HDA Intel PCH
HDA Intel PCH at 0x91418000 irq 122
Stock ChromeOS & Ubuntu using ChromeOS kernel (MilkyDeveloper's Breath):
chronos@localhost / $ cat /proc/asound/cards
0 [sofglkda7219max]: sof-glkda7219ma - sof-glkda7219max
HP-Bloog-rev4-Bloog
Would be easiest that I revert to stock ChromeOS kernel and use Breath to boot Linux for further testing? At least we get this error:
Direct firmware load for intel/sof/sof-glk.ri failed with error -2
request firmware intel/sof/sof-glk.ri failed err: -2
I removed the 2nd comment with all the expandable logs and attached them as txt files to the 1st post. I did the same for all other posts.
@plbossart Here: https://pastebin.com/G5rDaEBn
I meant use the GitHub "attach files' below the comment box. and sorry but no there is still nothing related to SOF in there.
I am supposed to attach the dmesg as .txt file?
yes. .txt or .log extensions work fine.
@Denisuu please attach the full dmesg log and alsa-info. I have no idea what 'Breath' is, nor why you don't have the firmware in /lib/firmware/intel/sof/community/sof-glk.ri To repeat: if the firmware files are not found there is nothing the SOF driver can do...
@plbossart this is Breath: https://cb-linux.github.io/breath/
@plbossart i'll just add my alsa-info
here too: http://alsa-project.org/db/?f=05ce4765b25d7d68e3c1b41bd3cda9ed271f81c8
Same reply as in https://github.com/thesofproject/sof/issues/5439#issuecomment-1055847673, the DMI info does not match what we expect in a Chromebook so NOTHING will work.
@MrChromebox this is a disconnect here:
Manufacturer: HP
Product Name: Blooglet
Product Version: rev4
Firmware Version: MrChromebox-4.15
System SKU: sku68
Board Vendor: HP
Board Name: Blooglet
v. what we use
.dmi_table = (const struct dmi_system_id []) {
{
.ident = "Google Chromebooks",
.matches = {
DMI_MATCH(DMI_SYS_VENDOR, "Google"),
}
},
{}
}
@plbossart same issue then, ugh. Will prevent the SMBIOS overrride.
@plbossart
So on ChromeOS you have 4 ways or running Linux:
The fist post was on Breath, I switched to MrChromebox FW because @aiChaoSONG said it might be due to an old kernel. Which might be true since ChromeOS still uses 4.14.256-18461-g6eaaee8fb397
@Denisuu The kernel version is meaningless for ChromeOS. It's only a base version, but the Chrome team will backport hundreds of patches, so you cannot know just with a version number what the kernel supports.
What we recommend is 5.10+ as a minimum for stability. Clearly a 4.14 base won't cut it or will only work with an ancient firmware.
@Denisuu @J0shuaT you'll need updated UEFI firmware from me to proceed further in troubleshooting (assuming the SMBIOS change doesn't resolve the issue completely). Not sure how to handle this for Breath though.
@MrChromebox Ok. I read the 'Hp Chromebook elite c1030 no audio rt5682 SOF' issue to understand what's happening. Let us know when it's ready, no rush for me.
I'm hoping once we get it working on of the 2 it will be easier to get it working on the other.
@Denisuu shoot me an email with the board name and I'll build an update for you to try
@MrChromebox could I also try the updated firmware?
@J0shuaT email me with your board name
@MrChromebox alright, thanks.
@plbossart @MrChromebox I just flashed the firmware with the fix:
I still have the dummy audio output, but here is the new alsa-info
output: http://alsa-project.org/db/?f=6a0ac2d7553fcf8746db94cc1c4351e0a486a99e
I think the DMI matching is still in the weeds.
here's what you have: Manufacturer: Google Product Name: Blooglet Product Version: rev4 Firmware Version: MrChromebox-4.15 System SKU: sku68 Board Vendor: HP Board Name: Blooglet
here's what I have.
Manufacturer: Google Product Name: Bobba Product Version: rev2 Firmware Version: Google_Bobba.11825.0.2019_03_06_2015 System SKU: sku2 Board Vendor: Google Board Name: Bobba
I think DMI_SYS_VENDOR is the Board vendor, no?
I think DMI_SYS_VENDOR is the Board vendor, no?
that would be DMI_BOARD_VENDOR, or at least I'd hope. I purposefully avoided changing the baseboard vendor to make this patch upstreamable
@MrChromebox that would be the rational explanation but from the results above I think there's some sort of inversion.
There's no issue loading the community firmware on GLK Chromebooks, it works fine here on mine. The issue appears to be isolated to models using the the da7219+max98357a combo; ones using rt5682+max98357a are working (at least for main speaker output).
Hey @MrChromebox , you stated rt5682+max98357a are working, does this apply for CometLake or just gemini? I have exactly that configuration. Is the fix applied in your test uefi rom? I would love to test, I have DRAGONAIR . ( ps. its nina, from reddit ) Cheers!
Hey @MrChromebox , you stated rt5682+max98357a are working, does this apply for CometLake or just gemini? I have exactly that configuration.
just GLK. Cometlake seems to have a completely different issue.
Laptop speakers are working OOB now on your latest 01/03/22 FW!!! :D Sound was muted by default but it worked the second I toggled it.
Headphone-jack doesn't work though. The internal speakers shows as Headphones and it's the only option.
EDIT: I installed Manjaro and the big red block in dmesg is gone. shutdown/restart & suspend work too now.
@Denisuu I am on Manjaro with Mr. Chromeboxes firmware, and I can also confirm that the audio works! However, there is an audio scaling bug explained here: https://github.com/thesofproject/sof/issues/5361
@J0shuaT this could be the codec driver kcontrol has the wrong shift or mask values for this volume.
@Denisuu I am on Manjaro with Mr. Chromeboxes firmware, and I can also confirm that the audio works! However, there is an audio scaling bug explained here: #5361
Yea I have the same issue. When lowering sound from 100% to 6% volume stays the same, when going below 4% only the right speaker turns off. Looks like the same issue as you posted.
I've been using Manjaro eversince MrChromebox recommeded it, I absolutely love it! Especially the AUR and the ability to install AUR packages through GUI so I'm staying on Manjaro. But, I wanted to test Ubuntu again out of curiosity though. When you install firmware-sof-signed_1.9-1ubuntu1_all.deb audio works too. Still it takes around 12min to boot and trackpad is furstrating as hell.
I don't have much time to troubleshoot until next weekend as I have an exam coming up. I'll probably test a bit more on Breath too and try to get Manjaro working on it (or Arch with GUI).
@lgirdwood Is there anything I can do to fix it? Maybe an application that limits the volume?
I tried the same test as I did on Breath here: OCTOPUS Baseboard Support: BLOOG and SPARKY360 #29
Video and sound work over USB-C/HDMI but only the right USB-C port, not the left. I'm not able to switch to HDMI or USB-C in Pulse audio. The only output device is laptop-speakers which show as Headphones.
Commands I ran:
aplay -D plughw:0,1 /usr/share/sounds/alsa/Front_Right.wav
aplay -D plughw:0,5 /usr/share/sounds/alsa/Front_Right.wav
aplay -D plughw:0,6 /usr/share/sounds/alsa/Front_Right.wav
aplay -D plughw:0,7 /usr/share/sounds/alsa/Front_Right.wav
Result:
Card 0, device 0 (Speakers) = Working Card 0, device 1 (Headphones) = No sound Card 0, device 5 (HDM1) = Not working (Does work on Breath Ubuntu) Card 0, device 6 (HDM2) = Working (Right USB-C port) Card 0, device 7 (HDM3) = Does not exist? (Only 2 USB-C ports)
@Denisuu could you explain how you got working audio on Ubuntu with Mr. Chromeboxes firmware?
Nvm, it works OOB on Ubuntu 22.04!
@lgirdwood Is there anything I can do to fix it? Maybe an application that limits the volume?
I would ask the Maxim folks to check the codec driver kcontrol for this volume is aligned to the codec registers (the shift or mask bits may be wrong). @ryans-lee is there someone who can help check the max98357a codec driver ?
@lgirdwood Is there anything I can do to fix it? Maybe an application that limits the volume?
I would ask the Maxim folks to check the codec driver kcontrol for this volume is aligned to the codec registers (the shift or mask bits may be wrong). @ryans-lee is there someone who can help check the max98357a codec driver ?
Where should I go to ask?
Describe the bug
Gemini lake processor Chromebooks that have both
sof-glkrt5682max
and/orsof-glkda7219max
don't have working audio. (Only dummy output).Reproduction Rate
Sound doesn't work OOB on devices listed below. I've tried multiple different
firmware-sof-signed
packages ranging from 1.6.1 to 1.9.1 none seem to work.Impact
Devices that are confirmed to have this issue are:
BLOOG
(sof-glkrt5682max & sof-glkda7219max)BLOOGLET
(sof-glkrt5682max & sof-glkda7219max)SPARKY360
(sof-glkrt5682max & sof-glkda7219max)CASTA
(only glkda7219)Source
The overlay tree of my device HP 14a BLOOGLET:
Unconfirmed devices that also have
sof-glkda7219max
and are likely to be affected:BLOOGUARD
(sof-glkda7219max & sof-glkrt5682max)BLORB
(sof-glkda7219max & sof-glkrt5682max)BOBBA
(sof-glkda7219max & sof-glkrt5682max)BOBBA360
(sof-glkda7219max & sof-glkrt5682max)DORP
(sof-glkda7219max & sof-glkrt5682max)DROID
(sof-glkda7219max & sof-glkrt5682max)GARFOUR
(sof-glkda7219max & sof-glkrt5682max)GARG
(sof-glkda7219max & sof-glkrt5682max)GARG360
(sof-glkda7219max & sof-glkrt5682max)GRABBITER
(sof-glkda7219max & sof-cs42l42 )PHASER
(sof-glkda7219max & sof-glkrt5682max)PHASER360
(sof-glkda7219max & sof-glkrt5682max)SPARKY
(sof-glkda7219max & sof-glkrt5682max)VORTICON
(sof-glkda7219max & sof-glkrt5682max)VORTININJA
(sof-glkda7219max & sof-glkrt5682max)BLUEBIRD
(sof-glkda7219max)DOOD
(sof-glkda7219max)FLEEX
(sof-glkda7219max & sof-cs42l42)FOOB
(sof-glkda7219max)FOOB360
(sof-glkda7219max)LASER14
(sof-glkda7219max)LICK
(sof-glkda7219max)MEEP
(sof-glkda7219max)MIMROCK
(sof-glkda7219max)NOSPIKE
(sof-glkrt5682max)ORBATRIX
(sof-glkda7219max)YORP
(sof-glkda7219max)source
Environment
Sound doesn´t work on:
Sound only works in ChromeOS.
Log files
Output from ChromeOS (Crosh) shell:
All logs below are from Xubuntu using Breath on my own device (BLOOGLET)
dmesg
snippit:Logs: