Discussion:
LIBASOUND_THREAD_SAFE workaround and ArchLinux
Zachary Kline
2016-08-13 17:39:09 UTC
Permalink
Hi All,

Does anybody have a way of implementing the LIBASOUND_THREAD_SAFE=0 workaround in Arch, with its espeakup.service systemd unit? I thought exporting the variable before starting the service would be enough, but it doesn’t seem to be passed into the environment properly.

It’s weird bugs like this which make me miss hardware synthesizers.
Thanks,
Zack.
Mark Peveto
2016-08-13 17:57:07 UTC
Permalink
Is it something that goes in pulseaudio's default.pa file?

Mark Peveto
Registered Linux user number 600552
Sent from sonar test box using alpine 2.20.14
Post by Zachary Kline
Hi All,
Does anybody have a way of implementing the LIBASOUND_THREAD_SAFE=0 workaround in Arch, with its espeakup.service systemd unit? I thought exporting the variable before starting the service would be enough, but it doesn’t seem to be passed into the environment properly.
It’s weird bugs like this which make me miss hardware synthesizers.
Thanks,
Zack.
_______________________________________________
Speakup mailing list
http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup
Chris Brannon
2016-08-13 21:31:19 UTC
Permalink
Post by Zachary Kline
Hi All,
Does anybody have a way of implementing the LIBASOUND_THREAD_SAFE=0
workaround in Arch, with its espeakup.service systemd unit?
Hi Zack and all,
You've got a couple of options now.

Samuel Thibault sent a patch to the Debian Accessibility list to fix the
issue in libasound. I've been running with that patch over here, and
espeakup seems to be working fine.
I put that patch up on my server so everyone can get it easily:
http://the-brannons.com/asound.patch
On Arch, you can add that patch to your ABS tree, adjust the PKGBUILD,
and rebuild alsa-lib from source.

If you'd rather use the environment variable workaround discussed
earlier, I think the following steps should work for you under systemd.
Copy /usr/lib/systemd/system/espeakup.service to /etc/systemd/system.
Edit /etc/systemd/system/espeakup.service.
Find the line that says [Service].
After that line, insert
Environment=LIBASOUND_THREAD_SAFE=0

-- Chris
Zachary Kline
2016-08-14 16:27:55 UTC
Permalink
Hi, Chris and All,

Thanks for this information. I ended up going for the environment method, although I used a drop in snippet instead of copying the whole unit. I hope a patch gets put upstream at some point soon, so this kind of sludge is not necessary.
Best,
Zack.
Post by Chris Brannon
Post by Zachary Kline
Hi All,
Does anybody have a way of implementing the LIBASOUND_THREAD_SAFE=0
workaround in Arch, with its espeakup.service systemd unit?
Hi Zack and all,
You've got a couple of options now.
Samuel Thibault sent a patch to the Debian Accessibility list to fix the
issue in libasound. I've been running with that patch over here, and
espeakup seems to be working fine.
http://the-brannons.com/asound.patch
On Arch, you can add that patch to your ABS tree, adjust the PKGBUILD,
and rebuild alsa-lib from source.
If you'd rather use the environment variable workaround discussed
earlier, I think the following steps should work for you under systemd.
Copy /usr/lib/systemd/system/espeakup.service to /etc/systemd/system.
Edit /etc/systemd/system/espeakup.service.
Find the line that says [Service].
After that line, insert
Environment=LIBASOUND_THREAD_SAFE=0
-- Chris
_______________________________________________
Speakup mailing list
http://linux-speakup.org/cgi-bin/mailman/listinfo/speakup
Chris Brannon
2016-08-18 01:30:02 UTC
Permalink
Post by Chris Brannon
Samuel Thibault sent a patch to the Debian Accessibility list to fix the
issue in libasound. I've been running with that patch over here, and
espeakup seems to be working fine.
Oops, you probably don't want to use that patch after all.
For instance, if you run aplay with the patched library, it doesn't
terminate when it is done playing a file.
So for now, the only thing I know that will work is setting the
environment variable.

-- Chris

Loading...