Linux on HTC Shift

I recently got an UMPCHTC 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 is working.

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 HTC Shift “The Easy Way”TM

If you are running Ubuntu/Kubuntu/Xubuntu 8.04, I have created a script which will automatically setup the following:

Run ‘sudo ./install.sh kernel‘ for keeping the default usb-rndis kernel modules: If you choose this option, the provided USB ethernet will work, however you will not be able to use 3G connectivity or to transfer files from WinCE using synce.

Run ‘sudo ./install.sh synce‘ for keeping the synce usb-rndis kernel modules: If you choose this option, you will be able to use 3G connectivity and to transfer files from WinCE using synce, however the provided USB ethernet will not work.

After installation, the two right side hardware buttons will be mapped to launch hsect2 (enable/disable wifi & bluetooth) and to rotate the screen, and you should have the following new items in Accessories menu:

TouchKit (Touch Screen Calibration Utility)

HTC Shift Embedded Controller Toolkit

Rotate Screen

You can switch from kernel to synce or viceversa at any time, just run the install.sh again.

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 script 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.

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 edit /etc/modules and add ‘sd8686′.

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:

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:

Touchscreen

What still doesn’t work

touch screen: Touchscreen working with htcpen driver 😀 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 😀

I don’t know about USB ethernet adapters, I don’t have any… maybe you need to ‘modprobe usbnet’?

For the wifi, if you are using the kernel inlcuded in ubuntu-8.04 (before performing any upgrades) then use my precomplied package, if you have upgraded your kernel then get the sd8686 sources from the linux-ubuntu-modules package (.tar.gz) available here:

Hi Pof, when I try to set wifi and 3G connettivity in the “Easy way” as you suggested, if I give the command
sudo echo sd8686 >>/etc/modules
the output is
bash: /etc/modules: Permesso negato
Have you got any suggestions?
Thanks
Gonzobeat

Hi Pof
On 7th june 2008 you wrote “I don’t know about USB ethernet adapters, I don’t have any”.
This kind of connector was included in the standard package. The USB hub aslo has an ethernet adapter included.
Since I used your package I have the same issues as lr. No more ethernet. And even with the hsect package installed I can’t seem to find the wireless adapter either.
I think I’ll reinstall ubuntu later and start over from scratch.

@gonzobeat: just edit /etc/modules as root.
@Snorry: Thanks for pointing that out, I just realized the USB hub has an ethernet adapter included, I left it on the box since the first day as I didn’t see any real usage for it Will now see if I can get it to work and update the instructions 😀

But since I messed around a lot figuring out what exactly went wrong I’ll be reinstalling Ubuntu tonight and leave the wlan and HSPDA for now. I did try the linux drivers from asix but it gave a lot of errors regarding usbnet.ko .

At the moment it includes precompiled binaries for 2.6.24-16 to 2.6.24-18 ubuntu kernels, I’ll probably be updating it when ubuntu releases new stable kernels (as I’ll have to compile the modules for my personal use too), so you can re-download and run again.

I’ve updated the easy-setup script to version 1.1, now it includes “shiftbuttons“, an new tool that allows you to remap the hardware buttons to any desired application, and version 2.1 of the Embedded Controller Toolkit.

Hi pof,
Love the pack, thanks a lot for this. First off, would be great if the pack installed the netbook remix apps also by default. Second, is it possible to improve the touch driver so its as smooth as the mouse? I appreciate what you did greatly, but just asking

I have the same problem as Phoenix. Wifi doesn’t work with the latest kernel. I don’t know if it worked before. After installing Ubuntu on the Shift I have installed the latest updates for Ubuntu. And I can’t get the 3G connection and USB ethernet working together. I must use your tool to switch. Another little thing: an external usb mouse doesn’t work anymore. Before installing your tool it worked well. Something to do with de touchscreen driver maybe?
By the way, thank you for this great tool! I appreciate it very much.

Also hassome one got success in WIFI working after installing the package.Mine doesn’t connect it all.My wifi is security enabled and many times I am providing the key butdoesn’t connect it all.may besomething to do with wifi driver.

Hi Kamal and Pof
I think the wifi driver doesnt support the security fetures. I am not absolutely sure but when I setup wifi from command line it looks like this problem. I am using Shift like router (internet gateway) for my notebook from time to time and I event didnt manage to switch wifi to Master mode (for creating AP) and I am using AdHoc mode. But I am not expert and I may be wrong.

Thanks Annath for your help,one more thing After running the htcshift-easy-setup-v1.2.tar.bz2 package my extrnal mouse stopped working as touch pen staarted working.Is this the case with you as well.Any idea how to make external mouse working ?

FIrst, thanks for the super work, the shift is so much quicker with Ubuntu. However, I am also having these wifi problems with my WEP enabled router – wont connect at all, even with the password. Would absolutely love to fix this, but can’t work out what the issue is. The issue is the same as AVDZM above. Also, AVDZM, the install should not effect snapvue at all – it runs on a completely separate processor and is totally self contained (theres a switch for the monitor and keyboard), maybe you could try resetting snapvue from vista?

Shame about snap, i actually havent looked at mine yet since the install, i will try it when i get some spare time this week. Sounds really weird though, I know that it is definitely a completely separate system inside so i cant see how an install on the x86 side could influence the other side.

Re the wireless issue, the ‘synce’ install is what i used originally. I will try it again though this week.

thanks – although i am sure Pof can help more when he gets some spare time.

Is any 1 having hardware performance or usability problems with the shift?
After a few hours of use my wireless device is an detected and shift is taking a long time 2 do processes because it’s failing to find the device.

Hope you very busy,I am deprately waiting for your next magic.Please can you let us know has the WI-Fi issue with WEP and external mouse issue been fixed.As after installing your package ,extrnal mouse stopped working in shift also Wi-Fi doesn’t connect with WEP keys.

YOU NEED TO LIBERATE your HTC shift, else you look for help like me !!

I installed Linux on seperate partition and THEN i got some infos about liberation so would be very good if you pof provide that info in you instructions to, took me a few hours to get an idea why i didn’t have such “USB-TOOL”

Thanks the instructions. I am new to Linux, how do I install “the easy way”? I have put it into my usb already. I connect it to my shift, nothing happens. Basically, I don’t know how to install the following thing as well, please help me. Many thanks in advance

Install Instructions:

Put htcshift-easy-setup-v1.2.tar.bz2 in a USB memory stick, insert it in the Shift and Ubuntu will automatically mount it as /media/disk/. Then issue the following commands:

$ sudo tar jxvfp /media/disk/htcshift-easy-setup-v1.2.tar.bz2
$ cd htcshift-easy-setup
Run ‘sudo ./install.sh kernel‘ for keeping the default usb-rndis kernel modules: If you choose this option, the provided USB ethernet will work, however you will not be able to use 3G connectivity or to transfer files from WinCE using synce.
Run ‘sudo ./install.sh synce‘ for keeping the synce usb-rndis kernel modules: If you choose this option, you will be able to use 3G connectivity and to transfer files from WinCE using synce, however the provided USB ethernet will not work.

I followed the instructions (top of page) exactly, including the recommended installation of Ubuntu, but I receive the error following the command ‘sudo ./install.sh kernel‘ and ‘sudo ./install.sh synce‘

ERROR: Your kernenel version (2.6.24-21.generic) is not supported
Visit http://pof.eslack.org/ to check for new version

I am not sure of the meaning of this message, the only other output I can think that might be useful in determining a problem is given by the kernel version ‘uname -a’

Does this work on Ubuntu 8.04.2 or not? I installed it and although it unpacks and seems to install ok, it doesn’t do anything and I get an error that it doesn’t work on my version.. Am downloading 8.04.1 in the hope it DOES work and it’s not just my lack of knowledge stopping it working

Ive managed to install 8.10 (2.6.27-11) from a previously created USB loader without any problems.
With a couple of small config changes (xorg.conf) ive got everything up and running BUT NO WIFI (marvell sd8686) !!

My first idea was to use the libertas_sdio module with fw_name=sd8686.bin .. but did not succeed…

spended 4 hours hoping it manage to work on 8.10 but……
a big disapointment it does not work on 8.10 only works on 8.04 . so… pliz can any one or sombody show a simple setup how does it work on ubuntus newest version …. Arg :s
y aver si alguien lo esplicas en castellano es que vamos .pobre los ke no entiende ingles y tienen el shift venga POF anima te
saludo

Is there an solution regarding the UsbMouse ?
I got wifi en screen rotation working, without any problems.
I found no update regarding this bug, but the script is really great !!!
Good job ! ( got Ubuntu 8.4 with kernel 2.6.24-16 because i couldn’t get it to work with 8.10 and 8.4.3

I wish this would work with Linux Mint…I had to download Ubuntu 8.0.4 and downgrade in order to take advantage of your excellent work compiling the package. Ubuntu Hardy Heron has ugly graphic interface but the package doesn’t work on Mint or Ubuntu 9.0.4…oh well we cannot have everything. I’m not a Linux Guru and sometimes I have a hard time configuring things. I tried Windows Vista, XP, and 7 and Ubuntu is by far faster and better. One of the stupid things with Vista is that we cannot watch a movie because of poor graphic card. On Ubuntu VLC works like a charm

i see you haven’t reacted lately, and a lot of people would like to see an updates package,
i would like to continue your work, any possibility you can send me your project files, so i can update / create a new package?

any people who got karmic completely working? do you have more instructions on the wifi and touchscreen?

Good afternoon, I wonder if there is any way to get it to work the wifi (sd8686) on Ubuntu 11.04 or 11.10, otherwise I’ve got, well except for the SD card reader. I wonder if there is any way to get the wifi enabled on this operating system. Thanks for your time