Wednesday, March 6, 2013

Adventures in the CLI: fixing sound using apt logs

Plunging back into community involvement this week meant installing mumble, a free messaging system. The virtual UDS (Ubuntu Developer Summit) Canonical is hosting at short notice this week (today and tomorrow, actually) is being conducted on Google Hangouts. While these can be cool, they limit participation to ten, and to those who have GooglePlus logins. So the Kubuntu devels wanted to try mumble instead for our meeting(s).

I usually use apt-get to upgrade and install packages, just because it is faster and easier. Alt-F12 to get nifty drop-down bash session, up-arrow to get to commonly used commands, and viola, done! However, this time apt-get installed most of GNOME along with mumble, such as evolution, plus gnucash and other stuff! Once all this was installed, I had no sound of any sort; from speakers, in flash, through earphones. Sadness.

I began working through the sound troubleshooting guide, but none of it worked, and didn't seem to apply anyway. When I asked in #kubuntu-devel about the mumble install, Scott Kitterman asked the right questions, and told me that his list of dependencies was small, as was the list of recommended packages, and how to find the complete list:

$ cd /var/log/apt/
$ ls 
$ cat history.log

This gets you a wonderfully detailed list of all packages dealt with by apt. I started by removing the obviously un-needed packages, including mumble itself. The list was so huge that I didn't get far, however, ScottK had suggested removing slpd and roaraudio. After reading the man page for apt, I got a bit more clever about getting more stuff in one fell swoop:

sudo apt-get purge gnome-mahjong*

for instance, gets the libs and -dbg packages too. Once I went back and purged roar* -- I got the offending libs, and had sound again!

By coincidence (I think) I had a problem in flash in Firefox at the same time. So Youtube videos were silent and about 100 times too fast. Once sound came back, I noticed that I had sound in Youtube in Chromium, and everything was the correct speed as well. Flash still seems broken in FF, but that now seems unrelated.

By the way, when I re-installed mumble using Muon, everything worked well. Although I haven't tested it yet, I expect it to work as advertised. 


  1. If you use aptitude instead of apt-get, it is a bit more clever with tracking stuff that is installed as dependencies of something else, and removing them when you remove what prompted it to be installed in the first place.

  2. Thanks for sharing the bit about history.log. I was unaware of it but it seems like it's very useful as you have just demonstrated.

  3. You might want to install the debian-goodies package and run which-pkg-broke.

  4. It just so happened I was about to look up where a log was kept of apt-get installs when I scrolled by your blog on :D