Bug 470472 - Bluetooth mouse lags when opening and closing programs on Wayland
Summary: Bluetooth mouse lags when opening and closing programs on Wayland
Status: RESOLVED UPSTREAM
Alias: None
Product: kwin
Classification: Plasma
Component: wayland-generic (show other bugs)
Version: 5.27.5
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: wayland
Depends on:
Blocks:
 
Reported: 2023-05-30 22:13 UTC by elman
Modified: 2023-09-12 13:36 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description elman 2023-05-30 22:13:10 UTC
SUMMARY
***
Most of the times when I close a program, Bluetooth mouse lags for a short while and then resumes working.
***

STEPS TO REPRODUCE
1. Run Wayland session
2. Connect Bluetooth mouse
3. Try opening and closing programs

OBSERVED RESULT
Mouse lags for a short while.

EXPECTED RESULT
Mouse movement should be smooth all the times.

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 5.27.5
KDE Frameworks Version: 5.106.0
Qt Version: 5.15.9
Kernel Version: 6.3.4-arch2-1 (64-bit)
Graphics Platform: Wayland

ADDITIONAL INFORMATION
What I tried already:
- Change kernels (didn't help although some kernel behave a bit different - lag maybe shorter or might occur less often)
- Disable BT autosuspend (as described in bug 427700)
- Change BT mouse latency (didn't help)
- Change schedulers (didn't help)
- Try X11 (this actually helps, but I wish to use Wayland)

Is there any information I can collect and add?
Comment 1 elman 2023-05-30 22:26:24 UTC
I forgot to mention it also happens when starting programs.
Comment 2 Nate Graham 2023-06-05 17:54:55 UTC
> - Try X11 (this actually helps, but I wish to use Wayland)
Input latency issue maybe.
Comment 3 elman 2023-06-06 05:27:49 UTC
Doesn't seem like latency problem. It's Logitech MX Master 3S and in other situations works perfectly. Seems to me like something is halting UI process.
Comment 4 james 2023-08-13 14:08:02 UTC
I am also seeing this issue
Comment 5 james 2023-08-13 15:49:13 UTC
I've found that I can eliminate the cursor lag by either changing the KDE compositor mode to "balance of smoothness and latency", or by switching my laptop's graphics mode from hybrid to dGPU.
Comment 6 elman 2023-08-16 07:20:15 UTC
James thanks for the tip. Setting "balance of latency and smoothness" seems to help.
Comment 7 james 2023-09-10 21:35:08 UTC
I upgraded to the 6.5.2 kernel a few hours ago and this problem (so far at least) seems to have disappeared.
Comment 8 Nate Graham 2023-09-11 16:47:44 UTC
Great!

FWIW it should also be much improved in general in Plasma 6, which includes a variety of cursor smoothness fixes.
Comment 9 elman 2023-09-12 10:40:12 UTC
So far looks good also for me when I upgraded to kernel 6.5.2. This seems to be a great kernel, because it works much better with my Zen3 processor. Maybe this issue was visible only on Zen processors.
Comment 10 james 2023-09-12 13:36:36 UTC
It was happening to me on an intel based laptop so I don't think it's related to the zen changes. Not really sure what exactly fixed it but happy to live in ignorance so long as it keeps working!