Thursday, December 2, 2010

WeTabOS to pure MeeGo

OK, I must warn those who are reading this text: more than I'm used to, this post is going to be really nerdy, maybe not in the best meaning of the term. This post will describe in details how to remove the WeTabOS from the WeTab internet tablet (http://wetab.info).

Brace yourselves, and get a lamp 'cause there's gonna be some grues.

First, why wouldn't I want to use the WeTab OS? Well I found the Graphical User Interface truly horrible, lacking any ergonomics engineering. While the core of the system, based on MeeGo, seemed to be good and usable (hey, a terminal accessible from the WeTab Market! Adobe Air supported out of the box!), the G.U.I. just didn't made it. The right panel always visible, the ugly virtual keyboard, I could go for hours. Ok, maybe minutes, but STILL.

Being a geek, I also wanted to try some other tablet operating system (or linuxes particularly packaged for these tablets, like JoliCloud). I use a N900 phone every day, so MeeGo, the successor to Maemo, seemed the way to go. I grabbed a disk image on their website (http://meego.com/), took the one with Chrome Browser (labelled "MeeGo v1.1 for Netbooks (Google Chrome Browser)")(there's a E.U.L.A. http://download5.meego.com/netbook/meego-v1.1-netbooks-google-chrome-browser). There's a good how-to for creating your own USB booting device, there: http://meego.com/devices/netbook/installing-meego-your-netbook, the guide is pretty straight-forward and adapted to all operating systems. The partition table of your USB drive can be either MBR or GUID (I tried with both) thanks to the WeTab having an Extensible Firmware Interface 'bios'.

Now that you have your USB drive, it's time to prepare the WeTab to boot on it. Simplest way: using the PLOP bootloader, instructions here: http://wetabz.blogspot.com/2010/10/using-plop-boot-manager.html. Basically, all you have to do is download a binary of PLOP here, copy the .img and the .bin to /boot/extlinux/, and add the entry to /boot/extlinux/extlinux.conf with vim or gedit (sudo is your friend here).

label plop
menu label ^plpbt
KERNEL memdisk
INITRD plpbt.img
menu default

I removed the "menu default" from the WeTab OS entry and added it to PLOP, just to be sure that if the keyboard isn't recognized I'll be able to boot PLOP.

So, that's it. Plug your USB drive, reboot the WeTab, don't forget to plug it to its AC adapter, and to maintain the 'soft' button as soon as the blue led lights up, and select the 'plop' entry (the quickstart button (the thingy on the upper-left of the WeTab, near the camera) can act as a selector in PLOP: one push to go down, hold to select the entry). If everything goes well, the MeeGo boot menu should appear. It didn't worked when I choose "try MeeGo", so I did an install (I already tested that in a virtual machine in OSX to be sure), and I entirely removed the WeTab OS. It should be feasible to dual- or triple-boot (plop is good for these kind of things), but I didn't wanted to spend disk space for multiple OS. Anyway, once the image is copied on the WeTab's disk, you can reboot. If you haven't done that before, now is the time to plug your USB keyboard in the WeTab.

At that point I had an error at boot, the famous "init: Id "x" respawning too fast: disabled for 5 minutes.". Just shut down the device, wait for a few seconds, and reboot.
If there's an error, or you have to leave the first screens of the MeeGo boot, don't panic: at the startup prompt, login as 'root', password 'meego', and type 'firstrun' on the command line, it'll relaunch the registering process for the new user.

Then, to activate the virtual keyboard! Again, MeeGo's website is useful for that. Basically what you have to do is add repositories to the package manager, and refresh the repositories :

$ sudo zypper addrepo http://repo.meego.com/MeeGo/releases/1.1/handset/repos/ia32/packages/ handset
$ sudo zypper refresh

then, do a '$ sudo zypper install meegotouch-inputmethodbridges', and '$ sudo zypper install meegotouch-inputmethodkeyboard'. You can do that either by plugging an USB mouse to the WeTab and selecting the Terminal in the Applications menu, or switching to the command prompt by alt+F2 or ctrl+alt+F2.
Now we are going to say to the system that it can use another input method by modifying /etc/xdg/autostart/meego-im-uiserver.desktop, adding the '-target name' and the "X-MEEGO-NB" at the end. name refers to an entry in /etc/meegotouch/devices.conf. For the WeTab, good values are 1366x768 for the X and Y resolution, and 250 and 200 for ppiX and ppiY.
Reboot! ('$ sudo shutdown -r now' or ctrl+alt+backspace)

Now you should have a working virtual keyboard! Congrats.
For the hard but last part: getting the touchscreen to work! Yeah, that thing didn't worked, from the first boot. MeeGo chooses to attribute to it a USB driver, and that is not working. At all.
So, another helpful post from Samiux's Blog, http://samiux.blogspot.com/2010/07/howto-ubuntu-1004-on-gigabyte-touchnote.html, is going to help us a lot. If you choose to install Ubuntu or some other GNU/Linux distribution based on it (Kubuntu, etc.) then you're in luck, because that bug has already been patched in the main branch (read the informations here).

Alas, we have to get dirty again. if you look closely, the post from Samiux's blog describes its touchscreen as a 'Bus 005 Device 002: ID 0eef:0001 D-WAV Scientific Co., Ltd eGalax TouchScreen', on the WeTab it's a 'ID 0eef:72a1 D-WAV Scientific Co., Ltd' (to check that, run a '$ lsusb'). We have to change the instructions in order to make it work.

In /etc/modprobe.d/blacklist.conf, add this line : 'blacklist usbtouchscreen'.

Another thing that changes is that MeeGo doesn't rely on GRUB to boot: the WeTab has an EFI 'bios', so it's extlinux again (I say again because the WeTabOS uses it too) that manages the boot. Instead of the 'GRUB_CMDLINE_LINUX_DEFAULT="quiet splash i8042.noloop=1 usbhid.quirks=0xeef:0x1:0x40"' described on Samiux's website, we have to append this after the last line in the first entry: 'i8042.noloop=1 usbhid.quirks=0xeef:0x72a1:0x40'. Note that I changed the second hexadecimal value to match the one from our 'lsusb'.

You also have to add a file in the /etc/X11/xorg.conf.d/ section. '$ sudo nano /etc/X11/xorg.conf.d/05-evdev.conf' (or whatever your preferred editor is, at that point I had already installed VIM) (again, thanks to Samiux), and add in this newly created file:

Section "InputClass"
Identifier "eGalax"
MatchProduct "eGalax"
MatchDevicePath "/dev/input/event*"
Driver "evdev"
Option "SwapAxes" "off"
Option "Calibration" "2 4100 11 4099"
EndSection

Another thing that changes: it's not Debian, so we don't have to create the .deb for xinput_calibrator like Samiux describes. Just a '$ sudo zypper install xinput_calibrator' will do the job.

Now you can reboot and enjoy the touchscreen.

And... That's it! Now you can play with it, install OpenOffice (really easy) and Firefox, impress your friends, patati patata.

P.S.: It may (or may not) have been easier to just remove the 4tiitoo UI from the WeTabOS and put MeeGo's one in place, but I'm really not sure about that. Let's say that technically, it should work (after adding the MeeGo repositories to yum, deleted everything related to tiitoo, then having installed MeeGo's UI).
Do not hesitate to ask questions here about the procedure or about MeeGo, I'll try to answer them as best as I can. Google is also (and always your friend), as are the guys on the MeeGo forum.

23 comments:

  1. Nice post W3c, I will definitely have to come up with the time to do that on my device. I tried running off of a USB stick but it drove me nuts for the most part. When I have more time I'll shrink my WeTab OS partition and install Meego on the empty space, you're definitely right about the ergonomics. How is it on speed though? How's the boot-up time? Apps?
    Cheers!

    ReplyDelete
  2. Hi Etheros!
    Well, as the WeTabOS was based on MeeGo, the boot time is equivalent (less than 20 seconds, I'd say 16 to 17 seconds). Overall it's pretty snappy, the applications work well.
    The only main problem is the package manager: think of it as Synaptic, so quite easy to use for someone who has a little knowledge in GNU/Linux, but I wouldn't recommend it for a newbie. MeeGo's Garage works well, but there are not many applications available at the moment. Your best bet is to either compile the apps you want, or install them as RPM via Synaptic (after having added another repository, like one for Fedora 14 or RHEL 5), or by hand (rpm -ivh file.rpm).
    To be fair, now that I've got MeeGo working, I'll never go back to the WeTab OS.

    ReplyDelete
  3. Hi

    I am following your instructions to install MeeGo on Exopc. I was successful until virtual keyboard. However, the touch screen does not work even after adding quirks option to extlinux.conf..Any more suggestions ?

    ReplyDelete
  4. Hi HexFace,
    Well, my instructions were written specifically for the WeTab. Maybe your touch screen is somehow different? Could you run a 'lsusb' on your tablet?
    The 'lsusb' command should give you the line to add in extlinux.conf, like 'ID 0eef:72a1 D-WAV Scientific Co., Ltd' told me to add 0xeef:0x72a1:0x40 (the 0x40, apparently, never changes).
    Please post your results!

    ReplyDelete
  5. Crap, I installed Meego then played around with the ExtLinux.conf and somehow messed up the boot order. Now I can't even recover properly...it seems what they call BIOS in WeTab land is just the MBR of the SDD!!! GULP! Any ideas apart from ripping the thing out?

    ReplyDelete
  6. Whew, nevermind, I attached my keyboard and was able to interact with the ext menu. I thought I was locked out! sheesh, that was a rush! I remember with the original bootloader I couldn't use a keyboard, only the soft-touch button...
    Hmmm... but this is scary, the original boot loader atleast allowed you to recover from a bad installation. This bootloader doesn't allow you to do the back button +soft touch click at the first second while loading in order to recover the original OS (http://wetab.mobi/en/developers/)...I'm not sure I'm liking Meego too much.

    ReplyDelete
  7. You're absolutely right, I had the chance not to mess things up, but in case you do so, I don't really know what are your possibilities.
    In fact, there is surely a way to open the EFI menu, but I didn't contact neither the MeeGo nor the WeTab developers. I'm sure there's some kind of keyboard command directly at boot, that can be entered when you have an USB keyboard of course (for example, while OSX and OSX computers start with EFI and haven't got a BIOS, you can still boot in EFI mode via the Apple + O + F keys at boot (see http://www.jacsoft.co.nz/Tech_Notes/Mac_Keys.shtml)).
    Besides, I haven't tested it, but they mention this on the Developer's WeTab page:
    'Once the WeTab starts to boot (Blue LED on WeTab lights up or LED on stick lights up) press and hold quickstart button (round area in top left corner of touch screen) and press F11 repeatedly until the boot menu shows up' (In the 'In order to boot up from another device or enter BIOS' section).

    ReplyDelete
  8. Hey So I've messed around a bit with the Developer's recovery method and it seems to be hardcoded on the BIOS ROM. I was having trouble getting it to work earlier because my silly USB-stick was messed-up. I dd'ed the recovery image on another USB stick and tried again and this time the recovery worked. Of course I can't fully confirm this because I had already recovered everything on disk so it could still have been the bootloader on the MBR that started the process, but that's unlikely, I think it's the BIOS that does this. I'll post again once I've figured out how to look at the BIOS.
    Cheers!

    ReplyDelete
  9. Have you tried to run MeeGo Handset UX in the WeTab? See http://wetab-community.de/forum/viewtopic.php?f=62&t=2502&start=0

    ReplyDelete
  10. Hi Quim Gil,
    No, I haven't tried that. Trying the 'full-fledged' MeeGo was the first operating system other than the WeTab OS I wanted to try on the WeTab. I choose the full MeeGo for netbooks because of the capabilities of the WeTab. Maybe I'll try MeeGo Handset UX on the N900 first, see how it goes :)

    ReplyDelete
  11. Hi w3c,

    I have alos a WeTab and I installed Meego.
    But I do not understand this section with the touchscreen.

    #########
    Now you should have a working virtual keyboard! Congrats.
    For the hard but last part: getting the touchscreen to work! Yeah, that thing didn't worked, from the first boot. MeeGo chooses to attribute to it a USB driver, and that is not working. At all.
    So, another helpful post from Samiux's Blog, http://samiux.blogspot.com/2010/07/howto-ubuntu-1004-on-gigabyte-touchnote.html, is going to help us a lot. If you choose to install Ubuntu or some other GNU/Linux distribution based on it (Kubuntu, etc.) then you're in luck, because that bug has already been patched in the main branch (read the informations here).

    Alas, we have to get dirty again. if you look closely, the post from Samiux's blog describes its touchscreen as a 'Bus 005 Device 002: ID 0eef:0001 D-WAV Scientific Co., Ltd eGalax TouchScreen', on the WeTab it's a 'ID 0eef:72a1 D-WAV Scientific Co., Ltd' (to check that, run a '$ lsusb'). We have to change the instructions in order to make it work.

    In /etc/modules/modprobe.d/blacklist.conf, add this line : 'blacklist usbtouchscreen'.
    ######
    Is it possible to explain me this step by step?

    Also the virtual keyboard is not running or I can not found it. How I have to start the keyboard?
    THX Tom

    ReplyDelete
  12. Hi Tom,

    About the touchscreen, this is exactly what you have to do :
    - Launch the Terminal
    - Type in exactly this : sudo gedit /etc/modprobe.d/blacklist.conf
    and type enter (yes there's an error in my post, it is NOT /etc/modules/modprobe.d/blacklist.conf)
    - In the editor (gedit), go down to the bottom of the file and add "blacklist usbtouchscreen" (without the quotes).
    - Select File > Save (or do ctrl + s), and quit Gedit.
    - Restart the WeTab.

    About the virtual keyboard, if you follow the instruction (again, in the Terminal, do the 'sudo zypper addrepos ...' then the 'sudo zypper install ...' etc., without the $ sign and the quotes) the keyboard should spring up whenever you click in a text field area. There's still a problem with the password areas, but you can copy / paste your password from a normal text area (with a long press on the touchscreen, the contextual menu should appear).

    Ask me again if you need more information, or if there's an error message or something with the zypper commands, I'll be happy to help you.

    w3c

    ReplyDelete
  13. Is this correct for the .desktop?

    [Desktop Entry]
    Exec=/usr/bin/meego-im-uiserver -remote-theme
    X-Moblin-Priority=High
    OnlyShowIn=X-MEEGO-HS;
    -target wetab
    X-MEEGO-NB

    ReplyDelete
  14. One question more.
    I am not able to find this .conf file
    /etc/meegotouch/devices.conf
    Could you please check and show me the entry for the wetab/exopc?

    ReplyDelete
  15. What is with the other hardware like GPS, 3G, Light-Sensor, Bluetooth. Is this fully funktional under MeeGo?

    ReplyDelete
  16. Hello HTC, I'm sorry I don't have the WeTab at hand right now, I'll try to answer your questions as soon as possible. I think the line '-target wetab' should be placed after '-remote-theme', like this :

    Exec=/usr/bin/meego-im-uiserver -remote-theme -target wetab

    Stefan > Light sensor and bluetooth are working ok, but I haven't had the occasion to test the G.P.S. and 3G; my WeTab is only a WiFi model.

    ReplyDelete
  17. My USB keyboard does not work when I booted from USB. So i cannot provide a return on selected item

    ReplyDelete
  18. Excuse me, already found it: ..." If the USB keyboard does not work, you can still use the soft button, just as in the plop bootloader. Tap it to highlight the next item. Hold it down to boot. Be careful though: unlike in the plop bootmenu, once you select the bottom-most item, you cannot go back up! "...

    (I should read better...)

    ReplyDelete
  19. Is there any way to get an image of the untouched WeTab OS that ships with the tablet?.

    I´m attempting to see if it could be made to run on other x86 tablets with similar hardware...

    :)

    F

    ReplyDelete
  20. Hi Nerd Pogre,
    Well, I haven't heard of any, apart from their recovery image (which is designed to be written to an usb key, to reinstall the OS). Maybe it'll work on another tablet, as long as the other tablet can boot from USB...
    Here's the link to the torrent of their disk image, http://update3.tiitoo.com/images/WeTab-recovery-29102010.torrent (and MD5sums here http://update3.tiitoo.com/images/WeTab-recovery.usbimg.md5).
    Once you have the image, use it in the same way as described in my "howto" (the MeeGo way).
    Hope it'll help ! I know it works for MeeGo (I installed it on an ASUS EEEPc 1015PN, worked like a charm), so I can't see why it wouldn't work here.
    Keep us posted on your findings! :)
    w3c

    ReplyDelete
  21. Hi,

    I am having trouble with the light sensor. It is randomly turning the brightness up and down. Even when the lighting in the room hasn't changed and I am nowhere near the sensor in the top left corner. I really just want to disable it at this point does anyone know how I can do that?

    I'm using debian (3.1.0-1-686-pae).

    ReplyDelete
  22. Hi Rodolphe,
    Sorry if I took time to answer, I hope your problem is solved by now. If not, I suggest you take a look at the documentation concerning your distribution.
    I don't know exactly about Debian, but I think there should be a switch in /sys/devices/platform/.
    You should be able do disable the light sensor by entering, as root,

    echo 1 > /sys/devices/platform/asus_laptop/ls_switch

    as explained here http://wiki.memelabs.net/doku.php?id=wetab
    Good luck!
    w3c

    ReplyDelete
    Replies
    1. Hi w3c,

      Thanks for your reply. I tried your solution but it does nothing. When the power lead is unplugged, the brightness up and down. Maybe the drivers didn't support by debian ?

      Delete