You are not logged in.

#1 2014-05-28 05:40:47

squirrel
Member
Registered: 2014-02-23
Posts: 7

[SOLVED] Touchpad palm detection not working on X1 Carbon

Hi all, I've been running Arch on my Thinkpad X1 Carbon (first generation) for about a year now with very few problems, except that palm detection on the touchpad has never worked. The touchpad on the X1 is quite large and it is very easy to mistakenly click or move the cursor while typing or even just resting my hands on the keyboard. Often when this happens, the touchpad gets stuck thinking I'm trying to drag something and I can't type until I click on the touchpad to get it unstuck.

I've seen several web posts of people running the X1 in linux with touchpad configs suggesting that Synaptics palm detection should work. However, it has never worked for me in Arch (the only linux I've run on my X1), although palm detection seems to work fine in Windows 7. I've followed the instructions here on the wiki to no effect, and I would greatly appreciate any suggestions to help troubleshoot further.

What I have done so far: I have tried changing the touchpad settings from the command line with synclient. Toggling the PalmDetect option and setting the PalmMinWidth and PalmMinZ settings to low values seem to have no effect, though "synclient -l" confirms that the settings have been changed. Putting my palm on the touchpad and moving it around causes cursor movement, clicks, and two-finger scrolling no matter what the palm detection settings are. When I make changes to other settings with synclient, e.g. toggling edge scrolling with VertEdgeScroll, I can notice the changes take effect right away.

I have also tried turning palm detection on in /etc/X11/xorg.conf.d/51-synaptics.conf. Running "synclient -l" after boot confirms that the options are applied but still not working.

As for other fixes to the sensitive touchpad problem besides palm detection: I have disabled the touchpad while typing with syndaemon; this works, but I still get very annoying palm triggers unless I am very careful. I could just disable the touchpad altogether, but I would really prefer to get palm detection working, especially as there seems to be no reason I can find why it shouldn't work on my X1.

Thanks again for any suggestions, and below are my xorg config files and output of "synclient -l". Please let me know if there are other log files I should look at.

My /etc/X11/xorg.conf.d/51-synaptics.conf file:

Section "InputClass"
    Identifier "touchpad catchall"
    Driver "synaptics"
    MatchIsTouchpad "on"
    MatchDevicePath "/dev/input/event*"

    Option "TapButton1" "1"
    Option "TapButton2" "3"
    # three fingers for the middle button
    Option "HorizTwoFingerScroll" "on"
    Option "HorizHysteresis" "50"
    Option "VertHysteresis" "50"
    Option "PalmDetect"    "1"
    Option "PalmMinWidth"  "5"
    Option "PalmMinZ"      "40"
    Option "ClickPad"      "1"
EndSection

I also have the recently-updated default 50-synaptics.conf file in my /etc/X11/xorg.conf.d/ folder,

Section "InputClass"
        Identifier "touchpad catchall"
        Driver "synaptics"
        MatchIsTouchpad "on"
        Option "TapButton1" "1"
        Option "TapButton2" "2"
        Option "TapButton3" "3"
# This option is recommend on all Linux systems using evdev, but cannot be
# enabled by default. See the following link for details:
# http://who-t.blogspot.com/2010/11/how-to-ignore-configuration-errors.html
        MatchDevicePath "/dev/input/event*"
EndSection

Section "InputClass"
        Identifier "touchpad ignore duplicates"
        MatchIsTouchpad "on"
        MatchOS "Linux"
        MatchDevicePath "/dev/input/mouse*"
        Option "Ignore" "on"
EndSection

# This option enables the bottom right corner to be a right button on clickpads
# and the right and middle top areas to be right / middle buttons on clickpads
# with a top button area.
# This option is only interpreted by clickpads.
Section "InputClass"
        Identifier "Default clickpad buttons"
        MatchDriver "synaptics"
        Option "SoftButtonAreas" "50% 0 82% 0 0 0 0 0"
        Option "SecondarySoftButtonAreas" "58% 0 0 8% 42% 58% 0 8%"
EndSection

# This option disables software buttons on Apple touchpads.
# This option is only interpreted by clickpads.
Section "InputClass"
        Identifier "Disable clickpad buttons on Apple touchpads"
        MatchProduct "Apple|bcm5974"
        MatchDriver "synaptics"
        Option "SoftButtonAreas" "0 0 0 0 0 0 0 0"
EndSection

The output of "synclient -l" after booting is

╰─$ synclient -l
Parameter settings:
    LeftEdge                = 1766
    RightEdge               = 5384
    TopEdge                 = 1640
    BottomEdge              = 4500
    FingerLow               = 25
    FingerHigh              = 30
    MaxTapTime              = 180
    MaxTapMove              = 235
    MaxDoubleTapTime        = 180
    SingleTapTimeout        = 180
    ClickTime               = 100
    EmulateMidButtonTime    = 0
    EmulateTwoFingerMinZ    = 282
    EmulateTwoFingerMinW    = 7
    VertScrollDelta         = 107
    HorizScrollDelta        = 107
    VertEdgeScroll          = 0
    HorizEdgeScroll         = 0
    CornerCoasting          = 0
    VertTwoFingerScroll     = 1
    HorizTwoFingerScroll    = 1
    MinSpeed                = 1
    MaxSpeed                = 1.75
    AccelFactor             = 0.0373134
    TouchpadOff             = 1
    LockedDrags             = 0
    LockedDragTimeout       = 5000
    RTCornerButton          = 0
    RBCornerButton          = 0
    LTCornerButton          = 0
    LBCornerButton          = 0
    TapButton1              = 1
    ClickFinger1            = 1
    ClickFinger2            = 3
    ClickFinger3            = 2
    CircularScrolling       = 0
    CircScrollDelta         = 0.1
    CircScrollTrigger       = 0
    CircularPad             = 0
    PalmDetect              = 1
    PalmMinWidth            = 5
    PalmMinZ                = 40
    CoastingSpeed           = 20
    CoastingFriction        = 50
    PressureMotionMinZ      = 30
    PressureMotionMaxZ      = 160
    PressureMotionMinFactor = 1
    PressureMotionMaxFactor = 1
    GrabEventDevice         = 0
    TapAndDragGesture       = 1
    AreaLeftEdge            = 0
    AreaRightEdge           = 0
    AreaTopEdge             = 0
    AreaBottomEdge          = 0
    HorizHysteresis         = 50
    VertHysteresis          = 50
    ClickPad                = 1
    RightButtonAreaLeft     = 3575
    RightButtonAreaRight    = 0
    RightButtonAreaTop      = 4133
    RightButtonAreaBottom   = 0
    MiddleButtonAreaLeft    = 0
    MiddleButtonAreaRight   = 0
    MiddleButtonAreaTop     = 0
    MiddleButtonAreaBottom  = 0

Edit: In case it is useful, here is the output of /var/log/Xorg.0.log after restarting X11.

Last edited by squirrel (2014-06-02 05:29:15)

Offline

#2 2014-05-28 13:51:36

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,240

Re: [SOLVED] Touchpad palm detection not working on X1 Carbon

I have had similar issues with my Thinkpad S540 - and I would like to see a solution too!


Mike C

Offline

#3 2014-05-29 14:12:22

silverhammermba
Wiki Maintainer
Registered: 2011-04-14
Posts: 156

Re: [SOLVED] Touchpad palm detection not working on X1 Carbon

I also have this issue with my X1 Carbon. Does synaptics have some kind of debug output? It's really hard to test palm detection.

Update:
I really want to figure this out so I'm checking out xf86-input-synaptics in ABS. Luckily the palm detection code is very tiny and self-contained so it hopefully won't be too hard to tinker with. It looks simple enough to patch in some debug output so that's what I'm going to try first.

Last edited by silverhammermba (2014-05-30 03:44:32)

Offline

#4 2014-05-30 18:13:15

silverhammermba
Wiki Maintainer
Registered: 2011-04-14
Posts: 156

Re: [SOLVED] Touchpad palm detection not working on X1 Carbon

After patching in debug output and digging around a bit, I found the issue. Luckily it is known:

https://bugs.launchpad.net/ubuntu/+sour … ug/1245328

The touchpad is not getting the finger width (rather, it says the width is always 0), which is a crucial part of the palm detection code.

To tell if this bug applies to you, check your Xorg log. You should see "finger width range..." near the top if your touchpad support finger widths. Then you can install evtest from AUR, check /proc/bus/input/devices to see which /dev/input/event* is your touchpad. Pass that to evtest and play around with your touchpad a bit - if you don't see any ABS_TOOL_WIDTH showing up then you've got the bug!

If you are getting finger widths reported, then you just need to tinker with your palm detection settings.

It's nice knowing what the bug is, but I still have no idea how to fix it. I've seen a few different patches to do palm detection without finger width, but I would much rather find a way to get the width reported properly.

Last edited by silverhammermba (2014-05-30 18:14:22)

Offline

#5 2014-05-30 21:17:10

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,240

Re: [SOLVED] Touchpad palm detection not working on X1 Carbon

There is a recent comment on the same bug reported in this thread - so it looks like the driver needs to be updated to reflect the changes in the kernel?

https://bugs.launchpad.net/ubuntu/+sour … comments/7


Mike C

Offline

#6 2014-05-30 22:51:40

silverhammermba
Wiki Maintainer
Registered: 2011-04-14
Posts: 156

Re: [SOLVED] Touchpad palm detection not working on X1 Carbon

Hmm, I'm not sure I understand him. But if you want to try out the patched driver (that just uses pressure for palm detection) I've made a patch and a new PKGBUILD:

https://gist.github.com/silverhammermba … caa63c86f1

I'm trying it out right now with PalmMinZ=80 (which is really strict. My normal usage hovers around 60) and it seems to work alright.

Offline

#7 2014-05-31 08:42:29

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,240

Re: [SOLVED] Touchpad palm detection not working on X1 Carbon

silverhammermba wrote:

Hmm, I'm not sure I understand him. But if you want to try out the patched driver (that just uses pressure for palm detection) I've made a patch and a new PKGBUILD:

https://gist.github.com/silverhammermba … caa63c86f1

I'm trying it out right now with PalmMinZ=80 (which is really strict. My normal usage hovers around 60) and it seems to work alright.

Thank you for writing this patched driver - I am keen to test this so I will try it out later this weekend when I have some time and report back after testing. I don't know if the values for PalmMinZ depend on which machine the clickpad is on, but in my case I have a clickpad that needs sorting out on a Y510p and an S540 (both Lenovo).  Being able to type without the cursor leaping away from the current window focus or to a different part of the current text entry would be wonderful to have fixed. The number of times I have been typing away and finding that I have entered a string of characters in an unintended place in the paragraph is innumerable!


Mike C

Offline

#8 2014-05-31 16:40:59

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,240

Re: [SOLVED] Touchpad palm detection not working on X1 Carbon

Can you tell me where to find the file add_tapbuttons.diff which is needed to build your patched xf86-input-synaptics?

Thanks


Mike C

Offline

#9 2014-05-31 18:22:13

silverhammermba
Wiki Maintainer
Registered: 2011-04-14
Posts: 156

Re: [SOLVED] Touchpad palm detection not working on X1 Carbon

I have posted a bug report upstream. https://bugzilla.kernel.org/show_bug.cgi?id=77161

mcloaked wrote:

Can you tell me where to find the file add_tapbuttons.diff which is needed to build your patched xf86-input-synaptics?

That came with the Arch package for me. Are you using Arch Build System? If not, you can probably just remove it. It doesn't look terribly important.

Last edited by silverhammermba (2014-05-31 18:22:58)

Offline

#10 2014-05-31 20:07:35

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,240

Re: [SOLVED] Touchpad palm detection not working on X1 Carbon

silverhammermba wrote:

I have posted a bug report upstream. https://bugzilla.kernel.org/show_bug.cgi?id=77161

mcloaked wrote:

Can you tell me where to find the file add_tapbuttons.diff which is needed to build your patched xf86-input-synaptics?

That came with the Arch package for me. Are you using Arch Build System? If not, you can probably just remove it. It doesn't look terribly important.

Ah OK - it is at https://projects.archlinux.org/svntogit … -synaptics

Adding in the three buttons is quite useful I think so I will include it when I try building it -

I am away from the machine again so I'll look at the package again tomorrow.


Mike C

Offline

#11 2014-05-31 20:26:58

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,240

Re: [SOLVED] Touchpad palm detection not working on X1 Carbon

silverhammermba: I have built your modified xf85-input-synaptics package on my other laptop (Lenovo Y510P) which also has the non palm detection issue - and have been testing by typing mail to see if the cursor skips to unexpected places - I left the PalmMinZ parameter as the default on this machine (200) which seems OK.  So far I have not had the cursor jump at all whilst typing so this is already much better than it was before.  I will test your modified package on my main laptop (Lenovo S540) tomorrow.  If that works and allows me to type and not have the clickpad falsely detect palm touches then I will be doubly pleased!   

Great to see this moving forward.


Mike C

Offline

#12 2014-06-01 07:00:50

squirrel
Member
Registered: 2014-02-23
Posts: 7

Re: [SOLVED] Touchpad palm detection not working on X1 Carbon

Thanks to both of you for your replies, and special thanks to silverhammermba for rooting out the cause and for the patch. I used evtest as suggested and can confirm that finger widths are not getting reported on my X1. I then installed silverhammermba's patch, and palm detection seems to be working quite well now. I have been using PalmMinZ=80 or 100 and both seem to be fine for me. I used evtest to see what typical pressure values are that correspond to palm vs. normal one-finger usage.  I suppose if finger widths were getting properly reported then Synaptics could use both to allow distinguishing finger vs. palm with lower settings of PalmMinZ, but I don't know what performance improvements this would give.

Hopefully the bug will get fixed soon in the official packages, but in the mean time the patch seems to be a quite workable solution. I will test things out some more tomorrow, but then I suppose I can mark the thread as solved.

Last edited by squirrel (2014-06-01 07:02:36)

Offline

#13 2014-06-01 19:20:20

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,240

Re: [SOLVED] Touchpad palm detection not working on X1 Carbon

I have now had a chance to test the patched xf86-input-synaptics package on my Thinkpad S540 and it works nicely on that machine too.  So thank you to silverhammermba for writing the patched driver....  this should be more widely tested of course but hopefully it will get accepted upstream. I am really pleased with the performance on my two machines - it makes a big difference for me. Excellent work.


Mike C

Offline

#14 2014-08-08 13:11:09

Sky
Member
Registered: 2009-07-11
Posts: 4

Re: [SOLVED] Touchpad palm detection not working on X1 Carbon

Hi,

This patch works fine on my x240 too smile I didn't find any news of an upstream patch, so I've submitted a package on AUR: https://aur.archlinux.org/packages/xf86 … dth-patch/

Last edited by Sky (2014-08-08 13:11:36)

Offline

#15 2014-08-08 13:42:17

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,240

Re: [SOLVED] Touchpad palm detection not working on X1 Carbon

Sky wrote:

Hi,

This patch works fine on my x240 too smile I didn't find any news of an upstream patch, so I've submitted a package on AUR: https://aur.archlinux.org/packages/xf86 … dth-patch/

Since the original thread ended I reverted to the standard xf86-input-synaptics package (which got updated) and have not had the problem since then - so I was guessing that the patch was in the updated version, although I could of course be wrong.


Mike C

Offline

#16 2014-08-08 14:32:55

Sky
Member
Registered: 2009-07-11
Posts: 4

Re: [SOLVED] Touchpad palm detection not working on X1 Carbon

mcloaked wrote:
Sky wrote:

Hi,

This patch works fine on my x240 too smile I didn't find any news of an upstream patch, so I've submitted a package on AUR: https://aur.archlinux.org/packages/xf86 … dth-patch/

Since the original thread ended I reverted to the standard xf86-input-synaptics package (which got updated) and have not had the problem since then - so I was guessing that the patch was in the updated version, although I could of course be wrong.

Weird, I don't see any patch in their code repository related to this. And I for my part I do really need this patch to get a working palm detection.

Offline

#17 2014-08-08 15:02:12

mcloaked
Member
From: Yorkshire, UK
Registered: 2012-02-02
Posts: 1,240

Re: [SOLVED] Touchpad palm detection not working on X1 Carbon

OK - since you checked and the patch is not there is it worth reporting upstream?


Mike C

Offline

#18 2014-08-08 15:33:13

Sky
Member
Registered: 2009-07-11
Posts: 4

Re: [SOLVED] Touchpad palm detection not working on X1 Carbon

mcloaked wrote:

OK - since you checked and the patch is not there is it worth reporting upstream?

I don't think so, the original bug is still opened upstream.

Offline

#19 2017-05-21 11:59:10

Lindhe
Member
Registered: 2015-05-13
Posts: 15

Re: [SOLVED] Touchpad palm detection not working on X1 Carbon

Do you happen to know if Palm Detection is possible to achieve now, with the libinput driver instead (X1 5gen; 2017)?

Offline

#20 2017-05-29 00:46:59

squirrel
Member
Registered: 2014-02-23
Posts: 7

Re: [SOLVED] Touchpad palm detection not working on X1 Carbon

Palm detection seems to work for me under libinput as described on the Wayland website. I was constantly getting annoyed with the touchpad on my X1 (1st gen) before libinput, but I never think about it since installing libinput---exactly how it should be. A big part of this might be that disable while typing seems to actually work, in addition to the palm exclusion zones on the edge of the trackpad. I hope the same is true for the 5th gen---I just got mine and will be installing Arch on it this week.

Offline

Board footer

Powered by FluxBB