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 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:
- TouchScreen
- Wifi
- 3G Connectivity
- suspend/resume
- Hardware buttons support
- rotate screen utility
- Embedded Controller Toolkit (lets you enable/disable wifi and bluetooth)
You can download it from here:
htcshift-easy-setup-v1.2.tar.bz2
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.
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.
To compile it, download the linux-ubuntu-modules package 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 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:
$ 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
You can also follow the Synce With Ubuntu instructions on SynCE website.
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
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
Screenshots
To finish, a couple of screenshots, click on them to maximize.
|
|
|
|
|
| Technorati tags: htc, shift, htc shift, ubuntu, mobile, linux, umpc
61 comentaris per a “Linux on HTC Shift”
Wow, Pau torna a escriure al blog, i en ingles… amazing xD
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?
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.
Harshal
April 16th, 2008 @ 17:05
Excellent Work POF
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
Mobiplayer
May 1st, 2008 @ 12:41
Moltes gràcies!
Ara puc fer servir Ubuntu a la Shift
gonzobeat
May 24th, 2008 @ 17:05
Hi Pof, have you installed just Ubuntu or Xubuntu? Anyway do you think that the procedure works with Xubuntu? It could be better as the Shift’s processor is a little weak
Thanks
Goonzobeat
I have installed ubuntu because I prefere gnome desktop, however the same is still valid for xubuntu or any other linux distribution
lr
June 7th, 2008 @ 20:00
I have 2 problems:
- when use your module then no ethernet works (with usb ethernet adapter)
- i tried to compile the module sd8xxx but in the ubuntu module package there no sd8xxx module included!?
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:
http://archive.ubuntu.com/ubuntu/pool/main/l/linux-ubuntu-modules-2.6.24/
gonzobeat
June 8th, 2008 @ 18:03
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
Snorry
June 8th, 2008 @ 19:16
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.
Sincerly,
Snorry
@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
Ok, the synce usb-rndis modules (usbnet.ko) which replace the kernel’s usbnet.ko module break compatibility with ‘asix.ko’ module used to support the USB ethernet controller.
I have filled a bug report in synce bug tracker:
http://sourceforge.net/tracker/index.php?func=detail&aid=1988841&group_id=30550&atid=399601
Will update the instructions with a dirty workaround soon.
Snorry
June 9th, 2008 @ 17:35
@pof Thanx for the quick reply.
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 .
Snorry: you do not need to reinstall. Read the “easy way” on the post again, I have updated it with a new script that will do the job for you
Snorry
June 9th, 2008 @ 21:38
@pof read that one too late. but used the easy way after the reinstall
By the way does this also work with an upgraded kernel? Or do we need an update (had a quick look at your srcipt)
GREAT WORK !!!
Glad it worked
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
actually some info on how to install the netbook remix apps for the shift would be great…on mine its off center and the app icons ore overflowing from their box…
@kornel: I’ve published the netbook remix instructions here, feel free to comment on that post if you’re having any trouble after that.
Regarding the touchscreen driver improvement, that’s on my TO-DO list, but it requires quite a lot of work and I don’t have the time right now.
published easy-setup tarball v1.2, updated with new modules for ubuntu kernel 2.6.24-19.
remember: you need to re-download and run it again if you upgrade your kernel.
Annath
June 18th, 2008 @ 15:25
Pof, you are doing so great job. Thanks. I am gonna install ubuntu soon as I am really sick of Vista … Is there anything I could help with?
@Annath: great, hope you enjoy ubuntu on your shift
BTW, I’ve noticed that the ‘axis’ bug with wince rndis modules has been fixed in ubuntu kernel 2.6.24-19.
You can use the kernel modules and get 3G connectivity and USB ethernet together, the rndis interface in kernel drivers is named ‘ethX’ instead of ‘rndisX’.
phoenix
June 22nd, 2008 @ 15:27
Latest Kernel updates broke Wifi for me. cant connect anymore. using 64 bit WEP.
Using the latest script too….
Alex
June 22nd, 2008 @ 16:25
Hello Pof,
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.
Sorry guys, I’m on travel with very few free time. Will check that in 3 days when I come back and update the script.
phoenix
June 23rd, 2008 @ 13:33
Thanks pof. The script is awesome and saves a lot of time and aggrivation!
Kamal
June 27th, 2008 @ 7:04
Hi,
I have followed exactly the same step as given above,but my external mouse stopped workng after I run your one in package for touchscreen,wifi etc.Please let me know what’s missing here
Thks
Kamal
massimo
June 27th, 2008 @ 22:07
I have installed it with ./install.sh synce but also the usb mouse and the ethernet port don’t work, how can i solve this?
Thanks,
massimo
Kamal
June 28th, 2008 @ 9:04
Hi,
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.
But many thanks to pof fo his wonderfull effot
Annath
July 2nd, 2008 @ 19:53
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 ?
Hi guys been busy those days, I’ll fix the issues ASAP, hopefully during this weekend. BTW, the wifi should work with WEP too, I’m using it on WPA network without problems.
avdzm
July 6th, 2008 @ 23:19
Hey all,
I got the touchscreen working, thanks for the easy setup.
I can turn on/off the bluetooth n wireless.
ubuntu can see the wireless device, but i can’t connect to a secure network.
However SnapVUE doesn’t work anymore n The screen rotation doesn’t work perfectly.
I haven’t tried the finger reader yet.
is there a new version in progress?
Nick
July 7th, 2008 @ 8:04
Hi All
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?
Cheers, N
avdzm
July 7th, 2008 @ 9:41
Hey Nick,
I tried reseting SnapVUE from vista and I still can’t access it.
Before I used easy-setup i could access it.
I can’t anymore.
avdzm
July 7th, 2008 @ 10:00
Hey all,
I just tried ‘sudo ./install.sh synce‘ and my wireless is working now.
I can connect to a secure network.
try it nick. let me know
Nick
July 7th, 2008 @ 23:27
Hi avdzm
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.
avdzm
July 8th, 2008 @ 8:06
hey guys,
I got snap working again, I reconfigured xorg and run easy-htc-setup and i came back.
About the wireless issue, synce installation didn’t really fix the wireless problem.
When I restart htc-shift i have trouble accessing a secure wireless network.
But when i turn the wireless off/on (repeatedly)and turning it on without disabling it (just clicking on “enable wireless”) again repeatedly, it some how connects to the secure wireless.
I know this is very strange n it doesn’t make sense, but it works for me.
have a go and let me know.
tc
Nick
July 16th, 2008 @ 21:01
hi tc
i finally had a chance to have a go at this method. No luck for me I’m afraid. I tried turning it on and off repeatedly and it just simply failed to work.
hopefully this can be sorted out as without wifi its not much use to me!
n
avdzm
July 17th, 2008 @ 9:01
Hey all,
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.
avdzm
July 18th, 2008 @ 14:32
Sorry I mean “un-detected”
avdzm
July 18th, 2008 @ 14:34
Does any1 have the 3g modem working under ubuntu?
I have the 3g connectivity working for the snapvue, but I don’t know how 2 do it for ubuntu.
Any help will be greatly appreciated.
thanks
Jorge
July 23rd, 2008 @ 19:22
Anybody has a problem with the rotate aplication? My screen is divided when I rotate and the touchscreen dont work…
I am the only?
ks
July 23rd, 2008 @ 19:45
Yes its same here while rotating screen,but external mouse has stopped working after enabling touch screen functionality.Has any body able to managed both working in ubuntu.
Thanks in Advance
KS
July 25th, 2008 @ 11:16
Hullo Pof,
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.
Thanks in Advance
KS
avdzm
August 4th, 2008 @ 8:26
Hey guys to rotate your screen successfully you have to disable the visual effects.
Go to Appearance -> Visual Effects and select none.
It’s working for me.
avdzm
August 17th, 2008 @ 12:25
Hey all,
Howz any1 tried downloading something big well around 175mb?
when i download a video over smb onto my shift, it freezes.
When I only browse it’s fine.
So i don’t know if it’s the driver for the wireless or there’s something wrong with samba.
how does your shift behave with the wireless?
avdzm
August 22nd, 2008 @ 23:04
Where is this USBTOOl.exe???
Anonymous
August 25th, 2008 @ 2:41
“Hey guys to rotate your screen successfully you have to disable the visual effects.”
it works for me too, thanks for sharing!
Anonymous
August 25th, 2008 @ 9:26
I reinstall the whole thing and turned visual effects off, Easy setup - synce.
But I will not updating anything until pof’s further instruction!
The shift works fine!
Hexagram
September 4th, 2008 @ 18:21
hi,
first of all, it’s a really nice job you’ve done pof. it’s really amazing.
anybody has experienced difficulties with the double click with the pen on touchscreen?
i don’t know how to use it…
Rich
September 22nd, 2008 @ 21:05
Thanks~
But after installed .sh in easyway I cann’t use USB mouse~~
how can I fix it?? please help
Rich
September 22nd, 2008 @ 21:11
Rotate Screen not full screen
and the mousepad does not Rotate too
Mike
October 4th, 2008 @ 11:18
Any idea for mouse and WEP?
Thank you POF!
Jan
October 8th, 2008 @ 17:44
ONE THING TO MENTION !!!!
3G not working ??
can’t find usb-tool.exe
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”



MiKi
April 15th, 2008 @ 0:21