You are not logged in.

#1 2012-12-08 01:49:23

OhneHerren
Member
Registered: 2012-07-09
Posts: 32

Tearing with Ivy Bridge on a Macbook Air 5,2 (2012) and xmonad.

I'm getting video tearing with mplayer on a Macbook Air 5,2 (2012) running Arch Linux 3.6.9-1-ARCH x86_64. My /etc/X11/xorg.conf.d/20-intel.conf is as follows:

Section "Device"
	Identifier	"HD 4000"
	Driver	"Intel"
	Option	"AccelMethod"	"uxa"
#	Option "TearFree" "true" 
#	Option  "TripleBuffer"  "True"
#	Option  "XvPreferOverlay" "true"
#	Option  "DRI" "true"
#	Option "SwapbuffersWait" "false"
EndSection

I've tried enabling and disabling all those options to no avail. Tearing is worse with sna acceleration. I've also tried the development versions of xf86-video-intel-git, libdrm-git and libva-driver-intel-git. I've always had tearing problems on this hardware (so I think these issues have wider implications for running Linux on the latest Macbooks) and the only output methods that work tear-free are vaapi and gl. Now that I'm running xmonad-contrib (instead of Fluxbox or Openbox) only gl2 works. Really don't want to switch back to Fluxbox just to save some battery.

Ideally I'd like to remove the tearing entirely but this probably isn't going to happen at the moment on this hardware. I would be happy to just get vaapi working like it did in Fluxbox, seeing as CPU usage is much higher with gl2, especially with HD videos. Additionally with gl the screen sometimes turns black when toggling fullscreen and I have to kill mplayer from another tty. Is there something I can change with the way xmonad treats the mplayer window? I've tried changing the mplayer fstype and removing the xmonad windowborder but this didn't make any difference.

Last edited by OhneHerren (2012-12-08 02:12:49)

Offline

#2 2012-12-08 03:00:24

Hspasta
Member
Registered: 2011-12-24
Posts: 187
Website

Re: Tearing with Ivy Bridge on a Macbook Air 5,2 (2012) and xmonad.

For the record, using a tiling wm has a minimal battery life improvement (if at all) over a floating wm. There's not much difference between a de and a wm either. At least in my experience, Gnome had just as good battery life as dwm, awesome and i3.

Last edited by Hspasta (2012-12-08 03:03:06)

Offline

#3 2012-12-08 03:07:28

OhneHerren
Member
Registered: 2012-07-09
Posts: 32

Re: Tearing with Ivy Bridge on a Macbook Air 5,2 (2012) and xmonad.

Yeah I meant battery life difference between rendering videos with vaapi over gl but thank you. Wouldn't want to switch to a floating WM anyway after tasting a tiling one.

Offline

#4 2012-12-08 03:54:07

OhneHerren
Member
Registered: 2012-07-09
Posts: 32

Re: Tearing with Ivy Bridge on a Macbook Air 5,2 (2012) and xmonad.

If I run mplayer fullscreen without a DE or WM there's no tearing. Pretty much every combination of hardware and software I've used with Linux has had tearing issues such as these save for an old box found in a dumpster, should stick to that.

Last edited by OhneHerren (2012-12-08 03:56:11)

Offline

#5 2012-12-08 16:01:29

OhneHerren
Member
Registered: 2012-07-09
Posts: 32

Re: Tearing with Ivy Bridge on a Macbook Air 5,2 (2012) and xmonad.

On further examination tearing is present in gl/gl2 also. No rendering method works in xmonad.

Offline

#6 2012-12-09 06:50:44

David Batson
Member
Registered: 2011-10-13
Posts: 640

Re: Tearing with Ivy Bridge on a Macbook Air 5,2 (2012) and xmonad.

If possible, try disabling OpenGL 2 shaders.  This works in KDE.

Offline

#7 2012-12-09 09:34:42

OhneHerren
Member
Registered: 2012-07-09
Posts: 32

Re: Tearing with Ivy Bridge on a Macbook Air 5,2 (2012) and xmonad.

Doesn't seem to be an option outside of KDE.

Offline

#8 2012-12-17 14:58:25

Janhouse
Member
Registered: 2010-10-02
Posts: 28

Re: Tearing with Ivy Bridge on a Macbook Air 5,2 (2012) and xmonad.

I'm using Compton development branch (richardgv-dev) with Openbox and it has fixed vsync (it was implemented ~ 2 months ago).

You can get it from: https://github.com/chjj/compton/tree/richardgv-dev

I use it with these settings: compton -cCG -r 8 -o0.7 -l-12 -t-12 -f -D10 -I0.11 -O0.07 -m0.93 -z -b --vsync opengl

Discussion about it: https://github.com/chjj/compton/issues/7

Offline

#9 2012-12-17 22:52:32

OhneHerren
Member
Registered: 2012-07-09
Posts: 32

Re: Tearing with Ivy Bridge on a Macbook Air 5,2 (2012) and xmonad.

I was sure I posted a followup to this but apparently not. Turns out the tearing was caused by the smartBorders function of xmonad. I get tearing whenever any window is overlayed on top of a fullscreen mplayer window (like a tilda window or an xmonad border). Removing the borders manually works but removing them with smartBorders means tearing for some reason. So I disabled smartBorders on the mplayer workspace in xmonad and removed them instead with "className =? "MPlayer" --> (ask >>= doF . W.sink)" and the per-workspace setting "noBorders Full". Problem solved.


Janhouse wrote:

I'm using Compton development branch (richardgv-dev) with Openbox and it has fixed vsync (it was implemented ~ 2 months ago).

You can get it from: https://github.com/chjj/compton/tree/richardgv-dev

I use it with these settings: compton -cCG-r 8 -o0.7 -l-12 -t-12 -f -D10 -I0.11 -O0.07 -m0.93 -z -b --vsync opengl

Discussion about it: https://github.com/chjj/compton/issues/7

This doesn't do anything to solve tearing with xv output (nor the smartBorders tearing), not that I would use xv, it just seems to be the default/benchmark. It also causes tearing in vaapi which wasn't there before. It does however fix tearing when I'm moving windows around which has always been an issue. Don't do this anymore (tiling WM) but I'm sure it will be useful for others who do float windows. Thanks a bunch Janhouse.

Last edited by OhneHerren (2012-12-17 23:45:49)

Offline

#10 2013-04-03 11:51:32

Janhouse
Member
Registered: 2010-10-02
Posts: 28

Re: Tearing with Ivy Bridge on a Macbook Air 5,2 (2012) and xmonad.

Compton has been updated (richardgv-dev branch!!!!!) and there is no tearing, it can now use opengl for compositing and even ARGB blur works really well.

I use it like this:

compton --opengl --sw-opti --vsync opengl-swc --paint-on-overlay -cCGb -r 10 -o 0.5 -l-12 -t-12 -fF -D35 -I0.4 -O0.4 --shadow-exclude 'g:e:Conky' --blur-background --blur-background-frame

Offline

#11 2013-04-04 11:29:20

OhneHerren
Member
Registered: 2012-07-09
Posts: 32

Re: Tearing with Ivy Bridge on a Macbook Air 5,2 (2012) and xmonad.

Holy moly not bad at all cheers.

Offline

Board footer

Powered by FluxBB