Skip to content

Instantly share code, notes, and snippets.

@A1exan10er
Created August 1, 2025 08:54
Show Gist options
  • Save A1exan10er/ede31ae5d3f18492a729decef0bf5393 to your computer and use it in GitHub Desktop.
Save A1exan10er/ede31ae5d3f18492a729decef0bf5393 to your computer and use it in GitHub Desktop.
"bluetooth-auto-enable.service" - Powers on Bluetooth after the bluetooth service starts; "bluetooth-rfkill-unblock.service" - Unblocks Bluetooth via rfkill before the bluetooth service starts
[Unit]
Description=Auto-enable Bluetooth
After=bluetooth.service
Requires=bluetooth.service
[Service]
Type=oneshot
ExecStart=/bin/bash -c 'sleep 5; /usr/bin/bluetoothctl power on'
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
[Unit]
Description=Unblock Bluetooth via rfkill
Before=bluetooth.service
[Service]
Type=oneshot
ExecStart=/usr/sbin/rfkill unblock bluetooth
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target
@A1exan10er
Copy link
Author

sudo systemctl enable bluetooth-auto-enable.service
sudo systemctl enable bluetooth-rfkill-unblock.service

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment