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: , , , ,

Saturday, May 12, 2007

About Ubuntu spinsters, mac-zealots and what the real Linux people use on their systems ...


For some time now I was hearing a lot of rumors about how amazing Ubuntu is - including some daring posts on how Microsoft should start having nightmares about it ... but surprisingly mostly from pathetic Apple losers that somehow managed to realize that Apple will never be a threat for Microsoft (or for Dell for that matter) - and can only survive by 'hopping' to the next thing that might (iPod) or might not (AppleTV) be 'hot' for the moment.

But since I was anyway going to redo my Linux installations (on both my dual-core Opteron primary desktop and my 1 kilo Dell X300 - twice lighter than the best Apple ever managed to get so far)
about one week ago I decided to also get the latest Ubuntu Live CD (7.04) and try to give it a shot - if it was going to be good I could keep at least one of the 2-3 installations ... if not ... the EXT3 partitions were anyway going to be erased so it was only a loss of some time ...

The Live CD was starting OK on both systems - but it was mostly in the default configuration mode - and I was also expecting a friend with a lot of Linux experience (and another distribution as a backup - see below) and the most important test was going to be how well could things go on the X300 (which was always VERY tricky in Linux) - so that's how I started the tests. While the installation went fine the final result was rather unimpressive - the CPU was not very well throttled,
also the wireless part was not working by default and most important of all - suspend and hibernate were not even close to working (which was always a huge problem in Linux on the X300, but with Ubuntu at least the crash on restore was looking spectacular, almost Apple-style - for 60 seconds we actually believed it was a desired visual effect and that's how it was supposed to work) - so on the subnotebook Ubuntu was voted out without even a single remorse ...

On the desktop the hardware was a lot more 'standard' - so most of the normal things were working by default - but again the new 3D part was not working, the CPU was always kept in the 'performance' (hot) mode
and again suspend/hibernate was not looking good - so again Ubuntu was a small disappointment ... and worse of all, it managed to seriously f*ck things on the (rather complex) Vista + OSX boot process from a PATA drive that I keep as a second drive after the SATA which is the 'default boot drive'. After 10 minutes of fixing the boot problems I finally managed to get things back to about the same point where I started - Ubuntu was not a keeper, but the best part of the story is yet to come!!!

The bottom line on Ubuntu - more hype than substance for the high-end user. It might not be a bad choice for somebody that knows nothing about computers and will get it fully pre-installed - since it is rather friendly and safe (actually even safer in the Live CD version) but once you have existing hardware where it must run, things can easily go wrong. I also first liked the 'African theme' but that is not so easy on the eyes after the initial contact and has to be changed, it was also nice that it automounted the OSX partition, but the main good thing that I got from Ubuntu was the curiosity to give GNOME another chance ... I might also take another look at Ubuntu on my iBook G4 but I don't expect too much on that
pathetic hardware either ... (update - it starts OK but enabling the 3D effects leaves 'noise' on screen and is not 100% usable; also power-management does not seem to work very well).

And now to the actual pleasant surprise - my friend is a long-time fan of Mandriva Linux - back from the days when it was called Mandrake - so we started with two DVD versions of the Mandriva 2007 Spring PowerPack - one for 32 bits and one for 64 bits. The HUGE surprise was that after the problems with Ubuntu on the Dell X300 ACPI / power management part, Mandriva installed and started just perfectly !!! I could not believe my eyes - after almost 4 years I was now able to suspend / hibernate in Linux on the X300 - and successfully resume :) The CPU was also using by default a dynamic policy - generating far less heat - so Mandriva was the clear winner on the X300. Even the new '3D desktop' part was starting OK - so during the next days I took Mandriva for a real-life test in the 3 installations that we did - 64 bit on the desktop, 32 bit on the desktop and 32 bit on the laptop, with almost half of the tests on the notebook!

I will not get into full details - but generally things were working quite well - actually most normal things were working OK since more than two Mandriva version ago, but now having low power mode and suspend / hibernate / resume I could really use the X300 as a notebook in Linux 'full time'!

The first part where things got tricky was the wireless connection - simple unprotected WiFi was working OK for years in Linux, in recent years even the number of native drivers was decent, but anything involving some security was very tricky. More than one year ago I gave up on having wireless on Mandriva since it was only working as far as WEP, and that only with ndiswrapper and with some strange bug where it was leaking memory to the point where it was only usable for 15 minutes :( With the latest Mandriva
2007 Spring the wireless was detected OK with the native drivers, but for some reason WPA was never actually working (which still is a big problem in some configurations, see below). After a few hours I was very close to give up again, but then I decided to try with the latest Dell 2000/XP drivers and ndiswrapper ... and huge surprise - things work just fine even with WPA !!! I still suspect that by using this convoluted approach the power-saving mode is not optimal for the wireless part, but it works and actually even in Windows the Dell driver was not optimal by default, so ... WPA still remains a problems with the native driver, and it is also a problem with the VERY old orinoco-based 802.11b-only (no g) card from the even older Dell X200 - and unfortunately on that one the Windows drivers are not recognized by ndiswrapper :(

The other tricky thing is the new '3D desktop' part - the really impressive
option (actually better eye-candy than OSX - or Vista for that matter) is Beryl - however that one is not (yet) integrated very well with KDE (which previously was always my choice on Mandriva) - it is still highly usable with two-three problems - one is that the 'virtual desktops' are not perfectly integrated, the second is that KDE is not 100% ready to see the <Win> key as a <Super> modifier (and instead will see it somehow as the <F13> standard key) and the third is that in some conditions (and pretty much always on LogOff) the '3D interceptions' can go wrong ...

I was anyway happy using KDE without the '3D desktop' when I also decided to take a look at how things are in GNOME with 3D - and again a very nice surprise - in GNOME things are A LOT better by default!!! The virtual desktops are slightly better (and the taskbar knows when not to show applications that are from a different '3D virtual desktop'), the
<Super> key is a modifier and can be configured as it should be, and the '3D interceptions' go wrong a lot less (but are not 100% OK yet); <Alt>+Tab will go to the new 'preview task switcher', <Win>+Tab will activate the '3D ring task switcher' and on my system <Win>+Escape will activate the 'all desktops window picker' - which is virtual desktops + OSX Expose in one - too bad that one is not very keyboard-friendly (yet). You can also assign commands to different corners and in my case I have also defined the "`" key as the 'reverse Tab' for both Alt and Win - the X86 name of that key is 'grave' (from grave accent) - and all are being set from "Beryl settings manager" (under Applications / System / Configuration / Other). That being said KDE is still the more mature option that I use on the desktop, but GNOME remained for the moment the default on the notebook...

So in the end I now have 3 new Mandriva installations that work surprisingly well, that will get their updates in a very friendly way and that indeed
some day might be a nightmare for BillG but LONG before that it will be a HUGE problem for SteveJ - however right now it is a very powerful tool in the hand of the more technical people that would like to keep their freedoms away from the convicted monopolist (MS) and also from the company not (yet) convicted but a LOT worse in regards to freedom - Apple of course.

PS - the post was 100% written on the Dell X300 under the above Linux in Firefox over wireless with WPA and a few 'suspend to RAM' and one 'hibernate' before finishing it :)

Updates:

a) it might not be very clear for a newcomer - Mandriva has both KDE and GNOME (and they have obviously worked a lot to have certain things working in a common way), while Ubuntu is only GNOME and for KDE you need Kubuntu (which I have now tested - looks slightly more usable than the plain Ubuntu but still less interesting than Mandriva);

b) with KDE + 3D Aquamarine (the window decorator) will crash a lot and there will also be problems from time to time when trying to log-off;

c) however in Mandriva KDE is a LOT better on sessions, log-off and many other 'shortcuts', and also has very good keyboard usability (especially once you get Win to be Super_L - see some of the comments); GNOME is sometimes very poor on keyboard shortcuts and in Mandriva there is far less session control :(

d) still things can go HORRIBLY WRONG with Beryl + certain focus combinations (for instance a protected screen saver can start but the focus can never get there - which means you can no longer get back to your programs);

e) enough about 3D eye candy - the real huge step forward with this version was power-management - things work very reliable on that - but suspend / hibernate / resume is still slower than in XP; the same can be said about boot time - even if Mandriva is already using a 'parallel boot' optimization that according to them can get 20% improvements in some conditions!

f) and a final link (very little, but related to the new 3D desktops) about another Linux (SUSE) used by somebody that is a top-level FOSS contributor - Fear and Loathing in Cupertino :) And here another one about something that is not even Linux ...

Labels: , , , ,