ponyfleisch / hid-magictrackpad2

An attempt to get solid Magic Trackpad 2 support on linux.
GNU General Public License v2.0
32 stars 4 forks source link

No support for dragging on the magic trackpad 2 #1

Open D12EA177E12 opened 7 years ago

D12EA177E12 commented 7 years ago

Before your driver came along, the Apple Magic Trackpad2 (hereafter referred to as the amtp2) is only capable of cursor movement, left mouse and basic drag-and-drop in Linux. So, with the additional bluetooth, two-finger scroll and two-finger right-click support, which your driver provides, I thought we finally have ourselves a usable amtp2 on Linux. To my surprise, the basic drag-and-drop doesn't work. Can you verify with me whether you have drag-and-drop on your system.

Here is the output of sudo xinput --list-props 10:

Device 'Apple Magic Trackpad 2':
    Device Enabled (152):   1
    Coordinate Transformation Matrix (154): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
    Device Accel Profile (280): 1
    Device Accel Constant Deceleration (281):   2.500000
    Device Accel Adaptive Deceleration (282):   1.000000
    Device Accel Velocity Scaling (283):    12.500000
    Synaptics Edges (547):  -3374, 3630, -2206, 2313
    Synaptics Finger (548): 25, 30, 0
    Synaptics Tap Time (549):   180
    Synaptics Tap Move (550):   402
    Synaptics Tap Durations (551):  180, 100, 100
    Synaptics ClickPad (552):   1
    Synaptics Middle Button Timeout (553):  0
    Synaptics Two-Finger Pressure (554):    283
    Synaptics Two-Finger Width (555):   7
    Synaptics Scrolling Distance (556): -182, -182
    Synaptics Edge Scrolling (492): 0, 0, 0
    Synaptics Two-Finger Scrolling (493):   1, 1
    Synaptics Move Speed (557): 1.000000, 1.750000, 0.021875, 0.000000
    Synaptics Button Scrolling (558):   1, 1
    Synaptics Button Scrolling Repeat (559):    1, 1
    Synaptics Button Scrolling Time (560):  100
    Synaptics Off (490):    2
    Synaptics Locked Drags (561):   0
    Synaptics Locked Drags Timeout (562):   5000
    Synaptics Tap Action (491): 2, 3, 0, 0, 1, 3, 0
    Synaptics Click Action (563):   1, 3, 0
    Synaptics Circular Scrolling (564): 0
    Synaptics Circular Scrolling Distance (565):    0.100000
    Synaptics Circular Scrolling Trigger (566): 0
    Synaptics Circular Pad (567):   0
    Synaptics Palm Detection (568): 0
    Synaptics Palm Dimensions (569):    10, 200
    Synaptics Coasting Speed (570): 20.000000, 50.000000
    Synaptics Pressure Motion (571):    30, 160
    Synaptics Pressure Motion Factor (572): 1.000000, 1.000000
    Synaptics Resolution Detect (573):  1
    Synaptics Grab Event Device (574):  0
    Synaptics Gestures (575):   1
    Synaptics Capabilities (576):   1, 0, 0, 1, 1, 1, 1
    Synaptics Pad Resolution (577): 1, 1
    Synaptics Area (578):   0, 0, 0, 0
    Synaptics Soft Button Areas (579):  0, 0, 0, 0, 0, 0, 0, 0
    Synaptics Noise Cancellation (580): 4, 4
    Device Product ID (269):    76, 613
    Device Node (270):  "/dev/input/event16"

and here's the output of sudo xinput --list --long 10:

Apple Magic Trackpad 2                      id=10   [slave  pointer  (2)]
    Reporting 11 classes:
        Class originated from: 10. Type: XIButtonClass
        Buttons supported: 12
        Button labels: "Button Left" "Button Middle" "Button Right" "Button Wheel Up" "Button Wheel Down" "Button Horiz Wheel Left" "Button Horiz Wheel Right" None None None None None
        Button state:
        Class originated from: 10. Type: XIValuatorClass
        Detail for Valuator 0:
          Label: Rel X
          Range: -3678.000000 - 3934.000000
          Resolution: 0 units/m
          Mode: relative
        Class originated from: 10. Type: XIValuatorClass
        Detail for Valuator 1:
          Label: Rel Y
          Range: -2479.000000 - 2586.000000
          Resolution: 0 units/m
          Mode: relative
        Class originated from: 10. Type: XIValuatorClass
        Detail for Valuator 2:
          Label: Rel Horiz Scroll
          Range: 0.000000 - -1.000000
          Resolution: 0 units/m
          Mode: relative
        Class originated from: 10. Type: XIValuatorClass
        Detail for Valuator 3:
          Label: Rel Vert Scroll
          Range: 0.000000 - -1.000000
          Resolution: 0 units/m
          Mode: relative
        Class originated from: 10. Type: XIValuatorClass
        Detail for Valuator 4:
          Label: Abs MT Touch Major
          Range: 0.000000 - 2048.000000
          Resolution: 0 units/m
          Mode: absolute
          Current value: 0.000000
        Class originated from: 10. Type: XIValuatorClass
        Detail for Valuator 5:
          Label: Abs MT Touch Minor
          Range: 0.000000 - 2048.000000
          Resolution: 0 units/m
          Mode: absolute
          Current value: 0.000000
        Class originated from: 10. Type: XIValuatorClass
        Detail for Valuator 6:
          Label: Abs MT Orientation
          Range: -16384.000000 - 16384.000000
          Resolution: 0 units/m
          Mode: absolute
          Current value: 6144.000000
        Class originated from: 10. Type: XIScrollClass
        Scroll info for Valuator 2
          type: 2 (horizontal)
          increment: -182.000000
          flags: 0x0
        Class originated from: 10. Type: XIScrollClass
        Scroll info for Valuator 3
          type: 1 (vertical)
          increment: -182.000000
          flags: 0x0
        Class originated from: 10. Type: XITouchClass
        Touch mode: dependent
        Max number of touches: 16

Can anyone spot something wrong with the above settings? Any help will be greatly appreciated.

So close, ever so close...

ponyfleisch commented 6 years ago

Hi @D12EA177E12

are you still using the driver? I'll try to look into this ASAP. Apologies.

hoboboedan commented 6 years ago

Dragging is working for me and I can't see a significant difference between our configurations. The force click on the magic trackpad sends a button release to xinput. So I can only continue dragging so long as I don't press hard enough to trigger the force click. I haven't figured out how to disable the force click or change the pressure sensitivity yet. Could it be that the pressure sensitivity on your trackpad is set lower and you are triggering the force click right away?

D12EA177E12 commented 6 years ago

@ponyfleisch Hey Claudio, I am not using your version of the driver because the problem never got resolved. Needless to say, I'd to love to use my amtp2 under Linux. I've never messed around with trackpad properties so I don't know which property, and what their suitable range of values are, nor do I know how to tweak these trackpad properties.

D12EA177E12 commented 6 years ago

@hoboboedan I think you might be right (I hope you are) about it being a pressure sensitivity issue. Here's what it looks like.

@ponyfleisch as it turns out, drag-and-drop does work. What property do I need to adjust, and how?

hoboboedan commented 6 years ago

Looks like force click is a constant. I was able to disable force click and solve the problem by changing

define PRESSURE_FORCE_THRESHOLD 140

to

define PRESSURE_FORCE_THRESHOLD 255

It'd be nice to be able to use force click for something else instead. Not sure what.

D12EA177E12 commented 6 years ago

@hoboboedan Unless there are context-aware apps through force click (which I am unaware of there being any) I don't see a need for it.

hoboboedan commented 6 years ago

Admittedly I haven't gotten much use out of it even on the mac side. I made a fork to play around with potential uses of it. Maybe something will stick.

D12EA177E12 commented 6 years ago

@hoboboedan With PRESSURE_FORCE_THRESHOLD set to 255 I finally have a usable amtp2 in Linux. Thanks Dan! Since you've been working on this driver, do you know how to configure multitouch features by any chance? Please take a look at issue #5.