Bug 84644

Summary: Can't play FPS games with Xwayland EG CS:GO Etc
Product: Wayland Reporter: cory <linuxgamerzone>
Component: XWaylandAssignee: Wayland bug list <wayland-bugs>
Status: RESOLVED FIXED QA Contact: Xorg Project Team <xorg-team>
Severity: blocker    
Priority: medium CC: anakin.cs, jadahl, kengur, kparal, pav, simon, xavierb
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=104426
Whiteboard:
i915 platform: i915 features:
Bug Depends on: 84014    
Bug Blocks:    

Description cory 2014-10-04 00:57:06 UTC
I think this is maybe a input bug i have seen it once before many years ago when hacking to get a game working but any time i try to move the mouse it will make the camara look at the ground in circles only in FPS's and some 3d games in wine this only happens in Xwayland far as i know i tested it in Fedora 21 with ATI drivers and a AMD HD9950 both Xorg and Xwayland
Comment 1 Jonas Ådahl 2014-10-04 09:21:51 UTC
This most likely has to do with the lack of pointer warp support. Adding pointer locking bug as a blocker for this one, as it might be possible to implement warping support in Xwayland using the pointer lock protocol.
Comment 2 AnAkkk 2016-06-19 10:29:58 UTC
This is still present with Xorg 1.18.3, tested in both Gnome Wayland and KDE Wayland. It is impossible to play CS GO, the in-game view just goes in the ground or the sky.
Comment 3 Jonas Ådahl 2016-06-27 03:07:50 UTC
*** Bug 96680 has been marked as a duplicate of this bug. ***
Comment 4 Jonas Ådahl 2016-06-27 03:08:20 UTC
See https://lists.freedesktop.org/archives/xorg-devel/2016-April/049351.html for the current approach.
Comment 5 AnAkkk 2016-06-27 16:38:26 UTC
Have any of these patches been merged yet?
Comment 6 Tomasz Paweł Gajc 2016-12-10 11:52:11 UTC
Looks like these Xwayland Pointer warp emulation patches has been merged into xserver 1.19.0 but i still cant play CS:GO or any other FPS games on Xwayland because my mouse pointer always stuck on the ground.

https://github.com/ValveSoftware/csgo-osx-linux/issues/1248
Comment 7 Jonas Ådahl 2016-12-10 12:08:43 UTC
What compositor are you using? The only one I know which has been adapted to handle Xwayland is mutter.
Comment 8 Kamil Páral 2016-12-12 09:48:55 UTC
Tomasz uses Plasma, per his github comment.
Comment 9 Tomasz Paweł Gajc 2016-12-12 14:27:22 UTC
Looks like support for "pointer constraints" and "ConfinedPointer" did not make into kwin-5.8.4 release :(

https://github.com/KDE/kwin/commit/0c5ca405cc6dbcd92e9297ed7350257123213478
https://github.com/KDE/kwin/commit/2defd6bb6487d52299a0162cf77b5d0e2390bf0f
Comment 10 BNolet 2016-12-17 20:42:39 UTC
The main issue is that the pointer is not semi-locked to the center of the screen. The way most FPS games work is that the mouse gets brought back to the center of a screen based on a certain refresh rate determined by the game.

Not too familiar with any of the protocols or exact coding but I believe there's some sort of call that the game actually performs to the mouse that will determine how many times in a second that mouse position is read and then returned to the center.
Comment 11 Daniel Stone 2018-06-04 07:33:30 UTC
(In reply to BNolet from comment #10)
> The main issue is that the pointer is not semi-locked to the center of the
> screen. The way most FPS games work is that the mouse gets brought back to
> the center of a screen based on a certain refresh rate determined by the
> game.
> 
> Not too familiar with any of the protocols or exact coding but I believe
> there's some sort of call that the game actually performs to the mouse that
> will determine how many times in a second that mouse position is read and
> then returned to the center.

Right, doing this is in fact supported in Xwayland, as long as your compositor provides the appropriate extensions.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.