Repository navigation
Fix the Bluetooth widget vanishing when the radio is turned off - #12585
selfcrypto wants to merge 16 commits into
Conversation
4cf367a to
adfd8b4
Compare
Translated rfkill output still hides blocked-radio controlsReviewed A localized successful query becomes a false hardware resultUsing the installed rfkill 2.42.3 with the same synthetic Bluetooth soft-block event: French and Spanish output reproduced the formatter mismatch too. The visible C/German states came from production panel logic with simulated backend state; Impact: with an absent BlueZ adapter and a soft-blocked radio, translated output leaves the original missing-control problem unresolved. Suggested change: set Verified: that query variant passed the tested blocked/unblocked, no-radio, hard-only, Wi-Fi-only and multiple-switch controls. Verified: the C-language blocked-startup case, simulated off/on adapter round trip and no-hardware hiding behave as intended. Focused Bluetooth suites pass on both revisions. Review informationTest scope: real rfkill formatting from private synthetic events; rendered panel logic with Bluetooth/audio provider substitutions; recorded power actions. No physical radio changes, actual BlueZ removal, reboot persistence or pairing tested. Community review: Independent automated community review, unaffiliated with the Omarchy team, intended to help prepare PRs for their review. Automated AI review: Astra ran initial command experiments; independent Fable 5.1 and Astra reviewers added locale and QML validation. Both completed reports and material evidence, including rendered states, were read before synthesis. |
|
Confirmed. util-linux translates the SOFT column (de "gesperrt", es "bloqueado", fr "bloqué"), so on a localized system 1fce0f6 pins the query to |
|
Tested on real affected hardware: a ThinkPad T14 Gen 2a with platform switch Everything passed:
Turning off from the panel never touched Tested with help from Claude Code; every run was on my machine. |
1fce0f6 to
feb25c2
Compare
Confidence Score: 5/5
[Medium impact] The PR appears safe to merge; no actionable issues remain in the reviewed changes. SummaryKeeps the Bluetooth widget available when a soft block removes its BlueZ adapter.
No new actionable issues were found. The three earlier, unnumbered concerns are addressed by the current runtime coverage and removal-only watcher. Tests were not run during this review.
|
|
Fixed the command-line case in feb25c2. The widget now stays on the bar until rfkill answers, no matter how Bluetooth was turned off. Also rebased on quattro. |
|
Re-tested
Not tested across a real reboot: on this ThinkPad the saved block doesn't survive boot. The radio comes back on ~4.4 s in (#13342), so the shell never starts with Bluetooth off. The shell-restart-while-blocked case above exercises the same start-up path. I'm now running it as my bar's Bluetooth widget ( |
|
Thanks for testing both PRs so carefully on real hardware. Glad it's working on your bar. |
|
Linking related work so the maintainer can pick: #13204 is a second open PR for the same panel fix and is the one linked from #12599. #15112 (filed this week) and #12599 are further ThinkPad reports of the same symptom. This PR has the most real-hardware testing (T14 Gen 2a, including the |
|
Looked at this again at Two models were asked separately what this is. Claude Opus 5.5 read it as a Separately: GitHub reports this branch as conflicting with Waiting on the maintainer to settle what this is; it is verified on a worker once that is decided. |
51ac490 to
2823a3d
Compare
|
Looked at this again at The two models were asked again, separately, at this head, and gave the same answers as before. Claude Opus 5.5 reads it as a The branch now merges cleanly into Waiting on the maintainer to settle what this is; once that is decided, it gets verified on a worker. |
|
I reviewed the open PRs that keep the Bluetooth bar widget visible when the radio is off (#12494, #12599, #13523, #9724). This is code review only: #12585's runtime fixture needs a compositor, and its 62 static checks pass after merging.
I'd go with #12585. It's the only one that still merges, it's 8 commits behind Suggestion for #12585: it also switches turning Bluetooth off to an rfkill soft block, which is a behaviour change beyond the widget, so call that out in the description and add |
|
Turning Bluetooth off already goes through the rfkill soft block on Added |
|
@birkskyum this has been waiting on classification since October: the two models split between It's rebased on current Update (Nov 22): the missing classification was a failure of the bot's second classifier that hit many PRs from Nov 18 and has since cleared. This PR has not been classified again yet, so it is still unlabelled; |
|
Rechecked GPT-6 in Codex reviewed the source (reasoning effort is not exposed to this session). The configured classification model, |
|
@omarchybot Please classify again at 578a45f ( |
No change to this branch's own code. The missing classification on this PR came from omarchybot's second classifier returning no answer, which hit many PRs from Nov 18 to Nov 22 and now answers again; nothing in this branch caused it. Brought up to date with quattro so the bot classifies the current head.
The adapter leaving started the rfkill query directly, which does nothing while an earlier query is still running, so the widget settled for an answer taken before the adapter left. Go through requeryBlocked like the switch-removal path, which queues a second ask.
|
Rechecked The second classifier answered this time: |
|
@dhh could you take a look at this one when you have a moment? I know the queue is huge. The bot's two classifiers disagree on it ( The fix is for laptops where turning Bluetooth off from the bar removes the widget, so the only way to turn it back on is a terminal. That happens on ThinkPads with It's on current #17616 is in the queue too, classified Thanks for Omarchy, and for your time. |
Keep the current Bluetooth CLI as the panel power entry point and retain both the CLI and radio-off runtime checks. Co-Authored-By: GPT-6 <noreply@openai.com>
Carry the CLI recovery from omacom#20378 into the widget fix. A blocked platform radio can have no BlueZ controller, so status and auto-power operations consult the same soft-block query as the panel. Power up before resolving device names because BlueZ cannot resolve them while the controller is absent. Keep the existing power deadline. Co-Authored-By: David Heinemeier Hansson <david@hey.com> Co-Authored-By: GPT-6 <noreply@openai.com> Co-Authored-By: Opus 5.5 High <noreply@anthropic.com>
An in-flight query can answer unblocked after the adapter has returned and disappeared again behind a new soft block. Keep the widget state until the queued refresh answers instead of briefly applying the stale result. The runtime fixture overlaps those transitions and fails before this change. Co-Authored-By: GPT-6 <noreply@openai.com> Co-Authored-By: Opus 5.5 High <noreply@anthropic.com> Co-Authored-By: muse-wonder via pi, thinking high
Run the CLI checks before the runtime fixture so a headless run still exercises them. Distinguish panel-issued power actions from fixture setup, and verify an empty name leaves a blocked radio untouched instead of checking only the exit code. Co-Authored-By: GPT-6 <noreply@openai.com> Co-Authored-By: Opus 5.5 High <noreply@anthropic.com>
|
Classification now resolves to I merged current
GPT-6 in Codex performed the driver review (session effort is not exposed). Opus 5.5 High and muse-wonder via pi, thinking high reviewed the final head and found no remaining code findings. Their reviews contributed the stale-query check and test corrections; agreement does not guarantee independence. @wb2012sf, @alhasapi or @Fab1anBecker: please test full head git clone --single-branch --branch bluetooth-keep-widget-when-blocked https://github.com/selfcrypto/omarchy.git ~/omarchy-pr-12585
git -C ~/omarchy-pr-12585 checkout --detach 5ba21682fb93bcd828ec76635e8d314b12f00967
omarchy dev link ~/omarchy-pr-12585Confirm that off/on from the bar keeps the widget usable, a shell started with the platform radio already blocked can turn it on, and CLI status/scan/connect work while BlueZ has no controller. If available, also unplug a removable radio while it is blocked and check that the widget disappears. Please include The earlier hardware confirmations cover older commits, so this waits for confirmation at the full head above; |
|
Merged current The only conflict was in
@wb2012sf @alhasapi @Fab1anBecker the head to test is now |
|
I checked The merge retains both the HCI-only blocking tests from |
|
@dhh could you set the class on this one by hand? The two classifiers split again on While the class is split the bot stops before testing, and the |
|
The merge from GPT-6 in Codex (high effort) checked the panel source and linked reports and classified this as a compatibility bug: a platform rfkill switch can remove the BlueZ adapter, and the stock panel then hides the control needed to turn Bluetooth back on. The configured classifier, |
A soft block can outlive bluetoothd, leaving the panel's on switch visible after the user stops the service. Check whether BlueZ owns its D-Bus name while a blocked radio has no adapter, and query rfkill again when BlueZ returns. Co-Authored-By: GPT-6 <noreply@openai.com> Co-Authored-By: Opus 5.5 High <noreply@anthropic.com>
|
Recommend: Hold — classification at
On an ISO worker with real BlueZ and simulated rfkill, the base and reverted panel hid the widget. The patched panel showed it and sent the unblock command. The stopped-service regression test passed with the patch and failed when reverted. The full suite had the same four failures on Codex High classifies the new head as a compatibility bug. The configured classifier, |


Fixes #12494, fixes #12599, fixes #13523.
What changes
The bug
Turning Bluetooth off from the bar takes the entire widget off the bar: icon, panel and power switch. The only way to turn it back on is a terminal.
bin/omarchy-bluetooth-power offmoves an rfkill soft block, deliberately, because that is the half that survives a reboot. The panel's comment assumes BlueZ rides that out:It doesn't, on every machine. Where the block reaches a switch that cuts power to the controller rather than just parking it,
hci0stops existing, bluetoothd drops the adapter, and/org/bluezgoes childless.Bluetooth.defaultAdapteris thennull, and the widget'svisible: adapter !== nulltakes it off the bar along with its own on switch.Measured on a ThinkPad, where the block lands on the
thinkpad_acpiplatform switch:The reporter of #12494 sees the same on an Intel 8087:0a2b.
The fix
BlueZ cannot tell "turned off" from "no Bluetooth hardware": both arrive as an absent adapter. rfkill can, because the block itself is a listed bluetooth switch. So the panel asks it, and only when BlueZ has nothing to say:
omarchy-bluetooth-power is-blocked: new read-only verb, exit 0 when any bluetooth switch is soft-blocked. Soft blocks only; a hard block is a physical switchoncannot lift anyway. The rfkill query runs underLC_ALL=C, because rfkill translates the column ("gesperrt", "bloqueado").radioPresentreplaces the adapter in everything the widget shows: visibility, icon, hero text, the switch, the empty-list copy. It is a plain property, set to true when an adapter appears and fromis-blockedwhen one goes away. It is never bound to the adapter, so it keeps its last value until rfkill has answered and the widget does not blink off the bar in between, whether the panel, the CLI or anything else set the block.radioEnabledstays adapter-driven.deviceFor) is untouched.The query runs on exactly two edges: the adapter going away, and startup with no adapter. Turning Bluetooth back on brings the adapter with it, which sets
radioPresentdirectly, so nothing polls.Hardware agnostic
The signal is "rfkill lists a soft-blocked bluetooth switch", not any particular controller, driver or platform:
hci0blockedPowered: noThe last two are why the check is
grep -qwand not a substring:unblockedcontainsblocked, and a loose match would pin the widget to the bar on every machine that has no Bluetooth at all. There's a test for it.Verification
quattroas a single commit (35528cb).test/shell.d/bluetooth-test.shpasses. It addsis-blockedagainst a mocked rfkill (blocked, unblocked, no hardware, localized session), and a runtime test: the realPanel.qmlunder quickshell with a mocked BlueZ (fixtures/bluetooth-radio-off) through turn-off, turn-on, no hardware and a blocked startup. The runtime test fails againstquattro'sPanel.qml(4 assertions) and passes with this change. The source-text assertions from earlier revisions are gone, matchingquattro, which dropped them from this file.i18n,keyboard-panel-lazy,qml-text-formatandpanel-open-budgetstests pass after the rebase.runtime-smoke-test.shreports "each widget registers its IPC handler once per screen" as failing, the same onquattrowithout this branch.is-blockedagainst real hardware: 1 unblocked, 0 while blocked with the adapter off D-Bus, 1 again afteron./usr/share/omarchy, full round trip with BlueZ holding no adapter throughout the middle step:toggleBluetoothIPC:/org/bluezchildless,is-blockedexits 0, widget still on the bar, panel readsTURNED OFF(notNo adapter), switch present and in the off position, body reads "Turn Bluetooth on to scan". No clipping or overlap.I18n.trebase): 0/16 hides across panel and CLI turn-offs and turn-ons, a shell started with the radio blocked shows "Turned Off" and turns back on, hidden withbluetooth.servicemasked orbtusbunloaded.Screenshots
screenrecording-2026-11-18_21-33-06.mp4