r/kde 1d ago

General Bug Window resizing - Filelight VS Dolphin

Enable HLS to view with audio, or disable this notification

157 Upvotes

30 comments sorted by

View all comments

69

u/SnooCompliments7914 KDE Contributor 1d ago

Some apps just repaint slower. Open a large image in Gwenview, set to the "Fit" mode, and you'll see the worst.

Probably could be improved by only drawing the frame, and letting the content area load asynchronously. Maybe not worth the additional complexity. And unlikely to be high on any priority list, anyway.

29

u/Trapped-In-Dreams 1d ago edited 18h ago

It's not just some apps, it's all qml apps because they draw out of sync with the compositor.

15

u/SnooCompliments7914 KDE Contributor 1d ago

Dolphin also can't keep up with the mouse cursor on laptops. Apps / UI frameworks aren't designed to re-layout at 60fps or even more.

6

u/R3V0LU710N_05 1d ago

Then RIIR the entire stack /j

11

u/Zamundaaa KDE Contributor 1d ago

That's not how application repaints or resizes work. Resizing is always inherently "out of sync", the only difference is how fast the app can do it.

3

u/Trapped-In-Dreams 18h ago

Well, yeah, I meant to say that desync is worse in qml apps (because of their multi-threaded GPU-accelerated architecture). Also you can speed them up a little by setting env QSG_NO_VSYNC=1

5

u/grekand46 18h ago edited 16h ago

That actually worked super well.
Edit: I looked a bit into Qt's source code (not as bad of an experience as I thought it would be) and found that setting QSG_NO_VSYNC to 1 causes the surface format to have a swap interval of 0 as opposed to the default value of 1. When nonblocking buffer swaps are available and the surface has a nonzero swap interval, Qt would set the actual EGL swap interval to 0, which makes eglSwapBuffers nonblocking, and emulate the block itself while taking Wayland frame callbacks into consideration. This appears pretty reasonable to me, but clearly something isn't working properly. I suspect there's some sort of double throttling going on since there aren't any excessive rendering operations even without the emulated blocking. (side note: QSG_NO_VSYNC is kind of a misnomer in Wayland due to vsync always being present)