Skip to content
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

broken speakers #3

Open
Okazakee opened this issue Sep 30, 2022 · 119 comments
Open

broken speakers #3

Okazakee opened this issue Sep 30, 2022 · 119 comments

Comments

@Okazakee
Copy link
Contributor

any news on 4 functioning speakers? There was a problem with pins connection not recognised by kernel or something like that.

@mdi22
Copy link

mdi22 commented Oct 14, 2022

As I understand, the speakers and the microphone will be fixed in Kernel 6.1
See https://bugzilla.kernel.org/show_bug.cgi?id=216299

@Okazakee
Copy link
Contributor Author

Holy moly, it was about time! Thx for the news, i can't wait to get rid of windows finaly. I guess the only main issue now remains EQing the heck outta them?

@mdi22
Copy link

mdi22 commented Oct 14, 2022

We will see...
The problem with the current kernel is, that the output is sent to the two "tweeters". That's why it sounds awful and is unsusable.
Probably the output over the "normal" speakers will be fine.
In any case, for fine tuning in my experience "Pulseaudio effects" works well. It's even possible to import Atmos profiles for the speakers, if you find them :-)
But on my last Yoga the default sound is already good and a bit of ordinary equalizing makes it even better.

@Okazakee
Copy link
Contributor Author

I am not scared, my father is a sound technician, I guess I'll spend some minutes with him if there are no suitable profiles online.

@mdi22
Copy link

mdi22 commented Oct 14, 2022

Good! Feel free to share them here :-)

@tomsom
Copy link
Owner

tomsom commented Oct 15, 2022

Hello peeps! Thank you for commenting here even though i have not kept this repo active recently. I hope to have some more time to contribute to the project in the near future.
I played around with EasyEffect a few weeks ago but with no luck(i also have absolutely no audio experience) but with only the two tin can tweeters working there is probably not much hope anyway.
It would be super cool if you'd share tuned sound profiles once all the speakers are working :)

@tomsom
Copy link
Owner

tomsom commented Oct 18, 2022

Ok, so i've upgraded to 6.1-rc1; unfortunately only the 2 speakers work still(and keep on sucking) :(
But at least the internal mic is now supported🎉

@Okazakee
Copy link
Contributor Author

Do you know if the fix has been skipped or just does not work?

@tomsom
Copy link
Owner

tomsom commented Oct 18, 2022

I don't really know more than you; but reading the thread you linked previously it seems the speakers are a separate issue that has not really been addressed yet. :/
If I read it correctly the mic issue also appeared on the Slim 7 though no one really investigated the speakers which seem to be a yoga 7 14 specific problem.
I also have not found any more info on that online.. at least for now

@Okazakee
Copy link
Contributor Author

ok I guess we have to spread the word then, any good @ we could ask for this issue?

@tomsom
Copy link
Owner

tomsom commented Oct 18, 2022

Nope unfortunately not, I'm completely new to this..🤷

@shiftyphil
Copy link

There's a script for enabling the bass speakers here:
https://bugzilla.kernel.org/show_bug.cgi?id=208555#c695

Haven't had a chance to do much testing myself.

@mdi22
Copy link

mdi22 commented Oct 25, 2022

There's a script for enabling the bass speakers here: https://bugzilla.kernel.org/show_bug.cgi?id=208555#c695

Haven't had a chance to do much testing myself.

Thanks for the info!
I can confirm that the output switches from the tweeters to the "normal" speakers by running

i2cset -y 3 0x48 0x2 0

i2cset has to be installed (in ubuntu by the package management with the package i2c-tools)

Very likely the instructions in the bugzilla link on how to do that on every boot will work, too.

Still, the speakers don't have much bass. It is quite OK using PulseEffects, enabling the equalizer and using the preset "gstreamer_pop".

@Okazakee
Copy link
Contributor Author

Switches? So not both working on the same time

@mdi22
Copy link

mdi22 commented Oct 25, 2022

Switches? So not both working on the same time

I think sound is just switched to the two main speakers, but I'm not sure.

I think, otherwise Linux needs to have a multi-speaker-configuration, which would be somehow possible, but is not achieved with the command.

As I understand, the laptop has 4 "ordinary" speakers for surround plus 1 subwoofer? Plus 2 tweeters?

It's my first time I hear about tweeters, so I don't know how they would have to be accessed... Maybe the "normal" audio stream can be forwarded to them or you need a special channel like the subwoofer...

I'm already happy when I can use two main speakers. To use them all fully with sorround, tweeters and subwoofer we need people with good knowledge of ALSA...
Maybe it can be posted in an ALSA forum and someone can help to configure the card and add it configuration to the kernel... It's even possible that the card could be recognized as surround only with a BIOS update. But I don't know :-)

@shiftyphil
Copy link

According to the specs, it is "Stereo speakers, 2W x2 (woofers), 2W x2 (tweeters),"
No separate subwoofer.

I think just enabling the woofers get everything going, the tweeters were already working.

PulseAudio Volume Control (pavucontrol) can switch between stereo, 2.1 and 4.0 modes.
2.1 sounds terrible as all the bass is sent to a sub that doesn't exist.
I don't have good enough hearing or reference material to tell whether stereo or 4.0 is the right mode.

@Okazakee
Copy link
Contributor Author

Unless speakers are hw set to be splitted with a crossover, they are 4.0. However I think the crossover would be the simplest way for them to make it work in all scenarios, limiting drivers to 2.0 output and manage frequency through the hw crossover. It would be stupid in my opinion to treat 2 dumbass tweeters as 2 full speaker drivers, but OEMs are OEMs...

@gitgud187
Copy link

There's been a fix for the speakers for some time now:
PJungkamp/yoga9-linux#8 (comment)

@tomsom
Copy link
Owner

tomsom commented Nov 10, 2022

Awesome thx :)
Just added a wiki page to apply the fix;
also modified it to make it work with fedora

Though stereo only till now

@Okazakee
Copy link
Contributor Author

Hope there will be a way to joint the 2 options soon :/

@imsofi
Copy link

imsofi commented Nov 24, 2022

For a real fix, we will likely need to sniff out the HDA verbs from the Windows side to apply them on Linux, for example trough HDAJackRetask or a Kernel patch. I'll add some quick links that i found on the subject, as I may try to mess with this down the line.

@Myaats
Copy link

Myaats commented Nov 24, 2022

It's worth noting that the 14IAL7 which is just the Intel version of the 14ARB7 already have a quirk for this including HDA verbs, I tried enabling it through kernel parameters without much luck. Since it shares the same chassis, codec and audio specs I would expect it to be the same. One guess is that the issue may have been the DSP w/ AMD Raphael not really being supported with kernel 6.0 which I tested with (Not sure if this could be related, i don't know the linux audio codec stack). Otherwise there could be differences in hardware, but I would find that weird.

I checked the subsystem id of the ALC287 codec in the 14ARB7 which has 0x17aa3870 and it is just one value over the 14IAL7 with 0x17aa3869 seen in this patch adding the quirk for that model https://www.spinics.net/lists/alsa-devel/msg146221.html

I don't have a good setup for doing kernel development, but if anyone else wants to continue, this is where i ended my research into it.

@rodude123
Copy link

rodude123 commented Nov 29, 2022

There's a script for enabling the bass speakers here: https://bugzilla.kernel.org/show_bug.cgi?id=208555#c695
Haven't had a chance to do much testing myself.

Thanks for the info! I can confirm that the output switches from the tweeters to the "normal" speakers by running

i2cset -y 3 0x48 0x2 0

i2cset has to be installed (in ubuntu by the package management with the package i2c-tools)

Very likely the instructions in the bugzilla link on how to do that on every boot will work, too.

Still, the speakers don't have much bass. It is quite OK using PulseEffects, enabling the equalizer and using the preset "gstreamer_pop".

I've tried the command i2cset -y 3 0x48 0x2 0 on arch but it doesn't work I get this error, any ideas?
image
Is there likely to be a fix in linux 6.1rc7, I'm trying the mainline kernel now to see if it will fix it

@imsofi
Copy link

imsofi commented Nov 29, 2022

@Myaats Did you try to apply it manually?

Apparently you should be able to do add this to /etc/modprobe/snd.conf on a recent version of the kernel (i think 6.0=<)

options snd_intel_dspcfg dsp_driver=1
options snd_hda_intel model=alc287-yoga9-bass-spk-pin

Do know you take the risk of possibly harming your computer by setting these options.

@Myaats
Copy link

Myaats commented Nov 29, 2022

@Myaats Did you try to apply it manually?

Apparently you should be able to do add this to /etc/modprobe/snd.conf on a recent version of the kernel (i think 6.0=<)

options snd_intel_dspcfg dsp_driver=1
options snd_hda_intel model=alc287-yoga9-bass-spk-pin

Do know you take the risk of possibly harming your computer by setting these options.

Yes I already tried that, but nothing changed, I know about the risks but since the 14ARB7 is sharing the chassis and codec with the 14IAL7 I don't believe there is much risk, they even share the hardware maintenance manual.

But as I noted it could be because the AMD ACP (Audio Co-Processor) which acts as the DSP, did not get recognize as the correct model until this got merged for 6.1 https://lore.kernel.org/all/20221019083323.444904947@linuxfoundation.org/.

I've just not bothered to pull it down and test further as the i2c workaround works most of time, I do have had the i2c bus lock up at times requiring a cold reboot to fix it.

@imsofi
Copy link

imsofi commented Nov 29, 2022

Now that is certainly interesting, thanks for the link to that. Curious to see where we go from this.

@rodude123
Copy link

I've managed to get i2c to work but now all I see is Play HiFi quality Music as the profile, I've set load-module module-udev-detect use_ucm=0 inside /etc/pulseaudio/default.pa but still nothing happens. I've even set it inside /etc/pipewire/pipewire-pulse.conf.d/default.pa but nothing happens. I'm using pipewire. I don't know what I have done as it used to show all 4 speakers. I applied it manually but nothing shows the 4 speakers @imsofi

@imsofi
Copy link

imsofi commented Nov 29, 2022

Yeah i do not plan to use i2cset for solving the current audio issues, as you will not be able to get the 4 speakers working together with it alone (from my understanding). Using it this way is basically a hack to "change" the audio chip to output to the two bass speakers in the system instead of the default tweeters.

I cant give much useful advice outside of that. As my laptop just got delayed to ship by another week, so i cant dig into it much further.

@Okazakee
Copy link
Contributor Author

Yeah i do not plan to use i2c for solving the current audio issues, as you will not be able to get the 4 speakers working together with it alone (from my understanding). Using it this way is basically a hack to "change" the audio chip to output to the two bass speakers in the system instead of the default tweeters.

I cant give much useful advice outside of that. As my laptop just got delayed to ship by another week, so i cant dig into it much further.

Hello, is there a place where someone can contact you aside of this comment section? I would like to ask you some questions not only for speakers issue

@Akinzekeel
Copy link

It's Manjaro. I updated the kernel through the Manjaro-settings kernel menu

@imsofi
Copy link

imsofi commented Jun 6, 2023

Can you run aplay --list-devices and show the output of sudo lspci -v?

@Akinzekeel
Copy link

~ aplay --list-devices                                                            
**** Liste der Hardware-Geräte (PLAYBACK) ****
Karte 0: Generic [HD-Audio Generic], Gerät 3: HDMI 0 [HDMI 0]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 0: Generic [HD-Audio Generic], Gerät 7: HDMI 1 [HDMI 1]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 0: Generic [HD-Audio Generic], Gerät 8: HDMI 2 [HDMI 2]
  Sub-Geräte: 1/1
  Sub-Gerät #0: subdevice #0
Karte 1: Generic_1 [HD-Audio Generic], Gerät 0: ALC287 Analog [ALC287 Analog]
  Sub-Geräte: 0/1
  Sub-Gerät #0: subdevice #0

lspci output is quite long, so I attached it as txt file: lspci.txt

@imsofi
Copy link

imsofi commented Jun 6, 2023

I cant see anything unique in there, can you try the following for me?

  • sudo systool -vm snd_hda_intel
  • sudo systool -vm snd_pci_acp6x
  • lsmod | grep '^snd_'

@Akinzekeel
Copy link

@imsofi
Copy link

imsofi commented Jun 6, 2023

Yeah your device is not loading in snd_soc_tas2562 compared to mine. Have you set up anything like options snd_hda_intel before?

You can try a grep "snd_" /etc/modprobe.d/* but i dont know if it would be exhaustive.

@Akinzekeel
Copy link

I don't think I set up anything with snd_hda_intel before. /etc/modprobe.d/ only contains alsa-base.conf, and that file is empty.

@Myaats
Copy link

Myaats commented Jun 6, 2023

Yeah your device is not loading in snd_soc_tas2562 compared to mine. Have you set up anything like options snd_hda_intel before?

You can try a grep "snd_" /etc/modprobe.d/* but i dont know if it would be exhaustive.

snd_soc_tas2562 only works for you because you copied the patch I wrote to add ACPI support and just hard set the correct registers

@imsofi
Copy link

imsofi commented Jun 6, 2023

I removed it from my configuration, so that patch is no longer present. I did however accidentally leave the module enabled, so it seems to have started loading the incorrect tas driver from linux itself. I will disable it and try again.

@Akinzekeel
Copy link

FWIW I have two 14ARB7's both running Manjaro (with kernel 6.4rc2-1 as of today) and sound seems to work fine on both of them so far without the i2c workaround. I can of course be mistaken, but I do feel like I would remember applying the ACPI patch on both devices.

@imsofi
Copy link

imsofi commented Jun 6, 2023

I must say its most strange, as it does not work on my end. This will be very verbose, but my last idea would be a sudo modprobe -c output. Should list every configuration and option currently on the system. If i cant see a difference there, i must say I would be a bit stumped how to proceed further.

@imsofi
Copy link

imsofi commented Jun 6, 2023

There is also sudo modprobe --show-depends snd_hda_intel, as I still only have 10 depends, while you had 11.

@Akinzekeel
Copy link

Maybe @sjmikler could help by upgrading his kernel and testing the sound without i2c-workarounds. He also mentioned Manjaro in his previous comment.

@stuarthayhurst
Copy link
Contributor

Debian Experimental has a 6.4 build in git, I'll give that a shot and report back. I haven't made any attempt to fix my speakers yet, so if it fails for me, it's not due to tampering.

It could be related to the merged MIPI SoundWire support for AMD chipsets?

I saw that and wondered if it would help, hopefully it does.

@imsofi
Copy link

imsofi commented Jun 6, 2023

@Akinzekeel When you get time, i would still be interested in the outputs of the last two commands i sent, as i think they will show what is different between your working system, and my tweeter only system.

@Akinzekeel
Copy link

@imsofi sure no problem, here is the output:
modprobe-c.output.txt
modprobe-show-depends.output.txt

@imsofi
Copy link

imsofi commented Jun 6, 2023

@imsofi sure no problem, here is the output: modprobe-c.output.txt modprobe-show-depends.output.txt

Frustratingly, this also does not have anything that stands out to me, its all just essentially defaults. Outside of the strange difference between "show depends" commands only listing 10 references, but your refcnt being 11. I must say I am at an end of ideas at this point.

@imsofi
Copy link

imsofi commented Jun 6, 2023

Only ideas left that i have would be to find a way to dump your sound chips current layout, but i only know of @Myaats who has done this successfully. This will show what its internal registers are set to. Maybe there exists a hidden "keep changes across reboot" that is turned on at your end?

Other idea would be maybe a BIOS version? But i am also running the latest, so i am a tad bit lost. Do you run Windows on these machines with any frequency or?

@stuarthayhurst
Copy link
Contributor

Kernel 6.4-rc5 hasn't fixed the speaker issue for me, I compiled a fresh upstream copy of the kernel with Debian Experimental's packaging and with the config for the soundwire driver enabled. Verified the driver is present, not loaded automatically, but it still doesn't have an effect when loaded with modprobe.

Latest BIOS, haven't used Windows for weeks.

@imsofi
Copy link

imsofi commented Jun 7, 2023

After some digging, one can dump their registers with alsa directly following these commands.

sudo su
echo 1 > /sys/module/snd_hda_codec/parameters/dump_coef
alsa-info

Then taking the generated file from /tmp and uploading it here.

For reference, this is how my 6.4.0-rc4 looks with broken sound: alsa-info.txt

Curious how @Akinzekeel differs. 👀

@Akinzekeel
Copy link

Where can I get alsa-info from? It seems I have a lot of alsa packages installed already (including alsa-utils) but this particular command is not available for me. If it's a script then kindly share it with me or let me know the exact version, just to be sure it will produce the output in the same way.

@imsofi
Copy link

imsofi commented Jun 7, 2023

It might be under alsa-info.sh for you? It should come from extras/alsa-utils at least. Source

@Akinzekeel
Copy link

Ah, yes alsa-info.sh worked. Looks like there are some small differences, but I do not know how significant they are.
alsa-info.txt

@Akinzekeel
Copy link

So I have some bad news. I tried to play a Steam game, and about 5 minutes in, the laptop suddenly shut off without warning (which is ironic because that was part of the reason I moved away from Windows). Anyway after booting back up, the WiFi adapter was missing. So I did a full reboot again and now the speakers are back to tin-can mode.

Apologies for creating so much fuss in this thread but it seems this one was indeed a red herring. I guess in my previous testing I booted up the laptop too quickly after shutting it down.

@imsofi
Copy link

imsofi commented Jun 7, 2023

If you can. Do another alsa-info. As then we can get the closest A/B diff possible between a working state and non working state.

Also sorry to hear about the crashed computer! It might be related to 6.4.0 as i have had a lot of Firefox crashes all day instead of flickers. So it might be PSR related.

@Akinzekeel
Copy link

I think the crashes are temperature related actually. The CPU gets very hot as soon as I start any game, but interestingly the fan doesn't ramp up as much as I would expect. So it's probably a safety guard that powers off the system to prevent damage.

Anyway here is the alsa-info with broken speakers: alsa-info-broken.txt

@RayOfLight1
Copy link

RayOfLight1 commented Jun 8, 2023 via email

@imsofi
Copy link

imsofi commented Jun 8, 2023

Well you are certainly not just imagining stuff. Diffing the two outputs gives left (working) and right (broken) with some core differences. I am just gonna highlight a few that i found interesting below.

Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out		Node 0x02 [Audio Output] wcaps 0x41d: Stereo Amp-Out
...
  Amp-Out vals:  [0x33 0x33]				     |	 Amp-Out vals:  [0x49 0x49]
  Converter: stream=5, channel=0			     |	 Converter: stream=0, channel=0

...

Node 0x20 [Vendor Defined Widget] wcaps 0xf00040: Mono		Node 0x20 [Vendor Defined Widget] wcaps 0xf00040: Mono
  Processing caps: benign=0, ncoeff=142				 Processing caps: benign=0, ncoeff=142
...
    Coeff 0x77: 0x003f					     |	   Coeff 0x77: 0xfffc
    Coeff 0x78: 0x0025					     |	   Coeff 0x78: 0x0042

Not quite sure what to make of it. I wanted to play with the two registers you have differing here, but my i2c seems unwilling to cooperate. @Myaats have you gotten i2c working on NixOS?

@Okazakee
Copy link
Contributor Author

from some time now the main way to fix speakers output with systemd seems to have stopped in my fedora, i have to manually run sudo systemctl enable --now yoga7-speaker-boot-fix.service to make it work, and even after that, it resets randomly

@Akinzekeel
Copy link

Akinzekeel commented Jun 16, 2023

Have you tried to put all 3 i2csets in the unit file instead of only the 2 from the wiki? It seems that the fix "sticks" better in this case (at least from my experience)

It seems to work for me, thank you very much :) So basically I want to execute /usr/sbin/i2cset -y 3 0x48 0x2 0 && /usr/sbin/i2cset -y 3 0x48 0x3 0 && /usr/sbin/i2cset -y 3 0x48 0x30 0x99 with the systemd service.. or is there a better solution? Idk a lot about that kinda stuff so i wanna ask before maybe adding it to the wiki..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests