tildearrow / kwin-lowlatency

archived - X11 full-screen unredirection and lots'a settings for KWin
373 stars 10 forks source link

Plasma 5.21 - Is that the end of this project? #106

Closed rnd-ash closed 2 years ago

rnd-ash commented 3 years ago

So firstly, thanks for making Plasma bearable for the past few years!

That said, plasma 5.21 is now in beta and I have tried it on ArchLinux. Supposedly Kwins compositing code was mostly re-written and it does defiantly show.

There is now a latency control option in Kwin's settings and being totally honest, setting it to 'force lowest latency' actually is amazing. The mouse is virtually glued to the titlebar as i am dragging windows around (I am using an optimus setup with Nvidia + Intel btw)

So with this probably being released next month, what will be the status of this project?

tildearrow commented 3 years ago

I was going to add information about that in the README.

It is true that Plasma 5.21 will defeat the point of this project, but... there is one detail that will keep the project alive for a while...

...full-screen unredirection. The project won't die out yet until this is implemented on upstream...

DarkWav commented 3 years ago

I think Plasma 5.21 will definitely improve the situation, but as @tildearrow mentioned, full-screen unredirection is still a thing. Additionally, I'd like to mention that the Ubuntu LTS and openSUSE Leap 15 Series and won't get these updates before 2022, so KWin-Lowlatency 5.18-LTS-Series Releases will probably stay in high demand for at least another year or two. After that, we'll see how it'll go, but I'm definitely willing to maintain kwin-lowlatency for openSUSE as long as there is demand for it, even for Tumbleweed, as it isn't too much extra work.

clapbr commented 3 years ago

I was going to add information about that in the README. It is true that Plasma 5.21 will defeat the point of this project, but... there is one detail that will keep the project alive for a while... ...full-screen unredirection. The project won't die out yet until this is implemented on upstream...

If kwin 5.21 ends up being on-par or better than kwin-lowlatency, you can even port only full-screen unredirection into the 5.21 tree and avoid having to deal with future bugs related to your beautiful hacks.

That being said, let's wait 5.21 release officially and see if it's good enough for everyone before we consider abandoning the safe boat of hacks. There's just too many diff setups to be tested yet.

(Thanks for this boat tildearrow, it keeps my frame-perfect OCD in check)

Izaic commented 3 years ago

I was going to add information about that in the README. It is true that Plasma 5.21 will defeat the point of this project, but... there is one detail that will keep the project alive for a while... ...full-screen unredirection. The project won't die out yet until this is implemented on upstream...

I doubt that will come to X11, as that's kind of being left behind in favor of Wayland... But it's already been merged for 5.22.

realnc commented 3 years ago

As soon as I saw the Plasma 5.21 update in my system, I immediately did a git pull of kwin-lowlatency to generate the new patch. There was nothing, so I just went ahead with the update and thought you just hadn't had the time yet to rebase your code for 5.21.

But it turns out vanilla kwin is not a stuttery mess anymore. For starters, the stupid, artificial frame rate limiter in kwin is gone (at last!) Then when I watched a 60FPS video on youtube it didn't stutter all the time anymore. It actually performs almost as well as in Windows 10.

I believe a major reason why vanilla kwin is at last doing proper vblank-driven compositing and frame presentation, is the kwin-lowlatency fork. So huge thanks for that! Unfortunately, they didn't add fullscreen unredirection :-/

gardotd426 commented 3 years ago

I really hope this project continues, because honestly 5.21 is not great.

Without the fullscreen unredirect it's honestly kind of a non-starter for me to even want to use vanilla kwin, but even setting that aside, it's jittery, not very smooth, my latency controls are gone, etc.

It's much better than it was, but it's nowhere near where it should be, and it's nowhere near kwin-lowlatency.

realnc commented 3 years ago

but even setting that aside, it's jittery, not very smooth, my latency controls are gone, etc.

I can see them:

image

gardotd426 commented 3 years ago

No, the "Maximum latency reduction" and "minimum latency reduction" options are gone.

Also, I absolutely definitely still do get the one clear line of tearing. I just rebooted to make sure that I was actually running the new 5.21 kwin (I just updated), and sure enough it's absolutely there.

Izaic commented 3 years ago

As soon as I saw the Plasma 5.21 update in my system, I immediately did a git pull of kwin-lowlatency to generate the new patch. There was nothing, so I just went ahead with the update and thought you just hadn't had the time yet to rebase your code for 5.21.

But it turns out vanilla kwin is not a stuttery mess anymore. For starters, the stupid, artificial frame rate limiter in kwin is gone (at last!) Then when I watched a 60FPS video on youtube it didn't stutter all the time anymore. It actually performs almost as well as in Windows 10.

I believe a major reason why vanilla kwin is at last doing proper vblank-driven compositing and frame presentation, is the kwin-lowlatency fork. So huge thanks for that! Unfortunately, they didn't add fullscreen unredirection :-/

Fullscreen unredirection is coming in 5.22 for Wayland sessions.

realnc commented 3 years ago

Fullscreen unredirection is coming in 5.22 for Wayland sessions.

Which doesn't help me at all, since I use X11.

Sporif commented 3 years ago

I rebased the unredirection part of the patch-set to 5.21 and so far testing with a couple of games it seems to work well.

https://gist.github.com/Sporif/7f18d95dd89af8ec386dd1fbbe11bf67

DarkWav commented 3 years ago

For me, using kwin 5.21.0 with NVIDIA, to get the same performance as kwin-lowlatency I needed to set both CPU and GPU frequency scaling governors to prefer maximum performance via cpupower and nvidia-settings, which was not necessary with kwin-lowlatency and might cause serious battery life regressions on laptops. Additionally, fullscreen unredirection will be wayland-exclusive which can be a real deal breaker for NVIDIA users as Wayland currently has abysmal performance on NVIDIA. It apperars the situation is even worse for AMD and especially Intel iGPUs as vanilla kwin has no fix for Intel tearing at the moment.

gardotd426 commented 3 years ago

I rebased the unredirection part of the patch-set to 5.21 and so far testing with a couple of games it seems to work well.

Thanks for this man, I just built it and I'm about to test it out as well

itsTyrion commented 3 years ago

I rebased the unredirection part of the patch-set to 5.21 and so far testing with a couple of games it seems to work well.

https://gist.github.com/Sporif/7f18d95dd89af8ec386dd1fbbe11bf67

Did you link the right thing? git apply throws a crap ton of "failed" and "does not apply" for me

Sporif commented 3 years ago

@itsTyrion Are you sure you tried it with 5.21? I just checked out https://github.com/KDE/kwin/commits/Plasma/5.21 and applied the patch without issues.

walmartshopper commented 3 years ago

I would love to see a kwin-lowlatency for 5.21. It's still needed for mixed refresh rate setups. I have a 144hz primary monitor plus some 60hz, and vanilla kwin 5.21 is stuck at 60fps with bad stuttering. With kwin-lowlatency 5.20 I had no trouble running the compositor at 144hz and it was so much smoother. I'm considering downgrading back to 5.20 so I can use kwin-lowlatency again.

es20490446e commented 3 years ago

There's something that I miss a lot in the official Kwin, which is the capability to block composition on full-screen applications.

So I have created a kwinscript that does exactly that, and probably it is more reliable than full-screen unredirection.

What it does is simply blocking composition if an application has launched full-screen from the very beginning.

It can be installed directly from the application "Kwin Scripts" (or System Settings).

I have called it Kwin Autocomposer.

walmartshopper commented 3 years ago

Update... I managed to get higher FPS on stock kwin 5.21 by opening nvidia-settings and unchecking Allow Flipping. With the box checked, kwin is stuck at 60fps and moving a window around uses 100% of a cpu core. When I uncheck the box, kwin immediately jumps to 100+ fps and feels smooth again.

I would love to see a kwin-lowlatency for 5.21. It's still needed for mixed refresh rate setups. I have a 144hz primary monitor plus some 60hz, and vanilla kwin 5.21 is stuck at 60fps with bad stuttering. With kwin-lowlatency 5.20 I had no trouble running the compositor at 144hz and it was so much smoother. I'm considering downgrading back to 5.20 so I can use kwin-lowlatency again.

tildearrow commented 2 years ago

Plasma 5.21 - Is that the end of this project?

No.