SDB:Howto install OpenSuSE on HP tx2-xxxx laptops
From openSUSE
The HP tx2-12nnxx is a small notebook with a multitouch screen, a stylus, and a remote control. This page explains how to get it works under Linux, with perfect touch control under X-desktop like KDE and stylus pressure sensitivity under graphical softwares like Gimp.
Contents |
OpenSuSE 11.2
All the issues reported below for 11.1 should have been fixed. A more detailed HowTo for 11.2 will come after official release. It should work "out-of-the-box" or nearly ! ;-)
OpenSuSE 11.1
There is some issues with proprietary drivers for three components : N-trig touchscreen, ATI driver, and Broadcom wireles driver.
Touchscreen
N-trig driver
The touchscreen need an up-to-date version of a kernel module: "hid-ntrig.c". No pre-compiled kernel can fit (See this bug). So you must compile it as a kernel module.
- install a very recent kernel (2.6.31). You can do that by adding the HEAD repository to your YaST sources (Kernel://HEAD/openSUSE_11.1). Some kernels have modules directly builtin the kernel. In this case, there's no way to simply update a driver without re-compiling the whole kernel. See Configure, Build and Install a Custom Linux Kernel if you need to do so, for example with the new kernel-desktop (see this bug).
- replace the existing /usr/src/<kernel-flavor>/drivers/hid/hid-ntrig.c by the latest one from git repository : [1]. Its source code is also here, and latests patches are listed here. Check for updates.
- recompile the driver (or the kernel if you have chosen to do so).
linuxwacom and sax2
Since 2009/11/04, precompiled packages are available for the latest patched linuxwacom (0.8.5-1) in X11:XOrg and sax2 hardware profile in X11:Utilities. Just add these two repositories to your YaST sources and install the latests x11-input-wacom and sax2-ident packages. Then, run sax2, choose the HP tx2-nnxx model, activate pen and touch, test, and save; That's done.
linuxwacom troubleshooting
- Xorg crashes when logout : add Option "Debuglevel" "10" in your stylus and touch devices in your /etc/X11/xorg.conf (or in the .fdi file if configured by .fdi files), and carefully check the X server logs. If you find something with xf86WcmUninit just before the X server crash, take a look at http://sourceforge.net/tracker/?func=detail&aid=2889028&group_id=69596&atid=525124
- in any other case, follow the how-to.
ATI proprietary driver
This proprietary driver enable OpenGL and Compiz desktop enhancements. Version 9.10 now works with kernel 2.6.30 et 2.6.31.
- download it from ATI.
- check the requirements and install the required packages (See instructions on ATI website).
- run the ati installer.
Run sax2 -r -m 0=fglrx to configure your X server with the fglrx proprietary ATI driver.
Screen rotation
There is a python script to detect a change of screen position and rotate screen, stylus, and touch accordingly : Magick Rotation. See [2] (version 0.3.2 - 10/2009) and/or check for a newer version or a better solution (it consume about 2% of processor power just to do that).
Broadcom wireless driver
HP tx2-1250 have a bcm4322 wireless chip, which is NOT managed by the linux free b43 driver. There's a proprietary linux driver, available at http://www.broadcom.com/support/802.11/linux_sta.php. Download and install it as said by Broadcom.
Wireless troubleshooting
- Unable to set txpower : there's an issue with "iwconfig eth1 set txpower" : the driver fails to set other power values than 0 and "maximum". Broadcom said by mail that "they are working on it", and also that could not damage the hardware or expose users to excessive electromagnetic waves, as the proprietary part of the driver and the device itself limits users requests to the maximum allowed by the constructor.
- Unable to connect to my wifi router : try another channel on your wireless router.
Remote control
The remote is an infrared device (Irda) that works "out-of-the-box" under OpenSuSE. Remote keys could be remapped to the actions you want (See keyboard shortcuts under KDE, or keytouch).
Sound
In YaST, declare model=auto. You can also use model=test to activate all features of the snd-hda-intel driver : that works, but is not really useful. Allowed values are listed in your /usr/src/<kernel>/Documentation/sound/alsa/HD-Audio-Models.txt file, and here for the latest kernel.
Sound troubleshooting
- Refer to SDB:AudioTroubleshooting.
Related bugs
-
N-trig driver is obsolete: fixed in 11.2 (newer kernels includes the up-to-date n-trig driver) -
sax2 lacks a configuration profile for HP tx2-nnnnxx: fixed (see the bug report) - HEAD/kernel-desktop : builtin modules forbids modules updates
Related features
Here are listed some required and desirable features referenced in the OpenSuSE features and features requests database. You should complete and update this list to contribute to enhance users experiences with OpenSuSE on their TabletPC.
- Add an up-to-date patched linuxwacom to OpenSUSE distribution packages
- Login by fingerprint
- Speech recognition
Advanced topics
compiling the linuxwacom driver
The latest version with available patches for n-trig support is 0.8.5-1. Take it from linuxwacom files. Take the n-trig patches from linuxwacom patches tracker and apply the patches (3 files to patch since linuxwacom 0.8.5-1).
Then, compile it with ./configure --prefix=/usr -- with-linux. Carefully check the result of the configure, and add required sources (by YaST) if someones missed. Do NOT pass through errors at this step. When everything is perfect, you can run make and make install. The wacom kernel module is not required for n-trig : the hid-ntrig kernel module do the job. Compile it only if you need to support an extra wacom tablet.
sample xorg.conf
Here is a sample of the touchscreen-related parts that works for my HP tx2-1250ef :
...
Section "ServerLayout"
Identifier "Layout[all]"
InputDevice "Keyboard[0]" "CoreKeyboard"
InputDevice "Mouse[1]" "CorePointer"
InputDevice "Mouse[3]" "SendCoreEvents"
InputDevice "stylus" "SendCoreEvents"
InputDevice "touch" "SendCoreEvents"
Screen "Screen[0]"
EndSection
...
Section "InputDevice"
Identifier "stylus"
Driver "wacom"
Option "AlwaysCore" "on"
Option "Device" "/dev/input/by-path/pci-0000:00:14.5-usb-0:2:1.0-event-mouse"
Option "DeviceName" "stylus"
Option "ForceDevice" "ISDV4"
Option "InputFashion" "Pen"
Option "Mode" "Absolute"
Option "Name" "ISDV4 TABLET PC Stylus (USB)"
Option "Protocol" "Auto"
Option "Button2" "3"
Option "TPCButton" "on"
Option "Type" "stylus"
Option "USB" "on"
Option "Vendor" "TABLET PCs"
EndSection
Section "InputDevice"
Identifier "touch"
Driver "wacom"
Option "AlwaysCore" "on"
Option "Device" "/dev/input/by-path/pci-0000:00:14.5-usb-0:2:1.0-event-mouse"
Option "DeviceName" "touch"
Option "ForceDevice" "ISDV4"
Option "InputFashion" "Touch"
Option "Mode" "Absolute"
Option "Name" "ISDV4 TABLET PC Touch (USB)"
Option "Protocol" "Auto"
Option "Suppress" "0"
Option "Type" "touch"
Option "Touch" "on" # required to get touch move the pointer
Option "USB" "on"
Option "TopX" "0"
Option "TopY" "0"
Option "BottomX" "9600"
Option "BottomY" "7200"
Option "Buttons" "1"
Option "Vendor" "TABLET PCs"
EndSection
...
Multitouch
Although multitouch events are sent by the hardware, most of software doesn't take advantages of that feature : the n-trig driver still does not send any multitouch events to the linuxwacom driver, and the linuxwacom driver multitouch support is very fresh, only in the dev branch.
Hacking the touchscreen
Since we can't get no real satisfaction with current level of support for ntrig devices, let's learn more about how does it work ... or work not ;-)
The touchscreen is registered as an USB subsystem. Command lsusb -v -d 1b96: reports :
Bus 007 Device 003: ID 1b96:0001
Device Descriptor:
bLength 18
bDescriptorType 1
bcdUSB 1.10
bDeviceClass 0 (Defined at Interface level)
bDeviceSubClass 0
bDeviceProtocol 0
bMaxPacketSize0 64
idVendor 0x1b96
idProduct 0x0001
bcdDevice 0.00
iManufacturer 0
iProduct 0
iSerial 0
bNumConfigurations 1
Configuration Descriptor:
bLength 9
bDescriptorType 2
wTotalLength 95
bNumInterfaces 3
bConfigurationValue 1
iConfiguration 0
bmAttributes 0xe0
Self Powered
Remote Wakeup
MaxPower 500mA
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 0
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 2 Mouse
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 161
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x81 EP 1 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 1
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 3 Human Interface Device
bInterfaceSubClass 1 Boot Interface Subclass
bInterfaceProtocol 2 Mouse
iInterface 0
HID Device Descriptor:
bLength 9
bDescriptorType 33
bcdHID 1.10
bCountryCode 0 Not supported
bNumDescriptors 1
bDescriptorType 34 Report
wDescriptorLength 161
Report Descriptors:
** UNAVAILABLE **
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x82 EP 2 IN
bmAttributes 3
Transfer Type Interrupt
Synch Type None
Usage Type Data
wMaxPacketSize 0x0010 1x 16 bytes
bInterval 1
Interface Descriptor:
bLength 9
bDescriptorType 4
bInterfaceNumber 2
bAlternateSetting 0
bNumEndpoints 1
bInterfaceClass 0 (Defined at Interface level)
bInterfaceSubClass 0
bInterfaceProtocol 0
iInterface 0
Endpoint Descriptor:
bLength 7
bDescriptorType 5
bEndpointAddress 0x83 EP 3 IN
bmAttributes 2
Transfer Type Bulk
Synch Type None
Usage Type Data
wMaxPacketSize 0x0040 1x 64 bytes
bInterval 0
** UNRECOGNIZED: 14 ff 42 49 53 54 00 01 01 01 10 00 00 00 00 00 01 03 02 02
Device Status: 0x0000
(Bus Powered)
See this page about USB descriptors. The ntrig-device has 3 interface descriptors.
When the hid-ntrig.ko kernel module is loaded, raw data are mapped on /dev/hidraw0 and HID data on /dev/hiddev0. Here is a short script to make this readable :
#!/usr/bin/env python
# Read inputs from an HID device
import struct
# Select the device
f = open('/dev/hiddev0', 'r')
# length to read at once for touch
length = 56
# length to read at once for stylus
# length = 64
lastBytes = range(length)
try:
while True:
input = f.read(length)
bytes = ''
for i in range (0, length-2, 2):
byte = struct.unpack('<H', input[i:i+2])[0]
# Change the color of the changed values
if (lastBytes[i] == byte):
bytes = bytes + str(byte)
else:
bytes = bytes + '\033[92m' + str(byte) + '\033[0m'
bytes += '-'
lastBytes[i] = byte
print bytes.rstrip('-')
except:
f.close()
A similar script on /dev/hidraw0 shows that the raw data is 11 bytes length :
0:1 "?" (always 0) 1:2 "tool" 1:'stylus', 2:'touch' 2:3 "state" 0:'offscreen', 1:'stylus-over', 3:'stylus_onscreen if tool=stylus and multitouch if tool=touch', 7:'stylus_button if tool=stylus and touch if tool=touch' 3:5 "x" 5:7 "y" 7:9 "pw" (width when tool is touch and pressure when tool is stylus) 9:11 "h" (height)
Width and height are set only in touch+multitouch mode, and pressure only in stylus+stylus_onscreen mode.

