Bug 1575260

Summary: Macbook touchpad temporarily unresponsive (bcm5974)
Product: [Fedora] Fedora Reporter: druidic
Component: libinputAssignee: Peter Hutterer <peter.hutterer>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 28CC: dchen, druidic, peter.hutterer
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: libinput-1.10.6-2.fc28 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-16 13:07:08 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description druidic 2018-05-05 13:23:35 UTC
Description of problem:

The touchpad/trackpad on a MacBook Pro (13-inch, Mid 2009) aka model MacBookPro5,5 temporarily stops responding to input during normal operation.


Version-Release number of selected component (if applicable):
- libinput-1.10.6


How reproducible:

The issue is 100% reproducible by booting the LiveCD and merely moving the pointer around for a while in Gnome. The easiest way to trigger is probably to perform a circular motion for a couple of seconds and the pointer will stop moving and the touchpad will stop responding to further input. Other sure way to trigger it is to open a terminal window and try click-dragging it around.

The way to restore functionality is to lift the finger from the trackpad and try again.


Steps to Reproduce:

1. Click on a window title bar, hold finger on the touchpad and try to move the window around using circular motion
2.
3.


Actual results:
- Either the pointer (and hence the window) does not budge at all or stops moving after a couple of seconds


Expected results:
- Window moves along with the pointer until the user stops moving his/her finger


Additional info:

I installed the latest libinput from updates-testing as these guys https://ask.fedoraproject.org/en/question/120258/macbook-touchpad-becomes-unresponsive/ had a similar problem. I was running the LiveCD so I logged out the user and restarted GDM to see whether that had any effect. Sadly, this did not fix it for me.

Comment 1 Peter Hutterer 2018-05-09 09:46:37 UTC
Run sudo libinput debug-events in a terminal and reproduce the bug. Do you see the event stream stop when the cursor stops? If so, it's a libinput (or hw) bug. Re-run with --verbose to see if anything interesting happens in that case, maybe there's a spurious palm detection happening or something like that.

Comment 2 druidic 2018-05-09 15:54:56 UTC
(In reply to Peter Hutterer from comment #1)
> Do you see the event stream stop when the cursor stops?

Yes indeed it does (stop).

> Re-run with --verbose to see if anything interesting happens in
> that case, maybe there's a spurious palm detection happening or something
> like that.

That is exactly what happens:

event6  - palm: touch size exceeded
event6  - palm: palm detected (touch size)
event6  - touch-size: end touch
event6  - button state: from BUTTON_STATE_AREA, event BUTTON_EVENT_UP to BUTTON_STATE_NONE

Comment 3 Peter Hutterer 2018-05-10 01:23:22 UTC
Run the libinput measure touch-size tool please (as root) and follow the instructions. See also https://wayland.freedesktop.org/libinput/doc/latest/touchpad_pressure.html#touchpad_touch_size_hwdb

Comment 4 druidic 2018-05-10 10:10:45 UTC
The maximum touch-size I was able to get with a single finger was in the lower 900s and even that was a rare occurrence that I cannot reliably reproduce.

These guys here https://gist.github.com/roadrunner2/1289542a748d9a104e7baec6a92f9cd7 have been setting the palm size detection threshold to 1200 on some newer MacBook Pros.

However, for me

# cat /etc/udev/hwdb.d/99-touchpad-pressure.hwdb
libinput:name:bcm5974:dmi:*svnAppleInc.:pnMacBookPro5,5*
 LIBINPUT_ATTR_PALM_SIZE_THRESHOLD=1000

seemed to do the trick.

Comment 5 druidic 2018-05-10 10:23:20 UTC
A match line

libinput:name:bcm5974:dmi:*:svnAppleInc.:pnMacBookPro5,5:*

with the added colons especially at the end is probably slightly safer.

Comment 6 Peter Hutterer 2018-05-11 00:30:40 UTC
rightyo, that works. Mind sending me this as git formatted patch for libinput (to the bugzilla email or the one in the libinput git logs). The line goes into 99-libinput-model-quirks.hwdb. That way I can apply it directly and you get all the fame and fortune from proper patch accreditation :)

Comment 7 druidic 2018-05-11 18:08:33 UTC
Done. I assume you meant 90-libinput-model-quirks.hwdb

Comment 8 Peter Hutterer 2018-05-14 01:18:55 UTC
got it, thanks. I just remembered when double-checking - the apple touchpads are all USB and use product ids correctly. So it'd be better to use an modalias here, the match is going to be:

libinput:touchpad:input:b0003v05ACpXXXX*

where XXXX is the 4 digit zero-prefixed uppercase hex product id of your touchpad, see the Input Device ID line in the evemu-record output. Can you please test that and let me know what the final match line is? I'll change it locally. Based on https://bugs.freedesktop.org/show_bug.cgi?id=106489 it should be 0237

Thanks

Comment 9 Fedora Update System 2018-05-14 01:43:29 UTC
libinput-1.10.6-2.fc28 has been submitted as an update to Fedora 28. https://bodhi.fedoraproject.org/updates/FEDORA-2018-84a230db9e

Comment 10 druidic 2018-05-14 15:06:21 UTC
I see yeah, that's better - makes it apply to more people with similar hardware.

Tested it and the match line is as you suggest:

libinput:touchpad:input:b0003v05ACp0237*

Comment 11 Fedora Update System 2018-05-14 20:39:05 UTC
libinput-1.10.6-2.fc28 has been pushed to the Fedora 28 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2018-84a230db9e

Comment 12 Peter Hutterer 2018-05-14 23:19:05 UTC
Thanks, updated and pushed to libinput git master as commit d7ff5a8f0d876b3125978fd357716ac0f5619de0

Comment 13 Fedora Update System 2018-05-16 13:07:08 UTC
libinput-1.10.6-2.fc28 has been pushed to the Fedora 28 stable repository. If problems still persist, please make note of it in this bug report.