linux icon indicating copy to clipboard operation
linux copied to clipboard

No sound on LG Gram 17 inch from 2023 (model: 17Z90R)

Open tchwpkgorg opened this issue 2 years ago • 16 comments

I have an LG Gram laptop released in 2023 (with 13th Gen Intel(R) Core(TM) i7-1360P CPU). Audio over bluetooth works, but unfortunately does not over laptop's speakers.

Tried with kernels 6.2.x, 6.3.x and 6.4-rc2 and with firmware-sof-signed 2.2.5 on Ubuntu 23.04.

alsa-info output: http://alsa-project.org/db/?f=101eaeda80f5c897d0e8679608fe4b476e536f52

tchwpkgorg avatar May 17 '23 16:05 tchwpkgorg

We really need to know if this is an amplifier-only issue, and whether it happens also with the snd-hda-intel driver. Bluetooth is usually irrelevant as not handled by the audio subsystem except in ADL+ Chrome devices.

See https://thesofproject.github.io/latest/getting_started/intel_debug/suggestions.html for some pointers to refine the issue

plbossart avatar May 17 '23 16:05 plbossart

  • Run alsa-info

alsa-info with kernel 6.3.3 and firmware-sof-signed 2.2.5 on Ubuntu 23.04:

http://alsa-project.org/db/?f=e0983a6a3ca0a6cefed9bab2f2bb25c3b61bc653

  • Disable SOF on PCI/HDaudio devices to test audio playback

Added, rebooted - didn't help.

  • Try booting into Windows first, then reboot into Linux

I did boot the laptop with Windows first. After booting into Ubuntu 23.04, there was no audio.

  • Reverse-engineer the Windows audio driver

I'm afraid I'm not able to do it.

  • Make sure the ME is enabled

Also something too complicated for me to diagnose.

  • Test at the ALSA ‘hw’ device level
$ aplay -l
**** List of PLAYBACK Hardware Devices ****
card 0: sofhdadsp [sof-hda-dsp], device 0: HDA Analog (*) []
  Subdevices: 0/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 3: HDMI1 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 4: HDMI2 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 5: HDMI3 (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: sofhdadsp [sof-hda-dsp], device 31: HDA Analog Deep Buffer (*) []
  Subdevices: 1/1
  Subdevice #0: subdevice #0


$ speaker-test -Dhw:0,0 -c2 -r48000 -f S16_LE

speaker-test 1.2.8

Playback device is hw:0,0
Stream parameters are 48000Hz, S16_LE, 2 channels
Using 16 octaves of pink noise
Playback open error: -16,Device or resource busy
  • Verify mixer settings

I see Ubuntu's mixer indicator going up and down when playing music. Just no actual sound getting from the speakers.

If there is anything I can try, please let me know!

tchwpkgorg avatar May 17 '23 17:05 tchwpkgorg

Also - not sure if it has any meaning - there is audio when I use a headphone jack and headphones. Just no audio with laptop's speakers.

tchwpkgorg avatar May 17 '23 17:05 tchwpkgorg

Thanks @tchwpkgorg so the conclusion is that your amplifier configuration is not well handled in the Linux HDaudio case, be it with the legacy snd-hda-intel or the SOF driver.

I am afraid I don't have a turn-key solution, the "reverse-engineer windows" is the only way to progress. It's problematic indeed because it requires a rather elaborate set of skills - I have never done this myself.

In the short-term, USB speakers seem the only work-around.

plbossart avatar May 17 '23 17:05 plbossart

And is it expected that I see several sof-hda-dsp devices?

image

(none of them play audio)

tchwpkgorg avatar May 17 '23 21:05 tchwpkgorg

The 'pro' stuff is an invention from PipeWire IIRC. I have no idea what this is. There is only one driver and a set of PCM devices exposed by this driver.

Open a terminal and type: "aplay -l" and "arecord -l" and you'll see what the card supports.

plbossart avatar May 18 '23 01:05 plbossart

In the short-term, USB speakers seem the only work-around.

OK, this is sad.

So in the end - assuming someone fixes it properly one beautiful day - where would be the fix coming from? A kernel update? sof-firmware? Some other package?

tchwpkgorg avatar May 18 '23 07:05 tchwpkgorg

kernel update on a windy day.

plbossart avatar May 18 '23 15:05 plbossart

Is "hda-verb" an option here?

I see some people were able to fix their audio on Linux using hda-verb, i.e.: https://www.linux.org/threads/solved-asus-zenbook-15-ux534f-realtek-hd-audio-problem.27384/

Just unsure how they came up with rather cryptic commands like:

hda-verb /dev/snd/hwC0D0 0x20 0x500 0x1b

tchwpkgorg avatar Jun 01 '23 23:06 tchwpkgorg

by reverse-engineering the Windows driver, see https://thesofproject.github.io/latest/getting_started/intel_debug/suggestions.html#reverse-engineer-the-windows-audio-driver

plbossart avatar Jun 02 '23 14:06 plbossart

They mention here that this issue was fixed in sof-bin 2.2.6 https://github.com/clearlinux/distribution/issues/2923

apolychrome avatar Aug 16 '23 20:08 apolychrome

You need the right hda-verbs. Solutions is here:

https://forums.fedoraforum.org/showthread.php?331130-Fixing-ALC298-audio-(no-sound-from-speakers)

apolychrome avatar Sep 17 '23 11:09 apolychrome

You need the right hda-verbs. Solutions is here:

https://forums.fedoraforum.org/showthread.php?331130-Fixing-ALC298-audio-(no-sound-from-speakers)

Thanks. this worked,my lg gram 17 have sound now。 but the left channel and right channel does not have same volume

eret9616 avatar Sep 17 '23 14:09 eret9616

This fix works but volume is crazy loud and uneven left vs right. Really hope one day it gets fixed properly

damien-bafile avatar Mar 24 '24 09:03 damien-bafile

I'm just going to add the correct order of steps to fix this issue since I wasnt a linux expert guru was able to solve this with the following links and gude on mint

https://forums.fedoraforum.org/showthread.php?331130-Fixing-ALC298-audio-(no-sound-from-speakers)&highlight=gram+sound

First thing first. You need to install the alsa tools which is not very clear, otherwise that script mention here will fail

sudo apt install alsa-tools

then download the sh and make it executable and save https://github.com/joshuagrisham/galaxy-book2-pro-linux/blob/main/sound/necessary-verbs.sh

First, grab the file "necessary-verbs.sh" from here. Then, mark the file executable: Code:

chmod +x necessary-verbs.sh

I moved the file to /usr/local/sbin

Then create a systemd unit file to run at startup in /etc/systemd/system. This causes the script to run at each startup (actually, it doesn't need to be run again after a warm reboot, but I don't know how to specify that in a unit file.)

This File will look like this and have this name under /etc/systemd/system necessary-verbs.service

You can start this file like this at startup after you made the necessary executable permissions systemctl daemon-reload systemctl enable necessary-verbs.service

System: Kernel: 6.5.0-26-generic x86_64 bits: 64 compiler: N/A Desktop: Cinnamon 6.0.4 tk: GTK 3.24.33 wm: muffin vt: 7 dm: LightDM 1.30.0 Distro: Linux Mint 21.3 Virginia base: Ubuntu 22.04 jammy Machine: Type: Laptop System: LG product: 16Z90R-A.ADC8U1 v: 0.1 serial: <superuser required> Chassis: type: 10 v: 0.1 serial: <superuser required> Mobo: LG model: 16Z90R v: FAB1 serial: <superuser required> UEFI: Phoenix v: R1ZH0330 X64 date: 02/03/2023 Audio: Device-1: Intel vendor: LG driver: sof-audio-pci-intel-tgl bus-ID: 00:1f.3 chip-ID: 8086:51ca class-ID: 0401 Sound Server-1: ALSA v: k6.5.0-26-generic running: yes Sound Server-2: PulseAudio v: 15.99.1 running: yes Sound Server-3: PipeWire v: 0.3.48 running: yes

carlos5577 avatar Mar 28 '24 19:03 carlos5577