# Battery

I just wondered if and how one can check the actual, fully charged battery capacity on a Linux notebook compared to the design value. Turns out to be very simple:

cobra@mini:~$acpitool -B Battery #1 : present Remaining capacity : 1870 mAh, 85.00% Design capacity : 2200 mAh Last full capacity : 2200 mAh Present rate : 0 mA Charging state : discharging Battery type : rechargeable, Lion Serial number : 11  Seems that the battery on my Mini is still in good shape. :) The above reading, by the way, was taken after running the little thing for more than an hour on battery. # Preferences Im my infinite naiveté, I always assumed that developers strive for the better. Usability, performance, stability, whatever: I reasoned that they want to improve it, and the many obvious examples to the contrary just led me to believe that developers, like ordinary humans, can fail. Fact is, of course, that developers are apparently sometimes guided by entirely different principles. Well, judge for yourself. In former times, I used to utilize the calculator available on almost every computer as a benchmark tool. It allows straightforward comparisons of the CPU performance of different machines with the same OS, or comparisons of the algorithms employed in different OS on the same machine. For example, the calculation of 100000! required about 100 s with calc 5.1 on Windows XP SP3, but only 4 s on KDE 3.5.10 with kcalc 2.0.6 on the same system. Obviously, the algorithm used for the latter is the better one. Now, on KDE 4.2.0, kcalc 2.4 zaps through 100000! in the blink of an eye, 400000! in 0.3 s, and 1000000! in 1.5 s. Its predecessor can process 400000! in 100 s, but I'd rather not try the feat of calculating the faculty of one million there. *g* In other words, the developers of kcalc have managed to speed up the calculations by two orders of magnitude. Not too shabby. I'd expected a similar development for Windows 7, particularly after the calculator therein was boasted by blogs and official media alike as being amongst the most remarkable features of Windows 7. Well: 1000000!: Overflow, 100000!: Overflow, 10000!: Overflow, 1000!: Hey! Result! I can't help but being a little disappointed. # oops! Q: Another open source project that underwent a big change was KDE with version 4.0. They released a lot of fundamental architectural changes with 4.0 and it received some negative reviews. As a KDE user how has this impacted you? A: I used to be a KDE user. I thought KDE 4.0 was such a disaster I switched to GNOME. PS: The KDE user is Linus Torvalds. Let's start an initiative: give KDE a chance! :D # A historic moment My first KDE4 (4.1.96 aka 4.2 RC 1) screenshot: I've chosen this wallpaper to reflect the current situation outside of this window (please don't say “there's no such thing as ‘outside’”...I know there is! :usl ) PS: No, it's not perfect. Far from it. But it's getting usable. PPS: Oxygen theme (panel), lancelot launcher (leftmost icon), dirtchamber skin (gkrellm...right). # TeXing on the Mini I can hardly believe it myself, but I'm actually working with the Mini. :) Work, in my case, most often means punching in some text in a LaTeX environment and compiling it from time to time, so that the result is visible with a pdf viewer. My main machine runs KDE, so the natural choice for a LaTeX-IDE is Kile. That's, of course, out of the question for the Mini with its 8 GB SSD (and running Gnome :D ). Of course, in this case emacs and auctex comes to mind, as well as vim and its LaTeX plugin. Well, the former is big, complex, and in general only suited to emacs lovers. The latter is awkward, clumsy, and, unfortunately, hopelessly outdated. I also don't need the power of emacs or vim when writing a text. I'm just typing, ok? What to do, then? Well, there's an amazingly good LaTeX plugin for gedit which is doing just what I need. After installing it (wajig install gedit-latex-plugin), gedit sports a LaTeX menu when loading a TeX file. Just type ahead! A Ctrl-Alt-1 will compile the text using pdfTeX and open your default pdf viewer (in this case, evince) to view the result. The compiler activity is indicated graphically, a summary of messages is displayed, and you can always look into the details one window down. It's damn near perfect. # xorg troubles Recent versions of the xorg-server bring about many improvements, among them, particularly, a complete cooperation with HAL to autoconfigure input devices and displays. That's mainly a good thing, but there are, as always, also problems with this new implementation. For example, experienced Debian or Ubuntu users were dumbfounded when trying to set the resolution of their display via 'dpkg-reconfigure xserver-xorg' in a reasonably up-to-date version of their OS. This option just doesn't exist anymore. ;) If you live on the bleeding edge, it's perfectly normal that the proprietary graphics driver declares to be not compatible with the shining, new xorg-server you've just updated to. Entirely your fault, freak! :D Well, at least for Nvidia users there's an easy way out: Option "ignoreABI" "True"  Add that to the "ServerFlags" section of your xorg.conf, and you're done (well, at least there is some hope *g*) Other symptoms of living on the edge are not as easy to fix, such as the strange inability of some applications such as VMware and Warsow to properly recognize the codes for certain keys, such as the arrows. Finding a solution for VMware proved to be easy, but for Warsow, there's only a workaround called w-a-s-d ;) This will certainly boost my mediocre FPS performance to levels which I never dreamed of reaching ... *g* To add something useful: here's how one can check the codes for certain keys, if they don't work in your host system (such as, e.g., a volume key on a notebook). You can then add the keycodes to your personal ~/.Xmodmap. xev | grep -A2 --line-buffered '^KeyRelease' \ | sed -n '/keycode /s/^.*keycode $[0-9]*$.* (.*, $.*$).*$/\1 \2/p'


Note that this won't help if the problem is restricted to a specific application such as VMware as described above.

# Blind love

Yesterday, I forgot to mention that the system lock-ups that I and others experienced with Dell's original installation on their Mini 9 are gone after the update to Intrepid. There's thus nothing wrong with the hardware of the Mini, confirming my suspicion that this phenomenon is caused by a software problem.

When searching the internet for reports of others and a possible clarification, I came across a blog devoted exclusively to the Ubuntu-powered Dell Mini 9. These guys spare neither time nor effort to collect all kind of information on the Mini and to present it to the curious beginner. At one point, however, they get carried away by their enthusiasm:

Just like any operating system, Ubuntu can freeze up and crash. This does not mean there is something wrong with your system, it just happens.

Excuse me? Anybody home? "It just happens?" The system locks-up on you such that only the magic sysrq gets through, and that doesn't mean that something is wrong with the system?

Let me spell it out for you: spontaneous freezes and lock-ups are not normal. Computers are not supposed to do that, you know. If these things happen, your system isn't worth a dime, unless you can figure out how to fix the problem. Because that's what it is: a big, big problem. It doesn't help to pretend as if nothing has happened. You have to face it and get a grip on it, for Christ's sake.

On this note, merry Christmas. :)

# Mini update

I never felt comfortable using a computer with the OS and software preinstalled by the manufacturer, and the Dell Mini is no exception. That's not because I'm snobbish and always want to be different. It's just that I want to have full control of the software I'm using. And I don't like crapware:

• You get an idea of what I'm talking about when looking at this screenshot. Dell sold the privilege of being the standard search engine in Firefox to Yahoo, and in turn they had to include all kind of Yahoo stuff which I neither need nor like (and they had to call Firefox "web browser" *g*).
• What you don't see on the screenshot: The "web browser" comes with a preinstalled Yahoo toolbar, which you can't deinstall from the add-ons menu as other extensions (I accidentally discovered the toolbar in synaptic, allowing me eventually to remove it).
• As a matter if fact: the entire installation is, in a certain sense, proprietary. It is compiled for the lpia (low power on Intel architecture), and while this architecture is binary compatible to i386, you always have to use the force-architecture switch when installing a standard x86 package.
• What's more, the Dell Mini even has its own repositories. You can't simply upgrade to Ubuntu 8.10 online by using, say, the update manager, because there is no 8.10 for the Dell Mini.
• An upgrade is also made difficult by the fact that Dell did not partition the 8 GB SSD of the mini. Formatting the partition thus means losing all configuration files in ~.
• And finally, at least some minis suffer from sudden freezes which are believed to be related to the WLAN connection. I've experienced these system lock-ups too. They are truly severe: only the magic sysrq saved me from having to power-off the mini. My attempts to replace the propietary wl driver (which I suspect to be the culprit) of the Broadcom WLAN chip with the open bc43x driver were, by the way, unsuccessful.

All in all quite many reasons for a clean reinstall, wouldn't you say so? ;)

Since the mini doesn't have an optical drive, I had to prepare a bootable USB stick. Ubuntu comes with a package called usb-creator for doing just that. Prior to "burning" the iso image to the stick, it proved to be necessary to prepare it by issuing:

dd if=/dev/zero of=/dev/sdb bs=512 count=1; blockdev --rereadpt /dev/sdb; usb-creator


This command erases any previous content on the stick and rereads the partition table. Usb-creator then offers to format the stick and to write the image.

What followed was an uneventful installation of Ubuntu 8.10. Of course, I created a separate /home for which I reserved 2 GB. Since space is an issue, I checked the size of the installed packages with the following little script which imitates the function of John Walkers perl script rpmhogs on a dpkg based system:

 1 2 3 4 #!/bin/bash dpkg-query --show --showformat='${Package;-50}\t${Installed-Size} ${Status}\n' \ | sort -k 2 -n -r |grep -v deinstall | awk '{printf "%-35s%-35s\n",$1, $2}'  Or, alternatively (thanks to haui for this rather unexpected discovery):  1 2 3 #!/bin/bash [wajig](wajig.html) size | sort -k 2 -n -r  Call this script with dpkghogs | head -n 20, and you'll get a top 20 of the fattest packages installed on your system. :D In my case, the biggest ist openoffice.org-core with 103 MB, followed by evolution-common with 93 (hmmm... I'll install claws instead) and the linux kernel (2.6.27) with 90 MB. Now, guess what the biggest package on Dell's original installation was. You'll never figure it out! Acrobat Reader with 120 MB. :O Here are two screenshots to give you a visual impression. I use the Dust theme and the Meliae-Dust icons, which go well together. The right screenshot shows firefox with the dustfox theme on a very well-known blog. ;) As you see, there's still plenty of space on the screen. Finally, I've found to both my great surprise and pleasure that the system feels much faster than I thought. There are, I think, three factors which are crucial for this impression: first, the SSD reads data as fast as 30 MB/s, second, the Atom CPU handles hyperthreading, and third, the integrated Intel GMA950 is fast enough (glxgears shows 550 fps, sufficient for simple 3D shooters such as AssaultCube and OpenArena) to run Compiz, which in turns keeps the load on the CPU low when shifting Windows around. The system just feels very responsive, much more so than I expected. Oh, and another good point: the battery life exceeds five hours. I had hoped for merely four. :) # Keep your blog up-to-date You certainly know the feeling: you've said it a thousand times, yet, people don't listen, do things contrary to your advice, fail pathetically, and end up crying at your shoulder! Or the other way around: you want some feature, beg for it for years....and are simply ignored by the obnoxious admins. #pdes, however, is different. Even if you're just mildly hinting at a feature you might hope to have in years, you'll get it automatically overnight! It's just like talking to a genie! Many thanks to haui, who relayed the message, and piet, who swiftly went into action. I really appreciate it. :) What I'm talking about is rsync, of course. Since my blog is getting bigger, its manual update has become quite cumbersome. Not any more: now we have an rsync server! And how can we use this server? Well, like that:  1 2 3 4 5 6 7 8 #!/bin/bash LPATH=/local/path/blog/* RHOST=our.rsync.server RPATH=/remote/path/blog rsync -avz -e 'ssh -p 20' --progress --stats --delete \ --exclude "*bak" --exclude "*~"$LPATH $RHOST:$RPATH 

connects to our.rsync.server over ssh on port 20 and synchronizes the remote and local version of the blog. Here's an example of the output:

[cobra@blackvelvet nb-3.4rc2]\$ blup

... long list of files ...

Number of files: 605
Number of files transferred: 35
Total file size: 8391086 bytes
Total transferred file size: 179532 bytes
Literal data: 21902 bytes
Matched data: 157630 bytes
File list size: 13812
File list generation time: 0.006 seconds
File list transfer time: 0.000 seconds
Total bytes sent: 24738

sent 24738 bytes  received 2386 bytes  10849.60 bytes/sec
total size is 8391086  speedup is 309.36


# Mini

Do you understand this netbook hype? You don't? You think every notebook should have an 18.4" screen and be able to display Crisis with at least 100 frames/s at a resolution of 1680x1050? Well, then you are unlike me and don't need to read further. ;)

I have to admit that I'm simply fascinated by these little things. I loved them from the very beginning, but what held me back initially was the low screen resolution which made horizontal scrolling necessary in the web. Now, that's really a nuisance, and put me off entirely.

After observing the market for a while, the following criteria for an attractive netbook formed:

• Intel graphics
• LED backlit display, non-glare
• highest resolution on smallest footprint (i.e., no 1024x600 on 10")
• maximum weight 1 kg (i.e., no 1.2 or 1.3 kg)
• no moving parts (i.e., no fans or HDs)
• no Windows (i.e., no Windows *g*)
• low price (€ 300 or below)

As if they'd known, Dell made an offer I just couldn't withstand: the Inspiron Mini 9.

• Atom N270 1.6 Ghz, 1 GB RAM
• Intel graphics
• LED backlit display, glare :(
• 1024x600 on 8.9", i.e., a resolution of 133 dpi
• 1030 g
• fanless, 8 GB SSD
• Ubuntu 8.04
• 299 €

Almost a one-to-one correspondence, except for:

• the glare display
• the glossy black plastic which is euphemistically sold as "piano lacquer"

Well, I can live with that, giving the other merits of the Mini 9. So I gave in ... and ordered one :O

It only took four days for my Mini to arrive in a neatly designed box. Except for the Mini itself, the box contains two CDs (one with Ubuntu 8.04 LTS and the other with Dell-specific software) as well as manuals on the hardware and on Ubuntu. Upon switching the Mini on, installation commences and asks for your name and location. After rebooting, the Mini comes up with its default desktop which you can see below on the left.

This default Dell desktop is thought to appeal to people having had little to no previous contact with computers. In the middle you see this desk after having clicked on the "Web" tab. Evidently, Dell and Yahoo have some kind of ... deal. Nevertheless, for a total newbie, this interface is nice and easy to use. In my opinion, Dell did a very good job with the design of their desktop.

For advanced users like ... öh ... me *g*, it's just one click to get rid of the Dell desktop. On the right side you see the standard Ubuntu desktop running Gnome 2.22 and another of the (truly pretty) backgrounds delivered by Dell. I've also installed gkrellm to assure you that the Atom processor indeed handles hyper-threading. As you see, it does.

Note that all these images appear about 40% too large when viewed on a standard desktop display. Typically, these displays have a resolution of about 95 dpi, while the Mini 9, as mentioned above, offers 133 dpi.