FS#17720 - [hal] ignore ALPS touchpad under Linux 2.6.33+

Attached to Project: Arch Linux
Opened by Michael Witten (mfwitten) - Wednesday, 06 January 2010, 06:00 GMT
Last edited by Jan de Groot (JGC) - Sunday, 07 March 2010, 13:44 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Jan de Groot (JGC)
Architecture All
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

HAL has a latent bug that prevents an ALPS touchpad from being recognized by Xorg; however, the DualPoint (mouse nipple) still works.

This bug may never be a problem, given that HAL has been deprecated and may not even be in use by the time Linux 2.6.33 becomes part of Arch Linux; however, it may be worthwhile to describe a/the solution here.

In order to fix the problem, either the end user can patch an installed file as follows:

patch /usr/share/hal/fdi/policy/10osvendor/10-x11-input.fdi bug-1/solution/hal-touchpad-evdev.patch

or the `hal' package can be rebuilt by applying `bug-1/solution/PKGBUILD.patch' to the hal package's PKGBUILD and then including `bug-1/solution/hal-touchpad-evdev.patch' among the other patches that are shipped with the hal package's PKGBUILD.

(Currently, the hal package won't build; apply the PKGBUILD.patch from this bug report and THEN apply a solution from http://bugs.archlinux.org/task/17719).

The following description and (modified) attached patch came from:

http://lists.freedesktop.org/archives/hal/2010-January/013734.html

(sorry if the formatting isn't as nice in this bug report)

From 4bd49edaa11926c885dccb60d2b2df231488d7d4 Mon Sep 17 00:00:00 2001
From: Michael Witten <mfwitten@gmail.com>
Date: Tue, 5 Jan 2010 16:24:17 -0600
Subject: [PATCH] Policy: handle `input.touchpad' explicitly

This commit essentially duplicates the policy for:

<match key="info.capabilities" contains="input.mouse">

and then changes `input.mouse' to `input.touchpad'. This
is necessary because in Linus Torvalds's Linux repo:

git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6.git

the following commit:

commit 7105d2ea73e1391b681d0e1212c42f561c64d429
Author: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Date: Fri Dec 11 23:54:54 2009 -0800

Input: ALPS - do not set REL_X/REL_Y capabilities on the touchpad

Relative events are only reported via secondary device therefore device
associated with the touchpad should not advertise these capabilities.

Signed-off-by: Dmitry Torokhov <dtor@mail.ru>

made these few changes:

diff --git a/drivers/input/mouse/alps.c b/drivers/input/mouse/alps.c
index a3f492a..b03e7e0 100644
--- a/drivers/input/mouse/alps.c
+++ b/drivers/input/mouse/alps.c
@@ -487,6 +487,17 @@ int alps_init(struct psmouse *psmouse)
if (alps_hw_init(psmouse))
goto init_fail;

+ /*
+ * Undo part of setup done for us by psmouse core since touchpad
+ * is not a relative device.
+ */
+ __clear_bit(EV_REL, dev1->evbit);
+ __clear_bit(REL_X, dev1->relbit);
+ __clear_bit(REL_Y, dev1->relbit);
+
+ /*
+ * Now set up our capabilities.
+ */
dev1->evbit[BIT_WORD(EV_KEY)] |= BIT_MASK(EV_KEY);
dev1->keybit[BIT_WORD(BTN_TOUCH)] |= BIT_MASK(BTN_TOUCH);
dev1->keybit[BIT_WORD(BTN_TOOL_FINGER)] |= BIT_MASK(BTN_TOOL_FINGER);

so that HAL no longer adds:

input.mouse

to an ALPS touchpad's:

info.capabilities

so that HAL no longer marks the ALPS touchpad with:

input.x11_driver = 'evdev'

because the policy file:

fdi/policy/10osvendor/10-x11-input.fdi

doesn't define the policy for:

<match key="info.capabilities" contains="input.touchpad">

which was previous unnecessary because everything used to
be caught by the policy for:

<match key="info.capabilities" contains="input.mouse">
This task depends upon

Closed by  Jan de Groot (JGC)
Sunday, 07 March 2010, 13:44 GMT
Reason for closing:  Fixed
Additional comments about closing:  Fixed in 0.5.14-2.
Comment by Michael Witten (mfwitten) - Sunday, 07 March 2010, 06:41 GMT
The latest stable kernel from kernel.org is 2.6.33; I imagine this version of the kernel will become part of Arch Linux soon.

Please fix up the hal package using the patch and directions supplied here.

Loading...