swaywm / sway

i3-compatible Wayland compositor
https://swaywm.org
MIT License
14.4k stars 1.1k forks source link

Cursor does not move between monitors when moving mouse slowly #8110

Open Nogesma opened 4 months ago

Nogesma commented 4 months ago

I have two monitors setup next to each other, when moving the mouse slowly from the left one (pos 0, 0) to the right one (pos 2560, 0), the cursor gets stuck on the right edge of the left monitor. This also happens in the other direction (right to left).

Setting pointer_accel to -1 makes it impossible to switch from one monitor to the other, as the speed of the mouse is really slow.

This looks like it started happening with https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4618, although I have not verified it with a bisect yet.

I am not sure if this is a sway or a wlroots bug, let me know if I need to open an issue there.

tirprox commented 4 months ago

Can confirm, but in my case it only happens from left to right. Right to left works fine.

sway version 1.10-dev-087226d9 (Apr 13 2024, branch 'master') swaymsg -t get_outputs:

Output DP-4 'Ancor Communications Inc PA248 E7LMQS076969' (focused)
  Current mode: 1920x1200 @ 59.950 Hz
  Power: on
  Position: 0,0
  Scale factor: 1.000000
  Scale filter: nearest
  Subpixel hinting: rgb
  Transform: normal
  Workspace: 4
  Max render time: 5 ms
  Adaptive sync: disabled
Output DP-5 'Ancor Communications Inc PA248 D7LMQS115634'
  Current mode: 1920x1200 @ 59.950 Hz
  Power: on
  Position: 1920,0
  Scale factor: 1.000000
  Scale filter: nearest
  Subpixel hinting: rgb
  Transform: normal
  Workspace: 2
  Max render time: 5 ms
  Adaptive sync: disabled
Nogesma commented 4 months ago

I think the speed threshold is different for left -> right and right -> left. With -0.5 sens I can only replicate left to right, but I can replicate it both ways with -1 sens.

alex-huff commented 4 months ago

This looks like it started happening with https://gitlab.freedesktop.org/wlroots/wlroots/-/merge_requests/4618, although I have not verified it with a bisect yet.

This started happening for me as well and after bisecting I found that 3fc66d45 was indeed the culprit.

alex-huff commented 3 months ago

I think the speed threshold is different for left -> right and right -> left. With -0.5 sens I can only replicate left to right, but I can replicate it both ways with -1 sens.

BTW, if you modify your settings to have a pointer_accel of -0.4999999, the problem will be gone. Might be worth it as a temporary workaround. It just so happens that -.5 is the exact point that this problem starts happening, and anything less than -.5 the problem happens going both ways.

input type:pointer {
        accel_profile flat
        pointer_accel -0.4999999
}