Comment 144 for bug 1958019

Revision history for this message
In , zanto98 (zanto98-linux-kernel-bugs) wrote :

(In reply to chenyh570 from comment #129)
> (In reply to DavidLenovo from comment #120)
> > Hi !
> > A man have find the solution for the Yoga 7 - Yoga 7i - 14ITL5 & 14ITL05 &
> > 15ITL05 & 15ITL5 :)
> > Sound from speakers works on Ubuntu 20.04.2LTS !!!
> >
> > (In reply to gurpreetsinghwalia5 from comment #86)
> > > (In reply to juliusvonkohout from comment #85)
> > > > (In reply to gurpreetsinghwalia5 from comment #84)
> > > > > I have a lenovo yoga 7i. No sound from the in build speaker in ubuntu
> > > > 20.10.
> > > > > Is there a solution for this ???
> > > >
> > > > Yes, install fedora 33 and update everything. Then at least the bottom
> > > > speakers will work.
> > >
> > > Is there a debian distro that works ??? Need debian for work.
> >
> > It work on Ubuntu so will work on Debian.
> >
> >
> > (In reply to Priyaranjan Sharma from comment #98)
> > > I don't have any sound on my Lenovo Yoga 7i 15" with Fedora 33.
> > > Tried Suse, Ubuntu and Mint as well and it is same result.
> >
> >
> > (In reply to esanchez from comment #110)
> > > Hi,
> > >
> > > Same error with Lenovo Yoga 7i 14"intel.
> > > Tested with Ubuntu 20.04LTS and Ubuntu 21.04 and no sound from internal
> > > speakers, meanwhile the headphones works perfectly.
> >
> >
> >
> > (In reply to chenyh570 from comment #104)
> > > (In reply to wave from comment #100)
> > > > Did anyone else with the problem try my "workaround" from comment #97?
> > It's
> > > > actually not too bad, I just suspend whenever I need audio from my
> > speakers
> > > > and play some music muted in the background in a loop to keep it alive
> in
> > > > case playback is interrupted. Not perfect but usable.
> > >
> > > I have 14inch yoga 7i, and unfortunately it doesn't work for me. I am
> > > running 5.10 kernel
> >
> >
> >
> > (In reply to lazertag from comment #116)
> > > Just wanted to join in on the bandwagon here and follow any possible
> > > progress. Look forward to hearing sound from my laptop speakers someday
> in
> > > Ubuntu. ;)
> > >
> > > Lenovo Yoga 7-14ITL5 model # 82BH0006US
> > >
> > > Like others my headphones via 1/8 jack seem to work fine but not a lick
> of
> > > sound from the built in speakers. Lots of trying suggestions noted
> > > throughout this thread to no avail. Playing sound while selected on
> > speakers
> > > it looks like there is activity just no sound of course.
> > >
> > > hdaJackRetask seems to not work at all on my unit and hangs quite often
> > > where you have to force quit. I was hopeful trying to use it might find
> > > some workaround. Anyway not sure if that says anything about the issue.
> >
> >
> >
> > The problem is to enable the S3 :
> > Try : cat /sys/power/mem_sleep
> > You will have : "S2idle [deep]"
> > Try : sudo dmesg |grep ACPI|grep supports
> > You will have : [ 0.195933] ACPI: (supports S0 S3 S4 S5)
> >
> > If not, you will check how to enable S3 :
> > ==== ENABLE S3 ====
> > We have to patch the DSDT table
> > 1) Install iasl :
> > sudo apt-get install acpica-tools cpio
> >
> > 2) make acpi directory
> > mkdir acpi
> >
> > 3) Get a dump of ACPI DSDT table:
> > sudo cat /sys/firmware/acpi/tables/DSDT > dsdt.aml
> >
> > 4) Decompile the dump, which will generate a .dsl source based on the .aml
> > ACPI machine language dump :
> > iasl -d dsdt.aml
> >
> > 5) Make the patch file
> > The patch is just for Yoga 7/7i :
> > nano acpi.patch
> > --- dsdt.dsl~ 2018-04-26 09:35:29.501055509 -0600
> > +++ dsdt.dsl 2018-04-26 09:36:23.769729028 -0600
> > @@ -18,7 +18,7 @@
> > * Compiler ID "INTL"
> > * Compiler Version 0x20210105 (539033861)
> > */
> > -DefinitionBlock ("", "DSDT", 2, "LENOVO", "CB-01 ", 0x00000002)
> > +DefinitionBlock ("", "DSDT", 2, "LENOVO", "CB-01 ", 0x00000003)
> > {
> > External (_GPE.AL6F, MethodObj) // 0 Arguments
> > External (_GPE.P0L6, MethodObj) // 0 Arguments
> > @@ -516,7 +516,7 @@
> >
> > Name (SS1, Zero)
> > Name (SS2, Zero)
> > - Name (SS3, Zero)
> > + Name (SS3, One)
> > Name (SS4, One)
> > OperationRegion (GNVS, SystemMemory, 0x45AB8018, 0x0A9B)
> > Field (GNVS, AnyAcc, Lock, Preserve)
> >
> > 6) Apply it against dsdt.dsl: patch --verbose < acpi.patch
> > You will have :
> > Hunk #1 succeeded at 18 with fuzz 2.
> > Hunk #2 succeeded at 516.
> > done
> > (not sure because I'm already done it) Could anybody confirm the message,
> > please ?
> >
> > 7) Recompile your patched version of the .dsl source :
> > iasl -ve -tc dsdt.dsl
> >
> > 8) Create a CPIO archive with the correct structure, which GRUB can load on
> > boot. We name the final image acpi_override and copy it into /boot/ :
> > mkdir -p kernel/firmware/acpi
> > cp dsdt.aml kernel/firmware/acpi
> > find kernel | cpio -H newc --create > acpi_override
> > cp acpi_override /boot
> >
> > 9) GRUB needs to boot the kernel with a parameter setting the deep sleep
> > state as default. Edit /etc/default/grub and add the following :
> > GRUB_CMDLINE_LINUX_DEFAULT="mem_sleep_default=deep"
> > GRUB_EARLY_INITRD_LINUX_CUSTOM="/boot/acpi_override"
> >
> > 10) Regenerate the GRUB configuration :
> > sudo update-grub
> >
> > If the second line of the previous step does not generate the grub to make
> > the initrd lines look like "initrd /boot/acpi_override" in the beginning,
> > then follow the next steps as normal. If it does generate those lines, skip
> > to step 12. For me on Ubuntu it's not like this.
> >
> > 11) Tell GRUB to load the new DSDT table on boot in its configuration file
> > usually located in /boot/grub/grub.cfg. Find the relevant GRUB menu entry
> > and add the new image /boot/acpi_override to the initrd lines for the
> images
> > that you want the s3 sleep to work in :
> > sudo nano /boot/grub/grub.cfg
> > initrd /boot/initrd.img-5.11.5-051105-generic
> > BECOME :
> > initrd /boot/acpi_override /boot/initrd.img-5.11.5-051105-generic
> >
> > Be sure to do it for all kernels !
> >
> > 12) Reboot and enjoy having a laptop running Linux again... close the lid
> > and the battery does not get drained in a few hours, also the battery no
> > longer stays warm in sleep mode. To verify that things are working :
> > Try : cat /sys/power/mem_sleep
> > You will have : "S2idle [deep]"
> > Try : sudo dmesg |grep ACPI|grep supports
> > You will have : [ 0.195933] ACPI: (supports S0 S3 S4 S5)
> >
> >
> > After we have to enable sound :
> > ==== ENABLE SOUND ====
> > For me on Ubuntu 20.04, I have to use kernel 5.11.0 to 5.11.5, 5.11.6 don't
> > work, 5.11.16 don't work to. Anybody say why ?
> > So I sugest to try with 5.11.5 :
> > https://kernel.ubuntu.com/~kernel-ppa/mainline/v5.11.5/.
> > After could you try with you kernel, and share your kernel version, please
> ?
> >
> > You will don't have dummy out.
> > For me :
> > aplay -l
> > gives :
> > **** Liste des Périphériques Matériels PLAYBACK ****
> > carte 0: sofhdadsp [sof-hda-dsp], périphérique 0: HDA Analog (*) []
> >
> > sudo dmesg | grep -i audio
> > gives : sof-audio-pci
> >
> > If it is ok, just have to :
> > - play a song on VLC
> > - suspend to ram
> > - power on
> > - the speakers work :)
> >
> > Like it is say, if you stop for 7 seconds, sound stop working.
> >
> > Work after many reboot.
> >
> > Ubuntu 21.04 live USB have jack/headphone work directly, so I think we have
> > just enable the S3 for it.
> >
> > Working for you ?
> >
> > Original tutorial : https://wiki.archlinux.org/title/Lenovo_Yoga_7i
> > French tutorial on Ubuntu 20.04 :
> https://doc.ubuntu-fr.org/lenovo_yoga_7_7i
>
> Wondeful news to me, basically it works. Yet, I was trying to make this as
> automatic as possible, so I was trying the bash script as descipt in the
> tutorial. Hower it keeps throwing: tee: /dev/audio: Connection refused to
> me. Do you know what is this about? Cheers!

First of all allow me to remark that this is exactly the solution that I talked about in comment #97 and which I tried to explain to you specifically in more detail in comment #107; in fact I wrote the archwiki article referred to in the comment.

Now your problem seems to be related to permissions; perhaps you are running the whole command or padsp as sudo?