jump to navigation

Ubuntu woes… December 24, 2009

Posted by jmcomputer in Home Use, Linux.
Tags: , , , , , , ,
2 comments

First, let me preface by saying that I do enjoy using Linux for my desktop, I have been able to do everything I was able to do in Windows and then some, and all for free. The reasons I’m even posting this is for people to see what steps I took, and in case a developer sees this, can fix it. Also if you have fixed this issue, please let me know!

Since I am not in classes at the moment, it’s a safe time for me to perform the typical distribution upgrade. For those of you who use Windows, this isn’t like a service pack, this is a free upgrade to the latest version (for example: upgrading from Windows Vista to Windows 7, easily and without the need to purchase a CD or anything). Ubuntu 9.04 is now Ubuntu 9.10! The upgrade went almost flawlessly, the only hitch I came across was that the new kernel did not load into the grub bootloader menu. That’s easily resolved by editing it myself.

Things I noticed immediately: MUCH faster boot time! Since I don’t use a bootsplash (the nice graphic that shows you it is loading), I can see all the commands and feedback that the system is going through during boot, and aside from AppArmor causing a bit of a slowdown, it is MUCH faster than the previous version! KDE looks similar to what I had before, but there are a couple changes, the “cashew” to unlock widgets is much smaller, and the menus and all look a little more polished (yes, the developers DO listen to comments). Booted into gnome (which incidentally hasn’t worked for me in the last couple months [my fault, I broke a couple packages]). Desktop looks the same, menus are a little quicker, and more polished as well, nicely done Gnome Team! So at this point, everything looks wonderful!

Now is where the problems become apparent. I play a game using Wine (for the Windows people: Wine is an application that allows MOST [not all] Windows applications/games to be run in Windows by making the application think that it is running in Windows), when I started the game, the sounds were “off”… The easiest way to describe is a slight garble that eventually faded into complete silence. This is different… After some tinkering with the game, I find that I can still hear the integrated voice-chat feature, but I cannot hear any other sounds from the game. Now THIS is odd, I have experienced a lot of interesting and obscure errors between both Windows and Linux, but to have an app where one sound doesn’t work, but another does when they are both streaming through the card is a really odd one. Usually either it completely doesn’t work, or it all works, and this is on ALL operating system.

Okay, time for the “fun” of Linux, I know the issue is either with Wine or PulseAudio sound system. So let’s see what I can do… I searched around and found the previous version of Wine that I was using, installed it, and I still have the same problem. This removes the possibility of Wine being the issue, so now I know it’s all the PulseAudio sound system.

A little bit of history on Pulse: Linux has several sound architectures, and many apps rely on different ones, for example: Advanced Linux Sound Architecture (Alsa), Open Source Sound (OSS), OpenAL, eSound, etc. An analogy to this would be in the video area, you have DirectX and OpenGL libraries to run graphics. PulseAudio is supposed to be a “mixer” of these different systems, so Alsa and OSS will be piped into Pulse, the benefit of this is multiple applications can play a sound in different architectures, and all will be heard at the same time (think mp3’s, videos, and website/flash/java sounds all playing at the same time, rather than only one application having sound control at any given time).

Back to the issue, since I now know it’s in the sound system, I start looking around for ways to roll it back to the version I KNOW worked before. Current version in Ubuntu 9.10 is Pulse 0.9.19, and the version I had before upgrading was 0.9.14 (still in Ubuntu 9.04 repositories). Okay, easy enough to just download the package for Pulse 0.9.14 and install that, or so I thought. The easiest way to do this is when you download, you open with GDebi, which complained because a more recent version is already installed. No problem I can force the install, just need to grab the other packages for the supporting files/modules. This is where I notice a different, Ubuntu 9.04 relied on HAL (Hardware Abstraction Layer) for it’s device control, but now Ubuntu 9.10 uses udev (unknown what this stands for), the pulse files for 9.04 were made for HAL use, and not udev use, so I am hesitant to force this one. Well, let’s see what else I can do…

PulseAudio’s website (http://pulseaudio.org) has an updated version of 0.9.21, this could fixed the problem, but it is only available in source code. For me this isn’t too big of a deal, the “Infamous Three Commands” of .configure, make, sudo make install aren’t new to me, and generally most of the time I haven’t had issues on this. After installing, I try to check the version (pulseaudio –version) and I am not getting an error of cannot find a file (libpulsecore-0.9.21.so). No big deal, copy that from the source code folder and drop into /usr/lib folder. That didn’t fix the error.

Okay, “Google is my friend”, I start searching around and I find quite a few write-ups, blogs, etc where people have had similar issues. One in particular says to delete the settings folder for Pulse in the user directory. Not a bad idea, these things are auto-generated anyways, and maybe an old config from before the upgrade is causing the issue. I deleted the files (~/.pulse and ~/.pulse-cookie). I tried out my Wine game, and hey, it worked, I now have full sound in the game! Unfortunately I found out later that this was only temporary, I have to do it each time I want to play the game.

The next site I come across talked about the same issue and suggested installing an updated Alsa set and PulseAudio set from the ppa repositories (ppa’s are repositories/download areas that are not in the “mainstream”, so you generally get Beta or “Unofficial” packages, does not mean they do not work, just means they are not in the “approved” repos, yet). I get both of these installed and then get to test them. The sound in the game is still garbled or silent (save for the voice-chat feature), and only one application can use the sound card at any given time (Amarok can play fine, but when I start a video file in MPlayer, the sound will not play in MPlayer).

After more Google sifting, every site I have come across has had the same suggestions as these (building from source, the development ppa’s, or deleting the pulse settings). Now I am annoyed, let’s just remove Pulse and use eSound. As I try to remove Pulse, the package manager says that it needs to remove ubuntu-desktop as well since Pulse is part of that package. Well, I can’t have that happen. But here’s some light at the end of the tunnel, KDE does not need Pulse, only Gnome does. This laptop has fared pretty well since it has gone through 2-3 distribution upgrades without a fresh install, I think it’s about time to do a clean install (i.e. delete the packages only and start over, for the Windows folks: user settings, documents, music, photos are stored in a different section of the filesystem, and thus are unaffected by re-installs, unlike in Windows where even when you reinstall Windows and all the applications, you do not get to keep your settings).

This time I am going to install Kubuntu (KDE only variant of Ubuntu), and use the Phonon sound system (does the same thing as Pulse, but only works in KDE). It’s a shame that I will end up having to remember/re-obtain all the wireless network passwords again, but since the wireless networking was being handled by a Gnome application, I won’t have that around after the re-install. Looks like I will be doing the install this weekend after the holidays, until then I can use the deleting pulse settings to do what I need to do.

If anyone has had better success or knows something that I have missed, please feel free to post, I’ll be checking here and at System76’s support forum before upgrading.