Saturday 14 May 2011

My new 260£ living-room-compatible NAS/HTPC

My first attempt at building a small silent HTPC (home theater pc) began and ended a couple of years ago with a mini-itx Pentium M board sitting bare and caseless on a cupboard in our living room. It worked quite well, but I never came around to building a case for it (back then mini itx cases were rare and expensive). When our daughter was born I decided that uncovered electronics and a baby were probably not going to mix well and exchanged it (the computer, that is) for a Mac Mini (the first Intel model had just come out).

I was delighted when I first discovered Front Row only to be severely disappointed only shortly thereafter by its lack of features and general bugginess. Nevertheless the Mini worked at least as well as a HTPC as the naked Pentium M had (especially after I had put Linux on it) and it was a lot prettier.

All was well until the Mini's hard drive *and* CD drive broke. Exchanging the hard drive was not a problem but it turned out installing Linux on an EFI-based computer without optical drive was. After a couple of very frustrating evenings I gave up and sold the Mini on ebay (for stupid 200£). First I thought about getting either an Efika MX or some cheap nettop as a replacement, but for various reasons that seemed unsatisfying.

I started to look into availability of components and - surprise - there is a *lot* more diversity today (at much better prices) than a couple of years ago. After some searching I decided to not only build my own HTPC but also to finally get rid of all the pesky external hard drives (containing our media collection) that litter our living room.

This is the configuration I went for:
  • mainboard: Gigabyte GA-D525TUD (Atom D525, 4 SATA connections, 1 IDE)
  • memory: 2GB Hypertec DDR3
  • PSU: 350W Akasa AK-P350AG8-SLUK (cheap but relatively quiet)
  • case: LianLI PC-Q08R (stylish, silly LED fans, 6 HHD bays)
I ordered the whole lot for 260£ (including shipping) at scan (fast albeit somewhat verbose service BTW).

When I had put everything together the system worked essentially as it was supposed to - except for the noise level. Case fans, CPU fan, PSU and hard disks taken together were definitely a lot more audible (at least in the evening after the kids' bed time) than I would have liked for our living room. This was however easily solved - the case fans I just disconnected (even under full load the puny Atom didn't need them), the CPU fan is under strict control by, err, fancontrol (comes with lm-sensors), making it barely audible and the data disks power down after five minutes (hdparm -S is your friend). After all this it turns out that the PSU is actually really quiet...

Add in mlnet and mediatomb and now from every device (except from my AC100, grrr) in our house the server can be accessed to browse, consume and, erm, acquire media. And the box in our living room is quiet and pretty.

Saturday 5 March 2011

Ubuntu on the Toshiba AC100 - 4 weeks later

Here are my impressions after a couple of weeks with my AC100 (with Ubuntu on it):

bad
  • Sound works sometimes, sometimes it doesn't. No idea why.
  • Network seems to stop working after a while now and then, wifi disconnects and can't reconnect anymore.
  • No flash obviously (the kids were seriously disappointed...).
  • No automounting of usb sticks, sd cards, etc. (might be a problem with Ubuntu, though).
  • Playing movies with vlc works ...sort of (flaky sound, slightly skippy picture).
  • Closing the lid sometimes fails to trigger sleep mode.
  • Still no display dimming on idle (shouldn't be too difficult using either xscreensaver or laptop-mode tools, just haven't found the time yet).
  • Haven't managed to find a working skype yet (neither Ubuntu nor Android).
  • The system sometimes just freezes at some point (although I also had it running for hours without any problems a couple of times).

good
  • Most of the time the system works without issues.
  • All programs I tried installed and worked flawlessly (even java).
  • Although there are still a couple of things missing power usage is already quite low. I haven't really tried it yet, but my guess would be 4-6 hours on a full charge with wifi.
  • Standby times are amazing as is wakeup from sleep.
  • The device is really thin and light. Also - although that's a slightly silly thing to mention - I noticed that it is far better balanced than my EeePC 901. If I carry it around the house I tend to just dangle it from one finger which I hook into the gap between display and battery - it feels completely natural.
  • I love the keyboard.

the future

I am still quite happy that I replaced my EeePC with the AC100. Despite its flaws I already use it more. And the future seems to be bright:
  • A couple of days ago Toshiba *finally* managed to release the 2.2 update. At the moment it unfortunately seems to not get along well with Ubuntu but I've heard that the source is already on the way (it seems actually to get shipped on real CDs - weird). Therefore I guess it will be only a matter of time until dual-boot 2.2/Ubuntu works.
  • Some people are working on a .36 kernel for the AC100 and seem to be making good progress. Hopefully the new kernel sources from Toshiba (.32 AFAIK) will be helpful for them.
  • Mark Shuttleworth (Ubuntu chief) himself has been rather enthusiastic about Ubuntu on ARM in general and on the AC100 in particular. Maybe he will manage to coerce some cooperation from NVidia and Toshiba so that the last serious issues (e.g. xorg driver, power management) can be solved.

Tuesday 8 February 2011

Ubuntu on the Toshiba AC100

I recently replaced my beloved but aging EeePC 901 with a shiny new Toshiba AC100.
The nice thing is that it runs Android 2.1 which means a) I had a nice excuse to buy it (my Archos 5 has only 1.6 with no upgrade in sight... and of course I *need* a halfway current Android device for development ;-) ) and b) that most people think it sucks many of which sell theirs again on Ebay for real cheap.
The problem is that it runs Android 2.1 which really is not such a great choice as a netbook OS (and to make matters worse there is no Google market - and no hack to sideload it as far as I know). Thus, while I don't agree with most people regarding the degree to which Android sucks as a non-phone OS (I think it has its merits) I do think that the AC100 is a beautiful gadget that deserves a proper desktop linux installation. Fortunately a few adventurous souls have done most of the explorative work needed for that and put it online. Still, as usual there were a couple of problems on the way. Anyways, this is how I did it:

The main HOWTO sits on http://tosh-ac100.wetpaint.com/page/Ubuntu, however it is aimed at installing Ubuntu on an SD card and uses an older kernel. There is a newer kernel by phh available here, with accompanying instructions for installing onto the device's SSD.

installation

Everything worked fine up to the point where I wanted to boot the newly installed boot image which lead to this cryptic message:
Waiting for devices ... done
/bin/sh: can't access tty; job control turned off
and a shell prompt. First I thought the problem was that I had used the newest update of the boot image, but the generic phh image had the same problem. It took a bit of fiddling and research but in the end a post in this thread lead me in the right direction.
Disassembling the boot image into kernel and ramdisk (following this guide) I found out that there were two distinct problems producing the same symptom: the older boot image did not check for /sbin/init on the right partition (mmcblk0p6 in my case) while the newer one did not have the right kernel arguments to recognize the partitions in the first place (see here). After I had just reassembled the new boot image with the proper kernel args everything worked fine.

(some) fine tuning

Most things worked out of the box after the install completed (notably sound!), however I had neither wifi nor suspend (there was also a problem with the touchpad but that disappeared mysteriously after a while...).

wifi
Following the discussion in this thread I put together a simple script which gets called from rc.local:
#!/bin/bash

/etc/init.d/network-manager stop
/etc/init.d/networking stop
echo 1 > /proc/test_program/wifi3g
/etc/init.d/networking restart
/etc/init.d/network-manager restart
suspend
The instructions in the HOWTO work like a charm except that lid-switch-daemon doesn't take an option '-d' - just '-s' is fine.

backlight
The instructions in the HOWTO are a bit vague. In fact the light_05 command takes an rgb value as argument with intensities between 0 and 255. This script will take a single value (0-255) and call light_05 with the right argument:
#!/bin/bash
light_05 $(( $1 + $1 * 256 + $1 * 256 * 256 ))

what doesn't work (yet)
  • shut down - doesn't seem to do anything (see below)
  • CPU scaling - as far as I know
  • dim screen on idle - should be doable
update [10/02/11]:
  • I found two new places with documentation - the kernel tree on gitorious actually has a wiki; and there's a new wiki being set up on linad. Now they all just need to merge their info...
  • Shut down works (see comments section)
  • I added a hook for pm-utils to dim the backlight on battery. Just put this:
    #!/bin/bash

    if [ $1 = "true" ] ; then
    /usr/sbin/dim_ac100 100
    else
    /usr/sbin/dim_ac100 255
    fi
    in /etc/pm/power.d/00backlight (assumes /usr/sbin/dim_ac100 is the backlight script mentioned above)