Skip to content

Linux Daily

Daily usage of linux, raw style

If you were on the internet around august-september last year, you might have heard some of the buzz surrounding Ubuntu 9.10 “Karmic “Koala”. Since ubuntu and windows 7 came out on more or less the same time, comparing both operating systems was quite fashionable. And, wow, what do you know, ubuntu always won. If you ask me, linux fanboys have used linux for so long they must’ve forgot what a fully working operating system looks like.

Well, you know what they say, the higher you fly the bigger the fall, or something of the like, and the fall of Karmic Koala was quite severe. Here’s a couple of notes of some the worst of Ubuntu’s latest edition.

1- PulseAudio is still broken

The PulseAudio rush started in late 2007. If I remember correctly, it was Fedora that first shipped with it. Then all the major distros rushed in as well and Ubuntu 8.04 LTS was the first release to include it. And that was the end of linux audio being close to working.

Since then, every ubuntu version suffers from some audio problem or another. In 8.04, flash didn’t work. In 8.10, sound clipped. In 9.04, skype broke. In 9.10 it’s just a mess. Audio in all  the emulators don’t work properly: GensGS, PSCX-R, Mupen64, and even Dosbox . Audio in wine will desynchronize periodically, click, hiss etc. Sound clipping in banshee was solved by defaulting the volume to 80% instead of 100% like it should be.  etc etc ad absurdum.

2- The radeon driver is broken

I had posted before that ATI dropped support for RV300 chips. I was happy that linux enabled me to use the latest software with my aging hardware. But that’s not really the case. The radeon driver suffers from an infinite number of regressions, bugs, performance issues that make Ubuntu 9.10 unusable with these cards. I’m not even talking about compositing performance, or the 3D acceleration that can’t really be called acceleration, it’s with video, 2D desktop performance and, of course, flash and scrolling performance.

I remember a somewhat old interview of Mark Shuttleworth that finished with mark saying to the interviewer “If you have an old laptop around the house, try the ubuntu live cd”. If this was ever true, it definitely is not true anymore.

3- The update-apt-xapian-index bug

Synaptic Package Manager has a quick search function that works very nicely. It has an optimized database of some sort, and it is populated by this process called update-apt-xapian-index which is scheduled to run weekly. Now, everytime this process decides to run, which obeying the fundamentals of moore’s laws is always on the worst possible time, the OS just freezes. If you have a recent computer, this is barely noticeable. If you have an older computer or say a netbook, this is unbelievably annoying. Some people don’t think it’s a bug, these people are wrong. It is a bug.

4- The system log bug

I only noticed this with my netbook, but I’m willing to infer that it happens on all computers that use the Intel Atom processor or one a line of motherboards that support it. On a completely random basis, the system will start logging hundreds of time per second the reported temperature of operation of the processor. In a couple of minutes your log files can shoot up to the GB numbers, which depending on your machine can be either an enormous disaster, or a gigantic disaster. Take your pick.

5- Probably the most unreliable release ever

There are so many little bugs and issues that this release of Ubuntu is just unreliable. It’s the gnome-do package that provides a broken gnome-do. It’s the doubt that any packaged program that uses audio will work at all. It’s the gnome keyring that requires authentication on every operation if you choose to enable automatic login. It’s the new boot process that hides some messages, but doesn’t hide others. It’s the two finger scrolling emulation that the driver supports, but the ubuntu menu to activate it doesn’t work. It’s firefox 3.5 that doesn’t scroll properly in google reader, and still has that bug that if some element has absolute positioning scrolling is horribly slow.  I say no more.

In conclusion

More and more ubuntu has converged into this notion: everything kind of works, but at the same time, it doesn’t. A few years back, installing ubuntu was a pain in the ass but in the end you had a reliable system. Today, the installation procedure is easier, but the bar has been raised. Even if your hardware is 100% supported with the best drivers, the system will not be 100% reliable. Be it the bad packaging or the pulseaudio mess, ubuntu has reached a point where it can’t be trusted. So the obvious question is: why use it at all?

All eyes on lucid lynx.

P.S. I haven’t written anything on this blog for quite some time. I’ve just been busy, and honestly, my motto for creating this blog was “because it’s relevant”. With every ubuntu release, I feel like it’s becoming progressively less true. And I still use ubuntu on all my computers. Go figure.

Tags: , , , , , , , , , , , , , ,

The other day I was a bit pissed off because network manager would not show network statistics. You know, inbound/outbound traffic, speeds, that kind of thing.

Well, on the Resources tab on System Monitor (accessible on System->Admnistration) you have that info. Probably you could have more info there, but for me it’s perfect, just what I was looking for.

I’m not going to get into the story of Open Sound System. Let’s just say that OSS was deprecated years ago and ALSA is the standard. Recently OSS was GPLed and now you can use it with no problems. The following was what I gathered about the subject, tested in Ubuntu 9.04 (linux mint 7 to tell the truth) on an Acer Aspire One. I sometimes reference things by wrong names by sheer ignorance, but you’ll get the idea. I present instructions for installation, configuring applications to work with OSS and a path to debug some of the most common problems encountered with OSS.

1.Why consider OSS

There are a number of reasons to consider using OSS in your system. Some say OSS has better sound quality, it’s hard to tell really. Some soundcards, of the more professional variety, are only properly supported with OSS. You know, 5.1 sound and the like. Some say it takes less resources, but really it’s nothing extravagant. A list of supported hardware can be found on this pdf.
A good reason to use OSS is to refuse to use ALSA+pulseaudio and avoid its problems. If you have propper support for your hardware in ALSA, then alright, ALSA works ok, but pulseaudio is just there to ruin your audio. Pulseaudio is the reason strange shit happens with sound. It’s why you experience sound clipping for no reason, it’s the reason skype audio breaks randomly on ubuntu 9.04, etc and etc ad absurdum. If you’ve used any distro with pulseaudio running on the background you have experienced problems with audio. There is no ideal pulseaudio set up, pulseaudio is a big piece of shit with useless features, it is the exact definition of bloatware and has random problems with no possibility of solution. With OSS you won’t have these problems. No, you’ll have a different set of problems. But hey, at least they are predictable and you might be able to solve them.

2. Why not consider OSS

OSS has its own issues. Assuming your hardware is supported, what will not work for sure is automatic headphone recognition and suspend/resume. Some workarounds are available, but it will not work out of the box.

The bigger problem with OSS though is support. It’s not supported very well. I mean support in terms of active development and integration with your desktop. Your system sounds will not work out of the box in GNOME. The base system itself is quite good and has extraordinary potential, but no one is really working on it to the fullest extent. The GUI mixer applet is just a proof of concept to be honest. Look at it

Oh boy

Oh boy

It tries to do inteligent things like calling pink-jack to your mic input, green jack to the headphone. The idea is brilliant, but it doesn’t work 100% and ends up being confusing. It is still better than alsa though. Consider this usual mess.

Just your everyday user-friendly, sane piece of software engineering. ALSA FTW!

Just your everyday user-friendly, sane piece of software engineering. ALSA FTW!

3.Getting it up and running


Installing OSS is pretty simple. If you haven’t tried OSS before, the more intelligent thing to do is disable ALSA and pulseaudio instead of uninstalling them. First thing is to blacklist all alsa sound modules using the two following commands

sudo cat /lib/linux-sound-base/noALSA.modprobe.conf >> /etc/modprobe.d/blacklist.conf

sudo echo "blacklist snd_hda_intel
blacklist snd_mixer_oss
blacklist snd_pcm
blacklist snd_timer
blacklist snd_page_alloc
blacklist snd_hwdep
blacklist snd
blacklist soundcore" >> /etc/modprobe.d/blacklist.conf # One whole command

Noticed that that last one should be on whole command, paragraphs and everything. Run this

sudo dpkg-reconfigure linux-sound-base

And choose OSS from the list. Now you have to reboot. If you would like to check if the ALSA modules have indeed not been loaded, try running lsmod.

Install all the needed dependencies like so

sudo aptitude install libtool libgtk2.0-dev libesd0 libsdl1.2debian-oss build-essential binutils linux-headers-`uname -r` gawk

Now you are ready to install. There is a deb package available. You can get it from the 4front website or directly here, the latest package as of the writing of this article. The recommended way to do it is installing the package using dpkg, for some reason the GUI app is said not to install it properly.

sudo dpkg -i oss-linux*.deb

And that’s that. OSS has been installed and should now be running. You can check it by running lsmod and checking for the new modules.

In system->preferences->sound you should change everything to OSS4 (if OSS4 is not available, then OSS will work too) like so

Notice the Default Mixer tracks

Notice the Default Mixer tracks

Note the last part, Default Mixer Track. When you change your volume using the volume applet, the volume you are changing is whatever track is choosen here.

This is what I mean

This is what I mean by volume applet

And we’re done.

Configuration and debugging

Now you will want to test your audio. This might be quite an involved process.

Flash 10 should be working out of the box if you have the package flashplugin-non-free-extrasound installed. If not working, try reinstalling the package. Totem should be working since the propper Gstreamer backend (packages gstreamer0.10-plugins-bad and/or gstreamer0.10-plugins-ugly). Regarding Wine, you need to change the sound driver to OSS in the Wine Configuration thing. Mplayer and vlc may have to be configured on their own options to have audio working. I will dedicate a whole section to Skype.

In case something’s wrong, here’s an explanation of some of the tools available, things you can do with them and things to look up. I will put them in an order that makes sense as a debugging procedure.

osstest is a command line utility that will play audio on all output devices avaialbe, it will run thru all devices registered in /dev/oss/oss_hdaudio/ (note that the last folder oss_hdaudio is driver specific). Running this will reveal if your soundcard is properly supported and the driver is properly installed. If you hear the audio test, then any playback problem lay elsewhere.

ossxmix is the mixer GUI you’ve seen a screenshot earlier. It looks pretty bad and confusing. There’s a couple of things I would like point out.
vmix stands for virtual mixer. This needs to be enabled for you to have multiple applications outputing audio at the same time, if you can’t play music in totem while watching a video a youtube, this is what you should be looking at. vmix0-src should be set to Production for the best sound quality possible. vmix0-outvol/-invol are respectively the volume of the ouput and the input, meaning playback and recording respectively. At the bottom you will see the mixer itself, several channels available and each application will connect to one of the channels. You can have one application occupy multiple channels, for instance, skype may use one input channel and one output and you will see both channels in the mixer. I don’t know as of now if there is a maximum number of channels and if you can do anything to change them. I still haven’t had any problems with that.
In the middle rows you will have the rest of the devices your soundcard is packing. It’s an enormous mess and the mess will be different from soundcard to soundcard, so I won’t go too deep on this. And note that by mess I don’t mean just mess in presentation, the driver itself may have some bugs and the controls will not work as intended or even in a logical way. To try to understand what is doing what, you can play some music in whatever program is working, play with the controls and see the changes in real time. It is useful to find out how to manually mute the internal speaker of your laptop, since like I mentioned, headphone detection doesn’t normally work. Microphone problems will be solved also by playing with the mixer, but the easiest way to use the mixer with ossrecord as I’ll explain in a second.

ossdevlinks shows the symlinks to which /dev/dsp* entries point. From what I understand, versions prior to OSSv4 used these /dev/dsp* entries, but in V4 they use different entries and basically the dsp ones link to the ones used in V4.  You need to run it as sudo and with the -v option, sudo ossdevlinks -v . Here’s an example output

4 audio devices
/dev/dsp4 is the next free legacy device
/dev/dsp0: symlink -> /dev/oss/oss_hdaudio0/pcm0 OK
/dev/dsp1: symlink -> /dev/oss/oss_hdaudio0/pcm1 OK
/dev/dsp2: symlink -> /dev/oss/oss_hdaudio0/pcmin0 OK
/dev/dsp3: symlink -> /dev/oss/oss_hdaudio0/pcmin1 OK

Here’s a brief explanation of what I understand of this output. pcm0/1 are respectively the internal speaker of my laptop and the headphone. I can see this by running osstest and checking wich pcm is which. So choosing the playback channel is done. pcmin0/1 are two available inputs, which in theory I would guess  should be the internal and the external mic. This is a bit more tricky, because in effect you can only select one mic at a time, which one is selected in the mixer.

This will come in handy to use ossrecord and to setup skype or any application that uses the dsp links.

ossrecord will record audio from the currently selected input device. An interesting way to use it is to redirect its output directly to ossplay like so

ossrecord - | ossplay -

Using this you can listen immediately to what’s being recorded. If you are having trouble with choosing the internal mic or the external mic in a laptop, for instance, with this command you can listen in real time to changes you make in the mixer. The problems you might be dealing with are a combination of muting and selection. Example, you might have the external mic selected, but if its muted you won’t hear a thing. Yep, it’s a mess.
In my case I was able to choose the external mic by doing the following irrational procedure

ossrecord -d/dev/dsp3 - | ossplay -

The -d option forces ossrecord to listen to a specific device. With dsp3,  selecting speaker/dmic I heard the external/internal mic respectively. Here’s a screenshot of what I mean.

There is no difference between this and something absolutely random

There is no difference between this and something absolutely random

Bottomline, by trial and error I found out that /dev/dsp3 is outputting the selected microphone in the mixer. Selecting the mic in the mixer was a shot in the dark. I knew which input devices were available by checking ossdevlinks and noticing that dsp2/3 were linked to pcmin0/1.

By  know you should’ve have mastered your soundcard if the installation went alright. There are still some things worth mentioning.

The volume applet is tricky. When you use your keyboard to change the volume it’s the same as changing it in the volume applet, and which mixer track this affects is chosen in the sound preferences dialog as I mentioned earlier. Going to volume control you will access the mixer. Since no more alsa and no more pulseaudio, you will have only one mixer available which is much more sane. This has basically the same options ossxmix has (note that you have to enable all the possible options choosing preferences and putting them all visible), but presented in a different way. I do not recommend using this, although it works, I do believe some options are missing, I recommend setting your audio using ossxmix.

ossmix is the command line mixer. Running ossmix will dump all the information ossxmix presents graphically. By using ossmix with some options, you can change the levels and switches you change in ossxmix. In theory, if you wish to have headphones automatically detected you should try to automatically run a specific command that mutes the laptop internal speaker when the headphone is detected. I have yet to find how to do this. Also, if you’d like to mute/unmute the internal speaker easily, you can try to do a script that toggles the value and then make a shortcut on the desktop that runs the script, enabling you to mute/unmute with a double click. I haven’t done this, but it shouldn’t be too difficult, it’s a basic if/then/else structure.

ossinfo will display information regarding the current configuration. Running ossinfo -v4 will display all available information.


I believe this is worth a section of its own. In case you’re running Ubuntu, you should have the medibuntu repository installed and this will provide the required packages. The skype package only supports ALSA/pulseaudio. If you have this installed and wish to start using OSS, uninstall the skype package and install skype-static-oss. As a side note, this version of skype will not blend in your GTK theme, it comes with a “static” qt configuration.
You will need to configure the audio. In the options you can see that the devices are referenced as /dev/dspX instead of a more user friend reference, like in the screenshot.

You think this is bad? Ever seen how it looks like with ALSA+pulse?

You think this is bad? Ever seen how it looks like with ALSA+pulse?

By know you should know how to deal with this. I have explained how to find out what the dsp links are referencing, which ones are input or output and how to test them in real time. Usually you’re sound out and ringing should be /dev/dsp, the sound in you should find out by using ossrecord.

3.Other problems and things I found out

Disabling vmix will make sound applications use much less cpu (around half), but you can one play one at a time. It is mentioned in this forum post that disabling vmix for recording channels will bring the cpu down. I honestly did not understand the procedure so well, what do you mean dettach then attach?bah, I think I did it but didn’t really see any effects.

Suspend/resume I did not find a solution. In theory, you should disable audio by running soundoff on suspend and renable it by running soundon on resume, and this implies altering whatever scripts are run in both operations. Does any one know how to this?

The workaround to enable gnome sounds is quite simple but I don’t remember where I saw it.

After I got everything working I purged pulseaudio from my system, but didn’t touch alsa. It should not be a problem.


I initially installed OSS to try to tackle 3 issues.
First, I noticed that pulseaudio was using a lot of CPU and I head that OSS used less resources. On the CPU level, I did not see any real difference, only with vmix disabled would CPU usage come considerably down. Some people report other results though.
Second, I use spotify to listen to music. With alsa/pulseaudio the sound was choppy, freezing at least twice every minute and it was annoying me. Changing the wine driver to OSS and running spotify with padsp, a wrapper for pulseaudio, brought the choppiness down but not completely and the CPU usage was very high. I expected that running OSS natively with solve all the problems. Well, CPU went to normal because you don’t need the wrapper anymore, choppiness went further down but never disappeared. I am still trying to figure out how to solve the issue.
Thirdly, skype in Ubuntu 9.04 is not working well. The sound freezes after a random amount of time and there is no definite solution. By the use of voodoo I was able to make it work, but honestly I don’t even remember what I did. With OSS skype works fine.
So, bottom line, after installing OSS runs quite well but it did not solve all my problems. I like that the mixing is less insane than with alsa+pulse, but it sadly has some problems and the GUI mixer is not intuitive by any means. Since I did a lot of research, I know that some soundcards are only supported by OSS and there isn’t any good in-depth guide I could find online, I decided to write this.

For further help, please check the 4front user forum. What this guide contains is basicaly all I know about OSS.


arch linux wiki
4front user forum

harshJ blog
Pdf from 4front
with installation instructions, hardware support and general overview of tools.

Tags: , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

This is gonna be a short one.

You probably heard the Firefox 3.5 has a new javascript engine which supposedly has greater performance than the current stable version of Firefox. If you tried it out probably you’ve been dissapointed. The difference is minimal, in practice it’s zero.

Because I’m a professional procrastinator I went thru the release notes of the 3.5 version. Turns out, the new javascript engine isn’t enabled by default because of it’s instability. To enable it just go to about:config and search for jit. Toggle the chrome variable to true and the engine will be activated.

The difference is huge. Try it out and see for yourself. The package is firefox-3.5

P.S. The blog has been a bit slow the last few weeks due to a shitload of work at university. A major blog post regarding performance is in the works that will blow the internet out of the water. Wait and see : -)

Long title. Here’s what happens if you try to open a usb image and the path to it contains spaces

IndexError: list index out of range

I’m not a big fan of this, but seriously? LOL. Now imagine you want to use it to write to a usb disk, just like that, out of the blue. You may get this output:

Executing: dd if=/media/LACIE/CDImages/moblin-netbook-ux-beta-20090518-004.img of=/dev/sdc
The dd process ended with an error !

And maybe you’re thinking, hm I hope it’s not anything serious. But if you try to run the command on the command line, the “error” is

dd: opening `/dev/sdc’: Permission denied

So guess what, if you start it with sudo before, problem solved. I say LOL.

Even a monkey can do better than this

I’ve been trying a lot of distros on the aa1 recently, I’ve tried all Ubuntus from 8.04 till 9.04, sidux, slitaz, madbox, and now Kuki Linux.

Kuki linux is made specifically for the AA1, so I was expecting something nice. I only tried it live from usb, so this is what I got.

On hardware performance and recognition, everything kinda works. Webcam, audio, baterry recognition, wireless (good performance btw) no problem whatsoever. Wired I didn’ try but it should be working.
In terms of graphics I was initially very disappointed with the streaming flash video performance. Then I read the release announcement more closely and it seems they have a “special” xorg configuration that boosts the performance tremendously. I was skeptical, but stupidily so. The xorg configuration they made is great, I mean it’s as good as it gets. I had just tried Ubuntu 9.04 before and flash video was terrible. With their conf you can get daily show with no problem whatsoever, facebook videos with normal quality rolling beautifully, youtube not even worth mentioning. Fullscreen works great too. Glxgears outputs ~570fps. Gentlemen, they did it, hat’s off!
Card recognition depends on which one you’re looking at. The left one works great. Hot plugging working by default, and it’s really fast, wait where’s the bold, oh, really fast. You plug the card in and dare I say in less than one second Thunar pops up. My balls dropped. The right one isn’t working out of the box, but according to this post on the forums they have a solution, so it’s just a matter of making it to the distro. Strange bug though, after I tried the right card reader and then put the card back in the left reader, it stopped working. Not too worried honestly.

Software wise, you get the general assortment of xfce (4.6) apps. You know, mousepad, the ex xarchiver and shit. Then I think they made weird choices on programs. Ok, I take that back, it just comes with programs I don’t like. Audacious for audio playing, Mplayer for video. Ever heard of vlc? Bah. Also comes with this thing called “Zim Desktop Wiki” I have no idea why. A lame looking ebook reader. No office apps as of yet, not even abi word. But I’ll confess my ignorance, i don’t know what are the plans for the future on this end and I didn’t bother to look up. Either way, if you install this, you’re on your own, but this is ubuntu running underneath so installing anything I’m sure is dead basic.
Oh, almost forgot. Networking done by wicd which is awesome. I fucking hate network manager and this was really good to see. Works wonders.

Now the visuals. I was really happy when I saw that the login screen. I don’t have a screenshot but it looks really nice. The color looks really good on the screen, the fonts are beautifull. Then you login, and the background doesn’t flicker or anything, it goes straight to the desktop in this really awesome integrated experience. Sad part is, you walk beautifull to reach this sad thing

Holy shit. Why so sad?

Holy shit. Why so sad?

No I don’t know if it’s just me, but I hate xfce. Seriously. Thunar (the file manager) aside, it’s horrible. Look at the font on the clock. Doesn’t it break your heart? Virtual desktops are vertical instead of horizontal, no option to change it. Bah. The icons on the desktop have no reason to be uncool, but for some reason they just look terrible. Maybe it’s because of the color background behind the name of the file. Maybe it’s because they look realistic and the rest of the desktop looks like ugly cartoons. Now look at this

Please stop, I can't take it anymore

Please stop, I can't take it anymore

Window border is horrific. Default gray makes me so sad I wanna cry. It’s this kind of prison gray, innit? Oh man it’s just awfull. You know, after coming from Ubuntu 9.04 using the awesome dust theme I look at this and just make a sad face. And really after trying madbox my standards in terms of looks just exploded thru the roof, just look at this

Now this is what Im talking about

Now this is what I'm talking about

So ok, let’s make a conclusion. I couldn’t test suspend and hibernation, but I think that’s working out of the box in Ubuntu 9.04 so I guess it’s working, but anyway. In terms of what really matters, kuki wins big time. Performance is great, hardware recognition getting very close to perfect, boot time is good too. I didn’t try it, but I used the same kernel in ubuntu and it was good then, since kuki uses even less services and shit it can only be faster. Where it loses is in using xfce which i hate, they should have sticked to lxde godamnit!, and on the desktop appearance. But this can be worked out, although I never saw any good looking xfce desktop to be honest. It’s one of those things you can leave for last, but guys, aim for the top, for the ubber distro, and do something about it. After that you can all demand preferential treatment from us, the idiots, because you godamn deserve it. Gentlemen, it took a long time but we’re getting very close. Hat’s off!

Ps: I wonder what happens if I stick that xorg conf on ubuntu 9.04 running lxde or

Tags: , , , , , , , , , , , , , , , , , , , ,

Two options:


Can be edited with gedit for instance, not sure if you need root permissions.

If you’re only interested in changing the hostname that is sent, or rahter seen by, the network, you can change the dhcp settings.

In /etc/dhcp3/dhclient.conf you can see right after the initial comments this:

send host-name "<hostname>";

You edit it to something like

#send host-name "<hostname>";
send host-name "m4m";

You’re good to go.

Tags: , , , , , , , , , , , , , , , , ,