I have a Fujitsu Lifebook P1120 laptop running Linux. There are many other pages with details of installing and using Linux on the lifebook P machines. I found each had slightly different details and that each one offered me a clue toward success. Therefore I'm adding my notes for others to learn from.
After much research and several mis-steps, I was able to determine that the standard USB HID driver event interface provides a fully functional interface to the touchscreen hardware.
To enable this interface, you must build your kernel with the following options:
CONFIG_USB=m CONFIG_USB_DEVICEFS=y CONFIG_USB_HID=m CONFIG_USB_HIDINPUT=y CONFIG_USB_HIDDEV=y CONFIG_INPUT=y CONFIG_INPUT_EVDEV=m CONFIG_USB_HIDINPUT=y
Basically I turned on everything to do with USB, HID and Event Input. Then you have to be sure to load the following modules:
evdev hid usb-ohci usbcore
evdev
is the critical one that may not be loaded by default.
I was unable to find an existing driver for this interface, but the examples in the Linux USB Documentation provided enough detail for me to write my own.
The usbtouch driver source code is available below. The tarball includes a binary driver compiled on an x86 system with XFree86 4.3.0. It may work for you as-is.
| usbtouch-1.0.0.tar.gz | first release |
| usbtouch-1.0.1.tar.gz | raised all debug output above XFree86's default verbosity of 3. |
| FTS-js.patch | patch to use the joystick intstead of ev device, needed by 2.6 kernel. Donated by robert jacobs. |
To use the binary, copy usbtouch_drv.o to /usr/X11R6/lib/modules/input and add the following to you XF86Config-4 file:
Section "ServerLayout"
Identifier "XFree86 Configured"
Screen 0 "Screen0" 0 0
InputDevice "Mouse0" "CorePointer"
InputDevice "touchscreen" "CorePointer"
InputDevice "Keyboard0" "CoreKeyboard"
EndSection
...
Section "InputDevice"
Identifier "touchscreen"
Driver "usbtouch"
Option "Device" "/dev/input/event0"
Option "DeviceName" "touchscreen"
Option "ReportingMode" "scaled"
Option "SendCoreEvents"
Option "MinX" "900"
Option "MinY" "1090"
Option "MaxX" "16090"
Option "MaxY" "16000"
EndSection
More options are documented in the complete sample XF86Config-4 file.
The calibration numbers are from my P1120, so they may not be exactly right for yours. If you need to recalibrate, there is no nice utlity yet. For now, you have to set the driver to return raw numbers by editing the XF86Config-4 file and setting ReportingMode to Raw:
Option "ReportingMode" "raw"
Then run run the X server in debug mode with the command:
X -verbose 9
You'll see the raw X and Y coordinates in the debug output. By touching at or near the edges of the screen you'll see the values to assign to MinX, MinY, MaxX and MaxY. Update the config file, restart the X server and see how well it tracks. Repeat ad nauseum until it's accurate.
If you want to build the touchscreen driver, simply unpack
and build the XFree86 4.3.0 tree, then unpack the
usbtouch.tar.gz into
xc/programs/Xserver/hw/xfree86/input. Then edit
the Imakefile in that directory and add
usbtouch to the SUBDIRS line. Now run
the following commands:
make Makefile make Makefiles make
you should end up with usbtouch_drv.o and you
can follow the instructions above.
One user reported a problem where he was getting only 0 coordinates from the touch screen. Here is his solution:
Module Size Used by keybdev 1952 0 (unused) mousedev 4244 0 (unused) hid 21156 0 (unused) usb-ohci 18888 0 (unused) usbcore 58400 1 [hid usb-ohci] evdev 4448 1 input 3200 0 [keybdev mousedev hid evdev]Just making sure that the usbmouse module doesn't get loaded and the various HID modules do should be sufficent I would imagine.. I'm not entirely sure that the mousedev (/dev/input/mice) and keybdev (/dev/input/keyboard?) modules are used but they don't appear to hurt anything either :) I just stuck the following in /etc/modules.conf to disable the usbmouse module from loading:
alias usbmouse off
I haven't spent a lot of time verifying these observations, so consider them merely another data point, not a definative answer.
The main thing I have discovered is that the P1120 does not have AGP. This, or the Radeon Mobility M6 LY, or the combination of the two seem to give the P1120 relatively low OpenGL performance.
Whenever I start an OpenGL application I get the message "disabling TCL support". This means the hardware and/or driver does not support accelerated Transform, Clipping and Lighting.
Based on the following lines from my Xfree86.0.log file, I believe that I have XFree86 DRI/DRM set up properly:
(II) RADEON(0): [drm] installed DRM signal handler (II) RADEON(0): [DRI] installation complete (II) RADEON(0): [drm] Added 32 65536 byte vertex/indirect buffers (II) RADEON(0): [drm] Mapped 32 vertex/indirect buffers (II) RADEON(0): [drm] dma control initialized, using IRQ 5 (II) RADEON(0): [drm] Initialized kernel agp heap manager, 0 (II) RADEON(0): Direct rendering enabled
With my current setup, if I run an OpenGL application as a normal user I also get:
libGL error: failed to open DRM: Operation not permitted libGL error: reverting to (slow) indirect rendering
I assume this is a permissions problem, but for the moment it gives me an easy way to test 2 different configurations.
The table below shows my results from glx gears when run as root and a normal user. I also tried depth 24 and 16.
| Color Depth | DRM (direct rendering) | frames/second |
|---|---|---|
| 24 | no | 55 |
| 24 | yes | 82 |
| 16 | no | 125 |
| 16 | yes | 119 |
One other piece of anecdotal evidence is that the game Chromium *feels* faster with DRM than without. I assum this is because of Chromium's heavy use of textures compared to glxgears. Unfortunately, even with DRM, Chromium is unplayable on this hardware.
I spent some time getting the frame buffer console to work on the P1120. There's really nothing special about it, except for the fact that it runs in 800x600 mode while the screen is really 1024x768. This leads to all images displayed being streached, unless you compensate by squishing them when you create them.
Here are 2 kernel lines from my grub.conf file. Both work, The second is supposed to enable improved performance, but I did not notice any difference:
kernel (hd0,0)/boot/kernel-2.4.22-gentoo-r2 root=/dev/hda4 vga=0x314 kernel (hd0,0)/boot/kernel-2.4.20-gentoo-r9 root=/dev/hda4 video=vesa:ywrap,mtrr vga=0x314 splash=silentHere's a link to some Star Trek LCARS boot images that I have adjusted look correct on the 800x600 display: LCARS Screens.