Well, Slackware 11.0 is officially out after an exhaustive batch of release candidates and (due to some hideously attentive monitoring of the ChangeLog in recent weeks) I've already upgraded to this system. In fact, I've been downloading each new package for the last few weeks as and when they changed the Changelog, and about once every few days, I'd create a DVD and install it onto a copy of my primary partition to find problems before I took the plunge and actually started using it as my primary desktop (replacing an up-to-date, clean Slackware 10.2).
The upgrade, as ever, goes like a dream so long as you follow instructions *very* carefully - don't omit any steps. We won't mention my moment of idiotic forgetfulness where I forgot to upgrade the rc.udev file once I'd installed it or even failing to copy the initial /dev from my existing partition to the "mirror" partition that I was upgrading, both of which caused Slackware to fail to boot... One of those is mentioned in the upgrade.txt (transfer ALL the .new files across! In a moment of blindness, I omitted rc.udev.new), however the other was just common sense if you intend to work from an accurate copy of your existing system! Those installing onto a clean partition should have no problem at all.
After many, many tests (I was, after all, performing a major operating system upgrade on a system that was still being used for "real" work), I copied my Slackware 10.2 main partition to a blank space, freed up 1.5 Gb on it (as leeway for new packages, upgrades, temporary files etc.) and installed the upgrades over the top of this copy. Once I'd followed the upgrade.txt (which, at the time, was the 10.1->10.2 upgrade.txt but still the principle is the same), all I had to do was recompile my kernel (Slackware 11.0 now ships with GCC 3.4 which means you also have to recompile any custom kernel or kernel modules that you may have had from Slackware 10.2, which only used GCC 3.3), reinstall lilo and it all just worked.
However, be very careful if you have extra modules in your kernel (e.g. nVidia/ATI drivers, out-of-tree wireless drivers etc.) as they *will* need recompiling. When you are using the same compiler and kernel on two different machines, the modules are usually transferable between the two machines, but Slackware has changed the default compiler so this time-saving trick no longer works. Failing to recompile them *will* crash your machine, maybe not immediately - for instance, in my initial testing on a blank partition, failing to recompile the nVidia modules and instead "copying" them from a previous installation crashed the machine hard as soon as OpenGL was used, but had functioned perfectly until then (even accelerating X and video flawlessly).
The crash was so hard that the (journalled) filesystem stopped halfway through a write and corrupted the partition - proof, if ever it were needed, that the use of proprietry modules removes any guarantees of stability and also that journalled filesystems and RAID are no substitute for adequate backups. That's also why you should always backup and/or test on a copy of your primary partition before you do stuff like this - I did it out of academic interest and was surprised that X or the kernel didn't throw up more warnings.
Applications, however, should not require any re-compilation at all, unless they are very tightly integrated into the kernel or statically build from the supplied libraries (something that they shouldn't do for most purposes). I haven't found anything that I've needed to recompile except for kernel modules but I'm sure I will find something that will have stopped working - a lot of stuff uses the kernel as the definitive source of information on things like kernel structures etc.
KDE was neatly upgraded to 3.5.4 in the process, all my old settings just ported over without any hassle (although a few KDE-specific tweaks, such as what the taskbar looks like and how multiple-desktop thumbnails work had reverted to a new default - easily changed and they were the exception rather than the rule). And it still runs like a dream.
Given a 1Ghz, 512Mb RAM machine, there is no significant detrimental performance difference between Slackware 10.2 and 11.0. In fact, because of both the KDE and X.org upgrades, programs under X run noticeably smoother - this is an old machine and small optimisations make a big difference when you don't use eye-candy like transluceny and anti-aliasing. Even code like a static-QT installation of Opera 9.0 is seeing responsiveness improvements compared to before. Given that Slackware is not designed as a desktop OS, it functions admirably under such circumstances and the system requirements are minimal.
Because it's Slackware, most desktop software will require, at some point, extra libraries or installations (for instance, mplayer codecs and OpenOffice.org are not included) but everything will usually compile cleanly from source without any patches or there is always Linux Packages.net for packages of any extra software you may need. Slackware's main install is only around the 3-4Gb mark when installed (depending on filesystem and block size) so on a modern hard disk, there's plenty of room for extra software. My main partition (not including personal files in /home directories) rides comfortably around the 10Gb mark and there's always plenty of space for a full install of Slackware plus Wine, Crossover Office, Microsoft Office, OpenOffice and many, many other large pieces of software.
One word of advice - take upgrade.txt's suggestion to just "install the rest of the packages" lightly - in fact the best method, especially if you are short of disk space, is to go through each package directory one-by-one... e.g. upgradepkg --install-new /root/slackware/a/*.tgz etc. Not only does this make it easier to omit the KDE/Koffice internationalisation packages for languages you don't speak (e.g. upgradepkg --install-new /root/slackware/kdei/*en_GB*.tgz), or to omit those packages that you don't need installed anyway (TeX or emacs for example), it saves a lot of time and diskspace and prevents you upgrading to a 2.4 kernel (hiding in slackware/k) and then having to reinstall the 2.6 kernel packages from /extra.
In terms of the final product, hotplug/udev is greatly improved and detects most peripherals and uses them automatically - nothing new or exciting unless you've not run any other recent Linux distro, but being able to plug in a USB drive, joystick or mouse and have it instantly recognised and have X/KDE start using it is a welcome return to the ease of a typical Windows installation. This does require a relatively modern 2.6 kernel though, but the scripts are still designed to take account of older kernels (2.4 or 2.6) that are not able to do this. And yes, 2.4 kernels are still the default for the time being.
One other change to the install process is that the sata.i bootdisk is now set as the default for any bootable CD or DVD (even the text on "how to boot in an emergency" on the boot screen reflects this), allowing direct installion on a old-style-PATA or shiny-new-SATA harddrive without having to select a different bootdisk - apparently a code conflict between the modules for the different hardware has now been resolved, making this possible. It's a welcome simplification to the install process.
All in all, the installation was fairly flawless but be careful about your kernel - unless you stick with the default 2.4 or 2.6 kernels (which will be out-of-date within a week or so, if not already) you are going to have to recompile the kernel and any modules and then reinstall LILO or GRUB. The only other thing to remember (and it's in upgrade.txt) is to ensure that all the .new files that appear on your computer have your settings transferred into them and then rename *them* to replace your original configuration - this way you won't miss any new config options that might have appeared.
I suppose the biggest disappointment would be for Gnome users - there isn't a sign of Gnome left in Slackware (the distribution cited ease of compilation/packaging as the reason for its removal in the last release) although you can still get Slackware packages for it from various third-party sites. To me, this went unnoticed as when I first started off installing Linux with X desktops, I tried both of the major window managers at the time and KDE came off best every time. Gnome felt clunky, old, out-of-place, like the Borland Windows dialogs used to back in the early days of Windows... nothing WRONG with them, they just didn't fit.
They are both now skinnable and in fact either can look like the other, so it's not a win-win situation - however, because of that there's also little reason to claim Gnome's loss is devastating... KDE can be made to work just the same and in fact the two projects are collaborating on just about everything these days. The GTK libraries etc. are still installed by default and, in fact, some ancient Gnome-based software that was left on my setup from its previous Slackware upgrades still functions perfectly.
People say that KDE is full of bloat but, I'm sorry, 3Gb for an entire OS including X and an office suite? That's well within the realms of convenience on a modern computer and most packages can be omitted if you really want (you can get a X installation down to less than a Gb if you really try and omit all the rubbish - I'd hate to imagine what the absolute minimum would be - I should think it would be amazingly small). And a 512Mb system showing only 100-200Mb in use when I have several applications open (and a few dozen background processes including Apache) under X/KDE is perfectly acceptable. And with KDE4 currently in development, the introduction of QT4 is supposed to make everything so much faster and leaner. But let's not get ahead of ourselves.
Altogether, Slackware 11.0 is another flawless upgrade of a "clean source" distribution - there are very few patches to the software included on the disks and the kernel is always "pure"... making upgrades, recompiles and troubleshooting simplicity itself. I should also imagine that it makes the lives of the software developers much easier as the bug reports are directly relevant to the software, rather than patches that the distro has tried to add itself.
Tuesday, October 03, 2006
Slackware 11.0 - first experiences and upgrade process
Thursday, September 07, 2006
Computers, gadgets, modern life and control.
It occurs that I've discovered a major theme in my life - control. Everything that I own has to be under my control. This obviously starts with my PC. Starting out on DOS, I was used to controlling most aspects of the computer's operation; I could control what programs it ran, whether they stayed resident or just ran once, when they ran, etc. Windows 3.1 also allowed such control but moving towards the more modern Windows OS, I gradually realised that I was losing this control. I didn't know what programs were running, when or why. I couldn't change settings, I couldn't rename stupidly-named menus or folders, I didn't get choices over where software installed itself and a lot of the time I couldn't change it later.
So I switched, to Linux of course, and now I have my control back. I get to decide what runs and when. Programs don't mysteriously insert themselves into the depths of my computer without me a) knowing, b) being able to revert the changes or c) having some way to prevent it. Software doesn't taunt me with promises of being able to do something only to stop me doing that exact thing until I pay more money, take out a subscription, click on an advert etc. If it does, there's always an alternative somewhere that I will be able to freely use. This is what used to make Windows more tolerable - If I couldn't control some aspect, such as which programs are allowed to connect to the Internet, I could always find some shareware or freeware that would allow me to control that aspect.
Unfortunately, this modern epidemic of removing control of modern electronics from the user's hands (the person who PAYS for these same products or services and enables them to be produced) and into the hands of the company (that receives the money, could not be in business without the user and whom, without checks, would dictate when, where and how much upgrades and further products will cost) has reached even the humble television.
Televisions and VCR's were always quite complex for the inexperienced user and rather difficult to exercise control over. I've seen at least one TV that, by a single keypress, will wipe out all its stored channel information, seek out every frequency and insert only discovered stations back into a list but in the order it finds them rather than any realistic ordering (such as by channel number etc.) and in so doing wipe out any channels for VCR's, games consoles or camcorders that might have been painstakingly set up.
The programming of the average VCR was legendary but towards the end of its life it became greatly simplified - no longer were they used as tuners but just as plain recorders, thus eliminating one level of commplexity in setting up recordings. VideoPlus codes enabled simple future-recording of programs on any channel for the exact time required to capture a particular program, even in some cases accounting for last-minute re-scheduling. Now most of that same functionality has moved into the era of the DVD-Recorder and HD-recorder although if anything the complexity is even more reduced - integration with automatic digital TV programme guides enables one-touch recording of future programs just from advertisements or trailers on any of a thousand channels. Programme guides also make browsing and recording any program on any channel on any day a breeze.
However, DVD has brought with it restrictions - restrictions which remove our control. You can't play an American DVD on a British DVD player - why? Not because of a technical difference, not because of an incompatibility but because the DVD inventors and distributors don't want to let you. Why? So they can sting more money out of you if you happen to live in such a closed market. The solution? Most DVD players sold are now either multi-region by default or multi-region capable. However, problems still remain with this format - UOP (User Operation Flags - those restrictions that prevent you skipping trailers, adverts, copyright warnings etc.). Again, these are an in-built mechanism designed to do nothing else but ensure that you see those messages.
When you are browsing your DVD's or waiting for the film to start UOP's are usually mainly used on trailers and commercial content that the user just DOES NOT WANT TO SEE, ever, and after they have seen it once, why would they want to watch any of it again? Sure, give them the option to see it again but let them skip it if they want as well. What's so wrong with a menu option on the DVD that lets me see trailers and other notices IF I decide to? I am perfectly aware of copyright law and if I wish to skip that inevitable 20-seconds of static screen I should be able to. Few DVD players have anything that lets you bypass the DVD's UOPS - however most PC DVD players can be patched or have utilities installed that will make them bypassable.
In fact, the libraries and media players that I have installed on my Linux computer just to be able to watch DVD's in the first place automatically do this for me - I just press skip and it skips forward, no matter what the DVD says I can or can't do. My control is restored, just not in my own front room where instead I make a point of noting which DVD's have excessive UOP control and either copy them, removing it in the process, or label them so I know to put them on five minutes before my tea is done so I can be out of the room while they go through their rigamarole. If neither is possible or practical, I merely make a mental note to never buy any of the things advertised and to try not to buy from the same distributor again, or at least not until they sort their act out. I honestly have a product/manufacturer blacklist in my head whenever I purchase a product.
My PC speaker's don't insist on locking themselves to full volume when a banner advert plays sound because it's intrusive, obnoxious and counter-productive (I will not buy those speakers or will stop visiting those websites) so I don't see why I should be forced to sit through ten minutes of adverts just to get to the film that I'VE PAID TO SEE. The same principle applies to cinema - how many people don't go in until the main feature has started, i.e. ten minutes after they say it starts on the ticket?
My car takes a lot of my control out of my hands but for very important reasons (my life, my safety) I still have control over some important points. I don't expect to be able to modify the algorithm that controls the activation of an airbag by any setting or by modifying any software or hardware - I wouldn't want to and there is no reason to. However, I would expect to be able to disable it, for instance, in the case of an emergency or if someone was working on the steering rack. This particular device is something installed to save my life - I don't expect it to be at all tinkerable or for it to be disabled without major interference with the car and major warnings (i.e. my airbag light staying lit on the dashboard).
Additionally, I want to be able to sue the airbag manufacturer if it failed to be deploy in an emergency situation (or my relatives but ideally **I** would be the person suing the company!). Therefore, I don't need to, or want to tinker with the details of its operation but I still have overall say over whether it's turned on or off. Relatively speaking, then, I have more control over my airbag than I do my DVD player, which has no reason at all for failing to let me turn off an unnecessary feature that allows me to enhance the use of hardware that I have purchased.
Would people tolerate a TV that would lock you into a single channel when you had selected to watch a movie and not allow you to change channel or switch off until you had sat through ten minutes of trailers? (The strange thing is that such TV's probably exist or are at least feasible for being manufactured today!) Would people tolerate vacuum cleaners that refused to suck until they had noticed your carpet was dirty, or because you used a competitors dust-bag? (Again, another likely occurence if the current state of inkjet printing is anything to go by) Would people tolerate telephones that auto-answered calls from marketers who had paid a fee to the telephone company and put them straight onto speakerphone?
One of the most popular features on telephones in the UK is a "Do Not Call" list for marketers, with severe penalties for companies that do not take account of it. My telephone has Caller ID functionality - I even get to control WHO I answer the phone to. My front door has a CCTV system - I get to control WHO I answer the door to (and leave marketers standing there in the cold and the wet). My oven and microwave do what I tell them to (within certain set parameters to ensure safety) and don't try to override me.
Most control-restrictions boil down to copyright control and advertising. Now copyright control is something that no form of protection has ever or will ever stop. Cinemas and DVD manufacturers are usually the source of any leak of pre-release films, professional copyright infringers have the knowledge, equipment and ability to bypass anything that the manufacturer may put in their way and those infringing copyright will not be stopped by such petty restrictions. Laws like the DMCA and its international equivalents fail to take account of one point - if someone is willing to break the law by pirating a movie, they will not think twice about breaking a law that prevents them from buying a device or using the "analogue hole" (the fact that if I can view it in any way, there will be ways to record that viewing, even if they are as primitive as using a camcorder to record the image on-screen) to copy the movie in the first place.
Additionally, it's impossible for a device alone to determine whether a copy process is infringing copyright - I am allowed to copy my DVD's for backup purposes in many countries. I may make one copy but then if the original disc breaks or is lost, the backup copy that saved me will also need to be copied, or I will have to obtain a second copy from somewhere. No chip in the world can currently decide accurately (or even just "well enough") whether or not I'm infringing copyright in doing either of those. In fact, in many cases, such backups are necessary. If you have ever let children loose with DVD's you will know that the discs scratch easily and many companies even refuse to provide copies of the DVD if this accidental damage happens to one you own (in the days of the ZX Spectrum, almost every company that distributed tapes would replace them free-of-charge if they stopped working).
The device has no way of knowing whether or not I am copying a DVD that I personally own or one I've rented or one I've filmed myself - in many cases this is the way that most modern copyright control systems end up being bypassed - any copyright flags or restrictions are removed to make the device "believe" it's genuine. Proof of purchase should be all I need to ensure that I can copy the disc and/or view copies of the disc. Even in court I'm innocent until proven guilty so it would be up to the device to prove, legally, that what I was doing was illegal. It couldn't. Ever.
That leaves advertising. Advertisting is not the only way to make money, or make your product known. Obtrusive advertising is a guaranteed way to lose money and make your products and even your own company infamous. If I wish to buy a product then I will research it. Not only will I not take any notice of brand-names or memories of previous advertisements of a company's products but I will absolutely blacklist a particular product, manufacturer or even entire line of products (such as DVD's or Blu-Ray or similar) based purely on how much control they expect to have over me. When I'm buying a product, the information available to me is what I base my decision on and not what advertisements I've seen in the past. When I go to the cinema, I base my decision on what is showing, not on every trailer I've seen since I last went to the movies and the ones before that. Only at the point of purchase do I NEED to know about any product.
As the years go by and copyright-protection gets ever more restrictive and more and more control is taken out of my hands, my mental blacklist grows. HDTV with it's amazing copy-protection? Blacklisted. (and my TV is five feet from my sofa and I don't see either how it will improve my perception of the TV image at that distance or why it's worth paying out for a mere resolution enhancement) Operating systems that want to dictate what audio/video streams I can play, where I can output them to or how many copies I can have installed? Blacklisted. (although I would like to point out that every OS I've ever installed has been properly licensed.) Cars that would only accept parts produced by their original manufacturer? Blacklisted.
And when enough of these blacklisted items are from a particular manufacturer? That manufacturer is blacklisted in its entirety.
The future, with its gadgets and gizmo's which are "vital" for modern life, holds immense interest for myself. As gadgets get more complicated, there has to be a certain amount of internal abstraction. We don't need to know how or why they work, just so long as we control what they do. My PC is the most complex appliance in my house and yet I exercise full control over what it does. My VCR has immensely complex integrated circuitry, although nowhere near that of my PC, that I don't need to understand to be able to use it and still it doesn't remove my control of its operations. Manufacturers would have you believe that "you can't" change what things do, because they are such complex machines. However, we have to keep in mind what motives they have for removing any controls we have - for instance, DVD region control and UOP's. There is no technical, functional or legal reasons (except for enforced compliance with what the manufacturers believe we should be paying for their DVD's in our particular country, whether or not we are legally able to import cheaper versions of the same DVD) why these two features should even exist and they can only interfere with our use of a product that we pay for in the first place and continue to fund by buying DVD's.
Are DVD's a product or a service? Is legally-bought downloaded music a product or a service? Is the computer hardware or software I buy a product or a service? If I stop paying for subscriptions and upgrades, or stop watching the advertisements, should things that I've "bought" be taken away from me? Everyone who sells these things wants them to be a service - they can charge more in the long run and revoke your use if ever you change your mind about paying for them. Everyone who buys these things wants them to be a product - they can control them and do what they want with them inside the confines of their law-abiding homes. Somewhere along the way, someone's going to have to come up with a reasonable compromise.
Tuesday, August 15, 2006
Slackware 11.0 RC-1
The next version of my favourite Linux distribution is on the verge of being released. Yes, Slackware has it's first 11.0 release candidate.
Normally, I don't chase the very latest versions of software until someone's tested them for me beforehand - for instance, my latest foray into the world of Opera version 9.0 was a bit dismal... most of the computers I installed it on had no problems at all but at least two showed severe random crashes that I could not track down for weeks. The funny thing was that both problematic installs were on different hardware and yet on two very-similar machines one version of Opera 9.0 worked flawlessly but another didn't.
Anyway, unusually for me, I've been closely tracking Slackware 11.0 since the last stable release, 10.2, which is currently powering my main desktop and a number of my servers and hobby machines (I always track updates to stable versions so my software is never vulnerable but I rarely use "beta" software of any kind). I've actually got an up-to-date mirror of the bleeding-edge -current version of Slackware (that will become 11.0) which I update every time the Changelog changes. I'm hoping in this way to not have to suffer traffic-lock when 11.0 is finally released - hopefully at worst a tiny update of a handful of packages will be all that's needed to create my own DVD-R instead of having to fight thousands of people trying to download all 4Gb of software swamping every mirror with traffic.
I have even gone to the effort of a test install of the RC-1 version on a seperate partition. Linux, and Slackware in particular, demonstrated its flexibility and user-focus once again - by booting from a Slackware DVD, I was able to install the full install to a blank partition without doing any more than a very basic check of the partition name (which I am always very careful to double-check by mounting the partition in question - never take partitioning or formatting of anything on a PC full of data lightly). Once it was installed to my spare partition, I was able to copy the kernel and modules directory from my "stable" partition to the new "current" partition and, with a little LILO magic, boot into the new version of Slackware without touching my previous installation in any way, but with the very latest 2.6 stable kernel and all the software of 11.0.
I have to say that it's not spectacular but it's not spectacular because it WORKS. It just does what you tell it. You boot it on your PC, it detects all your gear, you set a few options and you have a full desktop. You port your old settings and files over and everything just works again.
The simple fact was that, in under three minutes of the installation completing, I was in a fully kitted out Linux desktop with drivers for all my hardware without having to compile a single package - installation consisted of nothing more than an automated decompression of the packages to the partition in question and minor copies or edits of my previous configuration files (such as re-doing alsamixer settings, configuring X etc.). My old software worked (at worst requiring a recompile against latest headers), my settings transferred and my computer didn't crash or have to reboot seven zillion times.
New in Slackware 11.0 RC-1:
* Updated kernels (although the default still looks set to be a 2.4 kernel)
Obviously, although I would say that the kernel is the one thing not worth waiting for a Slackware package to come out for - just install the latest stable of 2.4 or 2.6 depending on your tastes... Slackware supports either seamlessly without needing any special setup (although you may find it convenient to stick with one of the two for compiling anything that reads from kernel headers). Don't forget that Slackware always comes with a .config for it's kernel that's fully modularised and ideal for "make oldconfig" when a new kernel comes out that you need to compile.
* Lots of init script fixes and features
* Updated hotplug / udev support
* X.org 6.9.0
* KDE 3.5.4
No more Gnome in Slackware unless you get it from somewhere else. Not a bad thing for me, given that Gnome always reminds me of the old Borland dialogs in Windows - it always looked clunky and out of place. You can still get Gnome for Slackware from many places but it was removed in the previous version because of an apparently horrid compilation rigmarole.
* Updated versions of just about everything else (Samba, Apache, MySQL, Java etc.)
The changes aren't massive - it's not even as if the previous version has software which is currently vulnerable (despite what some checkers may tell you if they only go by software version number rather than whether they've actually been patched!). The software isn't the very latest (but it is almost guaranteed to be the best tradeoff between features, security and code stability) but it's clean, it's quick, it's simple, it works and it's been designed to run on as many computers as possible by default.
Although not designed as a desktop distribution, it's easily subverted to that purpose by installing the right "extra" software but the fact is that you know what you are getting - a stable, safe system that works and is flexible.
I get to choose and keep my own firewall package - one I've grown to love and have integrated lots of my other scripts into, I get to keep my choice of kernels and even whether to go 2.4 or 2.6. Every piece of software has been updated but all my old settings port over easily (at worst requiring a diff of some sort). Every piece of hardware has modules ready-prepared for it so there's no need to keep recompiling to get support. The kernel is bog-standard kernel.org fare, so there's no vendor patches or compatibility problems to worry about. Everything is controlled by human-readable scripts, which upgrade cleanly over previous versions.
I'm planning on building some kind of workhorse headless server and it looks like Slackware 11.0 is going to be my choice, given it's proximity to release and its easy flexibility to be installed without X or other useless software. This server will be performing lots of tasks which I'm hoping to come to rely on - CCTV monitoring and other household security tasks, intranet web serving, firewall, NAT, printer server, transparent HTTP proxy, automated network antivirus scanner, email scanner proxy, Caller ID announcer, wireless gateway, network boot server and all manner of other custom projects. It will use relatively modern hardware, will require stability (as it will be expected to be running all day long), will not need any sort of graphics capability and have to be secure against attack. I don't want to have to compile anything from scratch or find out that I've forgotten package X, so a full install and then prune will be in order.
Slackware's reputation means that I'm quite happy to have waited nearly a year for this release - I haven't had a vulnerable system in that time due to strictly-monitored security fixes for the -stable version, I haven't had to fight with half-new features in things like udev and hotplug which would have caused me a lot of trouble and I'm going to a system that's just as stable albeit further updated.
Tuesday, May 09, 2006
A fascination with recompiling kernels
Okay, another trend for you:
Why do people who use Linux INSIST on recompiling their kernels over and over again? I'm a regular on several Linux forums and I see a lot of questions being asked that are along the lines of "I've recompiled my kernel and now something doesn't work". They are usually not talking about upgrading to a new kernel but actually just recompiling their already-working kernel but with different options (usually to change everything that is modularised to be incorporated into a single, fat kernel).
Now there are several very good reasons for customising a kernel in such a way. Firstly, if you are using PXE boots, USB keys, bootable CD's, (going back a bit now) single-floppy distributions or something else that has filesystem limitations (whether they are direct technicial limitations or, with PXE for instance, something like bandwidth) then having a single-file, small customised kernel is ideal. However, most people who are asking these types of questions are home desktop or laptop users.
When you have Gigabytes of space in which to store hundreds of unnecessary modules, recompiling the kernel ultimately costs you lots of time. Time in preparation, configuration, compilation, testing and, ultimately, problems brought about by missing a vital checkbox when configuring the new kernel.
One oft-touted advantage is speed. Now recompiling a kernel to target a different architecture may or may not give you a speed advantage (there are benchmarks which suggest that there isn't much difference at all between any of the x86 architectures). For general use, you wouldn't even notice the difference. The current theory is that compiling a kernel with only the modules you require built-in somehow makes it faster.
I can't see this myself. A module is ONLY ever loaded when you (or your hotplug programs) tell it to load. Otherwise, it's not even in RAM, let alone taking any of your CPU time. The time it takes to load a module is miniscule and rare... maybe ten, twenty times, each time your computer is booted, if that? A few milliseconds each time once properly cached? And that's usually done on bootup where things can hang around forever detecting hardware. After that, it's only ever done when you actually insert or remove some piece of hardware (and even then it may decide to stick around or be already loaded for something else). Compared to most other optimisations that are possible, that's an abysmally small one. Putting this stuff into a megalithic kernel every time doesn't save you anything in terms of processor time.
However, having a module PERMANENTLY in RAM even when you are not using it does not seem an efficient use of such a vital resource. By loading modules only on demand, surely you are saving enough RAM to cache anything you may want to load off of your disk (e.g. modules) and thereby increasing the system speed overall.
Additionally, having to hand-configure a kernel is an enormously time-consuming task, especially for the unskilled who may omit several vital options. And when you next purchase hardware, you're going to have to do it all over again. When you insert a USB device, the right options better be ticked or you won't see ANYTHING. You borrow your friend's USB hub, which uses slightly different modules, and you'll have to recompile the ENTIRE kernel all over again. You insert a USB device that uses a slightly different module to anything you've got in your kernel and, guess what, you have to recompile.
Why not just use a modularised, standard kernel that has modules for anything you could EVER use (but which are only lounging in a few tens of megabytes of disk), save yourself several hours of configuration, compilation, testing and frustration, sacrificing any miniscule optimisations that are negligible and unnoticeable for the sake of giving you more time actually USING the machine?
There are a lot of people on these forums that are complaining that something didn't work and their eventual solution is to recompile the kernel to incorporate some module that they didn't have to foresight to include. Add up the time taken to discover the problem, the time to diagnose it (which must be non-trivial if they have to post on a forum for help with it), the time to recompile the kernel and reinstall it in the right locations, to reboot and then test.
Is anyone seriously telling me that that is going to be LESS time than the actual productive time you lose you would lose by having to load a single module automatically from disk from their previous standard kernel configuration? I use hardware which, on the whole, is considered obsolete (it's cheaper and it does everything I need it to) and yet I still don't notice any significant improvement by not using modules.
Kernels take on the order of minutes to compile on modern machines but the human element is a lot of wasted time in doing so correctly, installing, rebooting etc.
Also, when troubleshooting omitting problematic modules can be necessary. When modularised this is simply a question of blacklisting them in the right software, editing a simple script to prevent insmod or modprobe from loading them or even just changing the permissions on the module file itself. Doing so on an all-in-one kernel involves, yes, yet another compile, install, reboot, etc...
I use Slackware which comes with the kernel config file used to compile the main Slackware kernel. It incorporates a lot of junk, most of it as modules, but it works on virtually ANY x86 machine (even 64-bit etc.) with little to no performance loss. I gladly sacrifice 50Mb of hard space to be able to buy/borrow ANY Linux-compatible hardware, stick it in the machine (which doesn't always involve shutting it down if you include USB, Firewire, PCMCIA etc.) and it will work without me having to TOUCH the software side of things.
People lend me their USB keys, their portable CDRW's, their scanners, their printers etc. so that I can diagnose them. So long as my software is up-to-date (which takes two commands at most), I know that anything Linux-compatible will run without me having to play with my machine or reboot it. The time I save in not recompiling the kernel each time more than makes up for any imaginary performance saving.
And when a new kernel comes out, the same config STILL works (make oldconfig). I get asked if I want to include X or Y in the new kernel and I always select the best option - the one that lets me use it if ever I need to (though I don't personally think I will have a Gigabit card, etc. in my personal machine any time soon) but doesn't allow it to get in my way - build as module.
Now let's pretend that my motherboard blows up tomorrow. So what? I move the hard drive to a spare machine, it boots up just the same but takes account of the new hardware without panicking, hanging, not having the modules required, or requiring me to play about with kernels and LILO/GRUB just to get the damn thing to boot up.
It's like defragging - there is a purpose to it but for most tasks the trade-off just doesn't add up. Spend three hours defragging to save milliseconds of disk acces time over the course of a month or so until the filesystem fragments again? There are scenarios where it may well be worth it, or have been worth it in the past, but most of the time you're just sitting a screen staring when you could be getting something done.
Friday, March 17, 2006
Kororaa Xgl Live CD
I've been reading about it everywhere and overall dismissing it so I thought I may as well have a look anyway. Yes, Novell have released this "next generation" X Server which combines OpenGL and hardware acceleration into a bog-standard X desktop.
Newsforge have an article about it and they're not the only ones.
Firstly, the use of a LiveCD for this is part of what they were designed for - tests of software you wouldn't want to even try and install but that someone's done the hard work for you, software that may well screw things up for you so you can test without having to install it.
Unfortunately, the demo AVI linked to in the above article shows you all it can do. And I have to say, I don't see what all the fuss is about. It's a minor point that all this is only supported on certain chipsets, almost all of which rely on a third-party binary-only driver (don't get me started again). If everyone in the world wants this, you'd better start complaining to nVidia and ATI now to open-source those drivers because otherwise it ain't gonna happen.
If a distribution (like, say, Suse) wants everyone to start running these sorts of desktops, there'd better be support and backing from someone who's going to keep this running once everyone in the world's got XGL... is that support going to come from Novell - I bet not, or at least without a hefty price. Bang goes advantage one of open-source operating systems. And what happens when nVidia change their support for OpenGL? Bye Bye Window Manager.
Anyway, skirting that minor issue - XGL looks very pretty. I've seen better effects in a few PC games menus, though. It's pretty but gimmicky. Having video overlaid over OpenGL graphics on a desktop that can spin around - very nifty. Now what could I use it for?
I've been able to have video play in the corner of my desktop for a while - it's called having a TV-card or a media player. My computer is also capable of transparencies (a feature which, incidentally, I turn off no matter what the operating system as there is very little legitimate use of it).
But personally, if I want something showing on the screen, it's because I'm watching it. If I don't, I don't want to have to squint to distinguish between different windows, or be distracted by a moving image somewhere else. Whether I'm working or just browsing, the normal use of my desktop ranges between one app full-screen and the rest minimized to another app full-screen and the rest minimized.
Before the advent of digital TV, I used to have a small window overlaying the bottom-right of my screen, in a position in which it did not obscure my use of scrollbars in my most common apps. However, I cannot remember a single occasion that I paid it any atttention like that. Occasionally, I would be waiting for a program to come on and would full-screen the TV when it did but there was nothing I did that would be aided by transparencies, hardware accelerated or not.
The only task I do where the apps aren't used full screen is if I'm doing janitorial work on my files. I would have several windows open on the filesystem, and drag-drop between them. Overlaps were eliminated by the simple precept of moving windows about. Granted, having a shortcut key to arrange/zoom windows would help but that's nothing that cannot be done in standard X.
Additionally, moving stuff between desktops is hardly a chore and a rare event - I use virtual desktops for different tasks. If something's not on the virtual desktop I'm using, it because it gets in the way or is part of a completely different task, e.g. games on a work desktop.
I frequently have my virtual desktops arranged by task, Internet, Work, Entertainment. Hence, the organisation of virtual desktops actually negates any need for transparency or some fancy 3D - I don't need to overlap windows if I can just throw them onto another, more relevant desktop. It also means that I can't be distracted while I'm working by stuff that shouldn't be on the screen at all.
Novell's XGL demo also demonstrates lot of other useless cruft - we won't even mention the bouncy windows or "snap to"... this stuff was done years ago and ignored because it's pure gimmick that's already working. It's the sort of stuff that appears in menus to games. Even there, it's only ever fun for the first minute and then you never dabble with it again.
Switching between virtual desktops as a cube - good metaphor but you could just as easily scrap it as an actual cube and just have four "sides" and still get work done without having to remember horrible keyboard combinations or have lots of OpenGL technology in place to be able to switch between desktops. It provides no advantage over much simpler, much less demanding methods.
Now it seems that the best bit of the XGL demos is, in fact, the hardware acceleration. Now that's a feature I won't knock unless it's for the fact that it only works on binary drivers at the moment. If they can resolve the driver issues and have hardware accelerated graphics on a desktop, maybe we can finally catch up the 90's with the rest of the world's operating systems! (And that's not a bash at Linux/X. It's a bash at the driver manufacturers who are holding us in that horrible position).
Novell, it seems, has spent two years making a stretchy GUI. To quote their website:
"Novell is announcing its contribution of the Xgl graphics subsystem and the 'Compiz ' compositing manager to the X.org project. These enhancements open up a whole world of hardware acceleration, fancy animation, separating hardware resolution from software resolution, and more. As a result, Linux desktops will become more usable, end-user productivity will increase, and Linux is firmly positioned at the forefront of client computing technology."
I'm sure that bouncy windows and video over a cube are so going to increase our productivity and make X more useable. I'm sure having to manually install a binary-only driver is phenomenally easy for your average potential Linux end-user that they'll even be able to do it in a bouncy window while watching Harry Potter playing over the top of Ice Age 2. I'm sure that those two years of adding to the configuration options of X.org.conf is going to just have us all blatting out our code twice as fast.
"Under the leadership of Novell's David Reveman, Novell has sponsored and led the development of this powerful new graphics subsystem for Linux since late 2004. Xgl is the X server architecture layered on top of OpenGL and takes advantage of available accelerated 3D rendering hardware. It is designed to integrate well with the composite extension and performs best when a compositing manager is running. 'Compiz' is the new OpenGL compositing manager from Novell and is the framework that enables the development of graphical plug-ins."
Let's get this straight - hardware acceleration is a good thing. I like to be able to run 3D apps as fast as possible. Rarely, however, does a working desktop require 3D acceleration. You might be a 3D designer all day long but your desktop really doesn't need it. If you have power to spare, a few bouncy windows would probably look lovely but otherwise all they've created is an add-on to window transparency, a feature most people have turned off or don't even notice that they can use.
Novell should have put their efforts into something a bit more practical. An OpenGL compositing manager, I'm sure, has one, maybe two uses where it's absolutely indispensible. What would have been much more use would have been simplified X configuration options, maybe even on-the-fly configuration for most options, tighter integration with layers like HAL or even a single damn hardware accelerated open-source driver.
XGL is a gimmick. It may convince some eight-year-old sap somewhere that "Linux is better than Windows" but that's about it. Just wait until he's thrown into the world of having to seperately compile a kernel-specific driver every time he wants to try out the next kernel assuming, that is, that nVidia has supported it at all yet. XGL brings nothing new to the table, no work that people couldn't get done before can now get done. No time is saved, no money is saved, no problem has been solved. All it does is make my computer even damn slower just to show me a file listing.