No sound to laptop speakers

Hi, so I have problems with my laptop audio. Headphones work both with Bluetooth and by type C cable. I have tried some things that I could find online. I updated the kernel and installed pipe wire and PulseAudio. I have also tried to unmute with amixer.

This maybe is interesting?

amixer sset Speaker unmute                                       ✔ 
amixer: Unable to find simple control 'Speaker',0

Here is all the info I can think of giving.

System:
  Kernel: 5.17.1-1-rt16-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 11.2.0
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.17-rt-x86_64
    root=UUID=333f6e70-9683-450e-ac01-16ab6d323b1f rw quiet
    cryptdevice=UUID=394675e1-92c4-48c6-901d-592f7f77b906:luks-394675e1-92c4-48c6-901d-592f7f77b906
    root=/dev/mapper/luks-394675e1-92c4-48c6-901d-592f7f77b906 splash
    apparmor=1 security=apparmor
    resume=/dev/mapper/luks-a3aaad29-5fb0-4f44-858b-85d1cb28646a
    udev.log_priority=3
  Desktop: GNOME v: 41.5 tk: GTK v: 3.24.33 wm: gnome-shell dm: GDM v: 41.3
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: LENOVO product: 82N6 v: Legion 7 16ACHg6
    serial: <superuser required> Chassis: type: 10 v: Legion 7 16ACHg6
    serial: <superuser required>
  Mobo: LENOVO model: LNVNB161216 v: SDK0R32862 WIN
    serial: <superuser required> UEFI: LENOVO v: GKCN49WW date: 11/08/2021
Battery:
  ID-1: BAT0 charge: 74.6 Wh (100.0%) condition: 74.6/80.0 Wh (93.2%)
    volts: 17.3 min: 15.4 model: Celxpert L20C4PC1 type: Li-poly
    serial: <filter> status: full cycles: 91
CPU:
  Info: model: AMD Ryzen 7 5800H with Radeon Graphics bits: 64 type: MT MCP
    arch: Zen 3 family: 0x19 (25) model-id: 0x50 (80) stepping: 0
    microcode: 0xA50000C
  Topology: cpus: 1x cores: 8 tpc: 2 threads: 16 smt: enabled cache:
    L1: 512 KiB desc: d-8x32 KiB; i-8x32 KiB L2: 4 MiB desc: 8x512 KiB
    L3: 16 MiB desc: 1x16 MiB
  Speed (MHz): avg: 3350 high: 3714 min/max: 400/4463 boost: enabled
    scaling: driver: amd-pstate governor: schedutil cores: 1: 3168 2: 3237
    3: 3375 4: 3324 5: 3527 6: 3497 7: 3308 8: 3350 9: 3290 10: 3245 11: 3610
    12: 3167 13: 3165 14: 3165 15: 3473 16: 3714 bogomips: 102204
  Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
  Vulnerabilities:
  Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: spec_store_bypass
    mitigation: Speculative Store Bypass disabled via prctl
  Type: spectre_v1
    mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Retpolines, IBPB: conditional, IBRS_FW,
    STIBP: always-on, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: NVIDIA GA104M [GeForce RTX 3080 Mobile / Max-Q 8GB/16GB]
    vendor: Lenovo driver: nvidia v: 510.60.02 alternate: nouveau,nvidia_drm
    pcie: gen: 1 speed: 2.5 GT/s lanes: 8 link-max: gen: 4 speed: 16 GT/s
    lanes: 16 bus-ID: 01:00.0 chip-ID: 10de:24dc class-ID: 0300
  Display: x11 server: X.org v: 1.21.1.3 with: Xwayland v: 22.1.1
    compositor: gnome-shell driver: X: loaded: nvidia gpu: nvidia display-ID: :1
    screens: 1
  Screen-1: 0 s-res: 2560x1600 s-size: <missing: xdpyinfo>
  Monitor-1: DP-4 res: 2560x1600 hz: 60 dpi: 188
    size: 345x215mm (13.58x8.46") diag: 407mm (16") modes: N/A
  Message: Unable to show GL data. Required tool glxinfo missing.
Audio:
  Device-1: NVIDIA GA104 High Definition Audio driver: snd_hda_intel v: kernel
    pcie: gen: 1 speed: 2.5 GT/s lanes: 8 link-max: gen: 4 speed: 16 GT/s
    lanes: 16 bus-ID: 01:00.1 chip-ID: 10de:228b class-ID: 0403
  Device-2: AMD Family 17h/19h HD Audio vendor: Lenovo driver: snd_hda_intel
    v: kernel pcie: gen: 3 speed: 8 GT/s lanes: 16 link-max: gen: 4
    speed: 16 GT/s bus-ID: 06:00.6 chip-ID: 1022:15e3 class-ID: 0403
  Sound Server-1: ALSA v: k5.17.1-1-rt16-MANJARO running: yes
  Sound Server-2: JACK v: 1.9.20 running: no
  Sound Server-3: PulseAudio v: 15.0 running: yes
  Sound Server-4: PipeWire v: 0.3.49 running: no
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
    vendor: Lenovo driver: r8169 v: kernel pcie: gen: 1 speed: 2.5 GT/s lanes: 1
    port: 1000 bus-ID: 03:00.0 chip-ID: 10ec:8168 class-ID: 0200
  IF: eno1 state: down mac: <filter>
  Device-2: Intel Wi-Fi 6 AX200 vendor: Rivet Networks Killer™
    driver: iwlwifi v: kernel pcie: gen: 2 speed: 5 GT/s lanes: 1
    bus-ID: 04:00.0 chip-ID: 8086:2723 class-ID: 0280
  IF: wlp4s0 state: up mac: <filter>
Bluetooth:
  Device-1: Intel AX200 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 3-4:2
    chip-ID: 8087:0029 class-ID: e001
  Report: rfkill ID: hci0 rfk-id: 3 state: up address: see --recommends
Drives:
  Local Storage: total: 1.16 TiB used: 36.27 GiB (3.1%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:4 vendor: Samsung
    model: MZVLB1T0HBLR-000L2 size: 953.87 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 3L1QEXF7 temp: 49.9 C scheme: GPT
  ID-2: /dev/nvme1n1 maj-min: 259:0 vendor: Western Digital
    model: WDS250G2B0C-00PXH0 size: 232.89 GiB block-size: physical: 512 B
    logical: 512 B speed: 31.6 Gb/s lanes: 4 type: SSD serial: <filter>
    rev: 211210WD temp: 45.9 C scheme: GPT
Partition:
  ID-1: / raw-size: 215.55 GiB size: 211.11 GiB (97.94%)
    used: 36.27 GiB (17.2%) fs: ext4 dev: /dev/dm-0 maj-min: 254:0
    mapped: luks-394675e1-92c4-48c6-901d-592f7f77b906
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
    used: 448 KiB (0.1%) fs: vfat dev: /dev/nvme1n1p1 maj-min: 259:1
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 17.03 GiB used: 0 KiB (0.0%)
    priority: -2 dev: /dev/dm-1 maj-min: 254:1
    mapped: luks-a3aaad29-5fb0-4f44-858b-85d1cb28646a
Sensors:
  System Temperatures: cpu: N/A mobo: N/A gpu: nvidia temp: 56 C
  Fan Speeds (RPM): N/A
Info:
  Processes: 490 Uptime: 5m wakeups: 1 Memory: 15.55 GiB
  used: 1.92 GiB (12.4%) Init: systemd v: 250 tool: systemctl Compilers:
  gcc: 11.2.0 clang: 13.0.1 Packages: 1320 pacman: 1313 lib: 421 flatpak: 0
  snap: 7 Shell: Zsh v: 5.8.1 running-in: gnome-terminal inxi: 3.3.15

### Configuration dump generated at Mon Apr 18 14:22:23 2022

load-module module-device-restore
load-module module-stream-restore
load-module module-card-restore
load-module module-augment-properties
load-module module-switch-on-port-available
load-module module-udev-detect
load-module module-alsa-card device_id="0" name="pci-0000_01_00.1" card_name="alsa_card.pci-0000_01_00.1" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1"
load-module module-alsa-card device_id="1" name="pci-0000_06_00.6" card_name="alsa_card.pci-0000_06_00.6" namereg_fail=false tsched=yes fixed_latency_range=no ignore_dB=no deferred_volume=yes use_ucm=yes avoid_resampling=no card_properties="module-udev-detect.discovered=1"
load-module module-jackdbus-detect channels=2
load-module module-bluetooth-policy
load-module module-bluetooth-discover
load-module module-bluez5-discover
load-module module-dbus-protocol
load-module module-native-protocol-unix
load-module module-gsettings
load-module module-default-device-restore
load-module module-always-sink
load-module module-intended-roles
load-module module-suspend-on-idle
load-module module-console-kit
load-module module-systemd-login
load-module module-position-event-sounds
load-module module-role-cork
load-module module-filter-heuristics
load-module module-filter-apply
load-module module-cli-protocol-unix

set-sink-volume alsa_output.pci-0000_06_00.6.analog-stereo 0x10000
set-sink-mute alsa_output.pci-0000_06_00.6.analog-stereo no
suspend-sink alsa_output.pci-0000_06_00.6.analog-stereo yes

set-source-volume alsa_output.pci-0000_06_00.6.analog-stereo.monitor 0x10000
set-source-mute alsa_output.pci-0000_06_00.6.analog-stereo.monitor no
suspend-source alsa_output.pci-0000_06_00.6.analog-stereo.monitor yes
set-source-volume alsa_input.pci-0000_06_00.6.analog-stereo 0x4421
set-source-mute alsa_input.pci-0000_06_00.6.analog-stereo no
suspend-source alsa_input.pci-0000_06_00.6.analog-stereo yes

set-card-profile alsa_card.pci-0000_01_00.1 off
set-card-profile alsa_card.pci-0000_06_00.6 output:analog-stereo+input:analog-stereo

set-default-sink alsa_output.pci-0000_06_00.6.analog-stereo
set-default-source alsa_input.pci-0000_06_00.6.analog-stereo

### EOF


Simple mixer control 'IEC958',0
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',1
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',2
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',3
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',4
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]
Simple mixer control 'IEC958',5
  Capabilities: pswitch pswitch-joined
  Playback channels: Mono
  Mono: Playback [on]

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

speaker-test 1.2.6

Playback device is default
Stream parameters are 48000Hz, S16_LE, 1 channels
Using 16 octaves of pink noise
Rate set to 48000Hz (requested 48000Hz)
Buffer size range from 192 to 2097152
Period size range from 64 to 699051
Using max buffer size 2097152
Periods = 4
was set period_size = 524288
was set buffer_size = 2097152
 0 - Front Left
Time per period = 10,928825
 0 - Front Left
Time per period = 10,928515
 0 - Front Left
Time per period = 10,928743
 0 - Front Left
Time per period = 10,928567
 0 - Front Left
Time per period = 10,928428
 0 - Front Left
Time per period = 10,928667
 0 - Front Left
Time per period = 10,928268
 0 - Front Left
Time per period = 10,928553
 0 - Front Left
Time per period = 10,927838
 0 - Front Left
Time per period = 10,928274
 0 - Front Left

null
    Discard all samples (playback) or generate zero samples (capture)
lavrate
    Rate Converter Plugin Using Libav/FFmpeg Library
samplerate
    Rate Converter Plugin Using Samplerate Library
speexrate
    Rate Converter Plugin Using Speex Resampler
jack
    JACK Audio Connection Kit
oss
    Open Sound System
pipewire
    PipeWire Sound Server
pulse
    PulseAudio Sound Server
speex
    Plugin using Speex DSP (resample, agc, denoise, echo, dereverb)
upmix
    Plugin for channel upmix (4,6,8)
vdownmix
    Plugin for channel downmix (stereo) with a simple spacialization
default
    Default ALSA Output (currently PulseAudio Sound Server)
hdmi:CARD=NVidia,DEV=0
    HDA NVidia, HDMI 0
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=1
    HDA NVidia, HDMI 1
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=2
    HDA NVidia, HDMI 2
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=3
    HDA NVidia, HDMI 3
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=4
    HDA NVidia, HDMI 4
    HDMI Audio Output
hdmi:CARD=NVidia,DEV=5
    HDA NVidia, HDMI 5
    HDMI Audio Output
usbstream:CARD=NVidia
    HDA NVidia
    USB Stream Output
sysdefault:CARD=Generic
    HD-Audio Generic, ALC287 Analog
    Default Audio Device
front:CARD=Generic,DEV=0
    HD-Audio Generic, ALC287 Analog
    Front output / input
surround21:CARD=Generic,DEV=0
    HD-Audio Generic, ALC287 Analog
    2.1 Surround output to Front and Subwoofer speakers
surround40:CARD=Generic,DEV=0
    HD-Audio Generic, ALC287 Analog
    4.0 Surround output to Front and Rear speakers
surround41:CARD=Generic,DEV=0
    HD-Audio Generic, ALC287 Analog
    4.1 Surround output to Front, Rear and Subwoofer speakers
surround50:CARD=Generic,DEV=0
    HD-Audio Generic, ALC287 Analog
    5.0 Surround output to Front, Center and Rear speakers
surround51:CARD=Generic,DEV=0
    HD-Audio Generic, ALC287 Analog
    5.1 Surround output to Front, Center, Rear and Subwoofer speakers
surround71:CARD=Generic,DEV=0
    HD-Audio Generic, ALC287 Analog
    7.1 Surround output to Front, Center, Side, Rear and Woofer speakers
usbstream:CARD=Generic
    HD-Audio Generic
    USB Stream Output
snd_hda_codec_realtek   159744  1
snd_hda_codec_generic    98304  1 snd_hda_codec_realtek
ledtrig_audio          16384  1 snd_hda_codec_generic
snd_hda_codec_hdmi     73728  1
snd_hda_intel          57344  6
snd_intel_dspcfg       32768  1 snd_hda_intel
snd_intel_sdw_acpi     20480  1 snd_intel_dspcfg
snd_hda_codec         176128  4 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec_realtek
snd_hda_core          106496  5 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek
snd_hwdep              16384  1 snd_hda_codec
snd_pcm               159744  5 snd_hda_codec_hdmi,snd_hda_intel,snd_hda_codec,snd_hda_core
snd_timer              40960  1 snd_pcm
snd_hda_scodec_cs35l41_i2c    16384  0
snd                   118784  19 snd_hda_codec_generic,snd_hda_codec_hdmi,snd_hwdep,snd_hda_intel,snd_hda_codec,snd_hda_codec_realtek,snd_timer,snd_pcm
snd_hda_scodec_cs35l41    16384  1 snd_hda_scodec_cs35l41_i2c
soundcore              16384  1 snd
snd_soc_cs35l41_lib    28672  2 snd_hda_scodec_cs35l41_i2c,snd_hda_scodec_cs35l41

what is the output of: aplay -l

**** List of PLAYBACK Hardware Devices ****
card 0: NVidia [HDA NVidia], device 3: HDMI 0 [HDMI 0]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 7: HDMI 1 [HDMI 1]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 8: HDMI 2 [HDMI 2]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 9: HDMI 3 [HDMI 3]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 10: HDMI 4 [HDMI 4]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 0: NVidia [HDA NVidia], device 11: HDMI 5 [HDMI 5]
  Subdevices: 1/1
  Subdevice #0: subdevice #0
card 1: Generic [HD-Audio Generic], device 0: ALC287 Analog [ALC287 Analog]
  Subdevices: 1/1
  Subdevice #0: subdevice #0

also outputs from these following commands:
speaker-test
aplay -L
lsmod | grep snd
and put them all into your first post

Ok, it was done. The test just kept on repeating. Should I let it keep going for longer?

no abort it… it looks like you have 2 audio devices which both use the same driver, thats probably whats causing the speaker problem… you could try this command, but im not sure if it will work:
echo "options snd-hda-intel index=1" > /etc/modprobe.d/alsa.conf
reboot

Ok, I tried it and still no audio. Should I post new outputs?

try recreating initframs:
sudo mkinitcpio -P
reboot

No luck there.

so lets try this, go to: /usr/share/alsa/alsa.conf and add at the end there these lines:
defaults.pcm.!card 1
defaults.pcm.!device 0
reboot
if it doesnt work go again to /usr/share/alsa/alsa.conf and add to the previous 2 lines this line:
defaults.ctl.card 1
reboot

https://wiki.archlinux.org/title/ALSA

Ok I did that and there is no change.

This is how it should be? Not inside any brackets?

yes thats how… so if it didnt work, just remove the entries from there and check this link:
https://unix.stackexchange.com/questions/698622/how-can-manage-output-device-with-amixer-command

amixer -c 1 sset Master 80%                                      ✔ 
Simple mixer control 'Master',0
  Capabilities: pvolume pvolume-joined pswitch pswitch-joined
  Playback channels: Mono
  Limits: Playback 0 - 87
  Mono: Playback 70 [80%] [-12.75dB] [on]

Something like this? Also didn’t help.

run alsamixer in terminal and press f6 and select your audio device and using your keyboard arrow-keys, scroll to the right until you find a setting called Auto-Mute If this is defaulted to enabled then it must be changed by using your up/down arrow keys to disabled, and then you can hit the escape key to exit.

Yes it is alredy disabled.

so try install following package: sof-firmware and also the latest kernel 5.17.1-3, reboot

ok so I changed to linux517.1-3 and sof-firmware was installed sense before. Still no sound.

it doesnt look good for you, theres a lot people with your speaker issue (realtek alc287+lenovo)… try these links:
https://forum.manjaro.org/t/headphones-work-but-laptop-speakers-do-not/93362
and also try this patch:
https://wiki.archlinux.org/title/Lenovo_Yoga_7i#Speaker_audio
even when its written there that its included since the 5.14 kernel, youll have nothing to lose

are you using HDMI-Output for the speakers ?