Bug 341148 - Compositing makes secondary mouse pointers flicker (X11)
Summary: Compositing makes secondary mouse pointers flicker (X11)
Status: RESOLVED DUPLICATE of bug 213281
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (other bugs)
Version First Reported In: 5.1.0
Platform: openSUSE Linux
: NOR wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-21 06:52 UTC by Kyle Mills
Modified: 2018-02-07 20:28 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Kyle Mills 2014-11-21 06:52:46 UTC
Multi-pointer X (MPX) was an addition to X11 that allowed there to be multiple on-screen mouse pointers, with virtual and physical mice and keyboards attached to them (comparable to the functionality of multi-touch touchscreens)


Reproducible: Always

Steps to Reproduce:
1. (optional) Press Shift+Alt+F12 to disable compositing.
2. (optional) run 'xinput list' between other xinput commands to see what changed.
3. (optional) Plug in a second mouse (serial if you know your way around inputattach, or PS/2 or USB)
4. (optional) Also another keyboard, if you have the second mouse (having two keyboards with one mouse makes it hard to focus one of the pointers - if the keyboards aren't attached to the same one)
5. xinput create-master "Virtual core 2"
6. (optional) xinput reattach "pointer:Logitech USB Receiver" "Virtual core 2 pointer" (use the actual name of your mouse or the id - you only need 'pointer:' if there's a keyboard with the same name, and you need to use the id if there are two mice with the same name)
7. (optional) xinput reattach 9 "Virtual core 2 keyboard" (again, use your exact id or name)
8. Re-enable compositing.
9. (optional) System Settings→Desktop Effects→Show Paint - this helps with measuring how much it flickers

Actual Results:  
The original mouse pointer is still drawn the same, solid, over frame redraws, windows, and the desktop.
The second mouse pointer is drawn differently than the original:
• The whole screen may be painted in the same color, with the secound pointer not visible.
• The whole screen may be painted in the same color, with the second pointer visible on top of it.
• The whole screen may be painted in the same color, with a square of a different color of paint around the second pointer, with the second pointer visible.
If there is something redrawing the screen (a cpu monitor or systray chat client trying to get your attention), the mouse flickers while it is changing between these various states of drawnness.

Expected Results:  
Both pointers being drawn solidly, on top of everything else, responding to whatever physical mice and keyboards are attached.

Steps to return to normal:
Disable System Settings→Desktop Effects→Show Paint
xinput remove-master "Virtual core 2 pointer" AttachToMaster

I remember, sometime in the past, if I created the second mouse pointer while the compositor was running, I could disable the compositor, stopping the flicker, and enable it again, which wouldn't make it flicker again. - If the compositing was turned on with two mice, it would work fine. If the second mouse was added while it was running, it had to be restarted to notice it. Now this restart doesn't help. This was before the AttachToMaster option existed.

Workaround #1: Don't use the compositor.
Workaround #2: Never use more than a single mouse pointer.
Workaround #3: Don't use the second mouse pointer for anything that requires knowing its position in a short amount of time.

My guess is that it's some sort of rendering synchronization problem. Some frames have both mice, some have one.
Comment 1 Martin Flöser 2014-11-21 09:08:47 UTC
I'm sorry to say, multi pointer is not on our todo list and a lot of work to get it working. This is never going to happen for the X11 version on KWin (unless someone steps up and implements it). Also for Wayland there is (at least from my side) currently no plan to support multiple seats at the same time.
Comment 2 Thomas Lübking 2014-11-21 14:44:39 UTC

*** This bug has been marked as a duplicate of bug 213281 ***
Comment 3 Navid Zamani 2018-02-07 20:28:59 UTC
Who said anything about multiple seats though?

The idea is that you, as a human, usually have two hands, and ten fingers, yet only use one hand and one finger at a time. That is quite insane.

Multi-touch “solved” this … for people who accept gorilla arms and, frankly, ridiculously coarse pointing.
Multi-pointer is the start of solving this for precise work, associated with actually creating things and doing work on a computer.

X has done a good job, fully implementing what is required, to achieve this.
Now it is KDE’s turn, and then that of applications like Krita/Gimp/Inkscape, Ardour, Kdenlive, FreeCAD, etc, to finally get us there.