Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions bin/omarchy-upgrade-to-quattro
Original file line number Diff line number Diff line change
Expand Up @@ -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' \
Expand Down
13 changes: 13 additions & 0 deletions etc/tlp.d/omarchy-bluetooth-usb.conf
Original file line number Diff line number Diff line change
@@ -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"
22 changes: 22 additions & 0 deletions test/shell.d/tlp-bluetooth-usb-test.sh
Original file line number Diff line number Diff line change
@@ -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"