Feeds:
Posts
Comments

Posts Tagged ‘daemon’

After upgraded to Intrepid RC, I once again fiddled with Ubuntu sound system to use ALSA instead of Pulseaudio in a non-destructive way (a.k.a no removable of Pulseaudio packages and configuration which in turn not remove ubuntu-desktop package which is needed for future distribution upgrade). It was a bit trickier to do compare to Hardy, but I managed to locate all the culpirt that plague my sound system eventually and came up with this comprehensive guide. Without further ado, let the game begin!

1. Preparation! Install the follow packages if you haven’t had them yet. First one is alsa wrapper for oss, 2nd one alsa library and 3rd one is alsa library plugins. The last one is to configure the runlevel of pulseaudio (just for a total overkill)

% sudo apt-get install alsa-oss
% sudo apt-get install libasound2
% sudo apt-get install libasound2-plugins
% sudo apt-get install sysv-rc-conf

2. Removal Procedure! Remove pulseaudio from Xsession by moving it somewhere safe just in case you want to use back Pulseaudio again. The 1st command will move it to your home folder (~/).

% sudo mv /etc/X11/Xsession.d/70pulseaudio ~/

Remove pulseaudio (sound plugin) from gnome-settings-daemon

% gconftool-2 -s -t bool /apps/gnome_settings_daemon/plugins/sound/active false

Well you can always open a UI to do this if you feel unconfortable, Alt+F2, then type “gconf-editor”, navigate to /apps/gnome_settings_daemon/plugins/sound/ then untick the active box.

Unset Pulseaudio

% asoundconf unset-pulseaudio

Remove from runlevel [Overkill, just to make sure]

% sudo sysv-rc-conf

Page down till you see “pulseaudio” entry, then untick all the box []. Save and exit.
CAUTION: I dare not ask you guys to do this oneliner “sudo update-rc.d -f pulseaudio remove” or “sudo update-rc.d pulseaudio kill 15 2 3 4 5 .” cos I think it is dangerous. If someone can update me on this then I am deeply appreciated. Just stick to sysv-rc-conf for a safe journey.

3. Configuration for ALSA! Now time to configure alsa to use the main sound card

% asoundconf list
Names of available sound cards:
Intel
% asoundconf set-default-card Intel

Make sure the libao.conf is using alsa. You can use gedit if you want to.

% sudo nano /etc/libao.conf
default_driver=alsa

Navigate from the menu: System – Preferences – Sound, make sure yours looks like the one in the screenshots below:

ALSA

non-pulse-daemon

You will have no login sound from now on 😦 . Workaround is you create your own autostart event, use “aplay” or “mpg123-alsa” or “mplayer” and path to the your log in sound.

To further overkill pulseaudio, edit your .bashrc at your home folder and put this in:

% export SDL_audiodriver=alsa
Use this line if you want alsa wrapper for OSS: % export SDL_audiodriver=aoss

Ubuntu 8.10 has flash 10 package [adobe-flashplugin] so multiple sounds and flash sound work perfectly without libflashsupport (no longer in the repository) πŸ™‚

Still with me? Haha. Give yourself a pat on the shoulder. Reboot and enjoy ALSA. Self-check, type in the terminal “pgrep pulseaudio”. If no number return, pulseaudio is disabled πŸ™‚

Future tips will come as I explore the system more πŸ˜› Till then.

TROUBLESHOOTING: 10 second time out solution below in the comment πŸ˜›

I finally figure out the 10second lag. Those applications will first look for Pulseaudio, but it is gone, so the 10 second time out before alsa kicks in.

=======
Solution:
=======

+ Edit /etc/mplayer/mplayer.conf, line 74, change the order to the order below (original pulse,alsa)
# Specify default audio driver (see -ao help for a list).
ao=alsa,pulse

+ Totem-gstreamer i can’t find the config for it yet, so work around is use totem-xine, then check that ~/.config/totem/xine_config , pulseaudio is comment out.

+ System-wide config (so far I only tested with mpg123-alsa, aplay, moc). Backup your /usr/share/alsa/alsa.conf. Then on the very top. Chage it to the following: (alternatively you can comment out /usr/share/alsa/pulse.conf or move it down the list, I prefer remove it anyway since we got a backup)

# pre-load the configuration files

@hooks [
{
func load
files [
“/usr/share/alsa/bluetooth.conf”
“/etc/asound.conf”
“~/.asoundrc”
]
errors false
}
]

=>>>>>>> Exam time!

Read Full Post »