Skip to content

Instantly share code, notes, and snippets.

@Ocawesome101
Last active November 18, 2023 10:06
Show Gist options
  • Save Ocawesome101/b1f98bd7f8bbfdb490cc531747d1b318 to your computer and use it in GitHub Desktop.
Save Ocawesome101/b1f98bd7f8bbfdb490cc531747d1b318 to your computer and use it in GitHub Desktop.
A script to enable audio for Baytrail Chromebooks. Made and tested on Manjaro Linux but has some level of package manager detection.
#!/bin/bash
# A script to make Baytrail Chromebooks' audio work (mostly) on most Linux
# distros. Tested on Manjaro and Ubuntu.
set -e
if ! [ -e "/usr/bin/git" ]; then
echo "-> This script requires Git. Attempting to install."
if [ -e "/usr/bin/pacman" ]; then
sudo pacman -S git
elif [ -e "/usr/bin/apt" ]; then
sudo apt install git
else
echo "-> Unsupported distro - you must install Git manually."
exit 1
fi
fi
repo="https://github.com/galliumos/galliumos-baytrail"
cd "$HOME"
echo "-> Cloning $repo ..."
git clone -q "$repo"
cd galliumos-baytrail
echo "-> Copying files into / ..."
sudo cp -rv etc /
sudo cp -rv lib /usr
sudo cp -rv usr /
sudo cp -rv var /
sudo cp -v debian/galliumos-baytrail.service /etc/systemd/system/
echo "-> Enabling system services ..."
sudo systemctl unmask galliumos-baytrail
sudo systemctl enable galliumos-baytrail
sudo systemctl start galliumos-baytrail
echo
echo "Done. You should now reboot, and in my testing audio only works after a suspend and resume - ie, after rebooting you must close and reopen your laptop for audio to work."
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment