You are not logged in.

#1 2014-03-02 20:27:49

bbarcher
Member
From: Poland
Registered: 2014-02-27
Posts: 174
Website

2014 update on GNOME tearing?

edit
An important update regarding a proper fix!
https://bbs.archlinux.org/viewtopic.php … 1#p1388841
edit

I'm interested in updates on the situation as well as updates to the recommended workarounds.

I've been using the CLUTTER_PAINT=disable-clipped-redraws:disable-culling workaround for months on Fedora to at least partially get rid of tearing. The latest was Fedora 20, February 2014. The weird thing is on Arch this workaround barely makes any difference. In fact another combination of tweaks seems to make a bigger difference, i.e. vblank + TearFree+sna. Still not as good as clutter_paint on Fedora though.

So, are there any news on the subject?
The very latest news is
https://bugs.freedesktop.org/show_bug.cgi?id=37686
https://bugzilla.gnome.org/show_bug.cgi?id=711028

The latter mentions things >might< change around Mesa 10+ and DRI3 (Xorg 1.15+) so maybe someone could review the situation and modify the wiki, if necessary.

A quick primer:
a) tearing doesn't seem to be a biggy for neither Gnome nor Intel developers
b) it is NOT specific to Sandy Bridge or later (the often repeated 'it's because of a removal of a hardware feature'); present on Gen4 (GM45, 4500HD) graphics
c) introduced around the beginning of 2013, measured by Gnome+Intel stack available in Fedora


A recommendation on the least resources intensive configuration:
Can anyone recommend the least demanding set of settings? It's very likely that neither of the workarounds give me acceptable results and I settle for disabling all Gnome animations.


Taking advantage of quick startup times of Arch I ran multiple anti-tearing tweaks combinations. Visual evaluation only. Same set of opened windows, Gnome Activities open/close. Here are my quick notes:

clutter_paint < vblank + TearFree+sna
vblank + TearFree+sna+swap = vblank + TearFree+sna
vblankDRI + TearFree+sna+swap = vblank + TearFree+sna
(nothing) + TearFree+sna+swap = vblank + TearFree+sna

verification:
clutter_paint < vblank + TearFree+sna


clutter_paint+vblank = clutter_paint
clutter_paint (small difference) ALL default


TearFree+sna = clutter_paint
TearFree+sna+swap = TearFree+sna

ALL tweaks at the same time = ALL default


Key:
</etc/environment tweaks><space>+<space></etc/X11/xorg.conf.d/20-intel.conf tweaks>
<, >, and = used for comparison results

The possible tweaks:

file: /etc/environment 
CLUTTER_PAINT=disable-clipped-redraws:disable-culling
CLUTTER_VBLANK=True
file: /etc/X11/xorg.conf.d/20-intel.conf
Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "TearFree"    "true"
   Option      "SwapbuffersWait" "true"
   Option      "AccelMethod" "sna"
EndSection    

Last edited by bbarcher (2014-03-05 15:32:39)


Put up or shut up. 
--Austin Meyer, the lead developer of X-Plane
[ url=http://... ]  Text  [ /url ]

Offline

#2 2014-03-03 12:26:30

Thorsten Reinbold
Member
From: Germany
Registered: 2011-12-06
Posts: 353

Re: 2014 update on GNOME tearing?

bbarcher wrote:

The possible tweaks:

file: /etc/environment 
CLUTTER_PAINT=disable-clipped-redraws:disable-culling
CLUTTER_VBLANK=True

Thanks! That works for me with my Nvidia-Card and the nvidia-cs-drivers.

Offline

#3 2014-03-03 12:32:16

volker_holthaus
Member
Registered: 2013-07-05
Posts: 11

Re: 2014 update on GNOME tearing?

Hai...

for me "AccelMethod" "uxa" in the 20-intel.conf works. The rest doesn't work for me.

Regards

Volker

Offline

#4 2014-03-03 19:33:55

bbarcher
Member
From: Poland
Registered: 2014-02-27
Posts: 174
Website

Re: 2014 update on GNOME tearing?

I've search through internet and bugzillas, even talked to some devs at phoronix.com, and it looks like the tearing bollocks is still a problem and one that's not going to go away anytime soon (see post #1, item a) ).

So, I'll share what worked best for me, i.e. disabling Gnome shell animations.

1. Disable only most problematic animations (Change the first one to 0.002 and the rest to 0.001):
gedit /usr/share/gnome-shell/js/ui/overview.js
const ANIMATION_TIME = 0.25;
const SHADE_ANIMATION_TIME = .20;

gedit /usr/share/gnome-shell/js/ui/panel.js
const SPINNER_ANIMATION_TIME = 0.2;

gedit /usr/share/gnome-shell/js/ui/dash.js
const DASH_ANIMATION_TIME = 0.2;

2. Disable all animations:
a) install dconf-editor:
b) in command line issue

gsettings set org.gnome.desktop.interface enable-animations "false"

or use dconf to change the value manually (go to org > gnome > ...)

Since Dash interferes  with disabling gnome Activities animations
http://forums.fedoraforum.org/showthread.php?p=1687694
you might actually see better results with method 1 as compared to method 2. Or check how both work together and report back.

Last edited by bbarcher (2014-03-03 20:16:31)


Put up or shut up. 
--Austin Meyer, the lead developer of X-Plane
[ url=http://... ]  Text  [ /url ]

Offline

#5 2014-03-05 15:28:55

bbarcher
Member
From: Poland
Registered: 2014-02-27
Posts: 174
Website

Re: 2014 update on GNOME tearing?

It looks like the real fix is coming! (likely not anytime soon though)

It is based on buffer_age xorg (DRI) extension
The developer was kind enough to list prerequisites to get rid of the tearing. Which are the following
https://bugzilla.gnome.org/show_bug.cgi?id=711028#c9

The issue explained in detail https://bugzilla.gnome.org/show_bug.cgi?id=669122

Now, is anyone up to the task to make Arch the first distro with tear-free Gnome? To build packages or at least provide some instructions on how to get it done? There are instructions on applying GIT patches but I wouldn't even know where to start with mesa patches. Is it a valid case for an AUR request?

I'll do some reading now. Please chime in if you can help.

Last edited by bbarcher (2014-03-06 09:38:04)


Put up or shut up. 
--Austin Meyer, the lead developer of X-Plane
[ url=http://... ]  Text  [ /url ]

Offline

#6 2014-03-06 14:03:10

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,936

Re: 2014 update on GNOME tearing?

Overall you need 3 separate packages :

- a patch for clutter
stage-cogl: Fix buffer_age code path
this could be covered by building clutter from git


- an out-of-tree xf86-video-intel built from keithp dri3 branch

- mesa with patches

glx: Update glxext.h to revision 25407
glx_pbuffer: Refactor GetDrawableAttribute
dri3: Add GLX_EXT_buffer_age support

the first has been accepted in git master, http://cgit.freedesktop.org/mesa/mesa/c … b8bbe9cff9 but the other 2 have not yet been accepted.
This suggests there may still be problems with them, but related threads on mesa-dev indicate Adel Gadlah is working on that.

Summary :
the clutter and mesa patches are rather small changes, the tricky part will likely be building the out-of-tree xf86-video-intel package.

EDIT :
there's  https://aur.archlinux.org/packages/clutter-git in aur, while it needs updating to use the new VCS source options (pacman 4.1), it does appear to be actively maintained.

Last edited by Lone_Wolf (2014-03-06 14:26:07)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#7 2014-03-06 16:33:56

bbarcher
Member
From: Poland
Registered: 2014-02-27
Posts: 174
Website

Re: 2014 update on GNOME tearing?

Thanks LW.


Put up or shut up. 
--Austin Meyer, the lead developer of X-Plane
[ url=http://... ]  Text  [ /url ]

Offline

#8 2014-03-12 18:58:19

bbarcher
Member
From: Poland
Registered: 2014-02-27
Posts: 174
Website

Re: 2014 update on GNOME tearing?

Please speak up if for you the CLUTTER_PAINT=disable-clipped-redraws:disable-culling workaround also doesn't work for tear-free gnome shell animations (most notably the overwiew).


Put up or shut up. 
--Austin Meyer, the lead developer of X-Plane
[ url=http://... ]  Text  [ /url ]

Offline

#9 2014-03-12 19:56:46

omer666
Member
Registered: 2011-01-26
Posts: 70

Re: 2014 update on GNOME tearing?

I just opened a bugtracker issue about clutter with nvidia latest drivers, that may be related to this issue as well :
https://bugs.archlinux.org/task/39371

Don't know if it is related in any way, but both seem to be linked with the "buffer-age" thing...

[Edit] By the way, CLUTTER_PAINT=disable-clipped-redraws:disable-culling seems to solve the issue for me with nvidia drivers...
[Edit 2] False alert... it improves things a great deal, but it still doesn't refresh screen as it should...

Last edited by omer666 (2014-03-12 20:09:41)

Offline

#10 2014-03-14 08:45:55

bbarcher
Member
From: Poland
Registered: 2014-02-27
Posts: 174
Website

Re: 2014 update on GNOME tearing?

Mesa DRI3 Picks Up GLX_EXT_buffer_age Support
http://www.phoronix.com/scan.php?page=n … px=MTYyOTk

Two more to go.


Put up or shut up. 
--Austin Meyer, the lead developer of X-Plane
[ url=http://... ]  Text  [ /url ]

Offline

#11 2014-03-14 13:22:40

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,936

Re: 2014 update on GNOME tearing?

glx_pbuffer: Refactor GetDrawableAttribute was merged into mesa git master also ,
http://cgit.freedesktop.org/mesa/mesa/c … 8be9649188 .

That means that codewise using master clutter-git and master mesa-git satisfies all but one of the requirements :
a package that builds keithp's out-of-tree dri3 branch of xf86-video-intel.

Last edited by Lone_Wolf (2014-03-14 13:22:55)


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#12 2014-03-14 15:58:12

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,936

Re: 2014 update on GNOME tearing?

making a package for the out-of-tree dri3 branch maintained by Keithp was easier then i anticipated, i submitted it to AUR.
https://aur.archlinux.org/packages/xf86 … -dri3-git/ .

It does build, but as i don't have access to a system with intel graphics and am not a gnome user, i can't test it.
I'll maintain the package for  a while, but it would be best if someone that does use the package steps up and takes over.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#13 2014-03-14 16:31:53

bbarcher
Member
From: Poland
Registered: 2014-02-27
Posts: 174
Website

Re: 2014 update on GNOME tearing?

Thanks LW!
Is monday/tuesday evening fine with you?


Put up or shut up. 
--Austin Meyer, the lead developer of X-Plane
[ url=http://... ]  Text  [ /url ]

Offline

#14 2014-03-14 21:36:44

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,936

Re: 2014 update on GNOME tearing?

I think so, bbarcher .

If you want to test then, maybe we could use #archlinux-aur irc channel to communicate easier?


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#15 2014-03-15 23:09:43

bbarcher
Member
From: Poland
Registered: 2014-02-27
Posts: 174
Website

Re: 2014 update on GNOME tearing?

Sure, we could do that. I'll just have to read up on how to connect.


Put up or shut up. 
--Austin Meyer, the lead developer of X-Plane
[ url=http://... ]  Text  [ /url ]

Offline

#16 2014-03-18 20:41:53

bbarcher
Member
From: Poland
Registered: 2014-02-27
Posts: 174
Website

Re: 2014 update on GNOME tearing?

Lone_wolf,

You will need to install clutter-git (aur) and intel-dri-git from
either aur mesa-git or Lordheavy's unofficial [mesa-git] repo.

I'm embarassed to admit it but I don't know how to achieve this.


Put up or shut up. 
--Austin Meyer, the lead developer of X-Plane
[ url=http://... ]  Text  [ /url ]

Offline

#17 2014-03-18 21:49:45

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,936

Re: 2014 update on GNOME tearing?

bbarcher, read https://wiki.archlinux.org/index.php/AUR when you got some time.

NOTE : you'll be running development / experimental packages, it's best to have 2 systems  available only one of which gets the *-git stuff

to help you get on your way with clutter-git and the other packages :

run pacman -Syu
install everything in the base-devel group
download the tarball for clutter-git
extract it to a build folder in your home, say ~/aurbuild
cd to ~/aurbuild/clutter-git
run makepkg
if makepkg complains about missing dependencies, install them and try again
at some point makepkg will finish building, and you'll have a clutter-git.somestuff.tar.gz file in ~/aurbuild/clutter-git .
use pacman -U ~/aurbuild/clutter-git/clutter-git.somestuff.tar.gz   to install it

To get mesa-git, we'll use the easy option and get it from Lordheavy's unofficial repo.
check http://pkgbuild.com/~lcarlier/mesa-git/   and add the mesa-git repo to /etc/pacman.conf .
NOTE : it's usually best to put such  a repo at the bottom of pacman.conf

after that , run pacman -Syu , followed by pacman -S intel-dri-git

once you're at this point, it's time to build xf86-video-intel-dri3-git/ .
download tarball, extract to folder and run makepkg.
install any missing dependencies, run makepkg again until it builds succesfully , after that install with pacman -U .

logout and re-login to gnome
check Xorg.0.log for errors, if none test tearing.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#18 2014-03-19 20:25:28

bbarcher
Member
From: Poland
Registered: 2014-02-27
Posts: 174
Website

Re: 2014 update on GNOME tearing?

Lone_Wolf,

Discard:[Do you mean https://github.com/GNOME/clutter (the master branch) specifically? I was unable to find anything matching clutter-git.]
Edit: OK, I've found out what is the clutter-git. It's listed under  https://aur.archlinux.org/packages/xf86 … -dri3-git/   dependencies.

I've just set up a separate Arch install for the purpose and starting to dig in. It would be great if you could confirm it's fine if give it a go during weekend in case of problems during my todays attempt. I'm kind of busy thursday, friday during the day.

BTW, how do I catch you on IRC? I've never used IRC before smile I've connected to #archlinux and #archlinux-aur channels using mibbit.com web-based IRC client. They are both empty.

Edit:
After pacman -S intel-dri-git I get signature-related errors:
missing required signature
* is corrupted (invalid or corrupted package (PGP signature)).

I've tried:
saying yes to 'Do you want to delete it?'
refreshing pacman keys and -Syy , -Syu
deleting pacman cache, -Syy , -Syu

I tried installing gparted and it went ahead without errors. Also, until the dri installs successfully I will not be able to boot into Gnome.

Last edited by bbarcher (2014-03-19 21:46:27)


Put up or shut up. 
--Austin Meyer, the lead developer of X-Plane
[ url=http://... ]  Text  [ /url ]

Offline

#19 2014-03-19 21:39:16

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,936

Re: 2014 update on GNOME tearing?

Arch irc channels are located on freenode.net  servers, it doesn't look like Mibbit has those in the list.

try https://webchat.freenode.net/

Note that to able to speak in #archlinux channel, you need to have an account with freenode
saturday during day and sunday evening i should be available.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#20 2014-03-21 11:36:24

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,936

Re: 2014 update on GNOME tearing?

bbarcher wrote:

Edit:
After pacman -S intel-dri-git I get signature-related errors:
missing required signature
* is corrupted (invalid or corrupted package (PGP signature)).

I've tried:
saying yes to 'Do you want to delete it?'
refreshing pacman keys and -Syy , -Syu
deleting pacman cache, -Syy , -Syu

I tried installing gparted and it went ahead without errors. Also, until the dri installs successfully I will not be able to boot into Gnome.

I don't think the [mesa-git] repo has signed packages .

try this in /etc/pacman.conf

[mesa-git]
SigLevel=Optional TrustAll
Server = http://pkgbuild.com/~lcarlier/$repo/$arch

Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#21 2014-03-22 18:03:09

bbarcher
Member
From: Poland
Registered: 2014-02-27
Posts: 174
Website

Re: 2014 update on GNOME tearing?

I've got through with the procedure from post #17. There don't seem to be any errors but it still get stuck on "Reached target graphical interface" upon reboot.
Here are Xorg.0.log and the return of dmesg: https://onedrive.live.com/redir?resid=6 … der%2c.log


Put up or shut up. 
--Austin Meyer, the lead developer of X-Plane
[ url=http://... ]  Text  [ /url ]

Offline

#22 2014-03-22 18:36:11

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,936

Re: 2014 update on GNOME tearing?

dmesg doesn't appear to have errors, Xorg.0.log lacks modelines and such, but no errors are shown.

I suggest you append systemd.unit=multi-user.target to your boot kernel line, so you'll boot to console instead of X.
after logging in as user , you can then use startx directly.
https://wiki.archlinux.org/index.php/Gn … ting_GNOME has details about how to start gnome through startx.

Describe what you see then, if it also fails switch back to stock xf86-video-intel .
You can leave clutter-git and mesa-git installed, while they are development versions mesa-git from mesa-git repo tends to be very stable and next clutter release (1.18) should be very close to clutter-git .

Could you also post Xorg.0.log from a boot with stock xf86-video-intel ? comparing the logs may give  a clue to what is going wrong.


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#23 2014-03-23 12:46:54

bbarcher
Member
From: Poland
Registered: 2014-02-27
Posts: 174
Website

Re: 2014 update on GNOME tearing?

What I did:
1. https://wiki.archlinux.org/index.php/Gn … ting_GNOME , [Alt+Ctrl+F2], logged in to my default non-root user and prepared the .xinitrc file
2. startx
3. got the gnome 'Oh no something has gone wrong!' error dialog
4. did 1 and 2 but for root and startx as root
4a. got the gnome 'Oh no something has gone wrong!' error dialog
5. pacman -Syy, pacman -S xf86-video-intel
6. reboot
7. startx as root
8. got the gnome 'Oh no something has gone wrong!' error dialog


Put up or shut up. 
--Austin Meyer, the lead developer of X-Plane
[ url=http://... ]  Text  [ /url ]

Offline

#24 2014-03-23 13:09:32

Lone_Wolf
Administrator
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 12,936

Re: 2014 update on GNOME tearing?

that suggests something in either mesa-git or clutter-git isn't handled well by gnome.

I suggest you replace clutter-git by official clutter, then try again.

If that also doesn't work, try clutter-git with official mesa


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.

clean chroot building not flexible enough ?
Try clean chroot manager by graysky

Offline

#25 2014-03-23 18:35:06

bbarcher
Member
From: Poland
Registered: 2014-02-27
Posts: 174
Website

Re: 2014 update on GNOME tearing?

clutter-git replaced by official clutter. Gnome starts fine but the tearing is unchanged. BTW, is enabling SNA acceleration required for the new anti-tearing implementations to work? On my system it made no difference.

Last edited by bbarcher (2014-03-23 18:48:51)


Put up or shut up. 
--Austin Meyer, the lead developer of X-Plane
[ url=http://... ]  Text  [ /url ]

Offline

Board footer

Powered by FluxBB