Trying to patch kernel on Treeya stoney ridge for audio support

This is my third fresh linux install trying to make audio work,

I am following Replace stoney-kernel with newer kernel built locally instructions

(thanks for your amazing work guys)

The thing is after

git apply liquorix-stoney.patch

I get

liquorix-stoney.patch:58: trailing whitespace.

liquorix-stoney.patch:68: trailing whitespace.

liquorix-stoney.patch:70: space before tab in indent.
DAILINK_COMP_ARRAY(COMP_CODEC("i2c-DLGS7219:00", "da7219-hifi")));
liquorix-stoney.patch:72: space before tab in indent.
DAILINK_COMP_ARRAY(COMP_CODEC("ADAU7002:00", "adau7002-hifi")));
liquorix-stoney.patch:73: trailing whitespace.

warning: squelched 59 whitespace errors
warning: 64 lines add whitespace errors.

Should I just keep going? Or something is wrong?

I am on

Linux jose-treeya 6.12.43+deb13-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.12.43-1 (2025-08-27) x86_64 GNU/Linux 

I also don’ t understand if I should apply the 3 patches linked at the end of the post or if the last one not (it is a raw file, not a .patch file) because it says “ making sure you are not a bot”

thanks!!

Anybody?

My environment: Acer Chromebook Spin 311 (R721T) running Debian 13.

Currently, with the latest kernel linux-6.17.7, only one patch is required.

cd ~
mkdir -p src
cd src
git clone https://github.com/damentz/liquorix-package
cd liquorix-package
wget -O linux-liquorix/debian/patches/debian/amd-gpu.patch https://lore.kernel.org/all/[email protected]/raw
echo 'debian/amd-gpu.patch' >> linux-liquorix/debian/patches/series

# you might run into trouble with errors for signing
# look for instances in the scripts folder of dpkg-buildpackage and add the --no-sign flag to all lines.
sed -i '/dpkg-buildpackage/ {/--no-sign/! s/$/ --no-sign/}' scripts/debian/container_build-binary.sh scripts/debian/env.sh

./scripts/debian/docker_bootstrap.sh
./scripts/debian/docker_build-source.sh debian trixie
./scripts/debian/docker_build-binary.sh amd64 debian trixie

cd artifacts/debian/trixie

# You’ll find several .deb files here — you only need these two:
linux-headers-6.17.7-1-liquorix-amd64_6.17-7.1~trixie_amd64.deb
linux-image-6.17.7-1-liquorix-amd64_6.17-7.1~trixie_amd64.deb
# Install on your Chromebook:
sudo dpkg -i linux-headers-6.17.7-1-liquorix-amd64_6.17-7.1~trixie_amd64.deb
sudo dpkg -i linux-image-6.17.7-1-liquorix-amd64_6.17-7.1~trixie_amd64.deb

Reboot, and your audio should now be working.

The Liquorix project is designed to support multi-distribution packaging (Debian + Ubuntu).
Therefore, by default, it will:
Generate these images for Debian: bookworm, trixie, forky, sid
Generate these images for Ubuntu: jammy, noble, plucky, questing
This is done to automatically create binary packages (e.g., .deb) for all major distributions, making it convenient for the official team to upload all versions of the Liquorix kernel at once.

If the image was created successfully, you should see that all packages for Ubuntu and Debian have been generated by default:

$ docker images | grep liquorix
liquorix_amd64/ubuntu/questing latest 7bca0cb42cc9 About a minute ago 696MB
liquorix_amd64/ubuntu/plucky latest c910ff9ec894 About a minute ago 717MB
liquorix_amd64/ubuntu/jammy latest 0eda4c1243a7 About a minute ago 728MB
liquorix_amd64/ubuntu/noble latest d8a2b743ce1a About a minute ago 719MB
liquorix_amd64/debian/sid latest 53c4df4a97ef About a minute ago 1.17GB
liquorix_amd64/debian/forky latest d3957021b05e 2 minutes ago 1.12GB
liquorix_amd64/debian/trixie latest 20d8f2ac4d55 2 minutes ago 923MB
liquorix_amd64/debian/bookworm latest ea2b45996ca5 2 minutes ago 831MB

#to delete one package (ex:Ubuntu questing), use its id above
$ docker image rm 7bca0cb42cc9

#to delete all packages at once
$ docker image rm $(docker images | grep liquorix | awk ‘{print $3}’) -f

To save time and space, you can generate the image only for Debian 13 (Trixie):

> 1. modify ~/src/liquorix-package/scripts/debian/env.sh
> 23c23
> source_release='bookworm'
> --- to
> source_release='trixie'
> 
> 26,27c26,27
> releases_debian=('bookworm' 'trixie' 'forky' 'sid')
> releases_ubuntu=('jammy' 'noble' 'plucky' 'questing')
> --- to
> releases_debian=('trixie')
> releases_ubuntu=()
> 2. modify ~/src/liquorix-package/scripts/debian/docker_bootstrap.sh
> 29c29
> declare -a distros=('debian' 'ubuntu')
> --- to 
> declare -a distros=('debian')

#if you encounter error: /bin/sh: 1: gawk: not found

> 3. modify ~/src/liquorix-package/scripts/debian/Dockerfile
> 26c26,27
>          schedtool &&\
> --- to
>          schedtool \
>          gawk &&\

Then

cd ~/src/liquorix-package
./scripts/debian/docker_bootstrap.sh
./scripts/debian/docker_build-source.sh debian trixie
./scripts/debian/docker_build-binary.sh amd64 debian trixie

only Debian trixie package will be generated

$docker images | grep liquorix
REPOSITORY TAG IMAGE ID CREATED SIZE
liquorix_amd64/debian/trixie latest a4af92caeedc 2 hours ago 781MB

@yang3 I tried following your steps but I’m stuck at this error message:

[INFO ] Using default process count, 2
[INFO ] liquorix_amd64/debian/trixie: Docker image not found, building with Dockerfile.
Dockerfile:32

31 |
32 | >>> RUN echo “$PUBLIC” | gpg --import &&\
33 | >>> echo “$SECRET” | gpg --import &&\
34 | >>> echo “default-key $DEFAULT” > ~/.gnupg/gpg.conf

35
ERROR: failed to solve: process “/bin/sh -c echo \”$PUBLIC\"
nf" did not complete successfully: exit code: 2

I followed these steps here beforehand:

  1. Execute gpg --full-gen-key and follow prompts

  2. Run gpg --list-secret-keys to produce a list of keys you own the secrets to

  3. Create ~/.gnupg/gpg.conf and add default-key EXAMPLE1234..., where the example is your key from the previous output

Is there anything I’m missing?

Based on the error message provided:

ERROR: failed to solve: process “/bin/sh -c echo \”$PUBLIC"
nf" did not complete successfully: exit code: 2

#Possible cause: You are using “smart quotes” instead of normal "ASCII quotes"
#(I don’t understand what caused this. Have any files been modified? maybe something wrong in your ~/.gnupg/gpg.conf ?)

The quotes in error message are:

“ ”  ← smart quotes (WRONG)

But Docker (and any shell) requires standard ASCII double quotes:

" "  ← correct

Smart quotes break the shell parser, causing weird behavior like this:

nf
exit code: 2

This happens because the non-ASCII “ ” characters get misinterpreted, and the shell ends up executing broken commands.

#Correct version

Replace all smart quotes with normal ASCII quotes:

RUN echo "$PUBLIC" | gpg --import && \
    echo "$SECRET" | gpg --import && \
    echo "default-key $DEFAULT" > ~/.gnupg/gpg.conf

This will fix the parsing error.

Hi @yang3 thanks for the reply, I tried to edit the Dockers file to replace the “ as you mention but it did not seem to work, I also tried using ‘ instead, but it did not work. I copied the text you shared but still, I always got the same error message. Could it be an issue with the text editor I’m using? I tried editing with Kate, Kwrite and vim. Or maybe I’m not editing properly?

I suggest restoring all changed files and starting over.

check all files modified
git status

If you want to completely revert your Git repository to its “initial state” with a single command—that is, discard all uncommitted changes, reset the staging area, and remove untracked files and directories—you can use:

git reset --hard && git clean -fd
Note: This will permanently delete all uncommitted changes and cannot be undone.
git reset --hard → Resets both the staging area and the working directory to the latest commit
git clean -fd → Removes all untracked files and directories

This time, do not modify any of the following files:

~/src/liquorix-package/scripts/debian/env.sh
~/src/liquorix-package/scripts/debian/docker_bootstrap.sh
~/src/liquorix-package/scripts/debian/Dockerfile

If it works, the issue might be caused by edits to those three files—especially the Dockerfile.

Hello @yang3 thanks again for your reply, I followed your steps and it did seem to work, the same error message did show up but the script kept running. However, it now stopped for what it seems low disk space, as it filled my internal storage. How much free space would be recommended? I only have the 32GB from my Lenovo 300e chromebook. I might try to run this in a VM and then copy the trixie package afterwards. Unless an sd card or extnernal ssd work for this. As I understand everything gets added to the root, so I’m not sure I could store everything into an external drive.

Here is the output of the command, after getting the files again:

[INFO ] Using default process count, 2
[INFO ] liquorix_amd64/debian/trixie: Docker image not found, building with Dockerfile.
[INFO ] liquorix_amd64/debian/bookworm: Docker image not found, building with Dockerfile.
Dockerfile:5
--------------------
   3 |     ARG RELEASE
   4 |     
   5 | >>> FROM $ARCH/$DISTRO:$RELEASE
   6 |     
   7 |     ARG DEFAULT
--------------------
ERROR: failed to solve: amd64/debian:trixie: failed to resolve source metadata for docker.io/amd64/debian:trixie: failed to do request: Head "https://registry-1.docker.io/v2/amd64/debian/manifests/trixie": dial tcp: lookup registry-1.docker.io on 200.28.4.129:53: dial udp 200.28.4.129:53: connect: network is unreachable
Dockerfile:5
--------------------
   3 |     ARG RELEASE
   4 |     
   5 | >>> FROM $ARCH/$DISTRO:$RELEASE
   6 |     
   7 |     ARG DEFAULT
--------------------
ERROR: failed to solve: amd64/debian:bookworm: failed to resolve source metadata for docker.io/amd64/debian:bookworm: failed to do request: Head "https://registry-1.docker.io/v2/amd64/debian/manifests/bookworm": dial tcp: lookup registry-1.docker.io on 200.28.4.129:53: dial udp 200.28.4.129:53: connect: network is unreachable
[INFO ] liquorix_amd64/debian/forky: Docker image not found, building with Dockerfile.
Dockerfile:5
--------------------
   3 |     ARG RELEASE
   4 |     
   5 | >>> FROM $ARCH/$DISTRO:$RELEASE
   6 |     
   7 |     ARG DEFAULT
--------------------
ERROR: failed to solve: amd64/debian:forky: failed to resolve source metadata for docker.io/amd64/debian:forky: failed to do request: Head "https://registry-1.docker.io/v2/amd64/debian/manifests/forky": dial tcp: lookup registry-1.docker.io on [::1]:53: read udp [::1]:54313->[::1]:53: read: connection refused
[INFO ] liquorix_amd64/debian/sid: Docker image not found, building with Dockerfile.
[INFO ] liquorix_amd64/ubuntu/jammy: Docker image not found, building with Dockerfile.
Dockerfile:30
--------------------
  29 |     
  30 | >>> RUN echo "$PUBLIC" | gpg --import &&\
  31 | >>>     echo "$SECRET" | gpg --import &&\
  32 | >>>     echo "default-key $DEFAULT" > ~/.gnupg/gpg.conf
  33 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c echo \"$PUBLIC\" | gpg --import &&    echo \"$SECRET\" | gpg --import &&    echo \"default-key $DEFAULT\" > ~/.gnupg/gpg.conf" did not complete successfully: exit code: 2
[INFO ] liquorix_amd64/ubuntu/noble: Docker image not found, building with Dockerfile.
Dockerfile:30
--------------------
  29 |     
  30 | >>> RUN echo "$PUBLIC" | gpg --import &&\
  31 | >>>     echo "$SECRET" | gpg --import &&\
  32 | >>>     echo "default-key $DEFAULT" > ~/.gnupg/gpg.conf
  33 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c echo \"$PUBLIC\" | gpg --import &&    echo \"$SECRET\" | gpg --import &&    echo \"default-key $DEFAULT\" > ~/.gnupg/gpg.conf" did not complete successfully: exit code: 2
[INFO ] liquorix_amd64/ubuntu/plucky: Docker image not found, building with Dockerfile.
Dockerfile:30
--------------------
  29 |     
  30 | >>> RUN echo "$PUBLIC" | gpg --import &&\
  31 | >>>     echo "$SECRET" | gpg --import &&\
  32 | >>>     echo "default-key $DEFAULT" > ~/.gnupg/gpg.conf
  33 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c echo \"$PUBLIC\" | gpg --import &&    echo \"$SECRET\" | gpg --import &&    echo \"default-key $DEFAULT\" > ~/.gnupg/gpg.conf" did not complete successfully: exit code: 2
[INFO ] liquorix_amd64/ubuntu/questing: Docker image not found, building with Dockerfile.
Dockerfile:18
--------------------
  17 |     ENV LD_PRELOAD=/usr/lib/x86_64-linux-gnu/libeatmydata.so
  18 | >>> RUN apt-get update &&\
  19 | >>>     apt-get dist-upgrade -y &&\
  20 | >>>     apt-get install -y \
  21 | >>>         build-essential \
  22 | >>>         devscripts \
  23 | >>>         equivs \
  24 | >>>         wget \
  25 | >>>         gnupg \
  26 | >>>         schedtool &&\
  27 | >>>     apt-get clean &&\
  28 | >>>     rm -rfv /var/lib/apt/lists/*
  29 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get update &&    apt-get dist-upgrade -y &&    apt-get install -y         build-essential         devscripts         equivs         wget         gnupg         schedtool &&    apt-get clean &&    rm -rfv /var/lib/apt/lists/*" did not complete successfully: exit code: 100
Dockerfile:30
--------------------
  29 |     
  30 | >>> RUN echo "$PUBLIC" | gpg --import &&\
  31 | >>>     echo "$SECRET" | gpg --import &&\
  32 | >>>     echo "default-key $DEFAULT" > ~/.gnupg/gpg.conf
  33 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c echo \"$PUBLIC\" | gpg --import &&    echo \"$SECRET\" | gpg --import &&    echo \"default-key $DEFAULT\" > ~/.gnupg/gpg.conf" did not complete successfully: exit code: 2

You’re running into two issues:

1. Network issues
or your didn’t install Docker correctly — search “how to install docker in Debian13?” on Google

failed to resolve source metadata … dial udp xxx:53: connect: network is unreachable
lookup registry-1.docker.io on 200.28.4.129:53: dial udp connect: network is unreachable

2. GPG import failure

echo "$PUBLIC" | gpg --import
exit code: 2

Given these errors, you may want to consider rebuilding your OS and trying again.
Also, I recommend not doing this on a Chromebook—it’s very time-consuming and without enough space.

Hi, I’ve been following along with this post to help with my HP 11 Chromebook G8 EE and after some lucky guesses and following the instructions from @yang3 here, I was able to reboot and have sound on Debian 13. Here are the steps I followed -

  • Do the actual build on a separate PC, either another Linux machine or VM. The HP spent 5 hours on the build only to run out of space at the end and it had 27 gbs unused to work with. I did my build on my Windows machine through Virtual Box and the same Debian ISO that I am using on the Chromebook. Make sure the VM has at least 60 gbs of space. For some reason it failed on the VM when I had set it 50 but not when I put it at 80, so maybe 60 is enough.
  • For a fresh Debian 13 I had to do a few things before the build
    • set my user into the sudoers file, make sure curl and git are installed, and install docker with the “install docker debian” guide found here
    • create my gpg key with gpg –full-generate-key and follow the prompts to create a regular key. After it generates, you take the long series of letters and numbers and copy that part for the conf file.
    • then I had to create the gpg.conf file in ~/.gnugpg/
      • all I needed inside was default-key followed by the long id generated earlier
  • With all that done, I was able to follow @yang3 steps to download the liquorix-package and scripts and build the two files needed on the VM. To get the files out and over to the chromebook I just used google drive.

Now an issue I had with installing the packages came up with errors about dependencies for dpkg like libelf so I had to do a

sudo apt --fix-broken install

to get that done. After that I used the sudo dpkg commands on the two build files, rebooted, and a third sound option under Pro Audio appeared named Built-In Speaker and when selected I got sound.

I apologize for the rough summary and lack of formatting. I’m still new to this forum and to working with Linux but wanted to make a post to confirm for anyone else trying that this will work after some messing around and to keep trying.

2 Likes

Thanks @yang3 and @olbean for your replies!, I’ve been trying to set my chromebook for months and finally got it working. Your replies were very helpful. I now have it running Debian 13 Xfce and it is great, hopefully your answers will help others too.

As advice for anyone else who might find this thread, I did as olbean mentioned and created a virtual machine to run the scripts, then simply uploaded the files to my drive and then installed them. Then it should just be installing the right kernel and then the patch and that’s it. I did have some issues with the package detected as “broken” but I just rebooted and reinstalled, and rebooted again xd. That seemed to fix it.

I can tell you that after about a year of searching for a method to get sound working on my Lenovo Chromebook 14e Liara, this is the path that finally worked. Thank you!

Also the tip about fixing broken packages helped too.