sway
sway copied to clipboard
Duplicated cursor with rotated external display.
Steps to produce:
- Start Sway with a config that contains something like the following:
set $display_primary eDP-1
set $display_other DP-1
set $display_width 1920
set $display_height 1080
output $display_primary {
pos 0 $display_height res $display_widthx$display_height
}
output $display_other {
pos 0 0 res $display_widthx$display_height
}
- Run
swaymsg output [EXTERNAL_DISPLAY] transform 90 clockwise - Move your cursor to the external display
- After moving it around horizontally, you should see a cursor duplicate across both displays
I tried to get a screenshot, but only one cursor is visible there.
Can't produce with the default config. I've isolated the relevant parts of my config that cause the issue and added them above.
Hi did you solve the problem? TLTR: Further observations and a workaround.
I have the same challenge putting two displays side by side in pivot mode
output DVI-I-1 res 1920x1080 transform 270 pos 0 0
output DP-1 res 1920x1080 transform 270 pos 1080 0
This double mouse effect only happens, if transform is used. Setting transform to 0 for usual landscape mode works correctly. To be clear, I only see a double mouse. Frames are displayed correctly on both screens. Albeit, I see heavy flickering and focus point loosing sometimes, which I can get rid of moving the mouse cursor once to the other screen and back.
Furthermore, I noticed that a screenshot taken by grim shows that the frames overlap exactly in the way the double mouse cursors are present.
Finally, I changed the pos by trial and error to
output DVI-I-1 res 1920x1080 transform 270 pos 0 0
output DP-1 res 1920x1080 transform 270 pos 1210 0
Whereas, the 1210 was a guess of the correct 1080 pixels offset + 130 pixels for the estimated overlap of the mouse cursor. This solved the problem of the "double cursor effect". I need to test further whether this also removes the flickering problems.
Hey! I had this exact same issue before with sway 1.4, but it went away on its own, I'm guessing with a dependency upgrade.
Manjaro Sway 21.1.0 (Kernel 5.10). In my case the reason of the double cursor was recalculation of the cursor position after connection the second (top) monitor.
output HDMI-A-1 res 1920x1080 pos 0 0
output eDP-1 res 1920x1080 pos 0 1080
I changed it to
output HDMI-A-1 res 1920x1080 pos 0 -1080
output eDP-1 res 1920x1080 pos 0 0
and the problem is gone. Thanks @torwag for pointing in the right direction, I suffered from this problem for several months :)
I have the same issue with my current configuration of 2 displays. One is in portrait mode and one is landscaped…
set $screen0 "DP-1"
set $screen1 "HDMI-A-1"
output $screen0 {
mode [email protected]
pos 0 0
adaptive_sync on
}
output $screen1 {
pos 2560 0
transform 270
scale 1.0
}
If I change the position of the screen, sure the cursor duplication problem is workarounded.—but it will remove the ability to move with the mouse cursor from one to the other screen. So sadly the workaround is not acceptable for me. I hope this bug will fix soon. Thanks
I sometimes have this problem in one of my screen environments. Are you using kanshi by any chance?
I just could workaround the issue by restarting kanshi.
Sometimes, somehow the display placement I configured in kanshi is not applied correctly when moving between screen environments. As a result screens overlap, leading to two mouse cursors. I also see the effect in a screenshot I took using grimshot.
Edit: Also output of swaymsg -t get_outputs showed the failed positioning (0,0) which usually is performed with kanshi. Proper position was set after restarting kanshi.
Can you post Sway debug logs?

This is how it looks. Just had the problem again. It's a bit hard to get the debug logs, since it very rarely occurs and I don't start sway with the debug flag.
From log output of journalctl I see those messages:
connector DP-2: Atomic commit failed (pageflip): Device or resource busy
connector eDP-1: Atomic commit failed (pageflip): Device or resource busy