Botão direito do touchpad ElanTech não funciona no Linux

4

Problema: o botão direito do hardware do touchpad não funciona no Linux, mas está funcionando bem no Win8.

Já tentei vários patches do psmouse, configurações de xinput ... nada ajuda: (

  • SO: Debian Jessie 64 bits
  • Notebook: G46VW

dmesg :

[    3.898598] psmouse serio4: elantech: assuming hardware version 4 (with firmware version 0x460f02)
[    3.912080] psmouse serio4: elantech: Synaptics capabilities query result 0x00, 0x18, 0x0c.

Xorg.log :

[46.491] (II) LoadModule: "synaptics"
[46.491] (II) Loading /usr/lib/xorg/modules/input/synaptics_drv.so
[46.494] (II) Module synaptics: vendor="X.Org Foundation"
[46.494] (II) Using input driver 'synaptics' for 'ETPS/2 Elantech Touchpad'
[46.499] (II) synaptics: ETPS/2 Elantech Touchpad: found clickpad property
[46.499] (--) synaptics: ETPS/2 Elantech Touchpad: x-axis range 0 - 3036
[46.499] (--) synaptics: ETPS/2 Elantech Touchpad: y-axis range 0 - 1452
[46.499] (--) synaptics: ETPS/2 Elantech Touchpad: pressure range 0 - 255
[46.499] (--) synaptics: ETPS/2 Elantech Touchpad: finger width range 0 - 15
[46.499] (--) synaptics: ETPS/2 Elantech Touchpad: buttons: left double triple
[46.499] (--) synaptics: ETPS/2 Elantech Touchpad: Vendor 0x2 Product 0xe
[46.499] (--) synaptics: ETPS/2 Elantech Touchpad: touchpad found
[46.500] (**) synaptics: ETPS/2 Elantech Touchpad: (accel) MinSpeed is now constant  zeceleration 2.5
[46.500] (**) synaptics: ETPS/2 Elantech Touchpad: MaxSpeed is now 1.75
[46.500] (**) synaptics: ETPS/2 Elantech Touchpad: AccelFactor is now 0.059
[46.500] (--) synaptics: ETPS/2 Elantech Touchpad: touchpad found

List-props :

Device 'ETPS/2 Elantech Touchpad':
Device Enabled (134):   1
Coordinate Transformation Matrix (136): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
Device Accel Profile (261): 1
Device Accel Constant Deceleration (262):   2.500000
Device Accel Adaptive Deceleration (263):   1.000000
Device Accel Velocity Scaling (264):    12.500000
Synaptics Edges (292):  121, 2915, 78, 1374
Synaptics Finger (293): 1, 1, 256
Synaptics Tap Time (294):   180
Synaptics Tap Move (295):   148
Synaptics Tap Durations (296):  180, 180, 100
Synaptics ClickPad (297):   1
Synaptics Tap FastTap (298):    0
Synaptics Middle Button Timeout (299):  0
Synaptics Two-Finger Pressure (300):    282
Synaptics Two-Finger Width (301):   7
Synaptics Scrolling Distance (302): 67, 67
Synaptics Edge Scrolling (303): 0, 0, 0
Synaptics Two-Finger Scrolling (304):   1, 0
Synaptics Move Speed (305): 1.000000, 1.750000, 0.059435, 40.000000
Synaptics Edge Motion Pressure (306):   30, 160
Synaptics Edge Motion Speed (307):  1, 269
Synaptics Edge Motion Always (308): 0
Synaptics Off (309):    2
Synaptics Locked Drags (310):   0
Synaptics Locked Drags Timeout (311):   5000
Synaptics Tap Action (312): 0, 0, 0, 0, 1, 3, 2
Synaptics Click Action (313):   1, 3, 2
Synaptics Circular Scrolling (314): 0
Synaptics Circular Scrolling Distance (315):    0.100000
Synaptics Circular Scrolling Trigger (316): 0
Synaptics Circular Pad (317):   0
Synaptics Palm Detection (318): 0
Synaptics Palm Dimensions (319):    10, 200
Synaptics Coasting Speed (320): 20.000000, 50.000000
Synaptics Pressure Motion (321):    30, 160
Synaptics Pressure Motion Factor (322): 1.000000, 1.000000
Synaptics Grab Event Device (323):  1
Synaptics Gestures (324):   1
Synaptics Capabilities (325):   1, 0, 0, 1, 1, 1, 1
Synaptics Pad Resolution (326): 33, 32
Synaptics Area (327):   0, 0, 0, 0
Synaptics Soft Button Areas (328):  1518, 0, 1190, 0, 0, 0, 0, 0
Synaptics Noise Cancellation (329): 16, 16
Device Product ID (255):    2, 14
Device Node (256):  "/dev/input/event8"
    
por datacompboy 14.07.2013 / 10:28

1 resposta

8

Encontrado problema: psmouse / elantech.c apenas asumes, que o protocolo de hardware V4 não tem botão direito.

A correção é trivial:

--- elantech.c.orig 2013-06-14 00:52:08.000000000 +0700
+++ elantech.c  2013-07-15 12:45:52.000000000 +0700
@@ -486,6 +486,7 @@ elantech_input_sync_v4
    unsigned char *packet = psmouse->packet;

    input_report_key(dev, BTN_LEFT, packet[0] & 0x01);
+   input_report_key(dev, BTN_RIGHT, packet[0] & 0x02);
    input_mt_report_pointer_emulation(dev, true);
    input_sync(dev);
 }
@@ -1019,7 +1018,7 @@ elantech_set_input_params { case 4: }
        }
        /* v4 is clickpad, with only one button. */
        __set_bit(INPUT_PROP_BUTTONPAD, dev->propbit);
-       __clear_bit(BTN_RIGHT, dev->keybit);
+       //__clear_bit(BTN_RIGHT, dev->keybit);
        __set_bit(BTN_TOOL_QUADTAP, dev->keybit);
        /* For X to recognize me as touchpad. */
        input_set_abs_params(dev, ABS_X, x_min, x_max, 0, 0);

Pronto para usar a solução:

wget http://datacompboy.ru/psmouse-elantech-v7right.tar.bz2
tar xfj psmouse-elantech-v7right.tar.bz2
sudo mv psmouse-elantech-v7right /usr/src/
sudo dkms install -m psmouse -v elantech-v7right
sudo modprobe -r psmouse
sudo modprobe psmouse
    
por 15.07.2013 / 08:03