04 February 2013

Neko's New Netbook

Around the end of last year, I decided I could really use a small portable laptop to do work on. I still have and love my old macbook, but while it is certainly "portable" it is not the sort of machine I would want to just grab and go to the park with. It has a glossy glass screen, which is ideal for crystal-clear viewing indoors but completely useless outdoors.

The Project

My n220 with its default matte display.
I started to wonder - e-ink type displays are ideal for the outdoors. And writing doesn't require a high refresh rate, really. Were there any notebooks with that sort of screen and a go-anywhere attitude? Surely there were plenty of writers out there who would love such a thing. Well, my initial searches concluded that yes, there were people who also wanted something like that - who pose the question only to get shot down on forums because "why would you want that". It's true that e-ink displays have a refresh rate problem, and perhaps that would have some implications even for typing text. I was undaunted and continued searching.

Then I found out about Pixel Qi displays. These are the same displays that were designed for the One Laptop Per Child project, and the designer is also making the small 10-inch displays available to commercial partners or interested hackers. Indoors, they work as a traditional LCD - colour and everything. The cool thing is, direct sunlight doesn't obliterate the image. Instead, it gracefully 'degrades' to a greyscale e-paper-like display, which looks great.

I learned I could shell out $800 for a "Sunbook" made by one of these partners, but the price was a bit steep for the specs, and it was basically just a Samsung n110 fitted with the screen.

Testing the screen just after replacing it.
Perhaps I could do better if I bought a netbook compatible with the display and fitted it myself! And this is exactly what I did. I trawled the Make forum for the Pixel Qi display, gathered as much info as I could, and bought a second-hand Samsung n220 from eBay. The screen, obtained via MakerShed, ended up costing me more than the laptop itself! But all up, it was still cheaper, more powerful, and more interesting to buy the parts myself and assemble them.

Up until then, I had never modified a laptop more than switching hard drives or RAM. Prising the plastic covers off the body and screen involved many scary snapping noises. Have I broken it?!? I've broken it, haven't I?! The LVDS connector was fiddly, as expected. However, all went well and I've levelled up my Hardware skill.

My New Toy

So, how happy am I with the Pixel Qi screen and the Samsung n220? Pretty damn happy! It enables me to just casually grab the netbook and go out for a walk - to one of the local parks, the library, wherever - set up and do some programming. It means that if home is too noisy to get any work done, it doesn't matter as much; the whole world is my office!

There are a few minor quibbles, certainly. There's a tiny bit of light bleed around the edge of the display (when it's dark enough that the light is even necessary, of course!). It doesn't have quite the same colour range or viewing angle that the original samsung LCD had. The netbook itself is from 2010, and while capable, isn't the fastest machine around.

But those things don't really matter. I'm not playing games on this thing, I'm working. I don't mind if code takes a little longer to compile. Most of my time is spent writing code, and that's where this netbook shines. Quite literally, in direct sunlight, because the display becomes easier to read. I can't emphasise enough how good it is to be able to use it outside. Especially since (what with the health problems) I've been super deficient on vitamin D and need to get lots more of that. But also simply because it's nice to get out into the fresh air.

Battery life was already pretty good to begin with at around 5 hours. Now that I've installed xubuntu, the screen and a small SSD, the battery indicator says I have 8 hours of charge to play with! I have never managed to use up all that charge in one go, so I'd say it's perfect.

System of Operations

Out in the park with the Pixel Qi display.
I tried out a bunch of distro combinations and settled on xubuntu 12.10, the 64-bit version. There wasn't a huge difference between 32-bit and 64-bit, they both have a slight edge over each other performance wise, but 64-bit is the future and if the CPU supports it that's really what I should be using. Memory usage isn't a terrible problem; I don't plan to keep the same Firefox habits as I do on the macbook and leave 30+ tabs open from months ago. That said, the XFCE desktop environment was much lighter on memory usage and much snappier than anything else I tried, and suits this machine ideally. I can customise the panels to maximise screen real estate, and installed Synapse for a lightning-fast little program launcher.

The other cool thing about this laptop is that it has a built-in 3G modem. It shows up as an internal USB device, and you can (in theory) configure Network Manager to build a Mobile Broadband connection using it. I haven't got this working yet; I don't think it's Linux' fault, the only SIM card I have is for my phone and perhaps there is some subtle difference I'm missing in the setup details. Perhaps when I'm earning some money from selling software here on the interwebs, I can justify spending for little extras like this. If I get it working, I'll be sure to edit this post.

Alas, I haven't yet pinned down the problem I have with pretty much all linux machines I've ever used:- Suspend and Resume. It's a game of Russian Roulette when suspending this machine, you have no idea whether it'll wake up properly or not. Happily, shutdown and boot are pretty fast, so you don't absolutely need it. Still, it'd be nice to preserve state between walkabouts. Again, I'm doing some research and suspect it's a misbehaving module that's to blame, but the infuriating thing about debugging these problems is that they're intermittent and you never know for sure if you've fixed it or not (spoiler: you haven't).

Update: I've found a workaround for the suspend/resume problem! See my latest post here.

Technical Details

To enable the display brightness controls for this laptop in Linux, you need to pass the acpi_osi=Linux acpi_backlight=vendor options to the kernel. You can put this in /etc/default/grub to get it active permanently. Fn+Up/Down arrows will now control the backlight brightness under X, but it doesn't let you go all the way down to "off", which is what you need to switch the Pixel Qi into pure reflective mode and maybe save a bit of power. To fix this, I found that you can also control what the intel graphics driver is telling the panel for its brightness level. These are two independent brightness controls, so what I've done for now is just bind a key (I used Fn-F5, XF86Launch1) to toggle the brightness completely on or off via the intel driver. Here's the script I used:-


#!/bin/bash

# To run this from a keybind without sudo wanting a password, you should make the
# file /etc/sudoers.d/qi_backlight with the contents:-
#
# james ALL=(root)NOPASSWD:/usr/bin/tee /sys/class/backlight/intel_backlight/brightness
#
# and make the file 440. Maybe make the file with a ~ on the name first, then
# finally mv it into place, or keep a root shell around; sudo likes to fall
# over and die if even the slightest thing is out of place.


# ---- Must be using correct hardware ----
[[ -f /sys/class/backlight/intel_backlight/max_brightness ]] || exit

MAX_BRIGHTNESS=`cat /sys/class/backlight/intel_backlight/max_brightness`
CURR_BRIGHTNESS=`cat /sys/class/backlight/intel_backlight/brightness`

if (( $CURR_BRIGHTNESS > 0 )); then
 NEW_BRIGHTNESS=0
else
 NEW_BRIGHTNESS="$MAX_BRIGHTNESS"
fi
echo "Changing brightness from $CURR_BRIGHTNESS to $NEW_BRIGHTNESS."

echo "$NEW_BRIGHTNESS" | sudo tee /sys/class/backlight/intel_backlight/brightness

As the comments in the script say, be careful if you're setting this up to let you sudo it without a password! A mangled sudoers file will lock you out of any root activities until you fix it (via booting in single user mode, liveUSB rescue, etc).

I'm really loving this laptop, and can't understand why the makers of Pixel Qi aren't pushing for it to be used in more tech. It's great, but if it's not easy to get a hold of, its popularity will remain limited.

Yes, there's glare in the photo, it looks much nicer in real life.


2 comments:

  1. This comment has been removed by a blog administrator.

    ReplyDelete
  2. This comment has been removed by a blog administrator.

    ReplyDelete