Community Packages

Please read this before reporting a bug:
http://wiki.archlinux.org/index.php/Reporting_Bug_Guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#53947 - [mumble] speech-dispatcher should be an optional dependency

Attached to Project: Community Packages
Opened by Nicolas F. (fratti) - Saturday, 06 May 2017, 14:08 GMT
Last edited by Sven-Hendrik Haase (Svenstaro) - Saturday, 29 December 2018, 14:12 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Sven-Hendrik Haase (Svenstaro)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

Description: The mumble package specifies speech-dispatcher as a required dependency, though all it does is provide the optional text-to-speech support.

speech-dispatcher has the nasty habit of always running in the background, and sends about 250 wakeups/second to the pulseaudio daemon when idle. This is preventing the CPU from entering lower p-states, making it waste power.


Steps to reproduce:
1. Install the package mumble
2. Note how you now have a sd_dummy running whether you're using mumble or not
3. Note how pulseaudio is now waking up the CPU significantly more often in powertop compared to before
4. Note how the wakeups are reduced by killing sd_dummy, thus confirming speech-dispatcher is the culprit
5. Try to pacman -Rs speech-dispatcher but realise that mumble depends on it despite it being an optional functionality
6. Assume fetal position as existential dread overcomes you, asking yourself where you life went so wrong. Your emotional support animal tries to cheer you up, but all for naught; the realisation that your system may not be a hallmark of minimalism wounded you too deeply.
This task depends upon

Closed by  Sven-Hendrik Haase (Svenstaro)
Saturday, 29 December 2018, 14:12 GMT
Reason for closing:  Fixed
Comment by Nicolas F. (fratti) - Saturday, 06 May 2017, 14:29 GMT
Oops, I messed up. Can someone fix the title from "mumble:" to "[mumble]"? I'm seemingly not able to do it myself.
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 06 May 2017, 15:59 GMT
Can you test for me whether everything still works if you remove speech-dispatcher (pacman -Rdd)?
Comment by Nicolas F. (fratti) - Saturday, 06 May 2017, 19:53 GMT
No, because you don't package libspeechd.so.2 separately from speech-dispatcher. On debian for example, the library is separate from speech-dispatcher itself, so mumble works without speech-dispatcher.

I've talked to some Mumble people, and they've told me that they're planning on at least having speech-dispatcher initialised lazily when say() is called. That being said, with just the library but without the other speech-dispatcher stuff, Mumble itself works just fine (just not the TTS, obviously).
Comment by Nicolas F. (fratti) - Saturday, 06 May 2017, 21:44 GMT
The Mumble dev response towards the suggestion of having libspeechd.so.2 dynamically loaded was "dynamic loading is ugly as hell". My counter-argument, "so is your mom but I still do her" was not very well received. So I'm assuming they're not going to use dynamic loading.

The other hope is that they will some day actually port to Qt5, and use qt5-speech instead of speech-dispatcher directly, which would fix this as qt5-speech does actually dynamically load the libspeechd library, judging by speech-dispatcher being an optional dependency for it.

If no code changes on Mumble's side happen, the only hope for the default Arch Linux package to work without speech-dispatcher running all the time is to split libspeechd into a separate package. (Ideally, people who are not interested in TTS won't have to build their own package from source, so the compile time configuration option to disable speechd isn't really an option here since this is mostly about users such as myself a few days ago who are unaware that this seemingly harmless dependency will require two processes to be running and constantly pound your pulseaudio daemon.)
Comment by Nicolas F. (fratti) - Saturday, 06 May 2017, 23:39 GMT
Someone pointed out another way this could be fixed, which is systemd socket activation. speech-dispatcher doesn't have to run unless the client library is asking for it. A PR is open against Mumble to make sure Mumble only initialises the client library if it tries to use TTS.

So this totals to 3 ways to fix this, ordered from best (1) to worst (3) (in my opinion):
1. Arch Linux separately packages the libspeechd client library just like it separately packages the libpulse client library, and other client libraries.
2. Arch Linux uses socket activation in systemd to decide when to start speech-dispatcher instead of always having it run (useful even if you decide on 1)
3. Mumble has to add a dynload hack to work around bad Arch packaging, which is unlikely to happen.
Comment by Sven-Hendrik Haase (Svenstaro) - Saturday, 03 June 2017, 15:29 GMT
Ok, a split package is in testing. Please test drive this. You will have to manually change the mumble package to only depend on libspeechd.
Comment by Nicolas F. (fratti) - Friday, 09 June 2017, 10:03 GMT
Hi,

the mumble build fails because you did not include libspeechd.h in the libspeechd package. Obviously, applications wishing to link against the client library will need to have the header file.
Comment by Nicolas F. (fratti) - Wednesday, 06 June 2018, 16:07 GMT
Have you gotten around to actually fixing the split package in testing?

Loading...