aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Kenny Levinsen <kl@kl.wtf>2020-05-01 17:20:41 +0200
committerLibravatar Simon Ser <contact@emersion.fr>2020-05-11 10:36:33 +0200
commita8a6ed667d0f9fe747a86bd8607f875e097e3af5 (patch)
tree0aa0a359bd91f506a1b98fc0f90f7f7d631b64e3
parentFix some mistakes in grimshot docs (diff)
downloadsway-a8a6ed667d0f9fe747a86bd8607f875e097e3af5.tar.gz
sway-a8a6ed667d0f9fe747a86bd8607f875e097e3af5.tar.zst
sway-a8a6ed667d0f9fe747a86bd8607f875e097e3af5.zip
Simplify repaint scheduling documentation
The current documentation for repaint scheduling is very technical and somewhat confusing. Closes: https://github.com/swaywm/sway/issues/4769
-rw-r--r--sway/sway-output.5.scd37
-rw-r--r--sway/sway.5.scd24
2 files changed, 29 insertions, 32 deletions
diff --git a/sway/sway-output.5.scd b/sway/sway-output.5.scd
index a95cfaa2..69f529fe 100644
--- a/sway/sway-output.5.scd
+++ b/sway/sway-output.5.scd
@@ -117,22 +117,17 @@ must be separated by one space. For example:
117 (ie. blank the screen but keep workspaces as-is), one can set DPMS to off. 117 (ie. blank the screen but keep workspaces as-is), one can set DPMS to off.
118 118
119*output* <name> max_render_time off|<msec> 119*output* <name> max_render_time off|<msec>
120 When set to a positive number of milliseconds, enables delaying output 120 Controls when sway composites the output, as a positive number of
121 rendering to reduce latency. The rendering is delayed in such a way as 121 milliseconds before the next display refresh. A smaller number leads to
122 to leave the specified number of milliseconds before the next 122 fresher composited frames and lower perceived input latency, but if set too
123 presentation for rendering. 123 low, sway may not finish compositing in time for display refresh, leading to
124 124 delayed frames.
125 The output rendering normally takes place immediately after a 125
126 presentation (vblank, buffer flip, etc.) and the frame callbacks are 126 When set to off, sway composites immediately after display refresh,
127 sent to surfaces immediately after the rendering to give surfaces the 127 maximizing time available for compositing.
128 most time to draw their next frame. This results in slightly below 2 128
129 frames of latency between the surface rendering and committing new 129 To adjust when applications are instructed to render, see *max_render_time*
130 contents, and the contents being shown on screen, on average. When the 130 in *sway*(5).
131 output rendering is delayed, the frame callbacks are sent immediately
132 after presentation, and the surfaces have a small timespan (1 /
133 (refresh rate) - max_render_time) to render and commit new contents to
134 be shown on the next presentation, resulting in below 1 frame of
135 latency.
136 131
137 To set this up for optimal latency: 132 To set this up for optimal latency:
138 . Launch some _full-screen_ application that renders continuously, like 133 . Launch some _full-screen_ application that renders continuously, like
@@ -140,14 +135,8 @@ must be separated by one space. For example:
140 . Start with *max_render_time 1*. Increment by *1* if you see frame 135 . Start with *max_render_time 1*. Increment by *1* if you see frame
141 drops. 136 drops.
142 137
143 To achieve even lower latency, see the *max_render_time* surface 138 This setting only has an effect on Wayland and DRM backends, as support for
144 property in *sway*(5). 139 presentation timestamps and predicted output refresh rate is required.
145
146 Note that this property has an effect only on backends which report the
147 presentation timestamp and the predicted output refresh rateā€”the DRM
148 and the Wayland backends. Furthermore, under the Wayland backend the
149 optimal max_render_time value may vary based on the parent compositor
150 rendering timings.
151 140
152*output* <name> adaptive_sync on|off 141*output* <name> adaptive_sync on|off
153 Enables or disables adaptive synchronization (often referred to as Variable 142 Enables or disables adaptive synchronization (often referred to as Variable
diff --git a/sway/sway.5.scd b/sway/sway.5.scd
index bbcc94e2..febf749f 100644
--- a/sway/sway.5.scd
+++ b/sway/sway.5.scd
@@ -186,21 +186,29 @@ set|plus|minus <amount>
186 Cycles the layout mode of the focused container through a list of layouts. 186 Cycles the layout mode of the focused container through a list of layouts.
187 187
188*max_render_time* off|<msec> 188*max_render_time* off|<msec>
189 Works together with *output max_render_time* to reduce the latency even 189 Controls when the relevant application is told to render this window, as a
190 further by delaying the frame callbacks sent to a surface. When set to 190 positive number of milliseconds before the next time sway composites the
191 a positive number of milliseconds, delays the frame callback in such a 191 output. A smaller number leads to fresher rendered frames being composited
192 way that the surface has the specified number of milliseconds to render 192 by sway and lower perceived input latency, but if set too low, the
193 and commit new contents before being sampled by the compositor for the 193 application may not finish rendering before sway composites the output,
194 next presentation. See *max_render_time* in *sway-output*(5) for 194 leading to delayed frames.
195 further details. 195
196 When set to off, the relevant application is told to render this window
197 immediately after display refresh. How much time is left for rendering
198 before sway composites the output at that point depends on the output
199 *max_render_time* setting.
196 200
197 To set this up for optimal latency: 201 To set this up for optimal latency:
198 . Set up *output max_render_time*. 202 . Set up *output max_render_time* (see *sway-output*(5)).
199 . Put the target application in _full-screen_ and have it continuously 203 . Put the target application in _full-screen_ and have it continuously
200 render something. 204 render something.
201 . Start by setting *max_render_time 1*. If the application drops 205 . Start by setting *max_render_time 1*. If the application drops
202 frames, increment by *1*. 206 frames, increment by *1*.
203 207
208 This setting only has an effect if a per-output *max_render_time* is in
209 effect on the output the window is currently on. See *sway-output*(5) for
210 further details.
211
204*move* left|right|up|down [<px> px] 212*move* left|right|up|down [<px> px]
205 Moves the focused container in the direction specified. If the container, 213 Moves the focused container in the direction specified. If the container,
206 the optional _px_ argument specifies how many pixels to move the container. 214 the optional _px_ argument specifies how many pixels to move the container.