You are not logged in.
July 29th, 2015 Update:
Ok, really wierd. I had marked this as solved after I found adding this to my 20-nvidia.conf fixed the problem
Option "metamodes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"
However, I had to reinstall arch and for some reason after the reinstall this will no longer fix the problem.I have gone over everything numerous times now and cannot figure out what is wrong. Running thee command by itself in the terminal also no longer fixes the problem. I have tried re-installing my nvidia drivers and that also does not help. I am wits end and do not know what to do and whats really irritating is the fact that it was working on my other install. Does anyone have any suggestions?
----------------------------------------------------------------------------------
July 31st, 2015 Update:
Ok, even wierder. I couldn't figure out what I had done on my other install to fix things EXCEPT for installing the nouveau drivers and then switching back to nvidia, THEN using:
Option "metamodes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"
So I tried switching to he nouveau drivers and then switching back to nvidia and applying the "Option... {FullCompositionPipeline = On}" and FUCK YES NO TEARING!! So I don't know why but unless I do that there is tearing.
----------------------------------------------------------------------------------
Original post:
I have had screen tearing when watching videos, gaming or sometimes scrolling and have tried everything I could find to fix the problem. I am using the proprietary driver and KDE 4 but I have the issue on plasma 5 and GNOME too and I am so tired of this issue i'm considering getting a new video card. I have a GeForce GTX 970. I have tried reinstalling arch and am all out of ideas.
What i've tried:
Adding triplebuffer=1 to /etc/profile.d/kwin.sh.
/etc/profile.d/kwin.sh
-------------------------
#!/bin/bash
export KWIN_TRIPLE_BUFFER=1
Adding export __GL_YIELD="USLEEP":
/etc/profile.d/kwin.sh
-------------------------
#!/bin/bash
export __GL_YIELD="USLEEP"
I have triplebuffering set to true on my /etc/X11/xorg.conf.d/20-nvidia.conf:
Section "ServerLayout"
Identifier "Layout0"
Screen 0 "Screen0"
InputDevice "Keyboard0" "CoreKeyboard"
InputDevice "Mouse0" "CorePointer"
EndSection
Section "Files"
EndSection
Section "InputDevice"
# generated from default
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "auto"
Option "Device" "/dev/psaux"
Option "Emulate3Buttons" "no"
Option "ZAxisMapping" "4 5"
EndSection
Section "InputDevice"
# generated from default
Identifier "Keyboard0"
Driver "kbd"
EndSection
Section "Monitor"
Identifier "Monitor0"
VendorName "Unknown"
ModelName "Unknown"
HorizSync 28.0 - 33.0
VertRefresh 43.0 - 72.0
Option "DPMS"
EndSection
Section "Device"
Identifier "Device0"
Driver "nvidia"
VendorName "NVIDIA Corporation"
Option "TripleBuffer" "true"
EndSection
Section "Screen"
Identifier "Screen0"
Device "Device0"
Monitor "Monitor0"
DefaultDepth 24
SubSection "Display"
Depth 24
EndSubSection
EndSection
In my nvidia settings I have allow flipping and sync to vblank checked.
Does anyone know how I can fix this?
Last edited by STREBLO (2015-07-31 21:09:05)
Offline
Have you tried this:
https://wiki.archlinux.org/index.php/NV … ries_cards
Offline
There is something more: system settgins > desktop effects > advanced:
-choose open gl > 3.1
-choose graphic system QT: native
-vsync: on (it should be named something like by itself in english or automatically)
Try it.
Offline
Funny, I don't think I've ever had tearing problems with GNOME. For Plasma 5 try going to System Settings -> Display and Monitor -> Compositor and set Tearing Prevention ("vsync"): to Full Screen Repaints.
Offline
There is something more: system settgins > desktop effects > advanced:
-choose open gl > 3.1
-choose graphic system QT: native
-vsync: on (it should be named something like by itself in english or automatically)Try it.
No luck
Offline
I'd recommend removing the triplebuffer line.
Hopefully compton thread helps.
Offline
I'd recommend removing the triplebuffer line.
Hopefully compton thread helps.
I tried this, no luck...
compton --vsync opengl-oml
Can you replace kwin as your wm in KDE, I can't figure out how or if you can.
Offline
^ For me there is as an "openbox/KDE" session, which will start your KDE session but with openbox instead of kwin. I think you can run compton from within an openbox session.
There doesn't seem to be an option to switch it within system settings.
[ Arch x86_64 | linux | Framework 13 | AMD Ryzen™ 5 7640U | 32GB RAM | KDE Plasma Wayland ]
Offline
The easy fix for me was to replace nvidia drivers with nouveau.
Offline
Except that this easy fix cripples your 3D performance. Maybe it's different with newer hardware, but on mine, I could no longer use mpv with opengl-hq renderer - it would stutter horribly.
[ Arch x86_64 | linux | Framework 13 | AMD Ryzen™ 5 7640U | 32GB RAM | KDE Plasma Wayland ]
Offline
The easy fix for me was to replace nvidia drivers with nouveau.
Tried that, didn't help and made everything else terrible.
Offline
You don't seem to have tried the solution Head_on_a_Stick linked to (or you just haven't posted you tried it).
[ Arch x86_64 | linux | Framework 13 | AMD Ryzen™ 5 7640U | 32GB RAM | KDE Plasma Wayland ]
Offline
You don't seem to have tried the solution Head_on_a_Stick linked to (or you just haven't posted you tried it).
No! Must have missed it. I'll give that a go.
Offline
I have no tearing in KDE4 or Plasma 5 with the following setup:
/etc/X11/xorg.conf.d/20-nvidia.conf:
Section "Device"
Identifier "NVIDIA GPU"
Driver "nvidia"
Option "TripleBuffer" "False"
EndSection
Environment for kwin:
export __GL_YIELD="USLEEP"
export KWIN_TRIPLE_BUFFER=0
export KWIN_USE_BUFFER_AGE=0
Gnome also works without tearing. For Gnome, this environment variable hides a bug it has on NVIDIA drivers:
export CLUTTER_PAINT=continuous-redraw
Last edited by Ropid (2015-07-13 23:41:19)
Offline
I have no tearing in KDE4 or Plasma 5 with the following setup:
/etc/X11/xorg.conf.d/20-nvidia.conf:
Section "Device" Identifier "NVIDIA GPU" Driver "nvidia" Option "TripleBuffer" "False" EndSection
Environment for kwin:
export __GL_YIELD="USLEEP" export KWIN_TRIPLE_BUFFER=0 export KWIN_USE_BUFFER_AGE=0
Gnome also works without tearing. For Gnome, this environment variable hides a bug it has on NVIDIA drivers:
export CLUTTER_PAINT=continuous-redraw
usleep doesn't work for me as i said in my post.
You don't seem to have tried the solution Head_on_a_Stick linked to (or you just haven't posted you tried it).
Have you tried this:
https://wiki.archlinux.org/index.php/NV … ries_cards
Holy crap this did it! I've been trying to fix this forever, thanks!!
Offline
usleep doesn't work for me as i said in my post.
You have to use either __GL_YIELD=USLEEP, or triple buffer. You can't use both. Hints about the reason for that is here: https://bugs.kde.org/show_bug.cgi?id=322060
For me, triple buffer had the problem that things for some reason ran at 50 fps on my 60 Hz screen. This would then look like stutter.
When using double buffering, __GL_YIELD=USLEEP is needed. I think kwin tries to detect if USLEEP is enabled or not. If it's not there, it will not try to do tearing prevention.
Soukyuu wrote:You don't seem to have tried the solution Head_on_a_Stick linked to (or you just haven't posted you tried it).
Head_on_a_Stick wrote:Have you tried this:
https://wiki.archlinux.org/index.php/NV … ries_cardsHoly crap this did it! I've been trying to fix this forever, thanks!!
This fix had a terrible downside for me, but I don't remember the details anymore.
Offline
STREBLO wrote:usleep doesn't work for me as i said in my post.
You have to use either __GL_YIELD=USLEEP, or triple buffer. You can't use both. Hints about the reason for that is here: https://bugs.kde.org/show_bug.cgi?id=322060
For me, triple buffer had the problem that things for some reason ran at 50 fps on my 60 Hz screen. This would then look like stutter.
When using double buffering, __GL_YIELD=USLEEP is needed. I think kwin tries to detect if USLEEP is enabled or not. If it's not there, it will not try to do tearing prevention.
STREBLO wrote:Soukyuu wrote:You don't seem to have tried the solution Head_on_a_Stick linked to (or you just haven't posted you tried it).
Head_on_a_Stick wrote:Have you tried this:
https://wiki.archlinux.org/index.php/NV … ries_cardsHoly crap this did it! I've been trying to fix this forever, thanks!!
This fix had a terrible downside for me, but I don't remember the details anymore.
Yes, I know, I tried both of them separately as I said in my post. Let me know if you recal ghe downside.
Offline
for proprietary drivers...
Both KDE and Gnome call xrandr on their load up overriding whatever you set in 20-nvidia.conf.... for gnome you can use a startup script to reapply your xorg settings
KDE launches a service at startup that handles monitor changes... you could disable that service and it will keep your settings defined in the 20-nvidia.conf file or you could do the same and call a script to reapply your settings on startup
here is a sample command to do that (adjust it to your current settings)
nvidia-settings --assign CurrentMetaMode="DVI-I-1: nvidia-auto-select +0+0 {ForceCompositionPipeline = On}"
Offline
Did anyone try this for Plasma 5?
For Plasma 5 try going to System Settings -> Display and Monitor -> Compositor and set Tearing Prevention ("vsync"): to Full Screen Repaints.
Offline
for proprietary drivers...
Both KDE and Gnome call xrandr on their load up overriding whatever you set in 20-nvidia.conf.... for gnome you can use a startup script to reapply your xorg settings
KDE launches a service at startup that handles monitor changes... you could disable that service and it will keep your settings defined in the 20-nvidia.conf file or you could do the same and call a script to reapply your settings on startup
here is a sample command to do that (adjust it to your current settings)
nvidia-settings --assign CurrentMetaMode="DVI-I-1: nvidia-auto-select +0+0 {ForceCompositionPipeline = On}"
Yea, Head_on_s_Stick already mentioned that and as I said it fixed my problem.
Did anyone try this for Plasma 5?
Chazza wrote:For Plasma 5 try going to System Settings -> Display and Monitor -> Compositor and set Tearing Prevention ("vsync"): to Full Screen Repaints.
I tried it, didn't help me.
Offline
Ok, really wierd. I had marked this as solved after I found adding this to my 20-nvidia.conf fixed the problem
Option "metamodes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"
However, I had to reinstall arch and for some reason after the reinstall this will no longer fix the problem.I have gone over everything numerous times now and cannot figure out what is wrong. Running thee command by itself in the terminal also no longer fixes the problem. I have tried re-installing my nvidia drivers and that also does not help. I am wits end and do not know what to do and whats really irritating is the fact that it was working on my other install. Does anyone have any suggestions?
Offline
The only thing that i do to remove tearing is use the fullcomposition ... i dont touch vsync settings anywhere ...
I do run a autostart script to reapply those settings after i log in on most desktop like gnome, kde etc......
this is all i have in my script (i do have multi monitors but removed my actual settings to show just what you posted)
nvidia-settings --assign CurrentMetaMode="DVI-I-1: nvidia-auto-select +0+0 {ForceFullCompositionPipeline = On}"
edit: fixed typo
Last edited by Malkymder (2015-07-30 00:44:08)
Offline
GL_YIELD and KWIN_TRIPPLE_BUFFER are in fact bad, opposite to what devs say. See this https://bugs.kde.org/show_bug.cgi?id=346275
Basically KWIN drops frames without tripple buffering, or simply disables vsync.
There are two ways to workaround that:
1) No xorg.conf setting, no exported variables, log in, wait until vsync breaks and then switch OpenGL3-> OpenGL2 -> Apply -> OpenGL3 -> Apply. Works with everything including 'Re-use screen content".
2) Force triple buffering globally with "Option "TripleBuffer" 1" KWin should detect that automatically.
EDIT: 50Hz problem is known upstream and may or may not been fixed. You can manually specify refresf rate in ~/.config/kwinrc
[Compositing]
RefreshRate=60
Last edited by Goresome (2015-07-30 19:56:40)
Offline
Ok, even wierder. I couldn't figure out what I had done on my other install to fix things EXCEPT for installing the nouveau drivers and then switching back to nvidia, THEN using:
Option "metamodes" "nvidia-auto-select +0+0 { ForceFullCompositionPipeline = On }"
So I tried switching to he nouveau drivers and then switching back to nvidia and applying the "Option... {FullCompositionPipeline = On}" and FUCK YES NO TEARING!! So I don't know why but unless I do that there is tearing.
Offline