Friday, June 17, 2011

Tearing screen even with VSyncing on NVIDIA ION

I've got a home media machine which I to watch MythTV and various online video streaming services. It's been annoying me for a while (possibly since I updated to Ubuntu 11.04) that there was tearing on the screen. It looked exactly like it wasn't vsyncing correctly, but I had vsyncing enabled in all the players I was trying.

The machine I'm using is an Acer Revo with NVIDIA ION chipset, so it isn't the most powerful system. Searching the internet for 'tearing' turned up results which were mostly about people not being able to play 720p or 1080p videos. However that certainly wasn't my issue as I'd done all of the following:

  • Giving the graphics card 512MB of RAM (called UMA in the BIOS setting).
  • Enabling VDPAU acceleration.
  • Disabling the compiz window manager (selecting "Ubuntu classic (no effects)" as the session).
  • Setting export __GL_SYNC_TO_VBLANK=1 and ignoring issues with vsync occurring for the wrong display.
  • Checking the refresh rate was correctly setup with nvidia-settings utility.
  • Updating to the latest NVIDIA drivers

But none of this helped. I then realised that all rendering to the screen was suffering from this, not just video playback. I wondered if the ION couldn't handle the memory bandwidth, but turning down the resolution didn't help. I then thought that maybe it was my TV being a bit broken with HDMI, but testing that would require finding a VGA cable or moving a monitor downstairs, so I didn't try that.

I even got to the point of thinking about installing Windows XP to see if it had the same issue and, if it didn't, giving up on Ubuntu. However after one last search I discovered a post on the XBMC forum. It contained the wisdom of adding the following to /etc/X11/xorg.conf:
Section "Extensions"
    Option         "Composite" "Disable"
EndSection

So I went ahead and did that, restarted X and all tearing was gone. I don't know where the bug is in the system, but I'm just glad of the ability in Linux to control things like this.

9 comments:

Bart said...

Thank you very much! I almost gave up on Linux again because of this problem, but it is now solved.

Do you perhaps know what possible side effects disabling the composite extension has? Desktop effects? Other stuff as well?

Thanks!

FreeWildebeest said...

I've not seen any bad side effects, but I just use the machine for playing media.

This page describes what the composite extension does, so at a guess I would imagine that Compiz won't be able to do certain effects or will be less efficient when doing them without this extension.

Andy M said...

Worked perfectly on my Acer Revo 3700 running Ubuntu 11.04 and XBMC. No negative side effects at all as of yet.

Thanks so much!!!

Haystack said...

Thanks a lot...I was totally feeling the same as you on giving up on Ubuntu.

I had the same problem in Ubuntu 10.10, and it took me a while to fix it, and then upgraded to 11.04 and same issue back...

Anonymous said...

It works!!!!!!!!!!

Anonymous said...

My hero! I was about to commit suicide (or go back to windows).. Saved my life!

commando_j said...

Worked for me. Dec23rd2011, nice Christmas gift. It started when going to 11.04 on my HTPC. I think I had either 9.X or 10.04 before with no issue. Tried a bunch of other solutions with no luck. I didn't give up this time since I saw there were so many with this issue I would find the solution eventually. ONLY took 4 weeks.
FYI it was system wide, even screen savers, HDMI and VGA was the same. Driver settings had minimal impact.

Thanks for the good solution.

Christian said...

Just wanted to thank you for your post. It saved my day when re-installing my "expired" Ubuntu 10.10 mediacenter as a fresh Ubuntu 12.04 LTS.

Last time around I was fighting with vblank, but this time I couldn't figure out what was wrong.

Thank you! :-)

Unknown said...

You are a god

Creative Commons License
The words and photos on this webpage which are created by Toby Gray are licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.0 England & Wales License.