MacBook Pro A1278 Early 2011: Touchpad issue, no tap or right-click

Hi all,

I have a problem configuring my touchpad properly in X11 with XFCE4 on an A1278 MacBook Pro Early 2011.

The touchpad works (well, kind of) in X11:
Mousepointer moves around, left click and two-finger scrolling is possible but that's it.
I'd like to have tap instead of click and also right-click working.

Applications => Settings => Mouse and Touchpad shows both "System Mouse" and "Touchpad" as active.
When I deactivate "System Mouse" the mousepointer can not be moved any more.

Touchbad (spelling on purpose) should be supported as it has the vendor ID 0x0246 which is listed in the manual for the older atp driver. Hence I assume it being supported with the newer wsp driver as well. But maybe I'm wrong on that.

I'm running FreeBSD 13.0-RELEASE-p4 on a i5 MacBook Pro Early 2011 (A1278).

I've dug through a lot of documentation and forum threads but up to now I didn't manage to configure the touchpad properly. But there simply might be something I'm missing.

Here are some parts of my configuration files:

Code:
# /boot/loader.conf (excerpt)
kern.vty=vt
aesni_load="YES"
# load touchpad driver
wsp_load="YES"
# /boot/loader.conf END

Code:
# /etc/rc.conf (excerpt)
powerd_enable="YES"
power_flags="-n min -a hiadaptive -b adaptive"
moused_port="wsp0"
moused_enable="YES"
#moused_type="auto"
#moused_flags="-l 2"
dbus_enable="YES"
hald_enable="YES"
slim_enable="YES"
# /etc/rc.conf END

Code:
# /etc/sysctl.conf (excerpt)
# touchpad
kern.evdev.rcpt_mask=3
# touchpad wsp
hw.usb.wsp.enable_single_tap_clicks: 0
hw.usb.wsp.scr_hor_threshold: 20
hw.usb.wsp.pressure_tap_threshold: 120
hw.usb.wsp.pressure_untouch_threshold: 10
hw.usb.wsp.pressure_touch_threshold: 50
hw.usb.wsp.z_factor: 5
hw.usb.wsp.scale_factor: 12
hw.usb.wsp.debug: 1
# /etc/sysctl.conf END

Code:
# NO additional config in /usr/local/etc/X11/xorg.conf.d/

Any help gladly appreciated :)
 
# /boot/loader.conf (excerpt)
kern.vty=vt
aesni_load="YES"
Not problem related!

No need to load vt(4) explicitily, it's build in the GENERIC kernel, loaded by default. aesni(4) is also build in kernel, also doesn't need to be extra loaded. Check with kldstat -v | grep ... .

I'd like to have tap instead of click and also right-click working.
...
# NO additional config in /usr/local/etc/X11/xorg.conf.d/
Try to enable those events from a Xorg configuration file. As a dependency of x11/xorg . x11-drivers/xf86-input-libinput is installed. Have a look at libinput(4):
Code:
       Option "Tapping"    "bool"
          Enables or disables tap-to-click behavior.

       Option "TappingButtonMap" "(lrm|lmr)"
          Set  the button mapping for 1/2/3-finger taps to left/right/mid-
          dle or left/middle/right,    respectively.

       Option "TappingDragLock"    "bool"
I've indicated also option "TappingDragLock", thinking it might interest you. I use the "tree finger drag" besides tapping on macOS exclusively.

If x11-drivers/xf86-input-libinput doesn't give the expected results try x11-drivers/xf86-input-synaptics and it's tool synclient(1).
 
Delete this line. It's redundant.
Done.

Yes.

My current, modified configurations look like this:

Code:
# /boot/loader.conf (excerpt)
geom_eli_load="YES"
kern.geom.label.disk_ident.enable="0"
kern.geom.label.gptid.enable="0"
cryptodev_load="YES"
zfs_load="YES"
# load touchpad driver
wsp_load="YES"
# apple system management controller
asmc_load="YES"

Code:
# /etc/rc.conf (excerpt)
clear_tmp_enable="YES"
sendmail_enable="NONE"
# de.macbook.kbd not supported
#keymap="de.macbook.kbd"
# use de.kbd as fallback
#keymap="de.kbd"
keymap="us.macbook.kdb"
sshd_enable="YES"
ntpdate_enable="YES"
powerd_enable="YES"
power_flags="-n min -a hiadaptive -b adaptive"
moused_enable="YES"
moused_port="wsp0"
#moused_type="auto"
#moused_flags="-l 2"
dbus_enable="YES"
slim_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
zfs_enable="YES"
kld_list="i915kms"

Code:
# /etc/sysctl.conf (excerpt)
# touchpad
kern.evdev.rcpt_mask=3
#kern.evdev.rcpt_mask=12
# touchpad atp
#hw.usb.atp.stroke_maturity_threshold: 4
#hw.usb.atp.slide_min_movement: 1
#hw.usb.atp.tap_minimum: 2
#hw.usb.atp.small_movement: 30
#hw.usb.atp.scale_factor: 18
#hw.usb.atp.double_tap_threshold: 200000
#hw.usb.atp.touch_timeout: 125000
# touchpad wsp
hw.usb.wsp.enable_single_tap_clicks: 0
hw.usb.wsp.scr_hor_threshold: 20
hw.usb.wsp.pressure_tap_threshold: 120
hw.usb.wsp.pressure_untouch_threshold: 10
hw.usb.wsp.pressure_touch_threshold: 50
hw.usb.wsp.z_factor: 5
hw.usb.wsp.scale_factor: 12
hw.usb.wsp.debug: 1

Code:
# dmesg (excerpt)
uhub2: 2 ports with 2 removable, self powered
uhub3: 2 ports with 2 removable, self powered
Root mount waiting for: usbus1 usbus3
uhub0: 6 ports with 6 removable, self powered
Root mount waiting for: usbus1 usbus3
uhub1: 8 ports with 8 removable, self powered
ugen1.2: <vendor 0x0424 product 0x2513> at usbus1
uhub4 on uhub0
drmn0: <drmn> on vgapci0
vgapci0: child drmn0 requested pci_enable_io
vgapci0: child drmn0 requested pci_enable_io
[drm] Unable to create a private tmpfs mount, hugepage support will be disabled(-19).
VT: Replacing driver "efifb" with new "dummy".
Successfully added WC MTRR for [0x90000000-0x9fffffff]: 0; 
[drm] Got stolen memory base 0x8ba00000, size 0x4000000
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] Driver supports precise vblank timestamp query.
Firmware Warning (ACPI): Possibly buggy BIOS with ACPI_TYPE_INTEGER for function enumeration
 (20201113/ACPI-2675)
[drm] Connector LVDS-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.LVDS-1
[drm]   - kern.vt.fb.default_mode
[drm] Connector VGA-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.VGA-1
[drm]   - kern.vt.fb.default_mode
[drm] Connector HDMI-A-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.HDMI-A-1
[drm]   - kern.vt.fb.default_mode
[drm] Connector DP-1: get mode from tunables:
[drm]   - kern.vt.fb.modes.DP-1
[drm]   - kern.vt.fb.default_mode
[drm] Connector HDMI-A-2: get mode from tunables:
[drm]   - kern.vt.fb.modes.HDMI-A-2
[drm]   - kern.vt.fb.default_mode
[drm] Connector HDMI-A-3: get mode from tunables:
[drm]   - kern.vt.fb.modes.HDMI-A-3
[drm]   - kern.vt.fb.default_mode
[drm] Connector DP-2: get mode from tunables:
[drm]   - kern.vt.fb.modes.DP-2
[drm]   - kern.vt.fb.default_mode
[drm] Connector DP-3: get mode from tunables:
[drm]   - kern.vt.fb.modes.DP-3
[drm]   - kern.vt.fb.default_mode
sysctl_warn_reuse: can't re-use a leaf (hw.dri.debug)!
[drm] Initialized i915 1.6.0 20190822 for drmn0 on minor 0
uhid0 on uhub5
uhid0: <Apple Computer, Inc. IR Receiver, class 0/0, rev 2.00/0.16, addr 3> on usbus3
ums0 on uhub6
ums0: <vendor 0x05ac product 0x820b, class 0/0, rev 2.00/1.00, addr 5> on usbus1
ums0: 3 buttons and [XY] coordinates ID=2
ums1 on uhub4
ums1: <Touchpad> on usbus1
ums1: 3 buttons and [XY] coordinates ID=2
ubt0 on uhub6
ubt0: <Apple Inc. Bluetooth USB Host Controller, rev 2.00/0.42, addr 6> on usbus1
uhub4: <vendor 0x0424 product 0x2513, class 9/0, rev 2.00/b.b3, addr 2> on usbus1
uhub4: MTT enabled
Root mount waiting for: usbus1 usbus3
uhub4: 3 ports with 0 removable, self powered
ugen3.2: <vendor 0x0424 product 0x2513> at usbus3
uhub5 on uhub1
uhub5: <vendor 0x0424 product 0x2513, class 9/0, rev 2.00/b.b3, addr 2> on usbus3
uhub5: MTT enabled
ugen1.3: <Apple Inc. BRCM2070 Hub> at usbus1
uhub6 on uhub4
uhub6: <Apple Inc. BRCM2070 Hub, class 9/0, rev 2.00/1.00, addr 3> on usbus1
Root mount waiting for: usbus1 usbus3
uhub5: 2 ports with 1 removable, self powered
uhub6: 3 ports with 0 removable, self powered
ugen3.3: <Apple Computer, Inc. IR Receiver> at usbus3
ugen1.4: <vendor 0x05ac product 0x820a> at usbus1
ukbd0 on uhub6
ukbd0: <vendor 0x05ac product 0x820a, class 0/0, rev 2.00/1.00, addr 4> on usbus1
kbd1 at ukbd0
Root mount waiting for: usbus1
ugen1.5: <vendor 0x05ac product 0x820b> at usbus1
ugen1.6: <Apple Inc. Bluetooth USB Host Controller> at usbus1
Root mount waiting for: usbus1
ugen1.7: <Apple Inc. Apple Internal Keyboard / Trackpad> at usbus1
ukbd1 on uhub4
ukbd1: <Apple Internal Keyboard> on usbus1
kbd2 at ukbd1
wsp0 on uhub4
wsp0: <Touchpad> on usbus1
Root mount waiting for: usbus1
ugen1.8: <Realtek 802.11n WLAN Adapter> at usbus1
Root mount waiting for: usbus1
ugen1.9: <Apple Inc. FaceTime HD Camera (Built-in)> at usbus1
WARNING: attempt to domain_add(bluetooth) after domainfinalize()
WARNING: attempt to domain_add(netgraph) after domainfinalize()
ugen1.4: <vendor 0x05ac product 0x820a> at usbus1 (disconnected)
ukbd0: at uhub6, port 1, addr 4 (disconnected)
ukbd0: detached
ugen1.5: <vendor 0x05ac product 0x820b> at usbus1 (disconnected)
ums0: at uhub6, port 2, addr 5 (disconnected)
ums0: detached

Don't now if relevant, but imho this is notable:
Code:
wsp0: <Touchpad> on usbus1
...
ums1: <Touchpad> on usbus1

And I'm not sure if any setting for kern.evdev.rcpt_mask is needed.

Try to enable those events from a Xorg configuration file. As a dependency of x11/xorg . x11-drivers/xf86-input-libinput is installed.

Ok, I've added this touchpad configuration file:
Code:
# /usr/local/etc/X11/xorg.conf.d/90-touchpad.conf
Section "InputClass"
  Identifier "Touchpad"
  Driver "libinput"
  MatchIsTouchpad "on"
  Option "Device" "/dev/wsp0"
  Option "Tapping" "on"
  Option "NaturalScrolling" "on"
  Option "ClickMethod" "clickfinger"
# Option "TappingButtonMap" "lrm|lmr"
# Option "TappingDragLock" "on"
EndSection

Just curious: the Apple Macbook Touchpad is made by Wellspring afaik, why should I try x11-drivers/xf86-input-synaptics and it's tool synclient(1)?

But after all fiddling still under Applications => Settings => Mouse and Touchpad both "System Mouse" and "Touchpad" are shown both and as active.
But when I deactivate "System Mouse" (reboot included) and just "Touchpad" active, the mousepointer can not be moved any more.

So still no properly working touchpad with tap and right click for me. Anything more I could check?

Thanks for all the feedback up to now :)
 
Ok, I've added this touchpad configuration file:
Code:
Section "InputClass"
  Option "Device" "/dev/wsp0"
Try without that option. libinput(4) states:
Code:
CONFIGURATION DETAILS
       ...
        Option "Device" "string"
                ... When using InputClass directives, this    option
                is  set by the server.
Alternatively try setting string "of the form "/dev/input/eventX", where X is some integer." in case the server hasn't set it after examining Xorg.0.log.



Just curious: the Apple Macbook Touchpad is made by Wellspring afaik, why should I try x11-drivers/xf86-input-synaptics and it's tool synclient(1)?
My suggestion to try it was based on this Linux Mint forums thread - [SOLVED]Macbook pro touchpad config and looking at the synaptics(4) manual. The "synaptics" naming has historical reasons, it's not a Synaptics brand touchpad specific driver. From synaptics(4):
Code:
DESCRIPTION
       synaptics is an Xorg input driver for touchpads.
       ...
       The  name  "synaptics"  is historical and the driver still provides the
       synaptics protocol parsing code.
And further:
Code:
       ... Under  Linux  however,    the  hardware-
       specifics  are  handled by the kernel and this driver will work for any
       touchpad    that has a working kernel driver.
I'm not sure if this is valid for FreeBSD as well with working kernel driver wsp(4) or atp(4), but I thought it doesn't hurt to try. I would have checked it on my MacBookPro8,2, but I haven't found the time to buy and install a second hard disk in the DVD bay for a FreeBSD installation in parallel to macOS.
 
Waaaaah:
Code:
# /etc/sysctl.conf (excerpt)
[...]
hw.usb.wsp.enable_single_tap_clicks: 0
[...]

The whole time I explicity had deactivated tapping... Dunno where I got this, maybe copied from another post or some misunderstanding on my side. By removing this line ofcourse the default setting kicks in, which is hw.usb.wsp.enable_single_tap_clicks: 1 - Tap is working! :)

wsp manual:
Tap to left-click can be controlled using the sysctl tunable hw.usb.wsp.enable_single_tap_clicks, set to 0 to disable single tap clicks or 1 to enable them (default).

wsp manual according right click:
The driver simulates a three-button mouse using multi-finger tap detection. A single-finger press generates a left button click. A two-finger tap maps to the right button; whereas a three-finger tap gets treated as a middle button click.
Is there really no way but a two-finger tap (which maps to the right button) to get a right click as a _single finger_ right tap working?
 
Back
Top