Wednesday, 16 December 2009

Karmic Sound

The Intel ICH7 southbridge with AC'97 audio is hardly what I would call rare. And yet, somehow Ubuntu Karmic conspires to screw around with the audio settings for this device.

Apparently, the only sure fire way to get sounds from the integrated speaker is to inadvertently browse to a website with garish embedded sound. If you actually want sound to emanate from the speaker though, you are stuffed.

Y'see there are settings and there are settings. The Sound Preferences program (which is run by the command gnome-sound-control, which in turns runs a program with the name gnome-volume-manager) has no setting for changing the source for the external speaker. So if it gets stuck on "Mic" you get no sound at all. You then have to drop to a terminal and run:

To get to the setting for "Mono Out". You want to use Page Up and Page Down to change between Mic and Mix. Mix being the one you want.

There is of course a separate question of who in their right mind would want to direct the Mic input straight to the Mono Speaker output. A nutter is the answer to that question.


Not content with one way to screw up your day, Ubuntu is ready with yet another. Pulseaudio is a part of Ubuntu that does ... I have no idea what. Pisses me off I suppose.

When this little gem swings into action (which appears from my extensive research to be whenever it fucking feels like it), the aforementioned Sound Preferences Program declares that you have NO OUTPUTS for sound. Alsamixer, gnome-alsamixer, and kmix can all happily see the proper sound outputs, but can you get any sound? No.

So, what you can do then is run:
ps aux | grep pulseaudio

from a terminal. That looks fairly nightmarish, so lets break it down. 'ps' means show me details of running processes. 'aux' is just a series of settings which make 'ps' show you a information about as many processes as possible. The '|' symbol means take the output of the left hand side of the line and 'pipe' it to the command on the right hand side of the line. The command 'grep' means search for, and the 'pulseaudio' is what we are searching for.

So, the command as a whole searches all running processes for pulseaudio and reports back information on it. The key piece of information you need is the 'pid' or program ID. This should be a 4 digit number. It uniquely identifies the program on the machine. The next step is the satisfying:
kill [pid of pusleaudio you found in the last step], e.g.
kill 1234

That should terminate pulseaudio, so when you go back to Sound Preferences, your output devices are back!

No comments:

Post a Comment