Repository navigation
Run the audio watchdog's commands under C.UTF-8, not C - #56
Merged
Merged
Conversation
Under LC_ALL=C, Quickshell 0.3.2 prints Qt's "Detected locale C ... not
UTF-8" warning on stdout, ahead of the JSON from `quickshell list -j`.
shell_instances() could not parse it and returned None, so stop_shell()
reported 'unknown' and every automatic WirePlumber or stack restart was
declined ("the shell state is unknown"). record() runs before
stop_shell(), so each declined attempt still counted against the
restart budget: on the M2 Max three of them right after login exhausted
WirePlumber's three per hour, and the next real repair was refused.
C.UTF-8 keeps the commands' messages in English, which is what LC_ALL
was there for; Arch and Arch Linux ARM ship it in glibc itself (C.utf8),
with no locale generation needed. The test runs a Quickshell stub
that prints the warning on stdout under C, and fails against the
previous code. omarchy-mac 0.2.1.
[Medium impact] The PR appears safe to merge. SummaryChanges the audio watchdog’s child commands to use
The review found no actionable issues. Tests were inspected, not run. Reviews (1) · Last reviewed commit: "Run the audio watchdog's commands under ..." · Reviewed by Greptile |
This was referenced Oct 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The audio watchdog declines every automatic restart on current installs:
System.run()forcesLC_ALL=C. Under C, Quickshell 0.3.2 prints Qt'sDetected locale "C" ... which is not UTF-8warning on stdout, ahead of the JSON fromquickshell list -j. Soshell_instances()can't parse the listing,stop_shell()returnsunknown, and the restart is declined.record()runs beforestop_shell(), so each declined attempt also uses up the restart budget. On the M2 Max, three refusals right after login exhausted WirePlumber's three per hour, and the next real repair was refused with EXHAUSTED. This affects every automatic WirePlumber/stack repair, including the mic mapper's.Fix:
LC_ALL=C.UTF-8. Messages stay in English (whyLC_ALLwas set), and Arch / Arch Linux ARM shipC.utf8in glibc itself, with no locale generation needed. omarchy-mac 0.2.1.Evidence
systemd --usertransient unit, as the mapper starts it,shell_instances()returnedNonewith the old code and1with this one. With this change in place, a live mic recovery run went through (#54 comment).watchdog-test.shadds a Quickshell stub onPATHthat prints the warning on stdout under C. It fails againstmain's watchdog ("a running shell is counted, whatever locale the session has") and passes here. The full suite passes in a Debian container.run().Not in this PR
Astra agrees
unknownrefusals shouldn't count against the restart budget, since nothing was touched. That's a separate behaviour change for its own PR.