yashsingh1/xdaforums huggingface dataset:
[Shift General] lovespuds:
Hi How are yo finding Ubuntu on the shift so far in terms of:

-Battery life compared to similar tasks in vista with the shift?

-Boot up time vs vista?

-Speed of response versus vista?

I'm not really bothered about use of linux on this device unless it has some real advantages or some must have application that xp of vista don't. I certainly see the advantage of windows mobile as there are some real advantages in battery power extra functionality for example with ubook reader for windows mobile the shift could be an excellent ebook readr.

I can't wait until I can put some money aside for one.
[Shift General] pof:
hi cr2 :) find attached dmesg, lspci & lsusb output. There are inside photos from the FCC, but it is much like a normal PC connected to a MSM7200 trough internal usb port, sharing screen and keyboard in a single box :)

- battery life in linux is similar to vista, probably a bit less.

-boot up is faster in linux compared to windows boot up, but slower if you just suspend vista. You can't suspend the shift under linux yet.

-linux as always is more responsive than vista, you can even enable all the eye-candy stuff (3d effects and such) and it is still faster than vista in that way.
[Shift General] cr2:
Ok :) There is something wrong with the SDHCI driver, but i think it's easy to fix.

Dumping the amibios should be easy too.
[Shift General] Pawel062:
the shift project is also working on proper drivers to fix the problems within linux using our friends who have then already. the proper work will begin soon when cmonex and ltxda get their devices.
[Shift General] cmonex:
i wasn't aware getting linux to work better was a plan for shift project.
[Shift General] Pawel062:
ltxda wants to work on it when he gets his in. remember hes working on the os side meaning xp etc..
[Shift General] pof:
Linux on HTC Shift

I have published some instructions to get Linux working on the Shift here:

http://pof.eslack.org/blog/2008/04/14/linux-on-htc-shift/

Enjoy :)
[Shift General] cr2:
hi pof, i've learned from your blog that there is a library to support the fingerprint scanner.

BTW, can you run 'strings' on the touchscreen driver ?
[Shift General] pof:
I attach the touchscreen driver here, it seems to be a wacom device, however linux doesn't recognize it. I've tried to cat all the /dev/input/event* and /dev/ttyS* with no luck.
[Shift General] pof:
Finally suspend working like a charm ;)

http://pof.eslack.org/blog/2008/04/21/suspend-resume-in-htc-shift/
[Shift General] cr2:
pof,

i think you'd dump amibios, decompile the DSDT, and look for the plug and pray config.

If the wacom driver is on a serial port, then it should be configured/activated there.
[Shift General] tece:
Opening the File in Plaintext Editor Shows some Debug-Information and API-References. Seems to do it "real serial" .. ?
[Shift General] pof:
Yesterday night we where looking at it with cr2, we're not sure yet if is serial or connected via the i2c bus. The Vista driver does not give much clues, and linux can't see the device directly.

As you can use the touchscreen in windows mobile (msm7200) at the same time than in the intel side, i think the i2c bus has more possibilities.

I mailed HTC during the weekend asking for a datasheet or some extra information, but haven't received an answer yet.
[Shift General] pof:
touchscreen progress

Great news regarding the touchscreen :D

I am now able to read the X axis raw value from the touchscreen and detect if it is pressed or not, still need to figure out how to read the Y.

I have done a small kernel module which maps the touchscreen to a HID device (/dev/input/event8) and provides the data to X wacom driver.

We'll see the touchscreen working on linux soon! :)
[Shift General] tece:
great news pof!

i wonder how you're doing these "magic-tricks". writing a kernel module may not be the hardest competition, but finding an interface where all the data gets through and writing some wrapper just lets me say "WOW - how did you do this?"

please go on with the good work!
[Shift General] danielherrero:
Nice¡¡¡¡ :)
[Shift General] pof:
basically by gathering all the information I can and sometimes also try-and-error :)

Here's in big steps how i proceed:

1. Disassemble vista drivers: no look, too difficult to find any juice. At least found it's a wacom device.

2. Try to load all the kernel i2c modules, and test if i could get any response... no luck.

3. Dump the DSDT and decompile it using IASL (see here). The info is there, by a bit of guess i thought it was a serial device connected through ISA interface on a PCI bus:

Name (_HID, EisaId ("PNP0CC0"))
...
Name (_PRS, ResourceTemplate ()
{
StartDependentFn (0x00, 0x00)
{
IO (Decode16,
0x0068, // Range Minimum
0x0068, // Range Maximum
0x01, // Alignment
0x01, // Length
)
IO (Decode16,
0x006C, // Range Minimum
0x006C, // Range Maximum
0x01, // Alignment
0x01, // Length
)
IO (Decode16,
0x0250, // Range Minimum
0x0250, // Range Maximum
0x01, // Alignment
0x02, // Length
)
IRQNoFlags ()
{3}
...

From here we know ports: 0x68, 0x6c, 0x250 and IRQ:3

4. Confirmed my guesses with lspnp (see here):

00:0b PNP0cc0 (unknown)
state = active
io 0x68-0x68
io 0x6c-0x6c
io 0x250-0x251
irq 3

5. Try to use 'setserial' to map the touchscreen to a serial device, unfortunately this is not possible :(

6. So the only choice was to write the module myself, use outb() and inb_p() to do low-level port input and output, and provide the raw touchscreen data to a HID device.

7. ... biggest problem is initialization of the device... sometimes works, sometimes not... but HTC has been contacted and doesn't answer. Wacom answered but says they don't have this info, it's HTC who should provide it.

And basically that's it... if you want to beta-test the module, or help with the development let me know :)

Cheers,

pof
[Shift General] pof:
htcpen: HTC Shift Touchscreen Driver for Linux

I have released a linux kernel module to make the touchscreen work:

http://pof.eslack.org/blog/2008/05/11/htcpen-htc-shift-touchscreen-driver-for-linux/

Feel free to test it, and send me patches or ideas to improve it :)
[Shift General] Pantaloonie:
Nice work Pof.

Time to make my dual boot Shift (XP & Vista) into a triple boot. Which makes the hard drive upgrade even more urgent.
[Shift General] ssaqu:
linux from a memory card?

Is it possible to install a linux distro on a memory card in a way you do it on a pendrive? I guess you cannot unless BIOS sees it (but unfortunatelly it doesn't see mine) so it seems I have to buy a pendrive...wubi installer isn't able to do that and I think it would be better to put GNU/Linux on a separate disk for a couple of reasons...
[Shift General] efrost:
Hello!

So, finally I got it working on my Shift. :) (I am not a xNIX specialist)

Not really understand yet how useful it is at the moment, but we'll see...

No suggestions about improvements yet... just studying sources at the moment.

Just one thing: just after successful install (I had a few attemts :) ) I noticed that mouse pointer are running faster than I move the stylus. Right near the corner of screen the mouse pointer was following stylus very precisely, but then it was moving faster and faster and finally mouse pointer touched opposite corner of the screen 30-40 mm. before the stylus.

Problem was in my acceleration settings for mouse and after a few more attempts I've found acceleration setting value where mouse pointer follows my stylus everywhere on the screen.

What I would suggest right now is to get somehow mouse acceleration parameter and set it to 0.

Thank you for your work!
[Shift General] pof:
The coordinates on the htcpen HID driver are updated by the reception of an interrupt (IRQ3). The IRQ is not triggered as fast as it should because the hardware is not properly initialized, but HTC refuses to give any specifications on how to initialize the touchscreen or how the EC controller works. I also tried to do it by polling with a timer instead of using IRQ, but it reads the same value several times and also updates the position slowly (no speed improvements over using IRQs). I hope to solve this problem in the future, when we know more about hardware initialization.

BTW, I have released version 0.3 this afternoon, I don't know which one you are using, but htcpen-0.3 combined with the egalaxy Xorg driver works very well :D It has a calibration utility where you calibrate using 25 points and also can manually adjust the borders of the screen. If you are running an older version I really encourage you to try htcpen-0.3+egalaxy touchkit.

I have uploaded a video on youtube which shows how version 0.3 works, see it here:

http://www.youtube.com/watch?v=qDHK9xjCZbg

Thanks for using it :)
[Shift General] pof:
htcpen touchscreen driver updated to v0.4, now it initializes the hardware properly, so you don't need to boot vista anymore to initialize the touchscreen :D

http://pof.eslack.org/blog/2008/05/11/htcpen-htc-shift-touchscreen-driver-for-linux/

Enjoy ;)
[Shift General] pof:
Published version 0.5 of the touchscreen driver in my blog, also submitted it to review for inclusion in the linux kernel.
[Shift General] pof:
ToDO

Here's my list of things to do, for better Linux support on HTC Shift:

Better support for HTC EC (Embedded Controller)

Related Vista driver files: ecdrv.sys, oem1.inf

The EC allows to send certificates to CE side, put CE in bootloader mode, reboot CE, enable and disable wifi and bluetooth, get GPS NMEA data from CE side, handles the touchscreen, and probably more.

Make the two side buttons functional (comm manager and screen resolution switch). Would be nice to assign them to user defined launchers, for example rotate the screen with 'xrandr' and launch on-screen-keyboard application.

Add support for HTC Shift in HTCFlasher, to be able to flash CE ROMs using linux.

Improve the speed of position updates on the htcpen touchscreen driver. If possible add some device probe/detection code, register it as an ISA driver and create udev rules for auto-loading the module.

If anyone wants to join the linux development feel free to contact me :)
[Shift General] cr2:
If it all goes over USB you'd be able to trace it easily.

The htc_poll() is used only in (as) the interrupt handler, why do you need it as a separate function ?

I think you'd be able to test/probe the driver using acpi/isapnp infrastructure.

I'd like to help, but hate the stupid x86 processors :)
[Shift General] febelus:
i pof!!!

first: GREATE JOB!!!!

i've some problem to configure x11.org....when i append input device section for touchscreen and restart xserver ubuntu go in low graphic mode (640x480) and reconfigure automatically the xorg.conf ....can you post your xorg.conf?

dmesg shw new htcpen at input8 but when i run Touchkit he say: "No touch controller found"!!!

thx

this is my xorg.conf:

Section "InputDevice"

Identifier	"Generic Keyboard"

Driver	"kbd"

Option	"XkbRules"	"xorg"

Option	"XkbModel"	"pc105"

Option	"XkbLayout"	"it"

Option	"XkbOptions"	"lv3:ralt_switch"

EndSection

Section "InputDevice"

Identifier	"Synaptics Touchpad"

Driver	"synaptics"

Option	"SendCoreEvents"	"true"

Option	"Device"	"/dev/psaux"

Option	"Protocol"	"auto-dev"

Option	"HorizEdgeScroll"	"0"

EndSection

Section "InputDevice"

Identifier "htcpen"

Driver "egalax"

Option "Device" "/dev/input/event8"

Option "Parameters" "/var/lib/egalax.cal"

Option "ScreenNo" "0"

Endsection

Section "ServerLayout"

InputDevice "htcpen" "CorePointer"

EndSection

Section "Device"

Identifier	"Configured Video Device"

Option	"UseFBDev"	"true"

EndSection

Section "Monitor"

Identifier	"Configured Monitor"

EndSection

Section "Screen"

Identifier	"Default Screen"

Monitor	"Configured Monitor"

Device	"Configured Video Device"

EndSection

#Section "ServerLayout"

#	Identifier	"Default Layout"

#	Screen	"Default Screen"

#	InputDevice	"Synaptics Touchpad"

#EndSection
[Shift General] danielherrero:
same here. Those lines must be added to the existing sections or we should create new sections?
[Shift General] febelus:
Now all Work!!!!

this is xorg.conf:

Section "InputDevice"

Identifier "Generic Keyboard"

Driver "kbd"

Option "XkbRules" "xorg"

Option "XkbModel" "pc105"

Option "XkbLayout" "it"

Option "XkbVariant" "nodeadkeys"

Option "XkbOptions" "lv3:ralt_switch"

EndSection

Section "InputDevice"

Identifier "Configured Mouse"

Driver "mouse"

EndSection

Section "InputDevice"

Identifier "Synaptics Touchpad"

Driver "synaptics"

Option "SendCoreEvents" "true"

Option "Device" "/dev/psaux"

Option "Protocol" "auto-dev"

Option "HorizEdgeScroll" "0"

EndSection

Section "InputDevice"

Identifier "htcpen"

Driver "egalax"

Option "Device" "/dev/input/event8"

Option "Parameters" "/var/lib/egalax.cal"

Option "ScreenNo" "0"

Endsection

Section "Device"

Identifier "Configured Video Device"

Boardname "intel"

Busid "PCI:0:2:1"

Driver "intel"

Screen 0

EndSection

Section "Monitor"

Identifier "Configured Monitor"

Vendorname "Plug 'n' Play"

Modelname "Plug 'n' Play"

modeline "1024x768@60" 25.2 640 656 752 800 480 490 492 525 -vsync -hsync

Gamma 1.0

EndSection

Section "Screen"

Identifier "Default Screen"

Device "Configured Video Device"

Monitor "Configured Monitor"

Defaultdepth 24

SubSection "Display"

Depth 24

Modes "1024x768@60"

EndSubSection

EndSection

Section "ServerLayout"

Identifier "Default Layout"

screen 0 "screen1" 0 0

Inputdevice "Synaptics Touchpad"

InputDevice "htcpen" "CorePointer"

EndSection

Section "Module"

Load "glx"

Load "GLcore"

Load "v4l"

EndSection

Section "device" #

Identifier "device1"

Boardname "Intel 945"

Busid "PCI:0:2:0"

Driver "intel"

Screen 0

Vendorname "Intel"

EndSection

Section "screen" #

Identifier "screen1"

Device "device1"

Defaultdepth 24

Monitor "monitor1"

EndSection

Section "monitor" #

Identifier "monitor1"

Gamma 1.0

EndSection

Section "ServerFlags"

EndSection
[Shift General] pof:
Unfortunately it uses the EC driver for everything, which uses 4 io ports not mapped to a serial device and this is a bit more tricky to trace, specially on vista. At the moment I used the trial version of Jungo Windriver to monitor some io operations, if you know anything better than that let me know :)

I end up doing the poll in the irq handler function, this is changed in the latest version :)

hehehe :) thanks, already registered as ISA driver too... see latest version in my blog.
[Shift General] febelus:
i pof,

can you port your greate work to winxp ?

at now driver work but can't calibrate with xp tool or touchkit tool!

thx
[Shift General] pof:
@febelus: I'll try to setup an XP and see if i can do something using jungo windriver or winDDK, although I have almost no experience writing XP drivers. However, the linux driver is open source, code is available for download on my blog, anyone with experience writing XP drivers should be able to "port" it quite quick as the reversing work on the EC controller has already been done for the touchscreen :)
[Shift General] pof:
hsect: Embedded Controller Toolkit

Now you can enable and disable wifi and bluetooth from Linux, put CE in bootloader mode, and much more, see:

hsect: HTC Shift Embedded Controller Toolkit​

First version released today, I plan to implement more features later, as reversing the EC controlled turned out to be very fun ;)
[Shift General] pof:
G-Sensor Demo

HTC Shift G-Sensor is a STMicroelectronics LIS3LV02DL accelerometer, which can be accessed through SMBus/i2c in linux. Here's some sample code:

http://pof.eslack.org/blog/2008/06/03/i2c-gsensor-lis3lv02dl-accelerometer-on-htc-shift-g-sensor/
[Shift General] giejo:
Wow !

can't wait to have my shift ... for testing your great work
[Shift General] cr2:
The same accelerometer is used by athena (i2c) and openmoko2 (spi).
[Shift General] pof:
They use the LIS302DL, while the Shift uses the LIS3LV02DL. But both chips are very similar.
[Shift General] pof:
I have updated the "Linux on HTC Shift" post on my blog with "HTC Shift Easy Setup" script, which will automatically setup the following on Ubuntu / Kubuntu / Xubuntu 8.04:

TouchScreen

Wifi

3G Connectivity

suspend/resume

rotate screen utility

Embedded Controller Toolkit (lets you enable/disable wifi and bluetooth)
[Shift General] danielherrero:
congratulations pof. You did it again. Tomorrow I will install ubuntu again (Previous instance was corrupt and unusable) and will try your installer

Thanks :)
[Shift General] Farsquidge:
The accelerometer forms part of the APS (active protection system) for the hard drive to prevent HDD damage. When you access it in Linux is this disabling the APS or just performing a parrallel read? Do you get any performance issues when using it for games with the HDD halting/starting when moving the shift around?

Cheers.
[Shift General] pof:
From what I have seen, the APS is hardware controlled: the shift shuts down completely either if you are on Linux or on windows, it doesn't really need any device driver to work.

However, on Vista you have gsensor.sys which is constantly polling the hardware values and reporting them on \\Device\GSensor. Similar to what my linux driver does, just reads the values and converts them to an input device (joystick).

No, the GSensor completely halts the shift (notifying you through a BIOS message on next boot) if it detects a "free fall". When moving it for gaming you're not applying enough force for it to detect a fall.

If you look at the datasheet, in CTRL_REG2 (21h) if you set to 1 the Interrupt ENable (IEN) field the device shuts down, so you can simulate a free fall event by setting this bit to 1.
[Shift General] pof:
Hardware buttons support

I've released the tool shiftbuttons, it allows you to map the two right side hardware buttons (over the touchpad) to any desired application. By default CommManager button launches "hsect2" (EC Toolkit) and the switch resolution button rotates the screen.
[Shift General] salmon:
Fantastic work Pof, thanks for making this available!

However, I'm really embarrassed to have to ask this (never used Linux before) but how do you "issue the following commands" in Ubuntu?

Thanks
[Shift General] pof:
First Open a terminal: ubuntu menu -> Accessories -> Terminal

There you will see a command prompt, of the form:

user@hostname:~$

You can type the commands there, and press ENTER to accept them :)
[Shift General] salmon:
thanks! can't wait to try this later on... this is definitely the most exciting Shift thread so far, by far!!!
[Shift General] Snorry:
Great Work

Thx for bringing Linux to the Shift, pof :) :) :)

I'll try this new feature tonight. :D

I'm already thinking of dumping the vista (I'm now dual booting) to have more room for Linux.
[Shift General] Snorry:
Tux Racer

For people who like to play "Tux Racer" like pof in his video with the G-sensor Joystick and can't get "Tux Racer" to launch.

Since the standard resolution used by "Tux Racer" is 800 x 600 you need to alter the 'options' file which can be found at:

~/.ppracer/

and then change "set y_resolution 600" to "set y_resolution 480"

Enjoy

Extreme Tux Racer also has an option file at ~/.etracer/
[Shift General] pof:
@Snorry: if you liked tuxracer on the g-sensor joystick, you should also try neverball (and neverputt) linux games :)
[Shift General] Snorry:
I haven't tried the g-sensor joystick yet since I was thinking of using your shiftbuttons to remap those keys to gaming keys ;)

I first wanted to get this game started, but since I got an initialising error I first went after that one to fix, so other people can enjoy your work. :)

I also saw g-sensor was incorperated in the easy pack. Do I only have to do the modprobe lines to activate it?
[Shift General] pof:
No, I didn't incorporate it on the easy pack as I don't want to replace people's xorg-server package (there's a bug in the one shipped in ubuntu, if you read the README on the gsensor-joy source).
[Shift General] Snorry:
Sorry

Sorry my mistake, you're right it ain't incorporated in the easy pack. Seems I misread on of the packages.
[Shift General] salmon:
Got it up and running last night and was very pleased to see how fast and responsive Ubuntu is on the Shift :)

One thing though, i noticed the fan seemed to stay on its highest level most/all of the time i was using it... does this mean the CPU is doing more work than it needs to? is there a reason it doesn't idle?
[Shift General] pof:
weird.... make sure you don't have any process consuming all the cpu, i'd suggest running 'top' and 'powertop' from a terminal, to identify what's causing the cpu usage.
[Shift General] mullmuzzler:
Having problem

Hi, I can't seem to install htcshift-easy-setup-v1.1.tar.bz2. I'm having problems using the terminal window. please help. Newbie here!
[Shift General] pof:
How should we help if you don't say what problems you have?
[Shift General] Snorry:
Newbie Problem

Do you mean you can't find "Terminal" or are you having troubles using the terminal console.

Starting the terminal console: use ALT Fn 2 then start gnome-terminal

You always start at your home folder. ( ~ or /home/<login> )

Remember where you have placed the file?

If you downloaded on the shift then you can use this:

Go to the download directory using: cd <directory>

You can see a directory listing by using: ls

If you downloaded it onto an USB stick or you located the file you can use the instructions provided by pof.
[Shift General] aquasesh:
The only problem I am facing now is the time and date settings in Ubuntu.

Somehow the time is never correct. I tried manual adjustment and I tried server sync.

Also, the time changes in the BIOS. I dont know how this happens, but it ranges from 1911 to 2048...randomly.
[Shift General] pof:
Similar weirdness has happened to me a few times when I have powered it down incorrectly (ie: take out the battery while the shift is running, or battery completely exhausted when the shift is resumed). It does not happen to me on a normal boot (after a clean shutdown, or proper suspend/resume).

If it serves for troubleshooting, I have the clock in the bios set to UTC and the timezone settings in Ubuntu to add the GMT+1 of my timezone to the hardware clock, and I keep the time synchronized with a NTP server when the shift is online.
[Shift General] Iminzilion:
How do I set up 3g support?

I have runned the script from pof.

Everything is working beside 3g.

Before I was installing ubuntu I have enabled 3g in vista.

Now nothing is happening.
[Shift General] cuervo:
microphone not working

As in title - which options should be checked in sounds to get it?
[Shift General] phoenixnr:
latest Kernel updates broke WIFI?

Can't connect to my access point at all. Anyone else? Does the install script need updated?
[Shift General] Snorry:
Are you using the easy-setup package ?

If so which version?

This is pof's latest relaese:

easy-setup tarball v1.2, updated with new modules for ubuntu kernel 2.6.24-19
[Shift General] phoenixnr:
yes useing latest. even reinstalled ubuntu. No connect with 64 bit WEP... UGH
[Shift General] salmon:
i've had intermittent problems connecting to wireless access points... i always find it a bit difficult to tell if the wifi is on. it's easy to see with Bluetooth as the icon appears in the tray, but with wireless it doesn't. The only way i have to check is with the flashing light underneath the screen...

My shift also seems to have lost touchscreen support too. I'm planning to re-install, but haven't gotten round to it yet.
[Shift General] idonxda:
Script problem

Hi Pof,

First of all many thanks for you wonderful effort,I think due to you guys we alway think about impossible things to become possible.I have run your script to activate touchscreen,wifi etc.But it created a problem1.

1.External mouse doesn't work any more

2.Wifi Doesn't connect if security password has to be supplied by using 64,128 any encryption option

2.At start/stop shell gives some patch issue message

Thanks