Bug 2063969

Summary: Real cursor position is slightly offset from displayed position on Wayland in virtual machine (kde spin)
Product: [Fedora] Fedora Reporter: Geraldo Simião <geraldo.simiao.kutz>
Component: kwinAssignee: Daniel Vrátil <me>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 36CC: awilliam, gmarr, jgrulich, kde-sig, kparal, me, rdieter, robatino, than
Target Milestone: ---Keywords: CommonBugs
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard: https://ask.fedoraproject.org/t/common-issues/20639 AcceptedBlocker AcceptedFreezeException
Fixed In Version: kwin-5.24.3-3.fc36 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2022-03-24 00:56:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1953784, 1953785    
Attachments:
Description Flags
Version-Release number of selected components
none
video of a plasma-wayland session bug on F36 KDE
none
screencast with new updates
none
at Fedora-KDE-Live-x86_64-36_Beta-1.4.iso it seems fixed none

Description Geraldo Simião 2022-03-14 18:44:22 UTC
Created attachment 1865913 [details]
Version-Release number of selected components

Description of problem:
Same behavior as see on a F35 ticket last year: [RHBZ ticket 2011066](https://bugzilla.redhat.com/show_bug.cgi?id=2011066)
"If you boot a KDE live image in a windowed qemu VM using qxl or virtio graphics (which are the two most recent default settings in qemu) and log into Plasma on Wayland (the bug does not affect Plasma on X11), the real cursor position will be slightly offset from where it's drawn. For me the real position is always slightly above and to the left of the 'apparent' position."

How reproducible:
Allways

Steps to Reproduce:
1.Install a KVM-Qemu-VirtManager VM qith Fedora 36 KDE spin
2.Open a plasma-wayland session
3. Open any window and try to move it

Actual results:
Mouse pointer offset
(I'll upload a video from the behavior)

Expected results:
Pointer actually working (clicking) at the right places

Comment 1 Geraldo Simião 2022-03-14 18:45:45 UTC
Created attachment 1865914 [details]
video of a plasma-wayland session bug on F36 KDE

VM is BIOS and using QXL video driver

Comment 2 Geraldo Simião 2022-03-14 18:49:25 UTC
It seems upstream is tracking that here. Thanks Adam Williamson.
https://bugs.kde.org/show_bug.cgi?id=427060

Comment 3 Geraldo Simião 2022-03-14 23:38:57 UTC
Since 2009304 and 2011066 was accepted as blocker at F35, I'm proposing this as a blocker too.

Comment 4 Kamil Páral 2022-03-18 13:17:02 UTC
Geraldo, could you please test whether removing spice-vdagent from the VM again serves as a workaround for this bug? Thanks!

Comment 5 Kamil Páral 2022-03-18 14:14:52 UTC
To answer myself - removing spice-vdagent doesn't help. I also tried putting KWIN_FORCE_SW_CURSOR=1 into /etc/environment, and then you see two cursors (host and guest) and you can see the actual offset between them. The offset is largest and easiest to detect, when you test this in the `drawing` app, probably due to the fact that it sets its own "cross" cursor.

Comment 6 Adam Williamson 2022-03-21 16:33:57 UTC
also proposing as Beta FE. there's a patch upstream I'll backport shortly.

Comment 7 Geoffrey Marr 2022-03-21 18:10:23 UTC
Discussed during the 2022-03-21 blocker review meeting: [0]

The decision to classify this bug as both an "AcceptedBlocker (Final)" and an "AcceptedFreezeException (Beta)" was made as this is a significant problem in using virtual machines with a release-blocking desktop; we accepted an identical bug as blocker for F35 Final. As it will affect the KDE live we would also like to fix it in Beta if possible.

[0] https://meetbot.fedoraproject.org/fedora-blocker-review/2022-03-21/f36-blocker-review.2022-03-21-16.01.txt

Comment 8 Fedora Update System 2022-03-21 19:10:00 UTC
FEDORA-2022-6ae069bd8a has been submitted as an update to Fedora 36. https://bodhi.fedoraproject.org/updates/FEDORA-2022-6ae069bd8a

Comment 9 Geraldo Simião 2022-03-22 02:27:39 UTC
Created attachment 1867341 [details]
screencast with new updates

With new updates (kwin-5.24.3-3.fc36) the offset looks a little better (it seems no horiszontal offset anymore) but stil some vertical to the right.

Comment 10 Kamil Páral 2022-03-22 08:52:16 UTC
In my case, the offset was fixed perfectly by the update.

Comment 11 Geraldo Simião 2022-03-23 02:28:54 UTC
Created attachment 1867644 [details]
at Fedora-KDE-Live-x86_64-36_Beta-1.4.iso it seems fixed

Comment 12 Fedora Update System 2022-03-24 00:56:48 UTC
FEDORA-2022-6ae069bd8a has been pushed to the Fedora 36 stable repository.
If problem still persists, please make note of it in this bug report.