Skip to content

Restart bluetooth.service from omarchy-restart-bluetooth - #13668

Closed
AnPod wants to merge 1 commit into
omacom:quattrofrom
AnPod:cursor/fix-restart-bluetooth-service-ef3e
Closed

AnPod wants to merge 1 commit into
omacom:quattrofrom
AnPod:cursor/fix-restart-bluetooth-service-ef3e

Conversation

@AnPod

@AnPod AnPod commented Sep 28, 2026

Copy link
Copy Markdown
Contributor

Summary

omarchy-restart-bluetooth only ran rfkill unblock. Wedged adapters often need bluetoothd to re-register on D-Bus after the controller bounces.

The command now also systemctl restart bluetooth.service and fails clearly if that restart fails.

Fixes #13078

Test plan

  • test/shell.d/restart-bluetooth-test.sh
  • Run Update → Hardware → Bluetooth on a wedged adapter and confirm the service comes back

Wedged adapters often need bluetoothd to re-register after rfkill
unblocks; restart the unit as well (omacom#13078).

Co-authored-by: AnPod <AnPod@users.noreply.github.com>
@jandrusk

jandrusk commented Oct 7, 2026

Copy link
Copy Markdown

Thanks for this. It duplicates two older open PRs for #13078: #13085 (restart bluetoothd and reload btusb) and #13101 (restart bluetooth.service). Maintainers will probably want to consolidate on one.

A note for whichever goes forward: systemctl restart bluetooth.service runs here without sudo. That only works through a polkit prompt, and the menu runs this in a floating terminal. Other restart helpers (for example omarchy-update-time) use sudo systemctl restart .... Using sudo plus # omarchy:requires-sudo=true would match them and give a predictable password prompt.

@omarchybot

Copy link
Copy Markdown
Collaborator

Reviewed at 19300ade. This PR is one of three open fixes for #13078 that make omarchy-restart-bluetooth restart bluetooth.service. The other two are #13085 and #13101. I compared all three diffs by reading them, and so did Codex Medium, reviewing separately. Nothing was run on a worker, because only one of the three will be merged.

Both reviews say #13085 should go forward. It is the oldest, and the oldest wins unless a newer fix is clearly better. This one is not clearly better. It runs systemctl restart bluetooth.service without sudo and without # omarchy:requires-sudo=true, so in the menu's floating terminal the restart depends on a polkit prompt. The other restart helpers use sudo, and so do #13085 and #13101. Beyond the restart, #13085 also checks that bluetoothd came back and reloads btusb when no controller appears, which covers #12519 too. The systemctl status printout here is the one thing the others lack. It was not worth carrying over, because #13085 already lists the controller on success and points at systemctl status bluetooth.service on failure.

Which of the three lands is the maintainer's decision, and this PR waits on that.

AnPod commented Oct 23, 2026

Copy link
Copy Markdown
Contributor Author

Closing as superseded by the older #13085 / #13101.

@AnPod AnPod closed this Oct 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

omarchy-restart-bluetooth does not restart bluetooth.service, leaving wedged adapters unrecoverable via GUI or menu

4 participants