STORE COMMUNITY ABOUT SUPPORT
login | language
简体中文 (Simplified Chinese) 繁體中文 (Traditional Chinese) 日本語 (Japanese) 한국어 (Korean) ไทย (Thai) Български (Bulgarian) Čeština (Czech) Dansk (Danish) Deutsch (German) Español - España (Spanish - Spain) Español - Latinoamérica (Spanish - Latin America) Ελληνικά (Greek) Français (French) Italiano (Italian) Magyar (Hungarian) Nederlands (Dutch) Norsk (Norwegian) Polski (Polish) Português (Portuguese - Portugal) Português - Brasil (Portuguese - Brazil) Română (Romanian) Русский (Russian) Suomi (Finnish) Svenska (Swedish) Türkçe (Turkish) Tiếng Việt (Vietnamese) Українська (Ukrainian) Report a translation problem
Yep indeed KDE enables to make custom rules for windows / apps, that's super powerful !
May I ask you if you encounter performance or tearing issues in other apps / games ? Did you apply the little tweak I mention above, that is required not to encounter tearing with Nvidia cards ? (the one line file to add in /etc/profile.d) ?
As far as I can tell, Kwin's automatic composition suspension seems to work for me. It seems most games and movie players trigger it probably by using the relevant API call. I am not 100% sure as it's just my subjective feeling. Also, I had numerous Nvidia cards in several different PCs and several different distros / KDE generations and apart from the tearing issue mentioned above, I never had performance issues, so there is clearly a problem here...
What I mean is... Even if SkyForce is the only game of your library not explicitely blocking composition, it should still be smooth considering your GPU performance. Please allow me to reiterate :-) Are you sure this is not a tearing issue ?
What I appreciate with Martin is that he seems to refuse to implement things he considers as hacks or workarounds. The drawback is obviously that sometimes it makes it (temporarily) more difficult for some users...
Cheers ! (sorry, long & confusing post :)
PS : I read you don't like rolling release distros and I kinda agree with you :-) However KDE Neon is just half rolling : the base is the long term support Ubuntu. Then you choose between Neon LTS with LTS plasma or Neon regular with constantly up to date plasma... 5.12 will be the next LTS so spring might be a good time to switch !
I've now tested several games (although without trying __GL_YIELD=USLEEP so far) using a seemingly better approach than before:
That locks me at 60 fps max and adds a tiny bit of latency, but I care more about solid frame timing and getting rid of tearing, so this is great. The good news is that all games I've tested (Dead Island, Borderlands 2, Sky Force Reloaded, Hand of Fate) respond really well to this. No tearing, no stutter.
__GL_YIELD=USLEEP instead of switching compositing off will not change anything. There is tearing and stutter in the Sky Force series and Hand of Fate. As soon as I switch compositing off, there is no more tearing, no more stutter, with or without the __GL_YIELD option doesn't make a difference.
With Neon I'm not a fan that it's based on Ubuntu, so that won't become my daily driver unless they switch to Debian. I prefer distros made by non-profits and other non-commercial entitites because I feel the pressures of money, market and power will otherwise corrupt the product in some way. For example, Ubuntu Server advertises Canonical's Landscape product to you, Ubuntu desktop had sponsoring ties to Amazon in the past, etc. For me this is not the culture I want to see.
Debian, the Arch, even Gentoo don't need to give in to such temptations, they are truly independent. I also appreciate that most of Debian's packages have reproducible builds now.
Regarding Neon, it's true I would also prefer if it were Debian based ! Although, what is good is that it's THE official KDE distribution, based on a stable (LTS) base + with the KDE stack constantly up to date. KDE is moving ahead so fast you do not really have any proper alternative if you don't want a rolling release...
Also it benefits from stuff like the "HWE" kernels from Ubuntu (hardware enablement) which backports drivers over several years and enable to have an LTS working on newer machines. For instance you can keep a stable LTS kernel but with up to date drivers. I was impressed, I didn't know it existed until I realized Neon used them by default.
HMMM... I remember KDE frameworks is now supplied as a SNAP. So maybe, it'll eventually be possible to have an up to date KDE on another distro... I must say I've been distro hopping for almost 2 decades looking exactly for that : LTS distro + up to date KDE + kinda official KDE support.
I'm a bit sad no major distro really considers KDE seriously nowadays... I think there is soooo much more good work put into it than in any other DE... See how much momentum Linux Mint got and compare the features brought in a year in Cinnamon VS KDE ! It's crazy.
Cheers mate !
It still requires turning off compositing to play these games stutter-free. I also tested with other games and saw stutter unless compositing was off, so this isn't even related to the unredirection WM hint anymore. I don't know how GNOME does it under the same circumstances, but I stopped caring now since all is perfect on KDE.
Thanks to the Kwin triple buffering trick mentioned above and some information from the Arch Linux wiki, I found out that there is a long-standing Nvidia driver bug in that the card appears to advertise triple buffering when in reality it's not doing triple buffering. This messes up Kwin's timing calculations (if I understand correctly).
The solution is to tell both the Nvidia driver and Kwin to force triple buffering and to switch Vsync on in the compositor. This gets you stutter-free, tearing-free desktop without needing to use ForceCompositionPipeline, an option that would introduce strong stutter.
Stick this in ~/.config/plasma-workspace/env/kwin.sh:
Then make sure to have an xorg.conf.d snippet that tells enables TripleBuffer on Nvidia:
Tried this on Debian and Neon with great success.
And to mahenou, I think KDE will rise to more glory at some point. It's extremely fast even on modest hardware, uses only about 350 MB RAM for me and is the most full-featured and customizable desktop environment I know. This has to count for something. Now if only they got the stability up as well. I get why distros don't put it in as default, it can be overwhelming for new users to have so many options. But as long as there are packagers for it for Debian, Arch and others and as long as Neon exists, I think it will be fine.
I donate every year to the KDE project to help keep things going :)
Regarding the nvidia issues, 3 solutions indeed :
1) yours by forcing triple buffering
2) the one advised by kde team GL_YIELD variable
or in the NVIDIA control panel, 3) force the compositing pipeline and the app does the work of creating the x conf file
I used to think the 2) was better but actually my desktop is smoother with 3)
Stll I wonder why you have to disable composition manually... never had or heard of this issue...
I will poke the 2) trick again, last time it didn't do anything but maybe it wasn't picked up by Kwin (now I know more about setting Kwin env vars, so that's something).
Edit: Tried it inside .config/plasma-workspace/env/kwin.sh. I must have done something wrong last time, since now everything is silky-smooth even without manually disabling compositing. I'll go through some more games but in Sky Force it was very easy to determine whether there is stutter or not because it has such delicious scrolling.
Edit 2: ARGH! With only the GL_YIELD trick there is tearing in KDE now. Only triple buffer seems to get rid of that.
Cheers and thanks :)
The desktop itself is smoother though, with any intel hd graphics !! But that's another subject.
I copy paste from the manjaro forum :
The fix is as easy as making a text file in the terminal:
sudo nano /etc/profile.d/kwin.sh
Inside the text file, you need the following:
Then hit ctrl+o to save it, ctrl+x to exit out and reboot. Bam, no more tearing with the NVidia driver. :slight_smile:
I know that the __GL_YIELD env var was picked up correctly by Kwin since it shows up in the env where Steam is run and the game itself is smooth, even without disabling compositing. So it's doing something.
Maybe the tearing in the desktop is the result of an Nvidia driver that's too new and doesn't gel with the older KDE, it's 384.111 from the short-lived branch. I'll revert to the old 375.82 that's in the repos and see what happens.
I use Nvidia driver 390.x and Plasma 5.12 (but didn't have the issue with the former versions of each).
There is definitely something special with your cofiguration that nobody else seems to encounter, but what is it ?
I decided to go to 390.25 before trying 375.82 again, and this one is smooth with either __GL_YIELD="USLEEP" or with triple buffering. In better news, compositing doesn't have to be disabled by hand anymore. I'm 99% sure that 375.82 had problems so I'm not too motivated to test this against that.
I'll try without those options now, maybe a miracle happened and some long-standing issue in Nvidia's driver was fixed that miraculously cures the tearing that happens by default as well.
Edit: Fortunately (because I'm going crazy here), tearing is back on the desktop even with 390.25 unless I set one of those options.
But Sky Force is smooth as silk with 390.25 in any situation, compositing on or off, triple buffer on or off, GL_YIELD set to USLEEP or not, it's always perfect. No tearing, no stutter. So if I meet someone else with Plasma on Debian stable, I'll recommend to use nothing older than 390.25 and hope for the best.
My next card is an AMD, as soon as the cryptocurrency miners stop driving prices up :)
Indeed, I'll definitely consider AMD for my next card... Although it seems they seem to consume / heat more than their NVIDIA counterpart... :-) Having no need to install a proprietary driver + butter smooth KDE + no tweak to apply sounds like a dream ;)
So, all in all, that's pretty good, although, artificially not perfect due to silly drivers issues :-)
thanks so far for this info! I've got Debian 10 and did it how you said but itś not working :(
in /.config/plasma-workspace/env/ i created a new file kwin.sh
also added in the xorg file in the "device" section
Option "TripleBuffer" "true"
Did I made something wrong?
What worked is, that (because i have gsync with 75hz) in the /.config/kwinrc file, in the [Compositing] section add
so i've got smooth windowmoving right now.
But tearing at movies is still there :(
Hope u can help me
You should be able to see if the TripleBuffer option was accepted by looking into /var/log/Xorg.0.log. But I don't know if that trick is even still relevant.