You are not logged in.

#1 2023-08-25 10:24:19

oschl
Member
Registered: 2023-08-25
Posts: 3

Can't get decent audio quality on laptop speakers

Hello everyone.

I've recently upgraded to a Lenovo Yoga Slim 7 14APU8 from my older ThinkPad E14 Gen 3. On the ThinkPad, audio quality on Linux (both Fedora and Arch) sounded miles worse than on Windows, but I never really bothered to fix the issue, as it was acceptable enough for YouTube videos and such and I used heaphones anyways most of the time, which played sound exactly as well as on Windows. With this new Lenovo Yoga though, the sound quality of the laptop speakers is absolutely unusable. It sounds like it's coming out of a can that's placed ten meters away.

I tried many steps to try to improve this issue, playing with Alsamixer, I used both PipeWire and PulseAudio, I tried changing the PulseAudio config, tried EasyEffects (even attempted to enable Dolby Atmos with it), etc. None of these solved the issue, EasyEffects was the only thing that had a noticeable effect, but I get the impression that it's fighting against some other limitation which stops the system from utilising the hardware properly.

Is this a widespread issue in Linux, or am I just really unlucky with the choices of my laptops/it's an issue that affects Lenovo laptops? Where should I look to attempt to resolve these issues?\

Thanks so much for your help.

Offline

#2 2023-08-25 18:33:33

espritlibre
Member
Registered: 2022-12-15
Posts: 129

Re: Can't get decent audio quality on laptop speakers

this might not be the optimal solution, because of different hardware but you could try to add the convolver/impulse file from a T14s G3 to easyeffects ArchWiki
it made the sound of my P14s G3 much better

Last edited by espritlibre (2023-08-25 18:34:41)

Offline

#3 2023-08-25 18:41:39

topcat01
Member
Registered: 2019-09-17
Posts: 127

Re: Can't get decent audio quality on laptop speakers

It's an alsa driver issue. The driver has to be configured correctly for the specific sound card. It is not a problem with Linux audio in general. How new is this laptop model?
You might find this useful: https://askubuntu.com/questions/1108825 … nd-quality. Try disabling dmix if you tweak your sound server.

Last edited by topcat01 (2023-08-25 18:45:01)

Offline

#4 2023-10-16 04:22:10

Asriel
Member
Registered: 2016-11-28
Posts: 43

Re: Can't get decent audio quality on laptop speakers

This laptop has speakers built using I2C ampilfies from TI - TIAS2781.  The driver for those landed in 6.6 kernel which is not released  yet (but rc-5 is quite usable and so I believe rc-6). Firmware have not landed yet - and available only by some strange links.

Take a look at this  thread - it is LEgion related but  based on the same amplifiers, and most likely will be for some future Lenovo laptops. 

https://forums.lenovo.com/t5/Ubuntu/Ubu … 09?page=17

Also what I've found on my Yoga - if I want to hibernate/resume keeping the sound working - I need to have snd_hda_scodec_tas2781_i2c and snd_hda_intel  compiled as a module, and before

hibernation unload  snd_hda_scodec_tas2781_i2c  first,  snd_hda_codec_realtek second and snd_hda_intel third.  ( the order is extremely important - if you do reverse order you have a chance  to boot up with exteremely loud noise ) - and load them back on resume in reverse order,

Also it is better to disable power saving for hda_intel  -  the amplifier driver loosing connection to main codec if hda_intel falls into power save mode.

echo '0' > '/sys/module/snd_hda_intel/parameters/power_save'

And the final problem - the amps can not be hardware volume controlled. So when you press you volume buttons your bass speakers keep maximum loudness, and the only way is to force software volume control. I use pipewire/wireplumber as sound system - in this case  edit the file /usr/share/wireplumber/main.lua.d/50-alsa-config.lua. Find  ["api.alsa.soft-mixer"] = false there,uncomment it and change false to true so it will look like

["api.alsa.soft-mixer"] = true,

With all this the sound works,  hibernates, resumes and volume can be managed by keyboard or mixer apps.  But still the solution is a pain.

So far the only problem remaining for this Yoga is suspend to RAM.

Last edited by Asriel (2023-10-16 15:50:25)

Offline

#5 2023-10-16 07:43:15

oschl
Member
Registered: 2023-08-25
Posts: 3

Re: Can't get decent audio quality on laptop speakers

Asriel wrote:

With all this the sound works,  hibernates, resumes and volume can be managed by keyboard or mixer apps.  But still the solution is a pain.

Thanks so much for your answer! So great to hear this is solvable. Do you think that with time, the speakers will simply just start working out of the box? How long do you think that is going to take to make its way into the Linux kernel? I'm a bit worried about patching my kernel, I've never done it before and I need my Linux install to be stable for work. Thank you!

Offline

#6 2023-10-16 15:58:33

Asriel
Member
Registered: 2016-11-28
Posts: 43

Re: Can't get decent audio quality on laptop speakers

oschl wrote:

Thanks so much for your answer! So great to hear this is solvable. Do you think that with time, the speakers will simply just start working out of the box? How long do you think that is going to take to make its way into the Linux kernel? I'm a bit worried about patching my kernel, I've never done it before and I need my Linux install to be stable for work. Thank you!

Sorry - when writing the post forgot about the third module that need to be unloaded - snd_hda_codec_realtek.  Edited the post.

As for future hope - I believe it will be solved.  The schematic is used in Legion and is goiing to be used in lot of future thinkbooks and yogas - so finally the firmware will land to mainstream and driver  will be fixed.

If you do not care about suspend/hibernate features much - just install kernel 6.6 (it will be released in 2-3 weeks from now) and unpack the firmware provided in Legion thread into /lib/firmware , and you will see huge difference in sound. That's probably the best sound I've heard from a laptop speakers.

And one more thing I've discovered right now - as you pipewire/pulseaudio system controls only master volume, and your bass amplifiers are locked to top volume - it is usefull to open alsamixer and play with hardware conrols of your sound card.  In this setup master volume ans speaker volume hardware controls in alsamixer  works as equalizer. I have set up all the controls to max so they all match the volume with bass.

And one more finding - on top volume the speakers and body of the laptop can not handle the sound. It is just an ultrabook - not a hi-end speaker, so that's expected.

Last edited by Asriel (2023-10-16 16:14:56)

Offline

#7 2023-10-16 17:01:33

oschl
Member
Registered: 2023-08-25
Posts: 3

Re: Can't get decent audio quality on laptop speakers

Thanks so much for taking the time to investigate and write this down, I really really appreciate it.

Offline

#8 2023-11-16 06:35:44

darp123
Member
Registered: 2023-11-16
Posts: 1

Re: Can't get decent audio quality on laptop speakers

I got it to work as well. Wrote it down here https://github.com/darinpp/yoga-slim-7

Offline

#9 2024-01-02 23:26:16

txordi
Member
Registered: 2024-01-02
Posts: 1

Re: Can't get decent audio quality on laptop speakers

Asriel wrote:

and before hibernation unload  snd_hda_scodec_tas2781_i2c  first,  snd_hda_codec_realtek second and snd_hda_intel third.  ( the order is extremely important - if you do reverse order you have a chance  to boot up with exteremely loud noise ) - and load them back on resume in reverse order

How can I do that? I am getting that horrendous noise (Lenovo Yoga Slim 7 14APU8) after following the steps explained by @darp123 in https://github.com/darinpp/yoga-slim-7. Maybe it even damaged already my laptop speakers....

Thanks a lot for your help.

Offline

Board footer

Powered by FluxBB