sway icon indicating copy to clipboard operation
sway copied to clipboard

Extremely laggy resizing when size < ~20% of screen

Open git-bruh opened this issue 3 years ago • 4 comments

Please fill out the following:

  • Sway Version:

    • 1.7
  • Debug Log:

    • https://0x0.st/opWZ.log
  • Configuration File:

    • Default
  • Description:

    • Launch sway
    • Launch firefox and foot
    • Make the firefox window small enough to fit in roughly 20% of the screen
    • Resize
    • Notice terrible lag
    • The color of the small window also becomes washed out for some reason
    • Video: https://0x0.st/opWb.mp4 (Won't play in browser, have to download)

git-bruh avatar Sep 01 '22 13:09 git-bruh

00:03:24.010 [DEBUG] [wlr] [types/output/render.c:236] Enabling direct scan-out on output 'HDMI-A-1' (locks: 0) 00:03:24.010 [DEBUG] [wlr] [types/output/cursor.c:43] Enabling hardware cursors on output 'HDMI-A-1' (locks: 0) 00:03:24.010 [DEBUG] [wlr] [types/output/render.c:236] Disabling direct scan-out on output 'HDMI-A-1' (locks: 1) 00:03:24.010 [DEBUG] [wlr] [types/output/cursor.c:43] Disabling hardware cursors on output 'HDMI-A-1' (locks: 1) 00:03:24.031 [DEBUG] [wlr] [types/output/render.c:236] Enabling direct scan-out on output 'HDMI-A-1' (locks: 0) 00:03:24.031 [DEBUG] [wlr] [types/output/cursor.c:43] Enabling hardware cursors on output 'HDMI-A-1' (locks: 0)

Seems to be the issue here, who's responsible for changing the cursor image? Is it firefox?

bl4ckb0ne avatar Sep 01 '22 13:09 bl4ckb0ne

These are printed when screen capture is active, not when the cursor image is changed.

emersion avatar Sep 01 '22 13:09 emersion

Firefox refuses to resize beyond a pre-defined minimal size and doesn't ack the sent configure, leading to a transaction timeout. I believe this is intended behavior.

vyivel avatar Sep 01 '22 15:09 vyivel

Firefox refuses to resize beyond a pre-defined minimal size and doesn't ack the sent configure, leading to a transaction timeout. I believe this is intended behavior.

Any idea about the discoloration?

git-bruh avatar Sep 07 '22 09:09 git-bruh

This seems to do with something called a "transaction timeout". Found it within the logs when recreating the issue. The default timeout is 200ms, which is kind of absurd. You can launch sway with the debug flag txn-timeout to change the timeout time. Too high and the lag will happen when windows take too long, too low and windows wont draw in time for the resize. I found 30 works well for my laptop and 15 for my PC. Ex: sway -Dtxn-timeout=15

ghost avatar Dec 23 '23 10:12 ghost

Firefox refuses to resize beyond a pre-defined minimal size and doesn't ack the sent configure, leading to a transaction timeout. I believe this is intended behavior.

This is not a sane behavior - holding back an ack implies holding back all future acks. It should just ack and disregard the size if it does not like it.

Closing as a client bug, especially as the original logs are lost.

kennylevinsen avatar Jan 02 '24 13:01 kennylevinsen