Feeds:
Posts
Comments

Archive for the ‘daemon’ Category

Ubuntu 9.04 Jaunty distribution release date draws near. Pulseaudio – the future is coming up as well. I admit that it works better compare to Intrepid, however, I still want to stick to the no-frills ALSA for my Intel on board card. If Pulseaudio works for you, by all means stick to it. I merely give you another option to choose. By the way, I manage to get my mic working 🙂 This guide will help you to kind of disable pulseaudio from starting / avoid pulseaudio to hog the sound hardware. It also solves the problem of every boot, the master channel is turned all the way down and muted.

The Environments: Firstly, I upgrade my Intrepid to Jaunty RC 32bits PC through ‘update-manager -d’. I have only one laptop so I can’t test the vanilla Jaunty RC version. Though, I will try to match the configuration as best as I can. Secondly, I have a built-in mic. Thirdly, the soundcard is an onboard Intel STAC9200 and I don’t have 2nd soundcard. For the uninitiate, the $ in front just denote your shell, after that is the command.

Required Packages: alsa-oss; libasound2; libasound-plugins; sysv-rc-conf (optional)

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

The Procedure:

Step 1:

When I upgrade to Jaunty, it doesn’t install any new ’70pulseaudio’ file in Xsession. If there is no such file, safely ignore this step. If it is present, move it to somewhere safe. The command below sends it to your home root folder.

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

Step 2:

Disable Pulseaudio service from run level. Watch out for the dot at the end. Else you can use sysv-rc-conf GUI.

$ sudo update-rc.d pulseaudio stop 50 2 3 4 5 .

Unset Pulseaudio from system and set my card from ‘asoundconf list’

$ asoundconf unset-pulseaudio
$ asoundconf set-default-card Intel

Make sure your libao.conf is using alsa. Use gedit if you like. For the uninitiate, to save in nano, press Ctrl + x.

$ 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:

screenshot-sound-preferences

So far so good. Cos those steps are similar to my previous guide. Now come to the more tricky part.

Prevent Pulseaudio from daemonize. Open ‘/etc/pulse/client.conf’ with your editor again. Look for this line ‘autospawn = yes’ then change it to ‘autospawn = no’.

This folliwng step is thanks to one of my reading of Sonal Santan on the mailing list last time, but now in Jaunty then it can shine. If the just above step doesn’t work properly. Open ‘/etc/pulse/default.pa’ in an editor. Look for lines similar to the following two commented out lines:

#load-module module-alsa-sink
#load-module module-alsa-source device=hw:1,0

Add the following two lines just after these two lines:

load-module module-alsa-sink device=dmix
load-module module-alsa-source device=dsnoop

The above change will force PA  not to  take exclusive control of sound hardware.

This step is similar to my old guide. Open ‘/usr/share/alsa/alsa.conf’ in an editor. Comment out the line which says ‘/usr/share/alsa/pulse.conf‘ by inserting a # in the beginning. After the change, the @hooks section would look something like the following.

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

The above procedure will make sure ALSA is use system-wise. 🙂

OPTIONAL (But recommended anyway): Go to this link, https://help.ubuntu.com/community/HdaIntelSoundHowto look at this section Manually Specify Module Parameters and do yourself a favour 🙂 

Step 3:

Application specific issue is discuss here. Mplayer only at the moment.

MPlayer: 10 second wait before audio start playing.

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

Step 4:

THE MIC WORKS 🙂 ! This step might need the optional step Manually Specify Module Parameters above.

I will give you a short tutorial on `alsamixer` which is required to get the elusive mic to work. Open alsamixer by type ‘alsamixer’ in the terminal. In alsamixer, using Tab to change View property. To MUTE/UNMUTE press m. To move the slider, use up and down key. To move to another property of same view, use right and left button. And the spacebar…

alsamixer

Now guys, you see the box right below the slider?  [ 00 ] == unmuted,  [MM] == muted. Check before you keep whining that there is no damn sound.

For the Mic to work, make sure (look at the screenshot, that’s how your should looks like)

Capture and Digital properties are not muted / not zero db. 67 is a good value. Capture should look like in my screenshot . If your capture looks like, —– then press space bar once to change it to L R  Captur.

Mux should be at zero.

Select your Input Source to Mic. Fire up your gnome-sound-recorder, choose Capture the voila. The capturing quality is better than M$ Windows with noise cancellation. Bleh 🙂

Step 5:

Check that you didn’t miss any step. Reboot (don’t be lazy) and make sure the damn sound is not muted =.=” .

Cheers and don’t disturb me for at least 3 weeks 🙂 Let me be at peace with my exams.

TROUBLESHOOTING

If you get the message as below

“audiotestsrc wave=sine freq=512 ! audioconvert ! audioresample ! gconfaudiosink: Could not open audio device for playback.”

You need todo the following to resolve it. Backup .asoundrc first =)

‘sudo /etc/init.d/alsa-utils restart’
OR/AND
‘rm ~/.asoundrc’

Btw, I set up twitter @ http://twitter.com/idyllic_tux to further disseminate any tips if I have in the future.

Advertisements

Read Full Post »

Greetings everyone :]

After a long period of laziness, Intrepid problems on my laptop (wireless + kernel-panic #314961 and blank CD/DVD problem #321174), I finally resurface and of course not without a souvernir to you.

With many tasks at hand to handle, you are preoccupied most of the time, chances are important email goes unnoticed. Pidgin’s new email notification is puny and has no tray icon support (what a let down). cGmail doesn’t support normal free Yahoo! and WLM/Hotmail. You started your quest searching for a decent mail notification: kbiff, gbiff, mail-notification, etc. You settled for Mail-notification for it caught your eyes with the lean interface and gnome integration. After the installation from the repo, what a nightmare you got after an easy process of adding accounts. You started swearing mentally. Yahoo and WLM don’t work out of the box unless installing extra debs (fetchyahoo and getlive). Worst still, the deb itself is not up-to-date and even the latest deb doesn’t work!!! You googled and started swearing verbally now. SSL support is greyed out due to licensing issue. You could be like, “**** this sh!t already!”. Don’t worry, I was in the same situation as you. I am ended up building the package from scratch with ssl enabled and writing a guide on how to install and use Mail-Notification with Ubuntu.

== 1 ==

Download my deb with SSL enabled [*** here ***]. And if you need evolution integration then this deb as well [mn_evolution].

== 2 ==

Install neccessary debs for Yahoo!, WLM as well as OpenSSL

% sudo apt-get install fetchyahoo getlive openssl

== 3 ==

* Download the modified script for [GetLive here]. Credit goes here https://bugs.launchpad.net/mail-notification/+bug/297774
* Presuming you saved the file in your home document, we need to move/symlink it to /usr/bin and make it executable

% sudo mv ~/GetLive /usr/bin/GetLive
% sudo chmod +x /usr/bin/GetLive

== 4 ==

Launch it, Menu – Internet – Mail Notification
Configure the accounts, this is per usersetting.

== 5 == (Optional)
* Automatic start mail-notification when session start, System – Preference – Session
* Always display icon, open “gconf-editor” -> /apps/mail-notification/always-display-icon
* Give yourself a pat on your shoulder.

Cheers :]

PS:  if you want to build them manually next time, I just found a blog (http://glyphobet.net/blog/essay/286) which provided a script to do it. Though, you should revise the script before run it because removing “–disable-ssl” is in for 4.x while  “ssl=no” is for  version >= 5.4 from debian/rules. (more…)

Read Full Post »