Sunday, November 04, 2007

Mandriva 2008 vs. Ubuntu 7.10 (and a special note about a serious problem with Linux on notebooks)

It is that time of the year - when new versions of your favorite (or less favorite) operating systems are launched - and there were quite a number of interesting new things floating around so I decided to have the latest rematch between my favorite Linux distributions - and if you stumbled upon this post you already know that my 'number 1' was Mandriva - the very first Linux distribution that was able to suspend and successfully resume on my old Dell Latitude X300 - wireless was also working (with ndiswrapper) but the 3D eye-candy was not really ready for prime-time :( However even without 3D the USABILITY of Mandriva was at that point miles ahead of Ubuntu - but that was quite some time ago, and the question was if the same could be said about the latest distributions!

The quick answer is that there were some serious surprises - most of them pleasant but not all :( I have first tested the new Mandriva 2008 - and while overall it was still looking a lot more polished and very well integrated there were two important showstoppers - there were a number of minor problems making Broadcom wireless adapters a serious pain (bcm43xx open-source driver seems to be broken for certain newer b/g and a/b/g cards, and on top of that blacklisting bcm43xx was not simple - I have found quite a number of posts on that matter ...) but the final straw was that the suspend/resume mechanism was no longer working as well as in the previous (2007 Spring) version (which is surprising, since that was based on an older kernel) and the 3D part (CompizFusion) was still not perfectly integrated into KDE (and the decorator was still crashing sometimes) :(

The really nice surprise was coming from Ubuntu 7.10 - in my previous test with 7.04 the level of support for my configuration was totally disappointing and the overall impression was of 'unfinished' and 'more concerned about competing on looks' - especially when considering the huge media frenzy around Ubuntu - but what a difference a few months can make in the Linux world! The new Ubuntu 7.10 is a LOT better - it is more polished, there are a lot less 'loose ends' and the vast majority of the drivers were working amazingly well !!!

Obviously there are still minor problems - first of all an essential part of the bcm43xx driver (the 'firmware cutter') was left out of the installation CD (which is stupid since it only takes 28 kbytes), then obviously the same bcm43xx driver was still buggy in Ubuntu and not working with my Dell internal card - but with Ubuntu blacklisting that driver and installing ndiswrapper was a very simple task - and once bcm43xx was out of the picture the very nice surprise was that suspend/resume was 'just working' and so were most/all of the special ACPI function-keys!!! (including brightness and sound, I guess that the recent deal with Dell helped a lot on that direction). The minor exception was the actual closing of the notebook lid (also reported by some other owners of X300) - the hint on that matter was that the problem was somehow related to the LCD panel itself - and indeed some extra search proved that other people had similar problems - the problem is a new experimental driver for Intel integrated video cards which somehow - even if clearly marked as experimental - is by default installed by Ubuntu! The solution is to replace it with the older i810 driver (and set a fixed primary display for the precise screen resolution of the actual main screen) - and with that suspend/resume now works like a charm even with the notebook lid!!!


The really nice part is that now all the 3D eye-candy works very well - as you can see in the screen captures from the right (you can click on them for bigger versions) the venerable X300 can do on Ubuntu the same nice task-switching as in certain operating systems that are not even able to be installed on this almost modest configuration - namely Vista (top picture) and OSX (second one) - I was a little surprised that I was almost always using the first one with the keyboard (Win+Tab) and the second method almost always with the mouse (a nice 'screenedge' set for two of the corners - one for the current desktop and the most used one for all desktops). There is also a very nice feature (called Expo) to see all the workspaces (the third capture) - and everything is using 'live images' (you can get a hint about that from the last capture where the media player was working hard). The only minor drawback is that the viewports can not have different wallpapers (something that I was able to have in Windows for many years now with an old but trusted virtual desktop program called XDESK - which unfortunately was not able to do live previews since Windows itself did not have the needed features before Vista).

In both Mandriva and Ubuntu the software management features are quite impressive - automatic update managers as good as with Windows (and unlike Windows, it certainly will NOT install anything against your wish) and installation support and package management that neither Windows nor OSX have by default! Ubuntu update manager seems a tad better since it also lists the number of megabytes that will be downloaded and the speed for patching things is quite good (even if the Windows version of Firefox patched itself more than one day before Ubuntu and Mandriva updated their repositories - but that is more like an exception in which open-source projects were competing between themselves, since everybody knows that patching IE can take a lot longer for M$ :) ).

The result is that I now have on my X300 both Mandriva 2008 and Ubuntu Gutsy - but for the moment I use Ubuntu more (and this entire post was done from Ubuntu) since it seems to be faster (including the standby/resume speed) and with the right changes a little 'nicer to the eye' :) So the winner of this latest round is Ubuntu - but the competition is far from over :)

HOWEVER there still IS a potentially HUGE problem for Linux on laptops that neither one of the above distributions seems to fix by default (or even entirely acknowledge it) - the problem is related to head parking/unparking (the more precise term would be 'head loading/unloading') - and the root of the problem is in the actual firmware of the vast majority of the modern notebook hard-disk-drives - by default those disks will have a very aggressive (and rather stupid) policy on unloading the heads - with the result that UNDER LINUX (and a few other variants) a HUGE amount of load cycles are done in a very short amount of time with the result of highly accelerated aging of the hard-drive and very often disk failure in less than one year ! The problem was initially blamed on the laptop-mode packet but that is very often not active and as a result many people tend to dismiss it without actually checking the relevant numbers! The really worst part is that in both Windows and OSX those type of 'wild load/unload cycles' are not present - most likely since those operating systems will replace the power-saving policy from the HDD firmware with their own policy!

The immediate fix for people that are not afraid of a small amount of tweaking would be to add somewhere in the Linux startup scripts a command or set of commands that will activate a less destructive policy - most often 'hdparm -B 224' will be enough (and coupled with longer times for dirty writes and noatime mounting has resulted for me in reducing the load_count from over 5000/day to well under 500/day and still very good HDD power management - probably even less heat than in Windows but at the cost of slightly more load cycles). Depending on the disk model 'hdparm -B 255' or 'hdparm -B 254' might be needed (that will entirely disable that advanced power management - but since in neither of the above Linux distribution there is no explicit separate policy for putting the HDD in standby that might result in a little more heat - but I doubt most people will note it). Unfortunately that is not a 100% fix and you should first check the result of your 'hdparm -B NN' command with 'hdparm -I' - since it seems that there are certain disk models where 'hdparm -B' is not enough (very bad are certain Samsung models where smartctl must be also used). The long-term fix would be that good Linux distributions will test that on more hardware and come with a decent fix by default!

There were also a number of other things that I have disliked in those latest distributions - very unpleasant was the fact that Ubuntu already seems to have a HUGE list of things that will be done for the next version but almost all are useless or low-priority eye-candy - so in the end of this post (and in the spirit of the Ubuntu bug tracking system - where at no 1 is listed the REALLY important stuff - the people that have seen that will understand) I will take the liberty of listing ONLY 3 major goals for each of the two distributions.

Mandriva:

1. FIX THE NOTEBOOK HDD PROBLEM !

2. Stop releasing stuff before it is seriously tested (especially on notebooks, today notebooks are increasingly important and a system that can not suspend and restore is a dead end) - it is the second consecutive year when something embarrassing is happening to your last major release of the year :(

3. Keep the good work with parallel KDE / GNOME support (and generally where usability can be configured by the actual user and is more important than eye-candy).


Ubuntu:

1. FIX THE NOTEBOOK HDD PROBLEM !

2. Stop trying to be just an OSX clone and start getting some usability hints - get icons where 'maximized' is more than 2 pixels different from 'restored', get at least one dark-blue scheme that will not hurt the eye (the old blubuntu is not a bad starting point) and generally get all the GOOD things from Windows (which by the way, since 2000 had clear rules on when focus can be stolen from the user - while in 2007 in Ubuntu still at least once per day I find myself cursing some stupid application that has stolen my focus since the window manager is too dumb to care !!!)

3. Keep the good work with a lot of testing on a lot of different machines (if possible get Dell to do some testing too) - and also don't try to be 'nicer looking but a lot slower' in the tradition started by Vista and now continued by the new OSX Leopard (but more on that maybe in my next post).


Small update on how to 'check the numbers':
a) if you do not have smartctl installed you need to go to a terminal (command prompt) and first enter 'sudo apt-get install smartmontools' ;
b) then you can do 'sudo smartctl -d ata -a /dev/sda grep Load_Cycle'
c) if you don't get any output take a look at just 'sudo smartctl -d ata -a /dev/sda'
d) if your 4 months old notebook HDD already has over 300000 cycles (and no manufacturer guarantees it over 600000) then you probably have a small problem and all the talk around this was not just defamation from M$ :(

Labels: , , , ,

2 Comments:

Anonymous Anonymous said...

ORRRRR.
You can install laptop-mode tools for both of these distros and tweak it a little according to the following link:
http://samwel.tk/laptop_mode/

BTW: Works for me

7:11 PM  
Blogger DevilHan said...

nice article.

8:55 AM  

Post a Comment

<< Home