Add Blue Yeti USB reset service for cold-boot fix
The Blue Yeti mic initializes audio endpoints in a broken state on cold boot because snd-usb-audio loads after device enumeration. This systemd service toggles USB authorization to force a clean rebind. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
09a71afe84
commit
2073876eaf
1 changed files with 25 additions and 0 deletions
|
|
@ -198,6 +198,31 @@
|
||||||
# systemd.packages = [pkgs.lact];
|
# systemd.packages = [pkgs.lact];
|
||||||
# systemd.services.lactd.wantedBy = ["multi-user.target"];
|
# systemd.services.lactd.wantedBy = ["multi-user.target"];
|
||||||
|
|
||||||
|
# Blue Yeti (046d:0ab7) initializes its audio endpoints in a broken state on cold boot
|
||||||
|
# because snd-usb-audio loads ~2s after the device enumerates. Toggling authorized
|
||||||
|
# forces a USB rebind on a clean device, mimicking unplug/replug.
|
||||||
|
systemd.services.blue-yeti-reset = {
|
||||||
|
description = "Reset Blue Yeti USB mic to fix cold-boot initialization";
|
||||||
|
after = ["systemd-udev-settle.service"];
|
||||||
|
wantedBy = ["multi-user.target"];
|
||||||
|
serviceConfig = {
|
||||||
|
Type = "oneshot";
|
||||||
|
ExecStart = pkgs.writeShellScript "blue-yeti-reset" ''
|
||||||
|
for dev in /sys/bus/usb/devices/*/; do
|
||||||
|
[ -f "$dev/idVendor" ] || continue
|
||||||
|
vendor=$(cat "$dev/idVendor" 2>/dev/null)
|
||||||
|
product=$(cat "$dev/idProduct" 2>/dev/null)
|
||||||
|
if [ "$vendor" = "046d" ] && [ "$product" = "0ab7" ]; then
|
||||||
|
echo 0 > "$dev/authorized"
|
||||||
|
sleep 0.5
|
||||||
|
echo 1 > "$dev/authorized"
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
hardware = {
|
hardware = {
|
||||||
amdgpu = {
|
amdgpu = {
|
||||||
opencl.enable = true;
|
opencl.enable = true;
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue