I automated the workaround for anyone with a Yeti Pro.
First I created a Ruby scrip that will remove the offending section of the asound.state file. I named this file blue_yeti_pro.rb and put it in ~/Documents/Scripts/
Code:
#!/usr/bin/ruby
require 'fileutils'
File.open('/var/lib/alsa/asound.state.replace', 'w') do |f2|
blue_yeti = false
File.open('/var/lib/alsa/asound.state', 'r') do |f1|
while line = f1.gets
if blue_yeti
if line == "}\n"
blue_yeti = false
end
else
if line == "state.B20 {\n"
blue_yeti = true
next
end
f2.write line
end
end
end
end
FileUtils.mv('/var/lib/alsa/asound.state.replace', '/var/lib/alsa/asound.state')
Then I edited the file /lib/udev/rules.d/90-alsa-restore.rules by adding the line
Code:
TEST=="/var/lib/alsa/asound.state", RUN+="/usr/bin/ruby /home/justin/Documents/Scripts/blue_yeti_pro.rb"
right after
Code:
LABEL="alsa_restore_go"
to cause the script to run before alsa tries to restore it's settings. Note that you'll need to update the path to the script on your computer.
The full file is as follows.
Code:
ACTION=="add", SUBSYSTEM=="sound", KERNEL=="controlC*", KERNELS!="card*", GOTO="alsa_restore_go"GOTO="alsa_restore_end"
LABEL="alsa_restore_go"
TEST=="/var/lib/alsa/asound.state", RUN+="/usr/bin/ruby /home/justin/Documents/Scripts/blue_yeti_pro.rb"
TEST!="/var/lib/alsa/state-daemon.conf", RUN+="/usr/sbin/alsactl -E HOME=/var/run/alsa restore $attr{device/number}"
TEST=="/var/lib/alsa/state-daemon.conf", RUN+="/usr/sbin/alsactl -E HOME=/var/run/alsa nrestore $attr{device/number}"
LABEL="alsa_restore_end"
The only problem I'm having with this workaround is that you have to select the Blue Yeti Pro from your settings every time you boot. However, it seems to work fine after being selected.
This is a bad solution, hopefully someone with more knowledge than I can fix the real bug.
I hope this helps some fellow Yeti owners out.
Justin
Bookmarks