Bug 7049 - Panasonic CF-18 Touchpad Being Detected as Touchscreen
Panasonic CF-18 Touchpad Being Detected as Touchscreen
Status: CLOSED CODE_FIX
Product: Drivers
Classification: Unclassified
Component: Input Devices
i386 Linux
: P2 normal
Assigned To: Dmitry Torokhov
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2006-08-23 19:07 UTC by john
Modified: 2007-05-10 10:23 UTC (History)
1 user (show)

See Also:
Kernel Version: 2.6.17.6
Tree: Mainline
Regression: ---


Attachments
Probe lifebook protocol last (1.89 KB, patch)
2007-03-16 21:35 UTC, Dmitry Torokhov
Details | Diff
Activate lifebook protocol on serio3 only (1.49 KB, patch)
2007-03-19 08:59 UTC, Dmitry Torokhov
Details | Diff

Description john 2006-08-23 19:07:53 UTC
Most recent kernel where this bug did not occur: 2.6.16.16 (there may be a more
recent one)
Distribution: Stock kernel on Gentoo
Hardware Environment: Panasonic CF-18
Software Environment:
Problem Description: On bootup, the touchpad is seen as a touchscreen. 
drivers/input/mouse/lifebook.c had the following added:

       {
               .ident = "CF-18",
               .matches = {
                       DMI_MATCH(DMI_PRODUCT_NAME, "CF-18"),
               },
       },

It looks like since that since both the touchscreen and touchpad go through this
logic, the condition is hit for each.

This makes the touchpad be seen as an absoloute device and generally be wonky.


Steps to reproduce: Compile kernel with mouse support and boot on a CF-18.
Comment 1 Carl Brown 2006-09-25 04:53:40 UTC
Distribution: Debian Etch
Hardware Environment: Panasonic CF-29
Software Environment: Questionable evtouch X driver, built for x.org 6.8, 
running on x.org 7.0

This behavior can be reproduced on a CF-29 by patching lifebook.c to recognize 
the system. The touchpad is interpreted as an absolute pointing device, rather 
than a relative pointing device. There is no sign of output from the 
touchscreen, and it does not work. 

Perhaps it needs a magic number init string?
Comment 2 Dmitry Torokhov 2006-09-25 05:53:30 UTC
Unfortunately we only know how to initialize Lifebook touchscreens but we do 
not know to verify that the device is indeed a Lifebook touchscreen. For now 
you will have to use psmouse.proto=exps to turn off lifebook-specific support 
when it gets in your way.
Comment 3 john 2006-09-25 16:34:23 UTC
Clarification: On the CF-18, the change made to lifebook.c that causes the
touchpad to be seen as an absolute device (touchscreen) does get the touchscreem
working.  Using evtest against the device assigned to the 
touchscreen, events are generated.  When configured in xorg, the touchscreen can
be used.  However, the cursor does not track correctly.  This may be a
calibration issue.
Comment 4 Dmitry Torokhov 2007-03-16 21:35:39 UTC
Created attachment 10803 [details]
Probe lifebook protocol last

Could you please try this patch on CF-18? Thanks!
Comment 5 john 2007-03-17 08:57:50 UTC
The patch applied cleanly against 2.6.20. The result appears to be similar to a
stock kernel in that both touchscreen and touchpad are configured as absolute
devices.


evtest /dev/input/event4 (touchscreen):

Input driver version is 1.0.0
Input device ID: bus 0x11 vendor 0x2 product 0x9 version 0x0
Input device name: "LBPS/2 Fujitsu Lifebook TouchScreen"
Supported events:
  Event type 0 (Sync)
  Event type 1 (Key)
    Event code 272 (LeftBtn)
    Event code 273 (RightBtn)
    Event code 274 (MiddleBtn)
    Event code 330 (Touch)
  Event type 2 (Relative)
    Event code 0 (X)
    Event code 1 (Y)
  Event type 3 (Absolute)
    Event code 0 (X)
      Value    508
      Min        0
      Max     1024
    Event code 1 (Y)
      Value    687
      Min        0
      Max     1024

evtest /dev/input/event5 (touchpad):

Input driver version is 1.0.0
Input device ID: bus 0x11 vendor 0x2 product 0x9 version 0x0
Input device name: "LBPS/2 Fujitsu Lifebook TouchScreen"
Supported events:
  Event type 0 (Sync)
  Event type 1 (Key)
    Event code 272 (LeftBtn)
    Event code 273 (RightBtn)
    Event code 274 (MiddleBtn)
    Event code 330 (Touch)
  Event type 2 (Relative)
    Event code 0 (X)
    Event code 1 (Y)
  Event type 3 (Absolute)
    Event code 0 (X)
      Value    313
      Min        0
      Max     1024
    Event code 1 (Y)
      Value    389
      Min        0
      Max     1024

evtest /dev/input/event5 (touchpad) with options psmouse proto=exps:

Input driver version is 1.0.0
Input device ID: bus 0x11 vendor 0x2 product 0x1 version 0x0
Input device name: "PS/2 Fujitsu Lifebook TouchScreen"
Supported events:
  Event type 0 (Sync)
  Event type 1 (Key)
    Event code 272 (LeftBtn)
    Event code 273 (RightBtn)
    Event code 274 (MiddleBtn)
  Event type 2 (Relative)
    Event code 0 (X)
    Event code 1 (Y)
Comment 6 Dmitry Torokhov 2007-03-17 11:20:26 UTC
Could you tell me how touchpad is recognized if you rip out any mention of 
CF-18 from lifebook.c? Is it recognized as a generic PS/2 mouse?
Comment 7 john 2007-03-17 13:59:35 UTC
Yes, f I strip out the DMI string for CF-18 in lifebook.c it is seen as a
generic mouse:

Input device ID: bus 0x11 vendor 0x2 product 0x1 version 0x0
Input device name: "PS/2 Generic Mouse"

Comment 8 Dmitry Torokhov 2007-03-17 18:19:22 UTC
Could you please also post contents of your /proc/bus/input/devices?
Comment 9 john 2007-03-17 18:34:20 UTC
This is /proc/bus/input/devices without CF-18 references in lifebook.c:

I: Bus=0019 Vendor=0000 Product=0002 Version=0000
N: Name="Power Button (FF)"
P: Phys=ACPI_FPB/button/input0
S: Sysfs=/class/input/input0
H: Handlers=kbd event0 
B: EV=3
B: KEY=100000 0 0 0

I: Bus=0019 Vendor=0000 Product=0005 Version=0000
N: Name="Lid Switch"
P: Phys=PNP0C0D/button/input0
S: Sysfs=/class/input/input1
H: Handlers=event1 
B: EV=21
B: SW=1

I: Bus=0019 Vendor=0000 Product=0001 Version=0000
N: Name="Power Button (CM)"
P: Phys=PNP0C0C/button/input0
S: Sysfs=/class/input/input2
H: Handlers=kbd event2 
B: EV=3
B: KEY=100000 0 0 0

I: Bus=0011 Vendor=0001 Product=0001 Version=ab41
N: Name="AT Translated Set 2 keyboard"
P: Phys=isa0060/serio0/input0
S: Sysfs=/class/input/input3
H: Handlers=kbd event3 
B: EV=120013
B: KEY=4 2000000 3802078 f840d001 feffffdf ffefffff ffffffff fffffffe
B: MSC=10
B: LED=7

I: Bus=001a Vendor=0001 Product=0001 Version=0100
N: Name="PCC Extra Driver"
P: Phys=panasonic/hkey0
S: Sysfs=/class/input/input6
H: Handlers=kbd event6 
B: EV=3
B: KEY=b 2000 0 4000 e0000 0 0 0

I: Bus=0011 Vendor=0002 Product=0001 Version=0000
N: Name="PS/2 Generic Mouse"
P: Phys=isa0060/serio3/input0
S: Sysfs=/class/input/input7
H: Handlers=mouse0 event4 
B: EV=7
B: KEY=70000 0 0 0 0 0 0 0 0
B: REL=3

I: Bus=0011 Vendor=0002 Product=0001 Version=0000
N: Name="PS/2 Generic Mouse"
P: Phys=isa0060/serio4/input0
S: Sysfs=/class/input/input8
H: Handlers=mouse1 event5 
B: EV=7
B: KEY=70000 0 0 0 0 0 0 0 0
B: REL=3
Comment 10 Dmitry Torokhov 2007-03-19 08:59:05 UTC
Created attachment 10835 [details]
Activate lifebook protocol on serio3 only

OK, could you please try this patch instead? Thanks!
Comment 11 john 2007-03-19 16:59:06 UTC
Looks like success!  Thanks!  Let me know if you need any future testing on this
laptop.

I think there is just calibration needed to get the cursor to track properly.

Relevant portion of /proc/bus/input/devices:

I: Bus=0011 Vendor=0002 Product=0009 Version=0000
N: Name="LBPS/2 Fujitsu Lifebook TouchScreen"
P: Phys=isa0060/serio3/input0
S: Sysfs=/class/input/input4
H: Handlers=mouse0 event4 
B: EV=f
B: KEY=400 0 70000 0 0 0 0 0 0 0 0
B: REL=3
B: ABS=3

I: Bus=0011 Vendor=0002 Product=0001 Version=0000
N: Name="PS/2 Generic Mouse"
P: Phys=isa0060/serio4/input0
S: Sysfs=/class/input/input5
H: Handlers=mouse1 event5 
B: EV=7
B: KEY=70000 0 0 0 0 0 0 0 0
B: REL=3
Comment 12 Dmitry Torokhov 2007-05-10 10:23:47 UTC
The fix is in mainline and will show up in 2.6.22; closing

Note You need to log in before you can comment on or make changes to this bug.