News for hackers. Stuff that matters.
Re:Nvidia Unveils GeForce RTX 30 Series GPUs by formerly_proven on Tuesday September 01, 2020 @03:58PM (#24346310)
One of the funniest instances of software intentionally kneecapping itself are compositors. As far as I know compositors universally treat all monitors together as a single surface and just assume that they're synchronized. On Windows, this causes all sorts of hilarious stuttering and hitching. On Linux, compositors just vsync on the slowest display.
Re:Nvidia Unveils GeForce RTX 30 Series GPUs by kevincox on Tuesday September 01, 2020 @06:17PM (#24347782)
This is changing, I believe that the next release of mutter (GNOME) will remove the global clock on Wayland so it can drive each monitor at it's native frequency[1].

IIUC input is still driven at 60Hz but changing this is in discussion [2].

[1] https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1285 [2] https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/168

Re:Nvidia Unveils GeForce RTX 30 Series GPUs by formerly_proven on Wednesday September 02, 2020 @06:46AM (#24351906)
> IIUC input is still driven at 60Hz but changing this is in discussion [2].

Why are inputs synchronized to the frame in Wayland? What the f---? That's just... wow.

Re:Nvidia Unveils GeForce RTX 30 Series GPUs by kevincox on Wednesday September 02, 2020 @07:08AM (#24352030)
The logic is that it doesn't make sense to deliver multiple batches of input in a single frame since the application will only get the chance to render once, maybe as well batch up a chunk of input once per frame.

The logic isn't perfect and the implementation is flawed but I see where the decision originated.

Re:Nvidia Unveils GeForce RTX 30 Series GPUs by formerly_proven on Wednesday September 02, 2020 @07:33AM (#24352201)
The app only gets to present one frame per compositor frame, but that doesn't restrict the app to rendering only one frame. This purely seems like a power-saving feature; it might not be entirely unreasonable in battery-powered devices, but everywhere else adding yet-another frame of input lag to systems that are generally already noticeably worse than the competition - not good.

Since the compositor is already using vsync, it's generally pointless to run graphical applications under a compositor with vsync as well, since that only adds latency. [2] Hypothetically that can result in tearing, however in practice that doesn't matter, because the scanout of the compositor is basically a copy in GPU memory, so you'd have to be rather unlucky to see tearing, let alone consistent tearing. [1]

Of course, OpenGL doesn't support triple buffering (since it has fixed definitions of exactly one GL_FRONT and exactly one GL_BACK buffer per framebuffer/output surface), and it seems like at least nVidia on Linux doesn't support it for Vulkan, either (no mailbox present mode, only FIFO).

In any case, on X11 there is a huge difference between running a 3D UI on a compositor with (A) VSync enabled, (B) running without VSync (which introduces unncessarily high GPU loads, since UIs are generally super-quick to render and if your app architecture is correct, you should be seeing thousands of frames per second), (C) running with a frame limiter (careful choice of limiting FPS to avoid common multiples of 30), (D) rendering a frame as soon as at least one event has been posted, which requires some explicit synchronization work and thought (worker threads have to post events to wake the UI, animations need a timer). (D) is what QML does and what I'm implementing currently. It works well, latency seems to be indistinguishable from B) and C), without the unnecessary power use. X11 only seems to deliver events at a rate of somewhere around 250-400 per second, so an explicit FPS limiter is unnecessary.

[1] If you are rendering to a monitor, scanout happens approx 95 % of the time, so tearing is very likely. Let's say your app's window is 1451x1400 pixels big, then its framebuffer will be about 8 MB. The "scanout" will take something like 15 µs, so at 60 Hz scanout happens about 0.1 % of the time.

[2] My angle here is primarily applications that happen to use <insert 3D API here> as their UI rendering backend. Games have slightly different considerations and should generally just run full-tilt with triple buffering.

Re:Nvidia Unveils GeForce RTX 30 Series GPUs by The_rationalist on Tuesday September 01, 2020 @07:33PM (#24348350)
How does mutter behave for X?
Re:Nvidia Unveils GeForce RTX 30 Series GPUs by Shared404 on Thursday September 03, 2020 @01:24PM (#24366353)
Mutter is a compositor for Wayland iirc, so it's non-applicable to X.
Re:Nvidia Unveils GeForce RTX 30 Series GPUs by The_rationalist on Thursday September 03, 2020 @03:32PM (#24367836)
?? If so what's the X gnome compositor?
Re:Nvidia Unveils GeForce RTX 30 Series GPUs by Shared404 on Thursday September 03, 2020 @08:07PM (#24370305)
Did a little more research, Mutter is used on X as well it looks like, or at least used to be [0]. Sorry for the inaccuracy.

https://en.wikipedia.org/wiki/Mutter_(window_manager)

Edit: I missed the part where you were asking specifically about GNOME. Removed everything unrelated to that.

Re:Nvidia Unveils GeForce RTX 30 Series GPUs by bonestormii_ on Tuesday September 01, 2020 @08:10PM (#24348606)
Absolutely. I have a laptop with a 1080p screen that's like 15-inches and a 27-inch 1080p monitor that I connect to it.

When I scroll in MS Word, there is this insane black tearing across the white surface when I scroll, but only on the laptop monitor.

It's A WORD PROCESSOR! It's just a word processor... It's.... weeps

Re:Nvidia Unveils GeForce RTX 30 Series GPUs by exikyut on Thursday September 03, 2020 @11:28PM (#24371444)
If you see this, a video of that would be interesting to see. (I'm not entirely certain where would be a good spot to post it in a support context though...)
Re:Nvidia Unveils GeForce RTX 30 Series GPUs by max38 on Wednesday September 02, 2020 @11:03AM (#24353943)
I have a similar setup, but experience no such issues. maybe it's specific to your hardware/drivers?
Re:Nvidia Unveils GeForce RTX 30 Series GPUs by bonestormii_ on Wednesday September 02, 2020 @11:45AM (#24354329)
Maybe, but I have drivers for the monitors and everything else factory default windows install. It’s some ASUS predator gaming laptop that I inherited, but it’s reasonably powerful.
Re:Nvidia Unveils GeForce RTX 30 Series GPUs by signal11 on Wednesday September 02, 2020 @03:49PM (#24357213)
You may need a driver for the laptop's video card. The 'tearing' you describe is very characteristic of Microsoft's generic display drivers, perhaps for some reason the OS was unable to auto-install the driver?

Or the graphics card isn't being used for some reason? E.g., if your laptop has NVidia's Optimus[1], the graphics card may be inactive while Word's running. There's usually a way to force applications to use the GPU with Optimus.

[1] https://www.nvidia.com/en-us/geforce/technologies/optimus/

Re:Nvidia Unveils GeForce RTX 30 Series GPUs by bonestormii_ on Wednesday September 02, 2020 @05:17PM (#24358242)
Definitely have actual Nvidia drivers installed.
Re:Nvidia Unveils GeForce RTX 30 Series GPUs by PeterStuer on Thursday September 03, 2020 @09:41AM (#24363933)
Predator is an Acer line, not ASUS. Are you sure Word is using the nVidia gpu and not the Intel (on processor) gpu?
Re:Nvidia Unveils GeForce RTX 30 Series GPUs by wlesieutre on Tuesday September 01, 2020 @08:18PM (#24348673)
Windows 10 has improved this earlier this year (2004 = 2020 April): https://www.reddit.com/r/Windows10/comments/f57tk4/dwm_multi...
Re:Nvidia Unveils GeForce RTX 30 Series GPUs by simcop2387 on Tuesday September 01, 2020 @05:44PM (#24347478)
From what I understand, on linux wayland makes it possible to do this properly but I'm not sure that any environment on top of it is doing it. I think it's in a "nice to have" holding pattern for them because there's still so much to do to getting a stable and usable desktop environment there to begin with.
Re:Nvidia Unveils GeForce RTX 30 Series GPUs by juergbi on Tuesday September 01, 2020 @05:52PM (#24347546)
Should be fixed in the upcoming GNOME 3.38: https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1285
Re:Nvidia Unveils GeForce RTX 30 Series GPUs by phkahler on Tuesday September 01, 2020 @06:33PM (#24347905)
I wrote a gtk program in Rust that did all its work in the wrong place. It locked up the ability to move ANY windows on the desktop for several seconds. That's a compositor design issue if ever there was one. Is that going to get fixed?
Re:Nvidia Unveils GeForce RTX 30 Series GPUs by Jasper_ on Tuesday September 01, 2020 @08:00PM (#24348541)
If it was an X11 app, there are several things that can cause that that are just unfixable, unfortunately (e.g. XLockDisplay). If it was a Wayland app, that sounds like a bug in the compositor. If you still have a repro case, please file it.
Re:Nvidia Unveils GeForce RTX 30 Series GPUs by phkahler on Wednesday September 02, 2020 @11:04AM (#24353947)
It was gnome on wayland.
Re:Nvidia Unveils GeForce RTX 30 Series GPUs by scotty79 on Wednesday September 02, 2020 @04:52AM (#24351277)
I just yesterday tried current stable debian with kde and after installing nvidia drivers it started vsyncing to my fastest display, not the slowest. (I checked with glxgears).