Bug 459558 - Cursor jumps while moving
Summary: Cursor jumps while moving
Status: RESOLVED UPSTREAM
Alias: None
Product: kwayland
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: 5.98.0
Platform: Arch Linux Linux
: VHI major
Target Milestone: ---
Assignee: Martin Flöser
URL: https://gitlab.freedesktop.org/mesa/m...
Keywords: regression
: 459561 459566 (view as bug list)
Depends on:
Blocks:
 
Reported: 2022-09-23 10:44 UTC by temptempor
Modified: 2022-10-19 22:41 UTC (History)
6 users (show)

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


Attachments
Vid1 (651.08 KB, video/webm)
2022-09-23 10:44 UTC, temptempor
Details
example2 (2.20 MB, video/webm)
2022-09-23 13:20 UTC, temptempor
Details

Note You need to log in before you can comment on or make changes to this bug.
Description temptempor 2022-09-23 10:44:04 UTC
Created attachment 152364 [details]
Vid1

SUMMARY

Mouse cursors starts "jumping" pixels away, focus on items not directly under where the cursor is.

Noticed first on Wayland / Intel / Plasma multi-monitor setups for applications on external monitors. Just started happening on main machine. No idea what triggered it, logged out/in because XWayland crashed and there was no way to respawn it and now this problem is happening.

Small buttons etc. become impossible to click as they're systematically "jumped from" and you have to blindly guess where the cursor aim translates / where it'll actually click.

STEPS TO REPRODUCE
1. No real idea how to reliably re-create this situation.


OBSERVED RESULT
See attachment.

EXPECTED RESULT
Usual mouse behaviour

SOFTWARE/OS VERSIONS

Operating System: Arch Linux
KDE Plasma Version: 5.25.5
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6
Kernel Version: 5.19.9-zen1-1-zen (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5800X 8-Core Processor
Memory: 62.7 Gio of RAM
Graphics Processor: AMD Radeon RX 6900 XT
Manufacturer: Micro-Star International Co., Ltd
Product Name: MS-7B86
System Version: 3.0

ADDITIONAL INFORMATION
Comment 1 temptempor 2022-09-23 13:20:29 UTC
Created attachment 152367 [details]
example2
Comment 2 temptempor 2022-09-23 14:55:13 UTC
Completely rebooted the system and behavior persists.
Comment 3 Nate Graham 2022-09-23 15:21:45 UTC
*** Bug 459566 has been marked as a duplicate of this bug. ***
Comment 4 Nate Graham 2022-09-23 15:23:04 UTC
Folks are saying this started happening after they updated their KWayland framework to a version that includes https://invent.kde.org/frameworks/kwayland/-/commit/4c0bba5fd5b33dc90860787372d253f017a4862b and https://invent.kde.org/frameworks/kwayland/-/commit/d02188ad1f6222215adcf842f4c9806ba9e62ccb.
Comment 5 Nate Graham 2022-09-23 15:33:29 UTC
*** Bug 459561 has been marked as a duplicate of this bug. ***
Comment 6 David Edmundson 2022-09-23 15:58:13 UTC
Comments in the last duplicate are extremely relevant (if true)

QQC2 Upgrade causes cursor detection issues in Wayland, issue was not in qqc2-desktop-style-5.97.0-1.fc36.x86_64
Upgraded to  qqc2-desktop-style-5.98.0-1.fc36.x86_64
Comment 7 temptempor 2022-09-23 21:31:27 UTC
(In reply to David Edmundson from comment #6)
> Comments in the last duplicate are extremely relevant (if true)
> 
> QQC2 Upgrade causes cursor detection issues in Wayland, issue was not in
> qqc2-desktop-style-5.97.0-1.fc36.x86_64
> Upgraded to  qqc2-desktop-style-5.98.0-1.fc36.x86_64

Downgraded to 5.97 in Arch still happening.
Comment 8 thesacredsin 2022-09-24 07:04:32 UTC
Worth to note, there was also a Mesa update on that day(In reply to temptempor from comment #7)
> (In reply to David Edmundson from comment #6)
> > Comments in the last duplicate are extremely relevant (if true)
> > 
> > QQC2 Upgrade causes cursor detection issues in Wayland, issue was not in
> > qqc2-desktop-style-5.97.0-1.fc36.x86_64
> > Upgraded to  qqc2-desktop-style-5.98.0-1.fc36.x86_64
> 
> Downgraded to 5.97 in Arch still happening.

Worth to note, there was also a Mesa update on that day. What GPU are you running and what Mesa version?
Comment 9 temptempor 2022-09-24 09:51:47 UTC
(In reply to thesacredsin from comment #8)
> Worth to note, there was also a Mesa update on that day(In reply to
> temptempor from comment #7)
> > (In reply to David Edmundson from comment #6)
> > > Comments in the last duplicate are extremely relevant (if true)
> > > 
> > > QQC2 Upgrade causes cursor detection issues in Wayland, issue was not in
> > > qqc2-desktop-style-5.97.0-1.fc36.x86_64
> > > Upgraded to  qqc2-desktop-style-5.98.0-1.fc36.x86_64
> > 
> > Downgraded to 5.97 in Arch still happening.
> 
> Worth to note, there was also a Mesa update on that day. What GPU are you
> running and what Mesa version?

Good notice.

The problem happens somewhere between Mesa 22.2.0 - 22.3.x.

I was running the Git version. Stable is 22.2.0
Comment 10 thesacredsin 2022-09-24 15:31:52 UTC
Rolled back Mesa to 22.3.0-git.20220921 and issue is now fixed
Comment 11 temptempor 2022-09-25 18:27:45 UTC
(In reply to thesacredsin from comment #10)
> Rolled back Mesa to 22.3.0-git.20220921 and issue is now fixed

Did you pinpoint the commit? It should be worth reporting it on Mesa issue tracker.
Comment 12 Nate Graham 2022-09-26 16:40:18 UTC
That would be a good idea. See https://docs.mesa3d.org/bugs.html.

Once you file a bug report for Mesa, can you add its URL to the URL field of this bug report? Thanks!
Comment 13 ready2rumbel 2022-09-30 17:17:14 UTC
Disabling mesa glthread globally seems to be the current work-around. What is/are the process/es that Plasma runs that could be added to Mesa's glthread exclusion list (in order to have glthread enabled by default globally but that it doesn't apply to Plasma)?
Comment 14 ready2rumbel 2022-10-06 21:59:20 UTC
For those interested, the process that Mesa glthread needs excluding for is kwin_wayland. I'm assuming that Mesa will add it in but until then you can resolve this manually by creating a file labelled .drirc, with the following info, and place it in ~/ (home folder):

<device driver="radeonsi">
   <application name="kwin_wayland" executable="kwin_wayland">
      <option name="mesa_glthread" value="false" />
   </application>
</device>
Comment 15 ready2rumbel 2022-10-19 22:41:51 UTC
This issue is fixed with Mesa commit 53e7f3af (https://gitlab.freedesktop.org/mesa/mesa/-/commit/53e7f3afbd206a419f01ff77f2ca69697acb23b9)