From 426951daccf5af5cb52660f9eaf1f3a3740515a7 Mon Sep 17 00:00:00 2001 From: Spencer Bull Date: Wed, 12 Aug 2026 10:42:18 -0500 Subject: [PATCH 1/2] Add Dell XPS 13 sidecar amp workaround --- .../.omarchy/package.json | 3 + pkgbuilds/dell-xps13-sidecar-amps/LICENSE | 21 +++++++ pkgbuilds/dell-xps13-sidecar-amps/PKGBUILD | 32 ++++++++++ pkgbuilds/dell-xps13-sidecar-amps/README.md | 28 +++++++++ .../dell-xps13-sidecar-amps.conf | 3 + .../dell-xps13-sidecar-amps.install | 60 +++++++++++++++++++ 6 files changed, 147 insertions(+) create mode 100644 pkgbuilds/dell-xps13-sidecar-amps/.omarchy/package.json create mode 100644 pkgbuilds/dell-xps13-sidecar-amps/LICENSE create mode 100644 pkgbuilds/dell-xps13-sidecar-amps/PKGBUILD create mode 100644 pkgbuilds/dell-xps13-sidecar-amps/README.md create mode 100644 pkgbuilds/dell-xps13-sidecar-amps/dell-xps13-sidecar-amps.conf create mode 100644 pkgbuilds/dell-xps13-sidecar-amps/dell-xps13-sidecar-amps.install diff --git a/pkgbuilds/dell-xps13-sidecar-amps/.omarchy/package.json b/pkgbuilds/dell-xps13-sidecar-amps/.omarchy/package.json new file mode 100644 index 0000000..2a9719d --- /dev/null +++ b/pkgbuilds/dell-xps13-sidecar-amps/.omarchy/package.json @@ -0,0 +1,3 @@ +{ + "source": "local" +} diff --git a/pkgbuilds/dell-xps13-sidecar-amps/LICENSE b/pkgbuilds/dell-xps13-sidecar-amps/LICENSE new file mode 100644 index 0000000..72ca599 --- /dev/null +++ b/pkgbuilds/dell-xps13-sidecar-amps/LICENSE @@ -0,0 +1,21 @@ +MIT License + +Copyright (c) 2026 Spencer Bull + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE. diff --git a/pkgbuilds/dell-xps13-sidecar-amps/PKGBUILD b/pkgbuilds/dell-xps13-sidecar-amps/PKGBUILD new file mode 100644 index 0000000..f977221 --- /dev/null +++ b/pkgbuilds/dell-xps13-sidecar-amps/PKGBUILD @@ -0,0 +1,32 @@ +# Maintainer: Spencer Bull + +pkgname=dell-xps13-sidecar-amps +pkgver=1.0.0 +pkgrel=1 +pkgdesc="Temporary sidecar speaker amplifier enablement for the Dell XPS 13 DX13260" +arch=('x86_64') +url="https://github.com/omacom-io/omarchy-pkgs" +license=('MIT') +depends=('kmod' 'mkinitcpio') +optdepends=('limine-mkinitcpio-hook: rebuild Limine Unified Kernel Images') +install=dell-xps13-sidecar-amps.install +options=('!debug') +source=( + 'dell-xps13-sidecar-amps.conf' + 'dell-xps13-sidecar-amps.install' + 'LICENSE' + 'README.md' +) +sha256sums=('dcef05d30c15b70943e621325d813980894c4c9d646aafe645e73e194f47f9d7' + '69d054e8e156c3449b53a972cde429216bad17841c6937228106ba2102b29e14' + 'fd9348252dda847b9b4c19e44c5ab101098c7d0470c2238857ce1e14bb63207b' + '95553269a76775ab28d5f376ed0f5daed06fe094e2b4357928f6bebab7731e97') + +package() { + install -Dm644 dell-xps13-sidecar-amps.conf \ + "${pkgdir}/usr/lib/modprobe.d/dell-xps13-sidecar-amps.conf" + install -Dm644 LICENSE \ + "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE" + install -Dm644 README.md \ + "${pkgdir}/usr/share/doc/${pkgname}/README.md" +} diff --git a/pkgbuilds/dell-xps13-sidecar-amps/README.md b/pkgbuilds/dell-xps13-sidecar-amps/README.md new file mode 100644 index 0000000..304b13e --- /dev/null +++ b/pkgbuilds/dell-xps13-sidecar-amps/README.md @@ -0,0 +1,28 @@ +# Dell XPS 13 sidecar speaker amplifiers + +This temporary package enables the two CS35L56 sidecar speaker amplifiers on +the Dell XPS 13 DX13260 with PCI subsystem ID `1028:0e53`. + +Linux commit +[`efd80de2de9d`](https://github.com/torvalds/linux/commit/efd80de2de9d06ddf0eee55ca11b04e39bfc7cd8) +adds this machine to the `snd_soc_sof_sdw` PCI quirk table with +`SOC_SDW_SIDECAR_AMPS`. That commit first appears in Linux 7.2-rc5. Until the +Arch kernel ships it, this package selects the equivalent existing driver path +with the module's `quirk=65536` override. + +The package does not replace the kernel, audio firmware, or speaker tuning. It +owns only a modprobe drop-in and rebuilds the boot images when installed, +upgraded, or removed. + +## Removal + +Once every kernel you intend to boot contains the upstream commit, remove the +workaround and reboot: + +```bash +sudo pacman -Rns dell-xps13-sidecar-amps +systemctl reboot +``` + +Removing the package deletes its modprobe drop-in and rebuilds the boot images, +so no temporary override remains embedded in the initramfs or Limine UKIs. diff --git a/pkgbuilds/dell-xps13-sidecar-amps/dell-xps13-sidecar-amps.conf b/pkgbuilds/dell-xps13-sidecar-amps/dell-xps13-sidecar-amps.conf new file mode 100644 index 0000000..b906c46 --- /dev/null +++ b/pkgbuilds/dell-xps13-sidecar-amps/dell-xps13-sidecar-amps.conf @@ -0,0 +1,3 @@ +# Temporary workaround for Dell XPS 13 DX13260 subsystem 1028:0e53. +# Remove this package once every bootable kernel contains Linux efd80de2de9d. +options snd_soc_sof_sdw quirk=65536 diff --git a/pkgbuilds/dell-xps13-sidecar-amps/dell-xps13-sidecar-amps.install b/pkgbuilds/dell-xps13-sidecar-amps/dell-xps13-sidecar-amps.install new file mode 100644 index 0000000..225c70b --- /dev/null +++ b/pkgbuilds/dell-xps13-sidecar-amps/dell-xps13-sidecar-amps.install @@ -0,0 +1,60 @@ +_legacy_override="/etc/modprobe.d/dell-xps13-dx13260-sidecar-amps.conf" +_legacy_sha256="97f36bce41581ecc6b1d7963cd0dab29c7b1a107b2dd4d17db7a56094a7b7289" + +_remove_legacy_override() { + local actual_sha256 hash_output + + [ -f "$_legacy_override" ] || return 0 + if ! hash_output=$(sha256sum "$_legacy_override"); then + printf ':: Unable to hash legacy override: %s\n' "$_legacy_override" >&2 + return 1 + fi + actual_sha256=${hash_output%% *} + + if [ "$actual_sha256" = "$_legacy_sha256" ]; then + if ! rm -f -- "$_legacy_override"; then + printf ':: Unable to remove legacy override: %s\n' "$_legacy_override" >&2 + return 1 + fi + printf ':: Removed the superseded Dell XPS 13 sidecar amplifier override.\n' + else + printf ':: Preserving modified legacy override: %s\n' "$_legacy_override" + fi +} + +_rebuild_boot_images() { + local output status + + if command -v limine-mkinitcpio >/dev/null 2>&1; then + output=$(limine-mkinitcpio 2>&1) + status=$? + [ -z "$output" ] || printf '%s\n' "$output" + + [ "$status" -eq 0 ] || return "$status" + case "$output" in + *"ERROR:"*) return 1 ;; + esac + elif command -v mkinitcpio >/dev/null 2>&1; then + mkinitcpio -P + else + printf ':: Unable to rebuild boot images: install mkinitcpio and rebuild before rebooting.\n' >&2 + return 1 + fi +} + +post_install() { + _remove_legacy_override || return + _rebuild_boot_images || return + printf ':: Reboot to enable the Dell XPS 13 sidecar speaker amplifiers.\n' +} + +post_upgrade() { + _remove_legacy_override || return + _rebuild_boot_images || return + printf ':: Reboot to apply the Dell XPS 13 sidecar amplifier update.\n' +} + +post_remove() { + _rebuild_boot_images || return + printf ':: Reboot to finish removing the Dell XPS 13 sidecar amplifier workaround.\n' +} From 8ab98748c1b718e00e98b937aae1fc24a1abe3e2 Mon Sep 17 00:00:00 2001 From: Spencer Bull Date: Sat, 15 Aug 2026 17:29:37 -0500 Subject: [PATCH 2/2] Expose sidecar amplifier apply status --- pkgbuilds/dell-xps13-sidecar-amps/PKGBUILD | 12 ++-- pkgbuilds/dell-xps13-sidecar-amps/README.md | 5 ++ .../dell-xps13-sidecar-amps-apply | 57 +++++++++++++++++++ .../dell-xps13-sidecar-amps.install | 30 +--------- 4 files changed, 73 insertions(+), 31 deletions(-) create mode 100755 pkgbuilds/dell-xps13-sidecar-amps/dell-xps13-sidecar-amps-apply diff --git a/pkgbuilds/dell-xps13-sidecar-amps/PKGBUILD b/pkgbuilds/dell-xps13-sidecar-amps/PKGBUILD index f977221..6e40680 100644 --- a/pkgbuilds/dell-xps13-sidecar-amps/PKGBUILD +++ b/pkgbuilds/dell-xps13-sidecar-amps/PKGBUILD @@ -2,7 +2,7 @@ pkgname=dell-xps13-sidecar-amps pkgver=1.0.0 -pkgrel=1 +pkgrel=2 pkgdesc="Temporary sidecar speaker amplifier enablement for the Dell XPS 13 DX13260" arch=('x86_64') url="https://github.com/omacom-io/omarchy-pkgs" @@ -12,17 +12,21 @@ optdepends=('limine-mkinitcpio-hook: rebuild Limine Unified Kernel Images') install=dell-xps13-sidecar-amps.install options=('!debug') source=( + 'dell-xps13-sidecar-amps-apply' 'dell-xps13-sidecar-amps.conf' 'dell-xps13-sidecar-amps.install' 'LICENSE' 'README.md' ) -sha256sums=('dcef05d30c15b70943e621325d813980894c4c9d646aafe645e73e194f47f9d7' - '69d054e8e156c3449b53a972cde429216bad17841c6937228106ba2102b29e14' +sha256sums=('ec5484486468c483b5a5acc50cd5a0dc5f368425c84bb88cddc95debe71d357e' + 'dcef05d30c15b70943e621325d813980894c4c9d646aafe645e73e194f47f9d7' + '5573370afad9ce25e9b11501154d231e062f2d90f4a99b775bef69b6c736d35c' 'fd9348252dda847b9b4c19e44c5ab101098c7d0470c2238857ce1e14bb63207b' - '95553269a76775ab28d5f376ed0f5daed06fe094e2b4357928f6bebab7731e97') + '82685711fcbe32bec70faa0aaf65032e0c0be4b6c8796123c171e1d7865e7771') package() { + install -Dm755 dell-xps13-sidecar-amps-apply \ + "${pkgdir}/usr/bin/dell-xps13-sidecar-amps-apply" install -Dm644 dell-xps13-sidecar-amps.conf \ "${pkgdir}/usr/lib/modprobe.d/dell-xps13-sidecar-amps.conf" install -Dm644 LICENSE \ diff --git a/pkgbuilds/dell-xps13-sidecar-amps/README.md b/pkgbuilds/dell-xps13-sidecar-amps/README.md index 304b13e..e9f3a7f 100644 --- a/pkgbuilds/dell-xps13-sidecar-amps/README.md +++ b/pkgbuilds/dell-xps13-sidecar-amps/README.md @@ -14,6 +14,11 @@ The package does not replace the kernel, audio firmware, or speaker tuning. It owns only a modprobe drop-in and rebuilds the boot images when installed, upgraded, or removed. +`dell-xps13-sidecar-amps-apply` repeats the legacy cleanup and boot-image +rebuild idempotently. System integrations can run it as root after installation +when they need a directly observable success or failure status; package-manager +scriptlet failures are otherwise only reported by Pacman. + ## Removal Once every kernel you intend to boot contains the upstream commit, remove the diff --git a/pkgbuilds/dell-xps13-sidecar-amps/dell-xps13-sidecar-amps-apply b/pkgbuilds/dell-xps13-sidecar-amps/dell-xps13-sidecar-amps-apply new file mode 100755 index 0000000..b8063a2 --- /dev/null +++ b/pkgbuilds/dell-xps13-sidecar-amps/dell-xps13-sidecar-amps-apply @@ -0,0 +1,57 @@ +#!/bin/bash + +_legacy_override="/etc/modprobe.d/dell-xps13-dx13260-sidecar-amps.conf" +_legacy_sha256="97f36bce41581ecc6b1d7963cd0dab29c7b1a107b2dd4d17db7a56094a7b7289" + +_remove_legacy_override() { + local actual_sha256 hash_output + + [[ -f $_legacy_override ]] || return 0 + if ! hash_output=$(sha256sum "$_legacy_override"); then + printf ':: Unable to hash legacy override: %s\n' "$_legacy_override" >&2 + return 1 + fi + actual_sha256=${hash_output%% *} + + if [[ $actual_sha256 == "$_legacy_sha256" ]]; then + if ! rm -f -- "$_legacy_override"; then + printf ':: Unable to remove legacy override: %s\n' "$_legacy_override" >&2 + return 1 + fi + printf ':: Removed the superseded Dell XPS 13 sidecar amplifier override.\n' + else + printf ':: Preserving modified legacy override: %s\n' "$_legacy_override" + fi +} + +_rebuild_boot_images() { + local output status + + if command -v limine-mkinitcpio >/dev/null 2>&1; then + output=$(limine-mkinitcpio 2>&1) + status=$? + [[ -z $output ]] || printf '%s\n' "$output" + + (( status == 0 )) || return "$status" + [[ $output != *"ERROR:"* ]] || return 1 + elif command -v mkinitcpio >/dev/null 2>&1; then + mkinitcpio -P + else + printf ':: Unable to rebuild boot images: install mkinitcpio and rebuild before rebooting.\n' >&2 + return 1 + fi +} + +apply_sidecar_amp_workaround() { + _remove_legacy_override || return + _rebuild_boot_images || return +} + +if [[ ${BASH_SOURCE[0]} == "$0" ]]; then + if (( EUID != 0 )); then + printf ':: Run dell-xps13-sidecar-amps-apply as root.\n' >&2 + exit 1 + fi + + apply_sidecar_amp_workaround +fi diff --git a/pkgbuilds/dell-xps13-sidecar-amps/dell-xps13-sidecar-amps.install b/pkgbuilds/dell-xps13-sidecar-amps/dell-xps13-sidecar-amps.install index 225c70b..f21e5ed 100644 --- a/pkgbuilds/dell-xps13-sidecar-amps/dell-xps13-sidecar-amps.install +++ b/pkgbuilds/dell-xps13-sidecar-amps/dell-xps13-sidecar-amps.install @@ -1,26 +1,4 @@ -_legacy_override="/etc/modprobe.d/dell-xps13-dx13260-sidecar-amps.conf" -_legacy_sha256="97f36bce41581ecc6b1d7963cd0dab29c7b1a107b2dd4d17db7a56094a7b7289" - -_remove_legacy_override() { - local actual_sha256 hash_output - - [ -f "$_legacy_override" ] || return 0 - if ! hash_output=$(sha256sum "$_legacy_override"); then - printf ':: Unable to hash legacy override: %s\n' "$_legacy_override" >&2 - return 1 - fi - actual_sha256=${hash_output%% *} - - if [ "$actual_sha256" = "$_legacy_sha256" ]; then - if ! rm -f -- "$_legacy_override"; then - printf ':: Unable to remove legacy override: %s\n' "$_legacy_override" >&2 - return 1 - fi - printf ':: Removed the superseded Dell XPS 13 sidecar amplifier override.\n' - else - printf ':: Preserving modified legacy override: %s\n' "$_legacy_override" - fi -} +_apply_command="/usr/bin/dell-xps13-sidecar-amps-apply" _rebuild_boot_images() { local output status @@ -43,14 +21,12 @@ _rebuild_boot_images() { } post_install() { - _remove_legacy_override || return - _rebuild_boot_images || return + "$_apply_command" || return printf ':: Reboot to enable the Dell XPS 13 sidecar speaker amplifiers.\n' } post_upgrade() { - _remove_legacy_override || return - _rebuild_boot_images || return + "$_apply_command" || return printf ':: Reboot to apply the Dell XPS 13 sidecar amplifier update.\n' }