# Workaround for Asus 1011PX where alsa headphone toggle code fails to enable speakers
cat <<EOF | sudo tee /usr/bin/amixer_headphone_fix.sh
/usr/bin/amixer -c 0 sset Headphone playback 100%
/usr/bin/amixer -c 0 sset Headphone unmute
EOF
# credit - https://ubuntuforums.org/showthread.php?t=2279687
sudo chmod +x /usr/bin/amixer_headphone_fix.sh
# automatically run this on startup
cat <<EOF | sudo tee -a /etc/xdg/lxsession/Lubuntu/autostart
xterm -e /usr/bin/amixer_script.sh
EOF
# add desktop icon for manual turn on if headphones plugged
cat <<-EOF! | sudo tee /usr/share/applications/asus-speaker-workaround.desktop
[Desktop Entry]
Version=1.0
Name=Fix Asus Speaker workaround
Comment=Make it so you can hear sound again after plugging headphones
Exec=lxterminal -e "/usr/bin/amixer_headphone_fix.sh"
Icon=audio-speakers
Type=Application
Categories=AudioVideo;Audio;
EOF!
Currently using the following workaround:
# Workaround for Asus 1011PX where alsa headphone toggle code fails to enable speakers amixer_ headphone_ fix.sh /ubuntuforums. org/showthread. php?t=2279687 amixer_ headphone_ fix.sh
cat <<EOF | sudo tee /usr/bin/
/usr/bin/amixer -c 0 sset Headphone playback 100%
/usr/bin/amixer -c 0 sset Headphone unmute
EOF
# credit - https:/
sudo chmod +x /usr/bin/
# automatically run this on startup lxsession/ Lubuntu/ autostart amixer_ script. sh
cat <<EOF | sudo tee -a /etc/xdg/
xterm -e /usr/bin/
EOF
# add desktop icon for manual turn on if headphones plugged applications/ asus-speaker- workaround. desktop amixer_ headphone_ fix.sh" AudioVideo; Audio;
cat <<-EOF! | sudo tee /usr/share/
[Desktop Entry]
Version=1.0
Name=Fix Asus Speaker workaround
Comment=Make it so you can hear sound again after plugging headphones
Exec=lxterminal -e "/usr/bin/
Icon=audio-speakers
Type=Application
Categories=
EOF!