#4440

Game window cursor issue (1px window edge)

Opengmbhneoopened 2mo ago

Sometimes when I play a game (mostly FragPunk) my cursor got stuck at the right side of the screen. There is like 1px where the game is not present anymore and you can see the "normal" cursor instead of the game cursor. Since FragPunk is a shooter, it is pretty normal to go from side to side with your cursor. So this happens pretty often. Specially after alt+tab out of the game.

I've tried to change resolution and windowed /bordered / fullscreen but nothing works. Very rarely the issue will just fix itself but I've no idea how.

Also tested KDE Plasma, COSMIC and Hyprland. All of them don't seem to have this issue.

I play my games using wayland by using PROTON_ENABLE_WAYLAND=1 to make sure the window don't shrink when tabbing out.

System Information

  • niri version: niri 26.04 (8ed0da4)
  • Distro: CachyOS
  • GPU: AMD Radeon RX 9070 XT
  • CPU: AMD Ryzen 7 9800X3D (16) @ 5.46 GHz

Activity

15
Sempyos2mo ago

Can you send a screenshot or video and your config.kdl

Sempyos2mo ago

Can you send a screenshot or video and your config.kdl

gmbhneo2mo ago

Here is a video of it. The video will only be available for two days because of streamable. Config is added too.

However, I found out in the video, if your cursor get stuck on the 1px at the edge, you can click and hold, drag the cursor to the center of the screen and sometimes it will work fine afterwards. But only sometimes. Hope this video helps. Let me know if you need more info.

config.kdl.zip

https://streamable.com/nslgv5

gmbhneo2mo ago

Here is a video of it. The video will only be available for two days because of streamable. Config is added too.

However, I found out in the video, if your cursor get stuck on the 1px at the edge, you can click and hold, drag the cursor to the center of the screen and sometimes it will work fine afterwards. But only sometimes. Hope this video helps. Let me know if you need more info.

config.kdl.zip

https://streamable.com/nslgv5

Sempyos2mo ago

In your output config put your scale as 1 and try again.

Sempyos2mo ago

In your output config put your scale as 1 and try again.

gmbhneo2mo ago

I've set it to 1 and was not able to reproduce the issue. However, setting it back to 1.3 (I cut of the numbers, dunno why they were there to be honest) it was happening again. So it might really be the scale.

Problem is, I can't read anything using scale 1. So I am in need to scale it to 1.3 :/

I've read on some other compositor that they were facing the same issue at some point, caused by some rounding issue I think.

Hopefully this helps.

gmbhneo2mo ago

I've set it to 1 and was not able to reproduce the issue. However, setting it back to 1.3 (I cut of the numbers, dunno why they were there to be honest) it was happening again. So it might really be the scale.

Problem is, I can't read anything using scale 1. So I am in need to scale it to 1.3 :/

I've read on some other compositor that they were facing the same issue at some point, caused by some rounding issue I think.

Hopefully this helps.

Sempyos2mo ago

This is probably a fractional scaling issue and not really something we can like fix. I would recommend try a few numbers for scale like 1.2 and 1.5 or using gamescope with the --force-grab-cursor flag.

Sempyos2mo ago

This is probably a fractional scaling issue and not really something we can like fix. I would recommend try a few numbers for scale like 1.2 and 1.5 or using gamescope with the --force-grab-cursor flag.

gmbhneo2mo ago

I do not want to use gamescope since it is using xwayland, adding a lot of latency instead of using wayland directly.

Btw. 1.5 seems to work too. So it really might be 1.3, 1.4 so any custom value I would say.

But how can this not be fixed? Can you explain this to me. Specially since other compositors seem to have this fixed already.

Would really like to use Niri but this would really be something I would have to switch to another compositor. Maybe we can track down the issue together to get it working. I am willing to help as much as I can. (logs, testing etc.)

gmbhneo2mo ago

I do not want to use gamescope since it is using xwayland, adding a lot of latency instead of using wayland directly.

Btw. 1.5 seems to work too. So it really might be 1.3, 1.4 so any custom value I would say.

But how can this not be fixed? Can you explain this to me. Specially since other compositors seem to have this fixed already.

Would really like to use Niri but this would really be something I would have to switch to another compositor. Maybe we can track down the issue together to get it working. I am willing to help as much as I can. (logs, testing etc.)

YaLTeR2mo ago

Thanks for the video. I'll need to take a look at some point

YaLTeR2mo ago

Thanks for the video. I'll need to take a look at some point

cornservant2mo ago

I think the scale 1.28 should work out better as 2560/1.28 = 2000 and 1440/1.28 = 1125 work out to be integers, so there shouldn't be rounding errors.