diff --git a/bin/omarchy-upgrade-to-quattro b/bin/omarchy-upgrade-to-quattro index 86f1efcef79d..99eae209be1a 100755 --- a/bin/omarchy-upgrade-to-quattro +++ b/bin/omarchy-upgrade-to-quattro @@ -1233,6 +1233,7 @@ run_final_system_package_upgrade() { --overwrite '/etc/systemd/system/plocate-updatedb.service.d/ac-only.conf' \ --overwrite '/etc/systemd/system.conf.d/20-omarchy-nofile.conf' \ --overwrite '/etc/systemd/user.conf.d/20-omarchy-nofile.conf' \ + --overwrite '/etc/tlp.d/omarchy-bluetooth-usb.conf' \ --overwrite '/usr/lib/systemd/system-sleep/unmount-fuse' \ --overwrite '/usr/share/plymouth/themes/omarchy/*' \ --overwrite '/usr/share/sddm/hyprland.lua' \ diff --git a/etc/tlp.d/omarchy-bluetooth-usb.conf b/etc/tlp.d/omarchy-bluetooth-usb.conf new file mode 100644 index 000000000000..5cca29bd33c8 --- /dev/null +++ b/etc/tlp.d/omarchy-bluetooth-usb.conf @@ -0,0 +1,13 @@ +# Keep Bluetooth USB controllers awake when TLP manages USB power. +# +# TLP's USB autosuspend suspends Bluetooth combo controllers about two +# seconds after they go idle. A runtime-suspended btusb drops the BLE +# advertisements that bonded peripherals send when they try to reconnect, +# so mice and keyboards only come back after they are removed and paired +# again. Excluding the controllers keeps the radios reachable without +# changing TLP's policy for other USB devices. +# +# Covers the Intel wireless combo cards shipped in most Omarchy laptops. +# Appended so earlier lexically-sorted user drop-ins keep their own +# exclusions; assignments in /etc/tlp.conf still win. +USB_DENYLIST+="8087:0025 8087:0026 8087:0029 8087:0032 8087:0033 8087:0036 8087:0a2a 8087:0a2b 8087:0aa7 8087:0aaa" diff --git a/test/shell.d/tlp-bluetooth-usb-test.sh b/test/shell.d/tlp-bluetooth-usb-test.sh new file mode 100644 index 000000000000..d44c4bd3ee87 --- /dev/null +++ b/test/shell.d/tlp-bluetooth-usb-test.sh @@ -0,0 +1,22 @@ +#!/bin/bash + +set -euo pipefail + +source "$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)/base-test.sh" + +packaged_conf="$ROOT/etc/tlp.d/omarchy-bluetooth-usb.conf" +upgrade_script="$ROOT/bin/omarchy-upgrade-to-quattro" + +[[ -f $packaged_conf ]] || + fail "Omarchy ships a TLP drop-in that keeps Bluetooth USB controllers awake" + +grep -Eq '^USB_DENYLIST\+="8087:[0-9a-f]{4}( 8087:[0-9a-f]{4})*"$' "$packaged_conf" || + fail "the TLP drop-in appends Intel Bluetooth controllers to the USB denylist" + +grep -Fq "8087:0aaa" "$packaged_conf" || + fail "the TLP drop-in covers the Jefferson Peak Bluetooth controllers" + +grep -Fq -- "--overwrite '/etc/tlp.d/omarchy-bluetooth-usb.conf'" "$upgrade_script" || + fail "the upgrade registers the TLP drop-in for conflict-free replacement" + +pass "TLP installations keep Bluetooth USB controllers awake"