! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Add opengl vsync support
Status:
RESOLVED: DUPLICATE

Comments

Description Yan Pas 2015-03-04 13:01:22 CET
Currently there is no way to get rid of tearing using Nvidia vedeo card and XFWM compositor. If there was an option to use opengl vsync, like it is made in comptom compositor, there would be no tearing at all.
Comment 1 Olivier Fourdan editbugs 2015-03-04 13:18:29 CET
Yes, agreed. But you forgot to attach the patch ...
Comment 2 Yan Pas 2015-03-04 14:20:13 CET
I have no patch; hope you will write it or port it from compton :)
Comment 3 Olivier Fourdan editbugs 2015-03-27 22:48:43 CET
II have added OPenGL VSync in git master, it helps with Nouveau (intel already has perfect tear-free implementation in the driver).

Not perfect, but definitely an improvement.
Comment 4 Yan Pas 2015-03-28 12:26:17 CET
Compiled from master git. The same situation on NVIDIA proprietary drivers (With vsync enabled tearing is at the bottom of the screen, without on top). Maybe I should run or compile it with some options?
Comment 5 Olivier Fourdan editbugs 2015-03-28 14:55:06 CET
Dunno, do you have the required libs?
Comment 6 Yan Pas 2015-03-28 16:25:40 CET
there were no errors during  compilation. So I think I have all required libs. Have you tested it with Nvidia proprietary drivers? (mine are 331)

xfwm4 --version
	This is xfwm4 version 4.12.0git.023763f (revision 023763f) for Xfce 4.10
	Released under the terms of the GNU General Public License.
	Compiled against GTK+-2.24.23, using GTK+-2.24.23.
Comment 7 Andrey Vihrov 2015-03-28 16:32:09 CET
I tried the git version just now. It removes tearing, and at a first glance it adds less latency than Intel's TearFree option (or is it placebo?). Nice!

By the way, this doesn't seem right:

+ g_warning ("GLX version %d is too old, vsync disabled.");


@yanpaso: Make sure you have libepoxy installed before building xfwm4.
Comment 8 Yan Pas 2015-03-28 19:17:07 CET
Can't believe my eyes! Years of sex with compton are passed! No I don't need any workarounds! You are awesome! NO TEARING ANYMORE!!!
Comment 9 Yan Pas 2015-03-28 19:36:25 CET
Ough. I got segmentation error. It appeared after i ran mousetweaks app and  was appearing until I  disabled compositing. (xfwm4:13642): xfwm4-WARNING **: Unmanaged net_wm_state (window 0x6800193, atom "_NET_WM_STATE_FOCUSED")
Ошибка сегментирования (сделан дамп памяти)
translation: Segmantation error (memory dump was made)

But where is the dump?...
Comment 10 Olivier Fourdan editbugs 2015-03-28 19:51:49 CET
(In reply to yanpaso from comment #9)
> Ough. I got segmentation error. It appeared after i ran mousetweaks app and 
> was appearing until I  disabled compositing. (xfwm4:13642): xfwm4-WARNING
> **: Unmanaged net_wm_state (window 0x6800193, atom "_NET_WM_STATE_FOCUSED")
> Ошибка сегментирования (сделан дамп памяти)
> translation: Segmantation error (memory dump was made)

Thats's most likely unrelated, so it's worth a different bug.

> But where is the dump?...

That depends on your setup, there is no way I can tell... Anyhow a core file isost likely useless, as I am not running the same binary as yours.
Comment 11 Olivier Fourdan editbugs 2015-03-28 21:50:31 CET
(In reply to Olivier Fourdan from comment #10)
> > But where is the dump?...
> 
> That depends on your setup, there is no way I can tell... Anyhow a core file
> is most likely useless, as I am not running the same binary as yours.

Usually it's just a a matter of setting "ulimit -c unlimited" to get a core file.

But ideally, best would be to run xfwm4 from within gdb from a remote connection (ssh) and capture a backtrace once the crash occurs.
Comment 12 Yan Pas 2015-03-28 21:54:21 CET
Rebooted PC. No segmentations anymore (I'm not sure they won't appear again) But xfwm's tearing behaves strangely. Just after I have logged in - tearing exists. If I turn XFWM effects off and on - there will be no more tearing during session.
Comment 13 Yan Pas 2015-03-28 22:04:35 CET
BTW after waking up from suspend I'm to restart xfwm compositor too
Comment 14 Yan Pas 2015-03-28 22:51:26 CET
And another things that "reenables tearing is switching to tty1-6. When I switch to tty1 my screen resolution becomes 640x480 instead on 1920x1080. Something resets and I'm again to uncheck and check xfwm eddects in settings
Comment 15 Olivier Fourdan editbugs 2015-03-28 23:08:56 CET
(In reply to yanpaso from comment #14)
> And another things that "reenables tearing is switching to tty1-6. When I
> switch to tty1 my screen resolution becomes 640x480 instead on 1920x1080.
> Something resets and I'm again to uncheck and check xfwm eddects in settings

xfwm4 doesn't care about VT switching, your driver does.
Comment 16 Yan Pas 2015-03-28 23:19:44 CET
And what about two other cases? It should remember somehow about compositing... xfwm-compositor looses connection with driver (?)

Made a workaround:
Autostart command "bash -c "sleep 2;xfwm4 --compositor=off --replace; xfwm4 --compositor=on --replace""
keyboard shortcut Backspace+Ctrl "bash -c "xfwm4 --compositor=off --replace; xfwm4 --compositor=on --replace""

I can't understand why it is so, will ask compton devs...
Comment 17 Olivier Fourdan editbugs 2015-03-29 08:53:46 CEST
(In reply to yanpaso from comment #16)
> And what about two other cases? It should remember somehow about
> compositing... xfwm-compositor looses connection with driver (?)
> 
> Made a workaround:
> Autostart command "bash -c "sleep 2;xfwm4 --compositor=off --replace; xfwm4
> --compositor=on --replace""
> keyboard shortcut Backspace+Ctrl "bash -c "xfwm4 --compositor=off --replace;
> xfwm4 --compositor=on --replace""
> 
> I can't understand why it is so, will ask compton devs...

That makes no sense to me. Anyhow, compton is a different project, pease do not not confuse everything.
Comment 18 Yan Pas 2015-03-29 12:53:58 CEST
Better way of reenabling compositing:
bash -c "xfconf-query -c xfwm4 -p /general/use_compositing -s false;xfconf-query -c xfwm4 -p /general/use_compositing -s true"
Comment 19 Yan Pas 2015-03-29 16:32:53 CEST
Ovilver,

Me and Richard Grenville (compton developer) are currently investigating tearing problem of xfwm4 in email conversation. Could you please write some details of login process and xfwm4 role in it? Where could we begin to search the root of the problem?
Comment 20 Olivier Fourdan editbugs 2015-03-29 16:54:30 CEST
(In reply to yanpaso from comment #19)
> Ovilver,
> 
> Me and Richard Grenville (compton developer) are currently investigating
> tearing problem of xfwm4 in email conversation. Could you please write some
> details of login process and xfwm4 role in it? Where could we begin to
> search the root of the problem?

This is insane, xfce is not Compton, all this makes no sense at all, I'm closing this bug now.
Comment 21 Yan Pas 2015-03-29 17:12:28 CEST
You missed the point :) I know that compton and xfwm are not related. I want to help xfce project, and Richard is Xorg specialist who can help us to fix this bug. He had read the code of your commit. Why have you closed it?
Comment 22 Thaddaeus Tintenfisch editbugs 2015-03-30 00:48:11 CEST
*** Bug 11661 has been marked as a duplicate of this bug. ***
Comment 23 Yan Pas 2015-04-08 19:54:59 CEST
For those who use NVidia there is a solution, that fixes tearing in any compositor:

Generate /etc/X11/xorg.conf via sudo nvidia-xconfig

Write to /etc/X11/xorg.conf
Section "Device"
 Identifier     "Device0"
 Driver         "nvidia"
 Option "Metamodes" "HDMI-0: 1920x1080 { ForceCompositionPipeline = On }"
 VendorName     "NVIDIA Corporation"
EndSection

HDMI-0: 1920x1080 is for my configuration. If you configuration differs - edit this line

https://devtalk.nvidia.com/default/topic/823711/linux/tearing-add-frame-buffer-please/?offset=7#4503217

I'm sure AMD has something similar. Try Option "TrippleBuffer" "True" too.
Comment 24 Olivier Fourdan editbugs 2015-06-29 17:29:39 CEST
Actually a dupe of bug 10439 (which is fixed)

*** This bug has been marked as a duplicate of bug 10439 ***

Bug #11642

Reported by:
Yan Pas
Reported on: 2015-03-04
Last modified on: 2019-09-04
Duplicates (1):
  • 11661 vsync no longer works after light-locker screen locking

People

Assignee:
Olivier Fourdan
CC List:
2 users

Version

Version:
unspecified

Attachments

Additional information