diff --git a/src/servers/sidecar/vnc/vnc-manager.ts b/src/servers/sidecar/vnc/vnc-manager.ts index 9c04a68f..9eb9cdaf 100644 --- a/src/servers/sidecar/vnc/vnc-manager.ts +++ b/src/servers/sidecar/vnc/vnc-manager.ts @@ -231,7 +231,15 @@ export async function startSession(params: VncStartParams): Promise<{ port: numb '-shared', ...clip, ...scale, - '-noxdamage', + // No -noxdamage. It was set when this was written, with no recorded reason, and it is expensive: + // without the DAMAGE extension x11vnc cannot be told which rectangles changed, so it polls the + // WHOLE framebuffer continuously to find out. That makes cost scale with screen area rather than + // with what actually moved — on a 4K mirror it is the single biggest source of latency, and it is + // why a smaller machine felt instant by comparison. This X server reports DAMAGE, MIT-SHM and + // XFIXES, so the optimisation is genuinely available. + // + // If stale patches ever appear on screen (some drivers under-report damage), putting -noxdamage + // back is the fix — at the cost of the polling above. '-quiet', ], stdout: 'ignore',