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
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
|
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
Saturday, 29 December 2018, 14:12 GMT
Reason for closing: Fixed
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).
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.)
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.
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.