Why does the touchpad on my Lenovo ThinkPad not behave as expected in Red Hat Enterprise Linux 7.0?

Solution Verified - Updated -

Environment

  • Red Hat Enterprise Linux 7.0 (without current updates)
  • Lenovo ThinkPad T440s
  • Lenovo ThinkPad T540p
  • Lenovo ThinkPad X240

Issue

  • Why does the touchpad on my Lenovo ThinkPad not behave as expected in Red Hat Enterprise Linux 7.0?

Resolution

Fixes that address issues on this generation of Lenovo touchpads were introduced in an updated RHEL 7 kernel and a separate update to the Synaptics driver. Please see the following errata for more information:

kernel-3.10.0-123.8.1.el7 update: https://access.redhat.com/errata/RHSA-2014:1281

xorg-x11-drv-synaptics-1.7.1-10.el7_0.1 update: https://access.redhat.com/errata/RHEA-2014:0990

Please update your system to use these package versions (or newer) to resolve problems with the touchpad.

If you are running the updated packages and are still experiencing problems with your touchpad, please open a new support case through the Red Hat Customer Portal or Red Hat Bugzilla, as is appropriate for your company, so that we can determine the cause of the problem.

If you must run earlier RHEL 7 packages, continue reading to learn about the configuration changes necessary to support your touchpad. You should not follow these steps if you are running the updated packages mentioned above.

Several fixes for Lenovo touchpad behavior have been included in Red Hat Enterprise Linux 7 kernels starting with kernel-3.10.0-123.8.1.el7 and updates to the Synaptics driver package. If you are unable to these updates, a custom X11 touchpad configuration file can be added to the system to greatly improve the behavior of the touchpad.

  1. As the root user, add the following to a new /etc/X11/xorg.conf.d/99-clickpad-softbuttons.conf file:

     Section "InputClass"
        Identifier "Default clickpad buttons"
        MatchDriver "synaptics"
        MatchIsTouchpad "on"
        Option "ClickPad" "on"
        # Soft Button Areas:
        # first 4 parameters: right button left, right, top, bottom edge
        # last 4 parameters: middle button left, right, top, bottom edge
        Option "SoftButtonAreas" "65% 0 0 2600 35% 65% 0 2600"
        # use /usr/local/bin/evtest to find the value for the top edge
        Option "AreaTopEdge" "2600"
        # reduce motion from noise during click events
        # (default value of 8 is too low)
        Option "HorizHysteresis" "30"
        Option "VertHysteresis" "30"
    EndSection
    
  2. Reboot the system to ensure the changes are loaded by Xorg

Root Cause

The system was not properly setting up the soft buttons at the top of the touchpad. As a result, the touchpad was treated as three large buttons that extended the entire height of the touchpad instead of three small buttons and a large touch area beneath them.

External reference: http://jeffbastian.blogspot.cz/2014/04/lenovo-t440s-touchpad-configuration-for.html

Diagnostic Steps

To recreate a config file like the one in the above resolution, read on.

  1. Download and install the Fedora 19 version of the "evtest" utility from Fedora Project at http://archive.fedoraproject.org/pub/fedora/linux/releases/19/Everything/x86_64/os/Packages/e/evtest-1.30-3.fc19.x86_64.rpm

  2. Log out of X to allow the utility to have uninterrupted control of the touchpad.

  3. Change to a virtual console by pressing Ctrl-Alt-F2 (or Fn-Ctrl-Alt-F2 if not in function lock mode).

  4. Log in as root.

  5. Run the evtest utility and select the touchpad hardware from the list.

  6. Using this diagram as a guide ...

    ----------------------------------------------------------------------
    | _________________________ . . . . . . . . ________________________ | <-- Red lines and raised dots
    |                                                                    |      on the touchpad surface
    |--------------------------A---------------B-------------------------|
    |                                                                    |
    |                                                                    |
    |                                                                    |
    |                                                                    |
    |                                                                    |
    |                                                                    |Y axis
    |                                                                    |
    |                                                                    |
    |                                                                    |
    |                                                                    |
    |                                                                    |
    |                                                                    |
    |                                                                    |
    |                                                                    |
    ----------------------------------------------------------------------
                                    X axis
    

    Touch the touchpad at point "A" and record the ABS_X and ABS_Y values displayed. This X Y coordinate pair will be the lower left corner of the soft middle button.
    Then touch the touchpad at point "B" and record the ABS_X and ABS_Y values displayed. This X Y coordinate pair will be the lower left corner of the soft right button.

  7. The Y values for points "A" and "B" will probably differ due to the sensitivity of the touchpad. Choose one of the Y values and use it for both points "A" and "B".

  8. When satisfied with the values, press Ctrl-c to exit evtest.

  9. Log out of the virtual console (press Ctrl-d), return to the graphical environment by pressing Ctrl-Alt-F1 (or Fn-Ctrl-Alt-F1 if not in function lock mode) and log back in.

  10. Fill in the X and Y coordinates from points "A" and "B" in the appropriate areas of the example configuration section shown below and add the section to the file /etc/X11/xorg.conf.d/99-clickpad-softbuttons.conf Root privileges will be needed to edit the file. Example:

    Section "InputClass"
        Identifier "Default clickpad buttons"
        MatchDriver "synaptics"
        MatchIsTouchpad "on"
        Option "ClickPad" "on"
         # Ignore motion events in the top part of the touchpad, treating it as
         # soft buttons only:
         Option "AreaTopEdge" "Y_value_from_points_A_and_B"
    
         # The eight numbers on the next Option line indicate the following 
         # positions for the soft buttons:
         # Right button left edge, right button right edge, right button top edge,
         # right button bottom edge, middle button left edge, middle button right edge,
         # middle button top edge, middle button bottom edge
         # Using a zero will extend the button to the edge of the touchpad 
         # in that direction. See the "synaptics" man page for more information.
         Option "SoftButtonAreas" "Point_B's_X_value 0 0 Points_A_and_B's_Y_value Point_A's_X_value Point_B's_X_value_minus_one 0 Points_A_and_B's_Y_value"
    
         # Help to stabilize the cursor while clicking
         Option "HorizHysteresis" "30"
         Option "VertHysteresis" "30"
    EndSection
    

    Note: Be sure that the sixth value on the SoftButtonAreas line is one less than the first value, otherwise there will be a problematic overlap between the middle and right buttons.

  11. Save the file and exit, then reboot the system again.

  12. Log in when the graphical environment returns.

  13. Launch the mouse settings test utility by going to Applications, System Tools, Settings, Mouse and Touchpad, and clicking the "Test Your Settings" button. Try clicking the left, middle, and right soft-button areas and confirming that they respond as expected. Try two-finger scrolling on the lower portion of the touchpad, confirm that single-finger clicks in the lower area respond as primary-button clicks, and confirm that two-finger clicks respond as secondary-button clicks. If the mouse does not behave as desired, try taking new readings with evtest and edit the configuration section to use those new values.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Comments