This repo contains a small script, which fixes the volume control bug of the Lenovo 82Y8 Yoga Pro 7 14APH8 (Gen8) running Linux.
The bug is described here and the fix here.
Because the config have to be updated after every update the process is automated. It was tested on Fedora 38 but can be generally applied with changes to the config path.
You can run the script as it is after an update to fix the volume controls. Note that root privileges are needed to edit the alsa-mixer config files.
sudo chmod u+x fix_alsa_mixer.sh
sudo ./fix_alsa_mixer.sh
To run the script automated "without" root privileges you can set the SUID bit on the file. However this is only supported on executables so you need to cross-compile it into C code first to get a binary.
# adapt this to your package manager
sudo dnf install shc
# compile the script
shc -Sf fix_alsa_mixer.sh
Finally, change the owner and add the SUID bit to the executable.
# change owner
sudo chown root:root fix_alsa_mixer.sh.x
# set SUID bit
sudo chmod 4701 fix_alsa_mixer.sh.x
You can now run the binary as your normal user!
If you use the dnf
as your package manager you can use the post-transaction-actions
plugin to run the binary after every update.
# install the plugin
sudo dnf install python3-dnf-plugin-post-transaction-actions
# copy the binary
sudo cp fix_alsa_mixer.sh.x /etc/dnf/plugins/post-transaction-actions.d/
# copy the action script
sudo cp fix_alsa_mixer.action /etc/dnf/plugins/post-transaction-actions.d/
The script will now be executed automatically after every pulseaudio
or alsa
package upgrade.