Skip to content

Audio Fix

Tom edited this page Nov 10, 2022 · 17 revisions

Audio Fix

While not perfect this fix will make the audio at least bearable. It will switch the audio output from the upper tweeters to the down firing woofers. The fix is explained here: https://github.com/PJungkamp/yoga9-linux/issues/8#issuecomment-1265454056

In summary

sudo su and execute following steps:

Make sure to have i2c-tools and tlp installed:

fedora:

dnf install i2c-tools tlp

ubuntu:

apt install i2c-tools tlp

arch:

pacman -S i2c-tools tlp

Create a service to switch to the woofers on boot:

cat > /etc/systemd/system/yoga7-speaker-boot-fix.service << 'UNIT'
[Unit]
Description=yoga7 bass speaker on
After=tlp.service
[Service]
ExecStart=/bin/bash -c '/usr/sbin/i2cset -y 3 0x48 0x2 0 && /usr/sbin/i2cset -y 3 0x48 0x3 0'
[Install]
WantedBy=default.target
UNIT

Make sure to have it working after resuming from sleep/hibernation

cat > /lib/systemd/system-sleep/yoga7_speaker-sleep-fix << 'SH'
#!/bin/bash
if [[ $1 == "post" ]]; then
  /usr/sbin/i2cset -y 3 0x48 0x2 0 && /usr/sbin/i2cset -y 3 0x48 0x3 0
fi
SH

and make it executable:

chmod +x /lib/systemd/system-sleep/yoga7_speaker-sleep-fix

Disable sound power management:

Note: This might come with a risk of damaging the speakers if over amplified

cat > /etc/tlp.d/99_fix_yoga_speakers.conf << 'CONF'
SOUND_POWER_SAVE_ON_AC=0
SOUND_POWER_SAVE_ON_BAT=0
SOUND_POWER_SAVE_CONTROLLER=N
CONF

Enable, start and reload:

systemctl enable --now tlp.service
systemctl daemon-reload
systemctl enable --now yoga7-bass-speaker-on.service