Tag Archives: Firefox

pulseaudio wasting CPU time because of speech-dispatcher

Disable speech-dispatcher on Debian 12

I’m running Debian 12 “Bookworm” on a HP ProBook x360 G1 EE. This “beast” is serving as a Jenkins node running an automated test suite on attached Android devices for GSM Signal Monitor. It also runs xRDP and XFCE as the desktop environment. I’m remoting into the machine from time to time for device management and configuration using scrcpy.

One thing I noticed when running htop and using Firefox to visit sites such as stackoverflow.com was the abnormal CPU utilization by PulseAudio.

After a bit of research, the issue was pinpointed to speech dispatcher auto spawning on demand when called by certain applications.

I don’t use speech synthesis or software synthesizers on this machine (or anywhere, to be fair) and would rather waste CPU cycles on something more useful—such as running complete regression test suites against GSM Signal Monitor when a build is merged into the dev branch, or pre-release testing on 24 devices attached to the little beast.

To prevent speech-dispatcher from auto-spawning on demand, open a terminal and run:

sudo nano /etc/speech-dispatcher/speechd.conf

Locate the “DisableAutoSpawn” option near the bottom of the file and uncomment it. Save the file and restart speech-dispatcher.

sudo systemctl restart speech-dispatcher

Optionally restart Firefox if it’s running.

Now speech-dispatcher should no longer spawn on demand by applications. You can verify that by navigating to a topic on Stack Overflow, for example.

speech-dispatcher disabled, firefox complaining

Firefox should complain that it can’t use speech synthesis.

Copying Cyrillic URLs in Google Chrome and Firefox

Using Google Chrome, I encountered strange bug affecting the copying and pasting of cyrillic urls.

When pasting, the non ASCII characters in the Url are converted to Punycode.

Performing some tests revealed that the same behaviour is present also in Firefox.

Punycode produced by Google Chrome and Firefox

Punycode produced by Google Chrome and Firefox

Doing some research led me to Issue 68718, unfortunately marked as WontFix stating:

Links on Wikipedia itself are a red herring, as comment 50 notes -- they're escaped in the page source.  The actual issue here is demonstrated by the link in comment 0.  We escape URLs when copying them.  This behavior matches Firefox 4 (by default) and Safari 5, though not IE9.

We added this behavior on  issue 2820  to fix a variety of problems in languages like Japanese.  Because those problems resulted in users unable to navigate to the pasted links, whereas this issue seems to be solely about cosmetics (in that escaped URLs are ugly and hard to read), preserving that behavior change seems like the more important thing to do.

Workarounds

Few things can be done if this issue is affecting your day to day usage of Google Chrome…

  • Before copying the URL add any character at the end of it, then erase it. After this operation the copied URL will preserve its structure not producing punycode when pasted.
  • Use the COPY URL extension.
  • Use a different browser. Microsoft Edge on Windows and Safari on OSX are producing the expected results.

Featured Image: https://wallpapercave.com/w/A7ZAUTz