Subject: bcm5974 touchpad is not recognized as touchpad

From: "pelzflorian (Florian Pelz)" <[email-masked]>
Date: Sun, 5 May 2019 08:54:11 +0200

On *some* reboots my Macbook’s touchpad does not work properly; it
behaves like mouse wheel, I can only scroll.  Only when I press it
down, I can move the pointer to the right, but never to the left.

This happens both with synaptics and libinput driver.

Restarting xorg-server does not help; this appears to be an issue with
the order in which udev rules are applied.

Apparently my bcm5974 touchpad is recognized by udev as a mouse
sometimes (?), because when diffing /var/log/gdm/greeter.log I see a
mouse being recognized (it is never called bcm5974) instead of a
bcm5974 touchpad.

$ sudo diff /var/log/gdm/greeter.log.1 /var/log/gdm/greeter.log.2
[…]
381,387c381,387
< (II) config/udev: Adding input device Apple Inc. Apple Internal Keyboard / Trackpad (/dev/input/event14)
< (**) Apple Inc. Apple Internal Keyboard / Trackpad: Applying InputClass "evdev pointer catchall"
< (**) Apple Inc. Apple Internal Keyboard / Trackpad: Applying InputClass "libinput pointer catchall"
< (II) Using input driver 'libinput' for 'Apple Inc. Apple Internal Keyboard / Trackpad'
< (II) systemd-logind: got fd for /dev/input/event14 13:78 fd 32 paused 0
< (**) Apple Inc. Apple Internal Keyboard / Trackpad: always reports core events
< (**) Option "Device" "/dev/input/event14"
---
> (II) config/udev: Adding input device bcm5974 (/dev/input/event12)
> (**) bcm5974: Applying InputClass "evdev touchpad catchall"
> (**) bcm5974: Applying InputClass "libinput touchpad catchall"
> (II) Using input driver 'libinput' for 'bcm5974'
> (II) systemd-logind: got fd for /dev/input/event12 13:76 fd 32 paused 0
> (**) bcm5974: always reports core events
> (**) Option "Device" "/dev/input/event12"
389,393c389,393
< (II) event14 - Apple Inc. Apple Internal Keyboard / Trackpad: is tagged by udev as: Mouse
< (II) event14 - Apple Inc. Apple Internal Keyboard / Trackpad: device is a pointer
< (II) event14 - Apple Inc. Apple Internal Keyboard / Trackpad: device removed
< (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:06.0/usb4/4-3/4-3:1.2/input/input14/event14"
< (II) XINPUT: Adding extended input device "Apple Inc. Apple Internal Keyboard / Trackpad" (type: MOUSE, id 12)
---
> (II) event12 - bcm5974: is tagged by udev as: Touchpad
> (II) event12 - bcm5974: device is a touchpad
> (II) event12 - bcm5974: device removed
> (**) Option "config_info" "udev:/sys/devices/pci0000:00/0000:00:06.0/usb4/4-3/4-3:1.2/input/input12/event12"
> (II) XINPUT: Adding extended input device "bcm5974" (type: TOUCHPAD, id 12)
395,400c395,400
< (**) Apple Inc. Apple Internal Keyboard / Trackpad: (accel) selected scheme none/0
< (**) Apple Inc. Apple Internal Keyboard / Trackpad: (accel) acceleration factor: 2.000
< (**) Apple Inc. Apple Internal Keyboard / Trackpad: (accel) acceleration threshold: 4
< (II) event14 - Apple Inc. Apple Internal Keyboard / Trackpad: is tagged by udev as: Mouse
< (II) event14 - Apple Inc. Apple Internal Keyboard / Trackpad: device is a pointer
< (II) config/udev: Adding input device Apple Inc. Apple Internal Keyboard / Trackpad (/dev/input/mouse1)
---
> (**) bcm5974: (accel) selected scheme none/0
> (**) bcm5974: (accel) acceleration factor: 2.000
> (**) bcm5974: (accel) acceleration threshold: 4
> (II) event12 - bcm5974: is tagged by udev as: Touchpad
> (II) event12 - bcm5974: device is a touchpad
> (II) config/udev: Adding input device bcm5974 (/dev/input/mouse0)
[…]

Regards,
Florian