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)

    20 comments:

    1. Dear MHinsch,
      Just so close to buying myself one... This kind of news is reassuring, although it doesn't seem to be plain sailing yet. I'll be following this page ,o)
      Thanks!

      ReplyDelete
    2. to shutdown AC100, did you try
      "sudo shutdown -h now" ?

      ReplyDelete
    3. Aah, works! Thanks!
      But why does this work however neither sudo halt nor the GUI shutdown button do?

      ReplyDelete
    4. that's the best summary i've found so far, thanks!

      ReplyDelete
    5. Thanks, really nice summary. I tried the same thing, but I have no sound (there was some sound just after the installation, but then I switched to the xubuntu desktop and did a system upgrade). Any idea how I could get it back?

      ReplyDelete
    6. Hmm, strange, I never had any problems with sound. Maybe ask on http://tosh-ac100.wetpaint.com/? Also, IIRC the changes files for phh's kernels did talk about sound a bit, maybe check that out.

      ReplyDelete
    7. Thanks. Strange: In alsamixer, there is only one soundcard called "tegra", but "This sound device does not have any controls"...???

      ReplyDelete
    8. phh (active dev on AC100) said he will work on a 2.6.36 kernel and make sound driver more stable... cross your finger !

      ReplyDelete
    9. I had the same issue with "/bin/sh: can't access tty; job control turned off" and got rid of it after reinstalling Ubuntu on a new sd-card

      ReplyDelete
    10. hello, i read that android 2.2 with ubuntu trough SD card is not possible at the moment...can you clarify that? thanks

      ReplyDelete
    11. hello, could you please give more precise setup for setting the brightness? I´m failing with some syntax errors, and my eyes are burning... thank you.

      ReplyDelete
    12. @Oinquer: not entirely sure. Better go to the AC100 irc channel and ask the devs directly.

      @Matej: Assuming you have the light_05 command available; open /usr/local/dim_ac100, paste the two lines shown above (under 'backlight'), close and make executable; open /etc/pm/power.d/00backlight, paste the seven lines shown above (under 'update'), close and make executable.

      ReplyDelete
    13. Linux4Tegra is gone! You wouldnt happen to know where i could get it ? :) :P

      ReplyDelete
    14. IIRC the problem has been discussed on irc. Have a look at the log at http://salaliitto.com/~gildean/ac100/ac100log.txt.

      ReplyDelete
    15. Thanks for the Log :)

      Also found the russian torrent with everything in it :)

      Now have to revert form Android 2.2 and try again :(

      ReplyDelete
    16. Hi again :)

      I managed to get it working from a usb stick.. but im still getting "cant't access tty"..

      I have repacked the boot image.. but no luck there.. cause i dont know which device to put on "tegraboot=".

      I have the Ubuntu5 untared with numeric owner on the internal EMMC.. but i guess the boot image cant find it..

      Any help would be greatly apreciated :)

      PS. Im not a great linux user.. but i get how stuff work :p

      ReplyDelete
    17. Yay! I managed to do it :) Mainly thanks to your blog post. It was the most helpfull one :) The forums were great. But this where i figured it out cause i aint a power linux user.

      Thanks dude :)

      PS. I also got sound of the box! :) Just heard the ubuntu login sound!!! YAY!

      Gonna figure the rest out later.

      Thanks again ;)

      ReplyDelete
    18. And is the wifi working? I have the device with 16G SSd but without 3G, so the wifi is the only possibility for me

      ReplyDelete
    19. @airboy: Yes it is, although it is not 100% stable - on my AC100 connection breaks down every hour or so. However simply restarting the WIFI (i.e. in my case just closing and opening the lid) usually restores it without problems.

      ReplyDelete
    20. Just posting a comment, there is an updated guide on how to install ubuntu with android 2.2 update and .32 kernel. It includes a more working sound and a faster system. Check it out at: http://ac100.tunk.org/wiki/phh

      ReplyDelete