Linux on HTC Shift

I recently got an UMPC HTC Shift (also known as HTC P9500, HTC Shangrila or HTC Clio).

You can install Ubuntu Hardy 8.04 using Wubi Installer, so you don’t need to partition the Hard Drive. Installation is pretty straight forward, just choose the installation size (I would recommend no less than 7Gb) and click “next”, “next”… If you prefer to install on a separate partition, follow the instructions here.

Once Ubuntu is installed, you get a menu at boot time which lets you choose which operating system to boot, Vista or Ubuntu. Surprisingly most of the hardware is auto-detected by ubuntu, and almost everything works out of the box:

  • Audio is working, mute and volume control works using the Fn keys.
  • SD card reader is working.
  • Adjusting the screen backlight works with the proper Fn keys.
  • Webcam is working (you can test it with gstreamer-properties).
  • CPU frequency scaling works by default too on the Intel Stealy 800Mhz CPU, you can monitor it by enabling the cpufreq gnome pannel.
  • ACPI is working, you can get the CPU temperature using the sensors-applet.
  • Screen resolution works at 800×480. I have not tried higher resolutions yet.
  • Bluetooth seems to work, although I have not tested it.

However there are a few things that require some extra work in order to have them working properly. I’ll walk through some of them in this post.

Setting up wifi and 3G connectivity “The Easy Way”TM

If you are running the stock 2.6.24-16-generic kernel that comes with ubuntu 8.04, you can have your wifi and 3G connectivity set up quickly by downloading the precompiled binary modules here: shift-networking-2.6.24-16-generic.tar.gz.

Instructions: Put shift-networking-2.6.24-16-generic.tar.gz in a USB memory stick, insert it in ubuntu, it will be automatically mounted as /media/disk/. Then issue the following commands:

$ sudo tar zxvfp /media/disk/shift-networking-2.6.24-16-generic.tar.gz -C /
$ sudo depmod -a
$ sudo echo sd8686 >>/etc/modules
$ sudo echo ipaq >>/etc/modules

To use wifi, you need to have wifi enabled in vista commanager first, then reboot and linux will see the wifi device, you can choose your network in ubuntu’s NetworkManager, or configure wlan0 manually.

To use 3G, you need to run USBTool.exe on CE, select “Attach to Vista”, then open the “Internet Sharing” application on CE and click “Connect”. Switch to linux, you should get the network settings over DCHP on rndis0 interface. Ubuntu’s NetworkManager sees it as a wired network.

Now I’ll explain the “long dificult way”TM, for those who don’t want to use my precompiled modules or have a different kernel version or distribution.

Wi-Fi: Marvell SD8686 Wireless Lan SDIO

The wlan card does not work by default, the driver for it is missing in ubuntu 8.04 beta. I have submitted a bug report, so hopefully it is included in the final 8.04 release, but at the moment you have to compile the driver yourself. Luckily for us, Marvell has published an open source driver plus a proprietary firmware which allows the wifi to work. The sources are available on the linux-ubuntu-modules-2.6.24 package.

To compile it, download the source, untar it and edit the file ubuntu-hardy-lum/debian/config/i386 to add the following:

CONFIG_MMC_SD8686=m
CONFIG_MMC_SD8688=m

Then compile it using ‘dpkg-buildpackage‘, the resulting module will be in ubuntu-hardy-lum/debian/build/build-386/wireless/marvell/8686_wlan/sd8686.ko, copy it to your /lib/modules and run depmod -a.

You also need to place the proprietary Marvell firmware to /lib/firmware/mrvl/ directory, the firmware can be downloaded from Marvell’s website here.

To get the wifi loaded automatically at boot time type the following:

$ sudo echo sd8686 >>/etc/modules

3G/HSDPA connectivity

3G connectivity is achieved through the CE / SnapVUE side, the same way you do it in Vista, but using the usb-rndis-lite linux module from SynCE. It just allows you to tether the “embedded” MSM7200 device in the Shift with the x86 side, using the USB connection that links them.

For it to work, you first need to get synce (which will also allow you to sync Ubuntu contacts and appointments with CE, share files between both systems, etc…) and the SVN version of the rndis-lite module:

$ sudo apt-get install synce-dccm synce-multisync-plugin synce-serial libsynce0 libsynce0-dev librra0 librra0-dev librra0-tools subversion build-essential
$ svn co http://synce.svn.sf.net/svnroot/synce/trunk/usb-rndis-lite/
$ cd usb-rndis-lite/
$ make
$ sudo ./clean.sh
$ sudo make install

To enable 3G connectivity, you need to switch to CE, use the USBTool.exe utility to “Attach to Vista” (this will enable the USB connection between the PocketPC side and the PC side) and then enable “Internet Sharing” in WM6. Network settings can be acquired through DHCP on interface rndis0.

Fingerprint Reader: AuthenTec AES1610

Ubuntu 8.04 does not have support for the AuthenTec AES1610, however this reader is supported in Linux using the fprint library. Unfortunately the current version doesn’t seem to work very well (it fails recognizing the fingerprint most of the times), but if you want to try it, there are some precompiled ubuntu packages in launchpad. To install them, add the following line to your /etc/apt/sources.list:

deb http://ppa.launchpad.net/madman2k/ubuntu hardy main restricted universe multiverse

Then install the libpam-fprint + libfprint + fprint-demo packages:

$ sudo apt-get install libpam-fprint libfprint0 fprint-demo

You can test the reader by running gksudo /usr/bin/fprint_demo.

Touchscreen

Finally we have a working touchscreen, read instructions on this post:

htcpen: HTC Shift Touchscreen Driver for Linux

What still doesn’t work

  • touch screen: Touchscreen working with htcpen driver :D The touch screen is not working yet, AFAIK there is no driver for linux (nor for Windows XP). Vista uses a “HTC Touch Screen Driver, V1.0.0.2″ which will need to be disassembled first. Meanwhile you’ll have to use the Synaptics Touchpad, which does its job nicely.
  • suspend: Suspend works, but the device doesn’t resume properly. I’ll have to look what is preventing it to resume, and probably disable the offending device driver before suspending. Will post more details if I get it working. download the suspend / resume scripts for HTC Shift here :D

Screenshots

To finish, a couple of screenshots, click on them to maximize.

linux on HTC Shift 1 linux on HTC Shift 2


meneame del.icio.us | Technorati tags: , , , , , ,

9 comentaris per a “Linux on HTC Shift”

Gravatar de MiKi

MiKi
April 15th, 2008 @ 0:21    

Wow, Pau torna a escriure al blog, i en ingles… amazing xD

Gravatar de Oriol

Oriol
April 15th, 2008 @ 13:49    

Great news, Pof writes again! congratulations and it’s interesting to know this news about HTC Shift. What’s the cost? and where can I buy it in Spain?

Gravatar de pof

pof
April 16th, 2008 @ 0:46    

Oriol: I bought it in antzup.com, cost is about 1000 EUR+IVA, expansys.es and El Corte Inglés also have it, but a bit more expensive. You can probably get it cheaper if you buy it from Movistar.

Gravatar de sergi

sergi
April 16th, 2008 @ 8:00    

nice toy! and good news if its working with ubuntu..

Gravatar de Harshal

Harshal
April 16th, 2008 @ 17:05    

Excellent Work POF :)

Gravatar de quetzal

quetzal
April 19th, 2008 @ 8:28    

Do want! ;)

It’s nice to see you around again…

Gravatar de DanielHerrero

DanielHerrero
April 21st, 2008 @ 18:03    

Hi Pof.
This link isnt available…any idea?
shift-networking-2.6.24-16-generic.tar.gz
Thanks
Dani

Gravatar de pof

pof
April 21st, 2008 @ 18:18    

oops, sorry try again, should be working now :)

Gravatar de Mobiplayer

Mobiplayer
May 1st, 2008 @ 12:41    

Moltes gràcies!

Ara puc fer servir Ubuntu a la Shift :-D

Deixa el teu comentari...