Finally got sound working on Lenovo Legion Pro 7 16ARX8H

Last few months, since I bought Lenovo Legion Pro 7 16ARX8H, I’m struggling to get sound on internal speakers. Headphones works, bluetooth works, but internal speakers don’t. After trying countless solutions, I finally found the one which works for me, disabling power saving features:

https://forums.lenovo.com/t5/Ubuntu/Ubuntu-and-legion-pro-7-16IRX8H-audio-issues/m-p/5210709?page=32

Create a script /usr/local/bin/tas2781-fix with the following contents:

#!/bin/sh

if [ "$(id -u)" -ne 0 ]; then
  printf "You must run this script as root.\n"
  exit 1
fi

POWER_SAVE_PATH="/sys/module/snd_hda_intel/parameters/power_save"
POWER_CONTROL_PATH="/sys/bus/i2c/drivers/tas2781-hda/i2c-TIAS2781:00/power/control"

check_paths() {
  [ -e "$POWER_SAVE_PATH" ] && [ -e "$POWER_CONTROL_PATH" ]
}

while ! check_paths; do
  sleep 1
done

# Disable snd_hda_intel power saving
printf "0" > "$POWER_SAVE_PATH"

# Disable runtime suspend/resume for tas2781
printf "on" > "$POWER_CONTROL_PATH"

Make script executable:

chmod +x /usr/local/bin/tas2781-fix

Now make a systemd unit /etc/systemd/system/tas2781-fix.service:

[Unit]
Description=Run the tas2781-fix script after the relevant sysfs paths become available

[Service]
Type=oneshot
ExecStart=/usr/local/bin/tas2781-fix
RemainAfterExit=true
TimeoutSec=60

[Install]
WantedBy=multi-user.target

Enable the unit and restart by executing

systemctl daemon-reload
systemctl enable tas2781-fix.service

Reboot.

1 Like

Unfortunately didn’t help on Xiaomi Redmi book pro 16 2024. But I have these files, except POWER_CONTROL_PATH has different path "/sys/devices/pci0000:00/power/control" :frowning: No sound Xiaomi Redmi Book 16 2024 (Intel Ultra 125H)