The update to Ubuntu 20.04 LTS broke the sound on my ASUS Zenbook. This was quite a surprise, since with 18.04 everything worked perfectly out of the box... luckily there is a rather simple fix to the issue.
The model of my laptop is ASUS UX430, but this solution might apply to other Zenbook variants.
First of all we need to change the default ALSA configuration to match the actual hardware on the laptop (ALC295) because for some reason the default value in 20.04 is not anymore correct. To do this we need to edit the file /etc/modprobe.d/alsa-base.conf
and update the value on the following line:
options snd-hda-intel model=asus-zenbook
and then restart Pulseaudio with pulseaudio -k
from a terminal.
This change will fix the main issue; however the volume control for the main speakers will not work properly and we need some more configuration tuning. Edit the file /usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common
and add the missing section [Element Master]
immediately before the section [Element PCM]
:
...
[Element Master]
switch = mute
volume = ignore
[Element PCM]
...
Note that after this change the Master volume should be set fixed to maximum in order for the volume controls to work as expected, this can be achieved e.g. with alsamixer or from the command line with amixer sset 'Master' 100%
.
System updates can revert the sound configuration to the default one, therefore I prepared a script to quickly re-apply the correction:
#!/bin/bash
CONFFILE="/usr/share/pulseaudio/alsa-mixer/paths/analog-output.conf.common"
if cat "$CONFFILE" | grep -xq "[Element Master]"; then
echo "File is ok."
else
sudo sed -i '/^.*Element.PCM.*/i [Element Master]\nswitch = mute\nvolume = ignore\n' "$CONFFILE"
pulseaudio -k
amixer sset 'Master' 100%
fi
Sources:
Condividi: