Turning PulseAudio and Phonon Off

PulseAudio can be a stubborn little daemon. The man page says you, can turn it off with the command pulseaudio --kill. But depending on your particular Linux distribution, it won’t stay killed; instead, it respawns itself. This is how it works on Ubuntu 10.04: It has a normal init script to start it at boot, /etc/rc2.d/S03pulseaudio. But when you try controlling this the normal way, it doesn’t work, because running /etc/init.d/pulseaudio stop doesn’t stop it. Removing /etc/rc2.d/S03pulseaudio doesn’t prevent it from starting at boot. Fortunately, I am even more stubborn and have figured out how to control stopping and starting Pulse. I don’t want to remove it; I want it to run when I want it to run. (If you want to remove Pulse, it shouldn’t hurt anything to do so.)

First look for a graphical control panel for Pulse with an option to disable it. This is missing from my Ubuntu 10.04 installation but present on Fedora and other distros. If your system has this, it might be all you need.

If there is no graphical control panel with an option to disable pulse, open /etc/pulse/client.conf, change autospawn = yes to autospawn = no, and set daemon-binary to /bin/true. Make sure they are uncommented, like this:

autospawn = no
daemon-binary = /bin/true

Next, to stop it from starting at boot requires several steps. First remove the relevant /etc/rc*.d/S*pulseaudio link for your usual runlevel or rename it to a “kill” link. This prevents init from starting Pulse. On my system, that looks like this:

# mv /etc/rc2.d/S03pulseaudio /etc/rc2.d/K03pulseaudio

How do you know your runlevel? Use the runlevel command:

$ runlevel
N 2

That means runlevel 2, which is controlled by the links (which must be links to files in /etc/init.d, not the files themselves!) in /etc/rc2.d/. Your distro may have a nice graphical services manager, which is a good thing to use.

On Ubuntu 10.04, there is one more startup file to dispense with: /etc/X11/Xsession.d/70pulseaudio. This starts Pulse when a Gnome session starts. Move this file to a different directory, like your home directory. Don’t delete it because you might want it again someday.

Other distros customize Pulse in different ways, so if these instructions don’t work, then look for help specific to your distro. There is no shortage of it because a lot of users are struggling with this. Another little trick, when you find scripts that start PulseAudio, is to change the binary that they call from /usr/bin/pulseaudio to /bin/true. This is a nice little executable whose only job is to “do nothing, successfully.” It keeps the scripts happy, and it’s a convenient placeholder if you ever want to change it back.

Now that you have purged all the startup scripts, how do you stop and start PulseAudio? It’s as easy as pie:

$ pulseaudio --kill
$ pulseaudio --start

Phonon is a different kettle of clams. Phonon exists only on KDE4, and it is impossible to remove because virtually all of KDE4 depends on it. It is not necessary to stop or remove Phonon in any case, because it uses only a tiny bit of system resources and adds no latency to your audio chain. It does have one annoying habit—when a sound daemon like Pulse or JACK takes control of a sound card, Phonon freaks out and emits an error message about how that sound card is missing, and it wants to remove the sound card from its menus. Just click Cancel to shush it.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.138.122.4