You are not logged in.
Hello, I'm having some trouble with a middle mouse button.
Below are two concurent logs of the following exercise: press and hold middle
mouse button for ~3 seconds.
It seems that the ButtonPress and ButtonRelease events are detected by Xorg at
the same time. Yet, the `evtest` log clearly shows the time delay.
How can I have Xorg separate these events?
evtest output:
Input driver version is 1.0.1
Input device ID: bus 0x11 vendor 0x2 product 0xa version 0x0
Input device name: "TPPS/2 Elan TrackPoint"
Supported events:
Event type 0 (EV_SYN)
Event type 1 (EV_KEY)
Event code 272 (BTN_LEFT)
Event code 273 (BTN_RIGHT)
Event code 274 (BTN_MIDDLE)
Event type 2 (EV_REL)
Event code 0 (REL_X)
Event code 1 (REL_Y)
Properties:
Property type 0 (INPUT_PROP_POINTER)
Property type 5 (INPUT_PROP_POINTING_STICK)
Testing ... (interrupt to exit)
Event: time 1567207291.440265, type 1 (EV_KEY), code 274 (BTN_MIDDLE), value 1
Event: time 1567207291.440265, -------------- SYN_REPORT ------------
Event: time 1567207294.781026, type 1 (EV_KEY), code 274 (BTN_MIDDLE), value 0
Event: time 1567207294.781026, -------------- SYN_REPORT ------------xev output:
ButtonPress event, serial 32, synthetic NO, window 0x2000001,
root 0x16a, subw 0x2000002, time 168957798, (50,49), root:(1330,77),
state 0x0, button 2, same_screen YES
EnterNotify event, serial 32, synthetic NO, window 0x2000001,
root 0x16a, subw 0x0, time 168957798, (50,49), root:(1330,77),
mode NotifyGrab, detail NotifyInferior, same_screen YES,
focus YES, state 512
KeymapNotify event, serial 32, synthetic NO, window 0x0,
keys: 106 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
ButtonRelease event, serial 32, synthetic NO, window 0x2000001,
root 0x16a, subw 0x2000002, time 168957798, (50,49), root:(1330,77),
state 0x200, button 2, same_screen YESOffline
This is different here for me. I get one event the moment I start holding down the mouse button, and then a second event when I let go of the button. See here:
ButtonPress event, serial 25, synthetic NO, window 0x5800001,
root 0x6cc, subw 0x0, time 53619583, (75,122), root:(1266,776),
state 0x0, button 2, same_screen YES
ButtonRelease event, serial 25, synthetic NO, window 0x5800001,
root 0x6cc, subw 0x0, time 53623488, (75,122), root:(1266,776),
state 0x200, button 2, same_screen YESYou can see the "time" value has a different number for me for the two events. I held down the button for about five seconds, and that's visible there in the "time" values.
Maybe you are running a program that is doing something to the mouse button event?
Last edited by Ropid (2019-08-31 00:35:55)
Offline
Hmm, I've tried this with wev/Swayland, which gives a combo of the two behaviours:
[173387.851549919] [11: wl_pointer] button: serial: 7194; time: 173385401; button: 274 (middle), state: 1 (pressed)
[173387.851562846] [11: wl_pointer] frame
[173387.851566814] [11: wl_pointer] button: serial: 7195; time: 173387851; button: 274 (middle), state: 0 (released)
[173387.851570897] [11: wl_pointer] frameHere the event timestamps are distinct. But note that the press was
actually made 2 seconds before showing up in the log entry.
Last edited by tomgg (2019-08-31 06:08:01)
Offline
There should be no EnterNotify/KeymapNotify events what typically means the button is taken by some global shortcut and that's probably the cause for the implicit release.
Edit: do they also show up if the xev window is explicitly activated?
Last edited by seth (2019-08-31 06:24:41)
Offline
Dear seth,
The EnterNotify/KeymapNotify sent because I had placed the pointer inside xev's little black box. Keeping the pointer outside of the box gives:
ButtonPress event, serial 32, synthetic NO, window 0xc00001,
root 0x16a, subw 0x0, time 177096951, (260,696), root:(1540,724),
state 0x0, button 2, same_screen YES
ButtonRelease event, serial 32, synthetic NO, window 0xc00001,
root 0x16a, subw 0x0, time 177096951, (260,696), root:(1540,724),
state 0x200, button 2, same_screen YESas you would expect. The times are still identical.
And, for clarification, the problem isn't an implicit release; it's a delayed press.
Offline
'key.
The sway test suggests the timestamps are preserved but the events passed as batch.
a) is the press also late in evtest?
b) do you use evdev or libinput in X11?
c) behavior in "libinput debug-events"?
Wild guess: Do you have "lsmod | grep psmouse"?
What if you pass "elantech_smbus=1" and "synaptics_intertouch=1" to the module?
Offline
Hi Seth, thanks for helping.
a) press is on time and works as expected in evtest (there's some log output in the OP)
b) libinput
c) this gives the swayland behaviour; i.e. events preserve the timing but are batched up so that press doesn't send until button is released.
Yes, I'm using psmouse. And I already have those params set for some other unreleated reason.
Offline
Smells like a libinput bug, did you try xf86-input-evdev?
Offline