Showing posts with label n800. Show all posts
Showing posts with label n800. Show all posts

20081226

Again with more gadgets

Well, my daughter was born this september, and she's still being a bit grouchy, so you'll forgive the lack of posts.

First of all, while she was sleeping in the first months and I was exiled to the living room as the little one was co-sleeping (before we discovered that she really hates it and would rather be in her own bed... She's strange, that one), I found time to update cbrPager somewhat. The main gain was the addition of background threads to pre-load pages. Oddly enough, page switching, while twice as fast, is still slow; it looks like the N800's relatively puny processor is having trouble just scaling the bitmap. I can't very much scale it on load, because the user may require it to be resized. But since then, very few changes. One pending feature request which I'll get around to implementing someday.

Second, I decided to take the plunge after much consultation with online price comparison engines and reading reviews, and, basically, the result is that I'm writing this from an Acer Aspire One AOA110-1698 netbook. It's going to replace my desktop completely. In doing this, I get two advantages:

  1. I hope to free the office to become the little one's room as she becomes older. I'll only require a desk that can hold the 22' LCD, the netbook in front, the external hard drive and DVD-ROM, and a keyboard drawer. This means not much depth is required, and this gives us a lot of flexibility on the size of the desk that I can live with.
  2. I can actually write this while watching the Dear Daughter sleep.

The latter was not part of the original plan, but I've got to admit, the Atom is a pretty amazing chip. It's faster than my old Athlon XP 2000+, and the GMA945 graphics, while not really the speediest in the world, are still quite a bit faster than my old Radeon 9000. Now, I don't recommend using that machine as a primary machine unless you're upgrading from an old clunker like mine; if right now you have a quad-core bomb, this little netbook won't impress you too much. But it's plenty fast enough for my needs; I even got some programming done on it.

Acer Aspire One Mini Review

This is turning into a mini review, so let's just get it done so I can gush about my daughter at the end of the article :) First, let's cover the external appearance of the device.

When you get that machine out of the box, it can't help turn heads. Everybody at the office wanted to have a look at the thing.

The shiny body, as often mentioned, attracts fingerprints more than anything else, so it doesn't impress me that much. Build quality is good, feeling as solid as my Dell corporate lappy.

The touchpad is quite small, and this can be annoying; unless you give it very high acceleration, you'll have trouble traversing the screen in a single swipe. I highly recommend using an external mouse for any kind of serious work. Still, it's built-in, and I still use it quite a bit when no at the desk.

The keyboard is the main reason I chose the One over, say, the Asus EeePC 900A or the Dell Mini 9. It's simply amazing. It's as usable to me as a fully laptop keyboard, and the key stiffness is even better. Key travel is great. Acer can do really nice hardware when they care, so it's too bad their stuff is usually so crappy. But the one feels more solid than the cheaper 14" laptops you'll find in brick-and-mortar stores (such as the really crappy 14" eMachine laptop that sells for the same price--trust me, unless you have to have a 64bit machine, the One is a better box). I only have one complaint about the keyboard: the left control key doesn't work very well, sometimes not registering. I solved that by remapping my caps lock key to control, which I do on regular PCs anyway. If the unit had been bought in a store, I would have returned it, but it's not worth the hassle since I have an alternate solution. One day, I'll take the keyboard apart and try to figure out if it's just a particle stuck under the keycap or something.

The screen is fantastic. At lowest brightness, it's very clear and sharp. You can plug in an external monitor. The graphic card appeared to give a fuzzy image at first, but after messing around with modelines in X, I got it to be pretty sharp. Too bad there's no DVI connector, but there's no room for both VGA and DVI, and VGA is still more widespread, so I understand the decision.

After having to crawl under my desk to reach rear-facing USB ports on my desktop, the side USB ports (3 of 'em, just enough for two external drives + the keyboard/mouse connected to a USB/PS/2 adapter) are really a blessing, and an unanticipated benefit to switching to a netbook from a desktop.

The 1698 comes with a 6-cell battery. It adds a silly protusion at the back, and I'm sure they could have come up with a better design. But do get a 6-cell. This thing has better battery life than my N800, and it shows... I don't use the N800 for web surfing much anymore (it's still getting much use as an e-book/comic book reader/time waster game machine). With the 6-cell, it's still pretty light, slightly less heavy than a thick hardcover book.

Software

Unless you don't know Linux at all, ditch the Linpus that comes with it. It's not that bad, but it's not that interesting either. There isn't that much software available for it compared to, say, Debian, Ubuntu or the latest Fedora (Linpus is based on an old Fedora release).

I initially considered installing Ubuntu, but in the end, I opted for Debian. The SSD in the 1698 is only 16 GB (it's big for an SSD, but it's far from my roomy 80GB I got on my desktop--it's now in an enclosure serving as the drive for multimedia stuff). I'm very satisfied with the boot time (about 20 seconds, not visibly much more than Linpus) and hardware support (full, after some monkeying around).

To install Debian on the AAO, the best hints are on on the Debian Wiki, these guys' blog (it was actually very, very helpful), and the kernel built by this guy (follow the link in the message). I had to monkey around with the kernel sources because I wanted to use madwifi to get the LED workings, and the headers package wasn't working right, but besides that, everything was very smooth.

To get the external screen working at full resolution, I added the modeline as explained somewhere (I can't find the link). The modeline has to be added to the Monitor section. For 1680x1050@60Hz (Samsung SyncMaster 2253w--it was a steal at 200 CAD), it's

        Modeline "1680x1050" 149.00 1680 1760 1944 2280  1050 1050 1052 1089

And then xrandr will see the right resolutions. I think it reads the resolutions from the built-in panel and ignores the external monitor; looks like a bug in the Intel video driver.

To get the screen switching functionality, I used arandr to create the scripts, and tweaked them a bit. In xfce, it looks like xfwm4 is a bit dumb when the monitor is added after X is started. So, the script to switch to the dual-screen configuration looks like this:

#!/bin/sh
killall xfwm4
xrandr --output TV --off --output LVDS --mode 1024x600 --pos 0x1050 --rotate normal --output VGA --mode 1680x1050 --pos 0x0 --rotate normal
xfwm4&

And everything works find. It's best to boot X without the external monitor plugged in, or Thunar has very tiny fonts when you unplug the VGA and switch to internal panel only. Don't ask me why; there might still be some glitches in the RandR extension. Still, RandR is really, really cool, and it looks even more flexible than many Windows XP display drivers (dual screen support is sometimes spotty--the worst part is, it's really driver dependent...).

I also installed XP on a small 4GB partition, just for the odd game that doesn't run in WINE or Dosbox. Install was OK, but installing the updates was really, really slow. I thought it was the SSD that was slow, and maybe that's part of it... but maybe it's just Windows Update. Someone at the office had to install SP3 + updates, and it took him as much time on his relatively fast desktop with a good 5400 RPM hard disk as on my paltry Atom 1.6 GHz with a really slow SSD. So, YMMV. If you're a heavy XP user, the hard disk may be a better choice. The external drive is a good compromise; I'll use it for heavy data crunching. But still, Windows really likes writing all over the disk. Use FAT32 and no swap.

Caveats

I still haven't tested the camera or the card readers. I'll test the card readers soon, moving the /home to a Class 6 8GB card; this should be faster than the SSD. When SSDs become cheaper, I'll swap the built-in one. In general, it's not that slow, but once in a while the whole system locks up waiting for the disk, and that's really annoying. Still, I like the SSD--it stays cool and boot times are really, really good with it. Heck, it boots faster than the fancy Core 2 Duo laptop the office provided me, and that uses a 7200 RPM disk drive!

It's still somewhat fiddly to install other OSs on that thing. But it's workable. Linpus is OK, just not as nice as .deb based distros (why they chose Fedora as a base is beyond me).

I haven't installed Notebook remix, because it depends on GNOME. Why it's not a plain GTK+ program is beyond my understanding. Maybe I'll hack it up a bit, it looks like I've become quite good at porting GNOME programs to plain GTK+.

In Canada, you get the weirdo keyboard with an extra key. However, I don't find it that bad, it's actually quite workable. I just hit the backslash instead of the Enter key once in a while. Nothing too bad, really. The Page Up/Page Down keys around the up arrow are really placed in an ideal way.

There's this fan control thing that is suggested online, but it doesn't seem to work too well with the latest BIOS (fan keeps turning on and off). The fan isn't that loud anyhow; it's not really noticeable. Maybe I lucked out and got a version with a nice fan.

Summary

Overall, I'm very happy with this purchase (400$, taxes and shipping included, at Swift Gamers--the guy ships fast, he shipped same day at 19:00 and it got home the following morning!). Mobile computing is in, folks. We now have enough power at low enough prices that you'll see small, light lapops everywhere. And I cannot emphasize enough how small and light the device really is. The only thing that might stop it is the CPU makers' fear that it'll cannibalize the sales on their high-power processors. But I think that'll only delay the inevitable. Low power CPUs are now very powerful, and make no mistake, people want low power. Being free of the power cable was already very cool with the N800, but now, I have my full desktop's power in my hands, and it's just... really cool.

The future of computing may not be determined by trying to beat the physical limits so Moore's law can still be applied. I think it'll be about finding more power-efficient ways of eking out a lot of computing power in small packages, at least for the end users. The big CPUs will be relegated to server racks, where they'll serve the computing power remotely. Star Trek TNG's vision of a big mainframe with small tablets serving as terminals may be the true future, with ubiquitous WiFi or 3G/WiMAX giving fast access to centralized resources.

Or maybe not. I'm not tech pundit, I don't pretend to know the future. But it's a really nice way to organize one's work, in any case.

And now, for something completely different...

This is usually a technology oriented blog, but I'd be a very poor father if technology were my only concern.

Stéphanie Nguyen-Emond came into my wife's life and mine this september, and despite the sleep deprivation (that little rascal was sleeping only 10 hours a day at first, and crying all the remaining hours of the day--with very little reason, believe me!), the worries about the little one not drinking well, the diapers, daddy getting sprayed with the little one's waste products several times, the Dear Daughter twisting around whenever she's being picked up (she wants to see stuff, and hates it when she's not facing outwards), etc. etc. etc... she's given my life meaning and purpose.

She's a robust baby, with very, very good lungs (we can attest to that every time she wakes up), drinks too fast sometimes, and has a wonderful smile when I change her diaper.

As a parent, you have to learn to be patient. Sometimes, I get very frustrated, and then feel bad about it because I feel I should have more patience, more skill calming her down. But the minute after she gives a really wide smile and coos, and then I feel like everything is all right with the world. Despite the crazy economic times and the uncertainty about the whole financial system, I find that I'm still optimistic. I'll work hard to leave her a nice world, and the difficulties we live right now will no doubt yield some good in the end. Hopefully a world that is more just, less crassly materialistic, and focused on protecting the middle class rather than the rich and powerful. One can only hope. Society is a pendulum, and it has swung too far to the advantage of scoundrels and con artists. It's only a matter of time before it swings back, and I hope I'll live to see it so that's the world my daughter will inherit.

Regardless, I'll be there for her, always. And that has to be worth something. Stéphanie, ton père t'aime et sera toujours là pour toi.

20080923

Again with the N800 :-)

Well, I'm at it again. I wanted to read mangas on the N800, but the only working application, Comix (a Python application) was somewhat slow. Not the Python code itself, which was actually quite fast, but rather the overall approach. You see, to speed up processing, Comix would always unzip the whole comic archive file (cbz or cbr) in a temporary directory and read from there. It does make page flipping faster.

It also fills the N800's main drive as fast as you can say, "out of disk space" :-)

The approach is acceptable on the desktop, where at worse, we're talking about 50 MB of temp disk space for really large archives. Not an issue, even on my relatively small (by today's standards) 80 GB drive.

On the tablet, though, not only is it problematic (you get 256 MB of drive space and that's it!), but even writing to external memory cards is really, really slow. Expect 2-5 minutes before you see the first page, and meanwhile Comix is hung. And woe to you if it crashes–you'll have to recover all this space at the command line.

The crash thing didn't bother me too much, but the slow boot time did. I read fast, especially manga which tend to have relatively little dialog per image. So I started looking for an alternate solution that ran on GTK+ and that I could potentially port.

After swimming through numerous Java applications (useless on the tablet), there were two candidates: cbrPager and Comical.

Choosing the One

Comical initially looked more interesting. It embeds libunzip, unrar (through a special exception to the GPL in the license) and did all image decoding in memory, which I thought could be faster. cbrPager, in contrast, had a similar approach to Comix (unzip to a temporary directory), except that it unzipped only one image at a time. I worried that this would be slow. Also, cbrPager used the Gnome libraries, some of which are not available on Maemo, and I didn't really expect to have to rewrite parts of the UI layer. But unfortunately, Comical is written on top of wxGTK, which is a bit problematic on Maemo (there's a port, but it's hard to get from a repository). So I decided to take a look at cbrPager and do an initial "straight port" using the Gnome canvas and disabling parts of the interface, just to see whether it was fast enough to be a workable base and not force me to deal with wxGTK.

It was quite fast, thank you very much.

I immediately knew I had a winner.

Modifications: Front end

I Hildonized the toolbar and main window, which was relatively quick. Unfortunately, one of the features that's really useful for tablet-based comic book readers is rotation. Comix had it, together with very high quality antialiasing. A small modification to the cbrPager source gave me antialiasing and rotation, but not both at the same time; rotated images looked really, really bad.

Since I wasn't too happy with using the Gnome canvas anyways, and that it was the last Gnome dependency left (I had had to remove all others), I decided to try to find a nice way to replace it. Initially, I was quite ambitious, thinking I'd do raw updates to the main widget. Looking over in the gdk-pixbuf library, it looked possible, as that library had all the bells and whistles I needed: antialiasing with selectable algorithm, automatic rotation, image scaling, etc.

But then I started to think about how to embed the image render in the main view, and my head started hurting, thinking that I'd have to write a GTK+ widget from scratch (it's not hard, exactly, as I've learned later, but I had never done something like that before...). In the end, I decided to look for a plain image viewer (initially I though gqview, since it has the features I'm looking for) and see if I could scavenge their widget.

In the end, I found GtkImageView, which had a ready-made widget and was only lacking rotation. I added rotation and was a happy camper.

Well, almost :-) I had introduced a memory leak that ate all the RAM of the tablet really, really quickly. Fixing it was really simple, but that didn't happen before I crashed my tablet several times in an effort to figure out what exactly was going on...

From the front-end point of view, I then added a few tidbits: scrolling through direct pen usage, auto-rotate, bookmarks (my wife asked for that one really fast...), persistent zoom settings, fullscreen... All of those were pretty easy to add, which speaks volumes about the initial cbrPager code's organisation (hint: it's pretty nice).

Modifications: back end

I then got annoyed that users were forced to install unzip. One nice feature of Comical is that it embeds the unzip code. So I wanted to do the same. For RAR files, I chose not to do it right away because of licensing problems.

To do that, I needed to extract the archive reading logic. It was embedded in command line use. So I chose to encapsulate it in a gobject. This was probably a bit overkill, but it made sense with respect to the use of the GtkImageView gobject.

I first moved the code of the fork/exec logic into a gobject and got it to work that way. Once that was done, it was really easy to get it to work with direct calls to the unzip library.

I had wanted to extract the image bits in memory and decode completely in memory, thus removing the need for a temporary file. I didn't do it that way right then because there were reports of really slow decoding when doing that through pixbuf loaders. Since image decoding was actually slower than archive reading, I decided to pass for now.

Writing a gobject was kinda cool, but those things are really quite heavy... there's a lot of macros and presumably some overhead. Since the same 3 objects are reused throughout the application (one object per supported archive type), the overhead is negligible, but if I had to do it again I'd just go with a struct and function pointers, although it feels kind of silly to do that given that there's already gobjects in the application.

The result

Well, just go download it at https://garage.maemo.org/frs/?group_id=777&release_id=2075.

You can see the announcement on the Internet Tablet Talk forum. There's screenshots.

Just beware, you need a memory card in the internal slot for this to work... I'll work on a fix tomorrow.

Credits, thanks, etc.

Many thanks to the original author of cbrPager for writing the initial code, and for putting up with me :-)

And thanks to the ITT community, who will be my beta testers, as usual ;-)