Installing Audio Drivers on Atomic Fedora (Silverblue/Kinonite)

Has anyone packaged GitHub - WeirdTreeThing/chromebook-linux-audio: Script to enable audio support on many Chrome devices into rpm package for installing with ostree based distros?

@ChocolateLoverRaj Release v0.8.1 · ChocolateLoverRaj/chromebook-linux-audio · GitHub doesn’t seem to work on Fedora 40.200 Silverblue. Does the package work for you and what version of fedora do you use?

I don’t use Fedora anymore. I use NixOS. My audio fork for silverblue is pretty old, so it may need to be updated to work on Fedora 40 silverblue. What Chromebook did you try it on?

I testing Fedora on OSIRIS right now. I can’t get the audio script to work on a freshly installed Fedora 40 image therefore will be waiting for a fix before packaging the RPM.

I just built my own RPM package for this and it worked perfectly on an Akemi (Lenovo Ideapad Flex 5 Chromebook) that’s running Fedora Kinoite v41. Here’s how I built the RPM:

  • Open a terminal and run the following commands to download the Chromebook audio files and move them to the correct locations:
mkdir -p ~/cros-audio-build

cd ~/cros-audio-build

wget https://github.com/WeirdTreeThing/chromebook-linux-audio/archive/refs/heads/main.zip

unzip main.zip

wget https://github.com/WeirdTreeThing/alsa-ucm-conf-cros/archive/refs/heads/standalone.zip

unzip standalone.zip

mkdir -p build/usr/share/alsa/ucm2

mkdir -p build/lib/firmware/intel/sof-tplg

cp chromebook-linux-audio-main/conf/sof/tplg/* build/lib/firmware/intel/sof-tplg

for FILE in `ls build/lib/firmware/intel/sof-tplg` ; do xz -v build/lib/firmware/intel/sof-tplg/$FILE ; done

cp /lib/firmware/intel/sof-tplg/sof-adl-max98360a-rt5682.tplg.xz build/lib/firmware/intel/sof-tplg/sof-adl-max98360a-cs42l42.tplg.xz

cp -r alsa-ucm-conf-cros-standalone/ucm2/* build/usr/share/alsa/ucm2/

cp -r alsa-ucm-conf-cros-standalone/overrides/* build/usr/share/alsa/ucm2/conf.d
  • With your favorite text editor, create the file ~/cros-audio-build/cros-audio.spec and populate it with the following:
Name: cros-audio
Version: 1.0
Release: 1
Summary: cros-audio
License: GPLv3
Distribution: user
Group: user
Packager: user
%description
Enable Chromebook audio
%files
  • Generate the list of files that the RPM will install:
cd build

find . -type f | sed -e 's/^\.//g' >> ~/cros-audio-build/cros-audio.spec
  • Run toolbox enter to create a temporary Fedora container - this will be used to build the RPM package.

  • From that toolbox instance, run sudo dnf install rpm-build to install the tools for building RPMs.

  • Now build the RPM: rpmbuild -bb --buildroot ~/cros-audio-build/build/ ~/cros-audio-build/cros-audio.spec

  • Log out of the toolbox terminal and go back to a regular terminal.

  • The next step is to install the RPM. Since this RPM overwrites some of the stock audio drivers you must use the --force-replacefiles option while installing. Here’s an example command to install it: sudo rpm-ostree install --force-replacefiles ~/rpmbuild/RPMS/x86_64/cros-audio-1.0-1.x86_64.rpm

  • Once the RPM finishes installing, reboot, go to the Sound control panel in KDE, and change your sound device from “Off” to “Default”. Audio should now be working.

These instructions will likely become obsolete over time as the Chromebook audio situation changes, but they should work for now.