Bug 217333

Summary: No sound from laptop speakers, ALC294 codec
Product: Drivers Reporter: Antony (astral54rus)
Component: Sound(ALSA)Assignee: Jaroslav Kysela (perex)
Status: NEW ---    
Severity: high CC: astral54rus, tiwai
Priority: P3    
Hardware: Intel   
OS: Linux   
See Also: https://bugzilla.kernel.org/show_bug.cgi?id=196429
https://bugzilla.kernel.org/show_bug.cgi?id=206589
https://bugzilla.kernel.org/show_bug.cgi?id=216392
https://bugzilla.kernel.org/show_bug.cgi?id=206145
https://bugzilla.kernel.org/show_bug.cgi?id=205859
https://bugzilla.kernel.org/show_bug.cgi?id=206935
Kernel Version: 5.19.0-38-generic Subsystem:
Regression: No Bisected commit-id:
Attachments: hardware_info
dmesg | grep snd
dmesg
alsa-info
alsa-info
A test fix patch

Description Antony 2023-04-13 17:53:07 UTC
Created attachment 304129 [details]
hardware_info

No sound from laptop speakers ASUS ROG Strix G712LU. But sound works through headphones connected to the 3.5mm port.

Tried various distributions: linuxmint-21.1-cinnamon-64bit, manjaro-kde-22.0.5-230316-linux61, pop-os_22.04_amd64_nvidia_25, ubuntu-22.10-desktop-amd64, also trying Ubuntu lunar-desktop-amd64 with kernel 6.2. Result is negative. In windows works fine. 
I suspect there is an issue with the audio drivers.
Comment 3 Antony 2023-04-13 18:04:39 UTC
Created attachment 304130 [details]
dmesg | grep snd
Comment 7 Antony 2023-04-13 18:35:51 UTC
Created attachment 304131 [details]
dmesg
Comment 9 Antony 2023-04-13 20:06:43 UTC
In my case, the method from this article helped. This leads to the conclusion that something is simply messed up in the drivers.

https://wiki.archlinux.org/title/ASUS_ROG_G533QS
Comment 10 Antony 2023-04-13 20:36:31 UTC
I hope that they will fix it in the upcoming kernel releases.
Comment 11 Takashi Iwai 2023-04-14 06:18:08 UTC
(In reply to Antony from comment #9)
> In my case, the method from this article helped. This leads to the
> conclusion that something is simply messed up in the drivers.
> 
> https://wiki.archlinux.org/title/ASUS_ROG_G533QS

Which workaround did you apply exactly?  Both the model option *and* hdajackretask?
IOW, doesn't it model option alone suffice?

In anyway, please give alsa-info.sh output.  Run the script with --no-upload option and attach the generated file.
Comment 12 Antony 2023-04-14 16:58:30 UTC
Created attachment 304137 [details]
alsa-info
Comment 13 Antony 2023-04-14 16:59:07 UTC
(In reply to Takashi Iwai from comment #11)
> (In reply to Antony from comment #9)
> > In my case, the method from this article helped. This leads to the
> > conclusion that something is simply messed up in the drivers.
> > 
> > https://wiki.archlinux.org/title/ASUS_ROG_G533QS
> 
> Which workaround did you apply exactly?  Both the model option *and*
> hdajackretask?
> IOW, doesn't it model option alone suffice?
> 
> In anyway, please give alsa-info.sh output.  Run the script with --no-upload
> option and attach the generated file.

Reinstalled the system to reproduce these manipulations again.
And after adding this line "options snd-hda-intel model=alc294-lenovo-mic" to the file "/etc/modprobe.d/alsa-base.conf" and rebooting, the sound started working.
Comment 14 Antony 2023-04-14 17:03:15 UTC
Created attachment 304138 [details]
alsa-info
Comment 15 Takashi Iwai 2023-04-15 09:51:25 UTC
If the model option alone suffices, the following patch should work.  Could you try it and test without model option?
Comment 16 Takashi Iwai 2023-04-15 09:52:01 UTC
Created attachment 304141 [details]
A test fix patch
Comment 17 Antony 2023-04-17 02:55:57 UTC
(In reply to Takashi Iwai from comment #16)
> Created attachment 304141 [details]
> A test fix patch

Sorry, but I am just starting to switch from Windows to Linux. 
I don't quite understand how to use this patch, there is no file called patch_realtek.c in the path /usr/src/linux-hwe-5.19-headers-5.19.0-38/sound/pci/hda/, do I need to create it?
Comment 18 Takashi Iwai 2023-04-17 06:06:11 UTC
If you don't know how to modify the kernel, better to ask your distribution people for the help.
Comment 19 Antony 2023-04-19 14:12:48 UTC
An attempt to ask for help ended unsuccessfully, an attempt to apply the fix myself got stuck here:


user@user-G712LU:~/linux-hwe-5.19-5.19.0$ make -j 11
  DESCEND objtool
  CALL    scripts/atomic/check-atomics.sh
  CALL    scripts/checksyscalls.sh
  CHK     include/generated/compile.h
  CC      drivers/gpu/drm/i915/display/intel_lpe_audio.o
  CC      drivers/gpu/drm/i915/display/intel_dp_aux_backlight.o
  CC      drivers/gpu/drm/i915/display/intel_dp_hdcp.o
  CC      drivers/gpu/drm/i915/display/intel_dp_link_training.o
  CC      drivers/gpu/drm/i915/display/intel_dp_mst.o
  CC      drivers/gpu/drm/i915/display/intel_dsi.o
  CC      drivers/gpu/drm/i915/display/intel_dsi_dcs_backlight.o
  CC      drivers/gpu/drm/i915/display/intel_dsi_vbt.o
  CC      drivers/gpu/drm/i915/display/intel_dvo.o
  CC      drivers/gpu/drm/i915/display/intel_gmbus.o
  CC      drivers/gpu/drm/i915/display/intel_hdmi.o
drivers/gpu/drm/i915/display/intel_lpe_audio.c: In function ‘lpe_audio_irq_init’:
drivers/gpu/drm/i915/display/intel_lpe_audio.c:178:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]
  178 |         static const struct pci_device_id irq_quirk_ids[] = {
      |         ^~~~~~
cc1: all warnings being treated as errors
make[4]: *** [scripts/Makefile.build:257: drivers/gpu/drm/i915/display/intel_lpe_audio.o] Error 1
make[4]: *** Waiting for unfinished jobs....
make[3]: *** [scripts/Makefile.build:474: drivers/gpu/drm/i915] Error 2
make[2]: *** [scripts/Makefile.build:474: drivers/gpu/drm] Error 2
make[1]: *** [scripts/Makefile.build:474: drivers/gpu] Error 2
make: *** [Makefile:1850: drivers] Error 2
Comment 20 Takashi Iwai 2023-04-19 15:31:27 UTC
That's an irrelevant problem.  You really need to ask distros for better help, or consider switching your distro...