Re: BUG: hid-magicmouse, scroll and middle-click don't work

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks for the reply Peter.  More inline:

On Tue, 2018-12-18 at 16:52 +1000, Peter Hutterer wrote:
> On Sun, Dec 16, 2018 at 05:42:53PM +0000, Robert Burcham wrote:
> > More information:
> > 
> > hid_magicmouse is driving the device: 
> > 
> > [Tue Nov 13 08:40:35 2018] magicmouse 0005:05AC:030D.0005: unknown
> > main item tag 0x0 
> > [Tue Nov 13 08:40:35 2018] input: rburcham’s Mouse as
> > /devices/virtual/misc/uhid/0005:05AC:030D.0005/input/input25 
> > [Tue Nov 13 08:40:35 2018] magicmouse 0005:05AC:030D.0005:
> > input,hidraw4: BLUETOOTH HID v3.06 Mouse [rburcham’s Mouse] on
> > [redacted]
> > 
> > hid_magicmouse is reporting the params: 
> > 
> > $ grep "" /sys/module/hid_magicmouse/parameters/* 
> > /sys/module/hid_magicmouse/parameters/emulate_3button:Y 
> > /sys/module/hid_magicmouse/parameters/emulate_scroll_wheel:Y 
> > /sys/module/hid_magicmouse/parameters/report_undeciphered:N 
> > /sys/module/hid_magicmouse/parameters/scroll_acceleration:N 
> > /sys/module/hid_magicmouse/parameters/scroll_speed:32 
> > 
> > 
> > libinput wants to do the right thing:
> > 
> > $ xinput list-props 19 
> > Device 'rburcham’s Mouse': 
> >         Device Enabled (155):   1 
> >         Coordinate Transformation Matrix (157): 1.000000, 0.000000,
> > 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000,
> > 1.000000 
> >         Device Accel Profile (286):     0 
> >         Device Accel Constant Deceleration (287):       1.000000 
> >         Device Accel Adaptive Deceleration (288):       1.000000 
> >         Device Accel Velocity Scaling (289):    10.000000 
> >         Device Product ID (279):        1452, 781 
> >         Device Node (278):      "/dev/input/event21" 
> >         Evdev Axis Inversion (595):     0, 0 
> 
> ftr, if the properties start with "Evdev", you're using the evdev
> driver,
> 

Understood.  For sake of brevity I omitted output from the libinput x
driver as it was largely analogous to that of evdev and the end
behavior was the same:

$ xinput list-props 19
Device 'rburcham’s Mouse':
        Device Enabled (155):   1
        Coordinate Transformation Matrix (157): 1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Natural Scrolling Enabled (298):       0
        libinput Natural Scrolling Enabled Default (299):       0
        libinput Scroll Methods Available (302):        0, 0, 1
        libinput Scroll Method Enabled (303):   0, 0, 1
        libinput Scroll Method Enabled Default (304):   0, 0, 0
        libinput Button Scrolling Button (311): 2
        libinput Button Scrolling Button Default (312): 2
        libinput Middle Emulation Enabled (313):        1
        libinput Middle Emulation Enabled Default (314):        0
        libinput Accel Speed (305):     0.000000
        libinput Accel Speed Default (306):     0.000000
        libinput Accel Profiles Available (315):        1, 1
        libinput Accel Profile Enabled (316):   1, 0
        libinput Accel Profile Enabled Default (317):   1, 0
        libinput Calibration Matrix (318):      1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Calibration Matrix Default (319):      1.000000, 0.000000, 0.000000, 0.000000, 1.000000, 0.000000, 0.000000, 0.000000, 1.000000
        libinput Left Handed Enabled (307):     0
        libinput Left Handed Enabled Default (308):     0
        libinput Send Events Modes Available (275):     1, 0
        libinput Send Events Mode Enabled (276):        0, 0
        libinput Send Events Mode Enabled Default (277):        0, 0
        Device Node (278):      "/dev/input/event21"
        Device Product ID (279):        1452, 781
        libinput Drag Lock Buttons (309):       <no items>
        libinput Horizontal Scroll Enabled (310):       1


> not libinput. for libinput testing, I recommend using 'libinput
> debug-events' anyway, it takes X out of the picture and narrows down
> where
> things don't work.
> 
> [...]
> 

Good trick, I didn't know:

$ libinput debug-events
-event3   DEVICE_ADDED     Power Button                      seat0 default group1  cap:k
-event11  DEVICE_ADDED     Video Bus                         seat0 default group2  cap:k
-event1   DEVICE_ADDED     Power Button                      seat0 default group3  cap:k
-event0   DEVICE_ADDED     Lid Switch                        seat0 default group4  cap:S
-event2   DEVICE_ADDED     Sleep Button                      seat0 default group5  cap:k
-event13  DEVICE_ADDED     HDA NVidia HDMI/DP,pcm=3          seat0 default group6  cap:
-event14  DEVICE_ADDED     HDA NVidia HDMI/DP,pcm=7          seat0 default group6  cap:
-event15  DEVICE_ADDED     HDA NVidia HDMI/DP,pcm=8          seat0 default group6  cap:
-event16  DEVICE_ADDED     HDA NVidia HDMI/DP,pcm=9          seat0 default group6  cap:
-event5   DEVICE_ADDED     Apple Inc. Apple Keyboard         seat0 default group7  cap:k
-event6   DEVICE_ADDED     Apple Inc. Apple Keyboard         seat0 default group7  cap:k
-event9   DEVICE_ADDED     Integrated_Webcam_HD: Integrate   seat0 default group8  cap:k
-event18  DEVICE_ADDED     DELL0832:00 044E:1220 Mouse       seat0 default group9  cap:p left scroll-nat scroll-button
-event19  DEVICE_ADDED     DELL0832:00 044E:1220 Touchpad    seat0 default group9  cap:pg  size 100x53mm tap(dl off) left scroll-nat scroll-2fg-edge dwt-on
-event20  DEVICE_ADDED     DELL0832:00 044E:1220 UNKNOWN     seat0 default group9  cap:k
-event17  DEVICE_ADDED     HDA Intel PCH Headphone Mic       seat0 default group6  cap:
-event7   DEVICE_ADDED     Intel HID events                  seat0 default group10 cap:k
-event8   DEVICE_ADDED     Intel HID 5 button array          seat0 default group11 cap:k
-event12  DEVICE_ADDED     Dell WMI hotkeys                  seat0 default group12 cap:k
-event4   DEVICE_ADDED     AT Translated Set 2 keyboard      seat0 default group13 cap:k
-event21  DEVICE_ADDED     rburcham’s Mouse                  seat0 default group14 cap:p  size 91x52mm left scroll-nat calib scroll-button

<attempting vertical and horizontal touch-scrolls, no events register...>

<attempt some middle-clicks, only lefts and rights register...>
 event21  POINTER_BUTTON   +12.76s      BTN_LEFT (272) pressed, seat count: 1
 event21  POINTER_BUTTON   +12.88s      BTN_LEFT (272) released, seat count: 0
 event21  POINTER_BUTTON   +16.63s      BTN_RIGHT (273) pressed, seat count: 1
 event21  POINTER_BUTTON   +16.79s      BTN_RIGHT (273) released, seat count: 0
 event21  POINTER_BUTTON   +19.82s      BTN_RIGHT (273) pressed, seat count: 1
 event21  POINTER_BUTTON   +19.98s      BTN_RIGHT (273) released, seat count: 0
 event21  POINTER_BUTTON   +21.36s      BTN_RIGHT (273) pressed, seat count: 1
 event21  POINTER_BUTTON   +21.50s      BTN_RIGHT (273) released, seat count: 0
 event21  POINTER_MOTION   +28.56s        0.23/  0.23 ( +1.00/ +1.00)
 event21  POINTER_MOTION   +28.57s        0.00/  0.44 ( +0.00/ +1.00)
 event21  POINTER_MOTION   +28.58s        0.00/  0.64 ( +0.00/ +1.00)
 event21  POINTER_MOTION   +28.59s        0.71/  0.71 ( +1.00/ +1.00)
 event21  POINTER_MOTION   +28.60s        0.00/  0.71 ( +0.00/ +1.00)
 event21  POINTER_MOTION   +29.25s       -1.33/  0.44 ( -3.00/ +1.00)
 event21  POINTER_MOTION   +29.27s       -2.05/  0.00 ( -3.00/ +0.00)
 event21  POINTER_MOTION   +29.28s       -1.54/  0.00 ( -2.00/ +0.00)
 event21  POINTER_MOTION   +29.29s       -1.54/  0.00 ( -2.00/ +0.00)
 event21  POINTER_MOTION   +29.30s       -2.31/  0.00 ( -3.00/ +0.00)
 event21  POINTER_MOTION   +29.31s       -1.54/  0.00 ( -2.00/ +0.00)
 event21  POINTER_MOTION   +29.32s       -1.54/  0.00 ( -2.00/ +0.00)
 event21  POINTER_MOTION   +29.33s       -0.75/  0.00 ( -1.00/ +0.00)
 event21  POINTER_MOTION   +29.36s       -0.53/  0.00 ( -1.00/ +0.00)
 event21  POINTER_MOTION   +29.37s       -0.54/  0.00 ( -1.00/ +0.00)
 event21  POINTER_MOTION   +29.39s       -0.54/  0.00 ( -1.00/ +0.00)
 event21  POINTER_MOTION   +29.41s       -0.47/  0.47 ( -1.00/ +1.00)
 event21  POINTER_MOTION   +29.50s       -0.40/  0.00 ( -1.00/ +0.00)
-event5   KEYBOARD_KEY     +35.49s      *** (-1) pressed
 event5   KEYBOARD_KEY     +37.21s      *** (-1) pressed

So the direct libinput test also shows no touch scroll events or middle
clicks.

> > $ xinput get-button-map 19 
> > 1 2 3 4 5 6 7
> > 
> > 
> > But issuing 'xinput test 19' and attempting any touch-scroll or
> > middle
> > click results in no events being received by libinput.  So I have
> > to
> > conclude hid_magicmouse is not sending them, despite the state of
> > the
> > module's parameters.
> 
> file a bug against libinput with an evemu recording attached (or
> libinput
> record, it does the same job). Could still be a libinput bug.
> 

Done https://bugs.freedesktop.org/show_bug.cgi?id=109087

I do kinda suspect a regression in hid_magicmouse though.

Does anyone have a properly scrolling and middle clicking gen-1 magic
mouse?

> Cheers,
>    Peter
> > 
> > 
> > On Sun, 2018-12-09 at 13:50 -0600, Robert Burcham wrote:
> > > In 4.19 kernels I have been unable to drive a bluetooth gen-1
> > > magicmouse as anything other than a stock 2-button mouse.
> > > Regardless of
> > > config or params the driver refuses to send events for middle
> > > button or
> > > any touch v-scroll and h-scroll actions.
> > > 
> > > I think this patch last year introduced proper middle button and
> > > touch
> > > scroll support:
> > > 
> > > https://lkml.org/lkml/2017/4/7/109
> > > 
> > > This patch moves the __set_bit calls for touch and tap events to
> > > a
> > > higher scope when setting up the device.  However sometime since
> > > then
> > > there has been some sort of regression.  There appears to have
> > > been
> > > some general refactoring around magicmouse_raw_event and
> > > magicmouse_setup_input that I suspect has reintroduced the more
> > > restrictive scope for those __set_bit calls.
> > > 
> > > I post this in the hope that it might jog the memory of someone
> > > familiar with the hid-magicmouse diver, so we can get a proper
> > > magicmouse support restored to the kernel.




[Index of Archives]     [Linux Media Devel]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Linux Wireless Networking]     [Linux Omap]

  Powered by Linux