LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   LinuxQuestions.org Member Success Stories (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/)
-   -   Panasonic Toughbook CF-27 Mk. 4 Touchscreen Working and Calibrated (https://www.linuxquestions.org/questions/linuxquestions-org-member-success-stories-23/panasonic-toughbook-cf-27-mk-4-touchscreen-working-and-calibrated-4175413134/)

xp19375 06-24-2012 11:37 AM

Panasonic Toughbook CF-27 Mk. 4 Touchscreen Working and Calibrated
 
After many months of trying to get the touchscreen on an old CF-27 mk. 4 working, I was finally able to. The problem I ran into while searching for solutions was that the CF-27 mk. 4 uses a different touchscreen than the other CF-27's. It uses the same one as the CF-28 mk. 1, specifically a Fujitsu Lifebook B-series touchscreen. The touchscreen is multiplexed with the touchpad, and both are connected to the PS/2 port.

The good news is that Linux already has the driver! The bad news is that Linux doesn't know how to use it.

To get this to work, I modified the lifebook.c file and recompiled the psmouse.ko module. lifebook.c is found in drivers/input/mouse in the Linux source code.
In lifebook.c, replace:

Code:

/* Panasonic CF-28 */
                .matches = {
                        DMI_MATCH(DMI_SYS_VENDOR, "Matsushita"),
                        DMI_MATCH(DMI_PRODUCT_NAME, "CF-28"),
                },
                .callback = lifebook_set_6byte_proto,

with
Code:

        /* Panasonic CF-28 */
                .matches = {
                        DMI_MATCH(DMI_SYS_VENDOR, "Matsushita"),
                        DMI_MATCH(DMI_PRODUCT_NAME, "CF27"),
                },
                .callback = lifebook_set_6byte_proto,

and compile the psmouse module. My makefile looks like this:
Code:


#
# Makefile for the psmouse driver from old kernel sources
#
obj-m := psmouse.o
psmouse-objs := psmouse-base.o synaptics.o alps.o lifebook.o trackpoint.o logips2pp.o elantech.o hgpk.o sentelic.o
#touchkit_ps2.o

all: 
        $(MAKE) -C /lib/modules/`uname -r`/build M=`pwd` modules
clean:
        $(MAKE) -C /lib/modules/`uname -r`/build M=`pwd` clean
        $(RM) Module.markers modules.order

Note that the Linux headers are required to build this. There should then be something in /lib/modules/<Distro>/build.
Also note that this is not a proper solution, as now CF-28 touchscreens will not work, but it gets the job done.

The newly build psmouse module goes in /lib/modules/<Distro>/kernel/drivers/input/mouse. On Arch, it needs to be gzip'ped. The module then needs to be reloaded with
Code:

modprobe -r psmouse
modprobe psmouse

That should activate the touchscreen, but it will be uncalibrated. The calibration utility I found, which works quite well, is xinput_calibrator. Download and install this, read the directions, and the touchscreen should be calibrated.

I recompiled the module on Arch with the 3.4.2 kernel, but I believe the same (or very similar) procedure will work with any kernel. I recall doing this sucessfully on Debian 6.0, with the default 2.6.32 kernel. I have only tried xinput_calibrator on Arch.

I hope this helps someone.

guyonearth 07-26-2012 01:50 PM

Nice work. I used to have several of those old laptops, they were great.


All times are GMT -5. The time now is 12:14 PM.