Do not request screen updates while the window is not visible - #1940
Conversation
9ab40bd to
1c4fc47
Compare
CendioOssman
left a comment
There was a problem hiding this comment.
Seems reasonable. Is this an issue you've observed in practice?
| writer()->writeFramebufferUpdateRequest({0, 0, | ||
| server.width(), | ||
| server.height()}, | ||
| !forceNonincremental); |
There was a problem hiding this comment.
What if there already is a pending update request?
There was a problem hiding this comment.
I based this code on what CConnection::requestNewUpdate() does.
Should it be done differently here? I'm not very familiar with how these updates are handled in vncviewer.
| writer()->writeFramebufferUpdateRequest({0, 0, | ||
| server.width(), | ||
| server.height()}, | ||
| !forceNonincremental); |
There was a problem hiding this comment.
Is this needed if we're using continuous updates?
| writer()->writeFramebufferUpdateRequest({0, 0, | ||
| server.width(), | ||
| server.height()}, | ||
| !forceNonincremental); |
There was a problem hiding this comment.
If you're going to look at forceNonincremental, then you need to reset it as well.
| core::BoolParameter | ||
| updateOnlyWhenVisible("UpdateOnlyWhenVisible", | ||
| "Do not request screen updates while the window is " | ||
| "not visible, e.g. minimized.", | ||
| false); | ||
|
|
There was a problem hiding this comment.
Do we really need to add another setting for this? Why can't it be constantly be enabled?
There was a problem hiding this comment.
Do all VNC servers tolerate not sending updates for extended periods of time? If yes and this can be always enabled, then I fully agree that this option should be removed.
There was a problem hiding this comment.
I would hope, since they don't know how fast a client might be able to respond. All servers I know of track the coordinates of things that are changed, rather than the changed pixels themselves. So there shouldn't be any issue of things overbuffering.
I'm running several instances of the TigerVNC viewer, and each of them uses 10%-15% CPU when there are a lot of updates on the screen. |
1c4fc47 to
9d1329c
Compare
I'm a bit surprised that you're getting Any idea if we can get some hint for the compositing desktops as well? E.g. GNOME, which is the default desktop on most Linux systems, doesn't really do minimize. |
KDE 5 on X11.
Blocking compositing was historically a big issue outside KDE. Only KDE allowed to block it automatically for fullscreen applications and provided the shortcut for manually disabling it. I don't really know what the current state of GNOME and possibly Wayland is, and if they even want this or care. |
|
Compositing is fundamental to modern desktops, so I don't think there's any option of blocking that. I was rather hoping that the desktop would be kind enough to send us some other signal to indicate "you're currently not visible, so don't waste time rendering stuff". |
9d1329c to
bc5f0ef
Compare
bc5f0ef to
617f37d
Compare
New option: UpdateOnlyWhenVisible
617f37d to
47a6f86
Compare
Do not request screen updates while the window is not visible, e.g. minimized.
This saves a lot of bandwidth and CPU.
New option: UpdateOnlyWhenVisible