Bug 323646 - Need to set Tearing Prevention on every login to prevent screen tearing.
Summary: Need to set Tearing Prevention on every login to prevent screen tearing.
Status: RESOLVED DUPLICATE of bug 322060
Alias: None
Product: kwin
Classification: Plasma
Component: core (show other bugs)
Version: 4.11.0
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-08-17 17:28 UTC by Yohan Pereira
Modified: 2013-08-28 09:02 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
output of qdbus org.kde.kwin /KWin supportInformation just after logging in. (5.71 KB, text/plain)
2013-08-17 18:19 UTC, Yohan Pereira
Details
output of qdbus org.kde.kwin /KWin supportInformation just after re setting the Tearing Prevention. (5.71 KB, text/plain)
2013-08-17 18:20 UTC, Yohan Pereira
Details
Xorg.0.log (19.07 KB, text/x-log)
2013-08-17 18:21 UTC, Yohan Pereira
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yohan Pereira 2013-08-17 17:28:53 UTC
On every login I have to set  Tearing Prevention (VSync) to None and then back to automatic to prevent screen tearing. 

Reproducible: Always




Using the nvidia blob version 325.15.
Comment 1 Thomas Lübking 2013-08-17 17:50:54 UTC
please post the output of "qdbug org.kde.kwin /KWin supportInformation" right after the login and before doing anything else as well as the one from after altering the setting.

Also attach /var/log/Xorg.0.log and the output of

   env | grep YIELD
Comment 2 Thomas Lübking 2013-08-17 18:08:56 UTC
Sorry:
qdbus org.kde.kwin /KWin supportInformation
      ^^^ <- notice the "s"
Comment 3 Yohan Pereira 2013-08-17 18:19:36 UTC
Created attachment 81755 [details]
output of qdbus org.kde.kwin /KWin supportInformation just after logging in.

output of qdbus org.kde.kwin /KWin supportInformation just after logging in.
Comment 4 Yohan Pereira 2013-08-17 18:20:55 UTC
Created attachment 81756 [details]
output of qdbus org.kde.kwin /KWin supportInformation just after re setting the Tearing Prevention.

output of qdbus org.kde.kwin /KWin supportInformation just after setting the Tearing Prevention to None and back to Automatic.
Comment 5 Yohan Pereira 2013-08-17 18:21:57 UTC
Created attachment 81757 [details]
Xorg.0.log
Comment 6 Yohan Pereira 2013-08-17 18:22:46 UTC
There is no output from env | grep YIELD
Comment 7 Thomas Lübking 2013-08-17 18:27:21 UTC
Ok, you're not using triple buffering and __GL_YIELD is not exported as "USLEEP"

Nvidia will perform a busy wait for this, leading to high CPU load just for swapping.

(It should be reset to "none" internally after some seconds, even if you changed it)

Ideally enable triple buffering

/etc/X11/xorg.conf.d/20-nvidia.conf 
----------------------------------------
Section "Device"
        Identifier "Default nvidia Device"
        Driver "nvidia"
        Option "TripleBuffer" "True"
EndSection

Alternatively 'export __GL_YIELD="USLEEP"' at least for kwin. (exporting it automatically from a script in ~/.kde/env will export it for every application in the session)

*** This bug has been marked as a duplicate of bug 322060 ***
Comment 8 Yohan Pereira 2013-08-17 19:40:18 UTC
enabling triple buffering worked for me thanks.
Comment 9 S. Christian Collins 2013-08-18 05:49:54 UTC
I had this bug on my GeForce 7900 GS with NVIDIA proprietary driver 304.88. I already had triple-buffering enabled, but adding 'export __GL_YIELD="USLEEP"' to /etc/profile fixed it for me.
Comment 10 Miro Kropacek 2013-08-20 02:24:02 UTC
Wow, I've been losing my hope. I've been trying to fix this since 4.10 release, looked up tons of forums, bug reports, nothing had helped. To me symptoms were even funnier, it did work for a while and then, after a few seconds the tearing was back.

Anyway, not only setting to None and back did work for me but also the __GL_YIELD trick fixed it for good (the triple buffer setting alone didn't).
Comment 11 Thomas Lübking 2013-08-20 07:38:09 UTC
see duplicate, triple buffering detection seems to pot. fail during login.
the entire thing didn't work before 4.11, since there was no "swap encouragement" and copying memory into the frontbuffer was too slow for (most) retrace times.