Page 1 of 1

[Solved] Screen tearing

Posted: Fri Dec 07, 2018 4:12 am
by UK_Eliter
Previously, I tried Oolite out on a slightly underpowered desktop, with an AMD card, and had fairly bad screen tearing, as I reported here. I have now tried Oolite on a high-powered, albeit not gaming, laptop, with Intel integrated graphics (ThinkPad X1CG6) - and had the same result (though boy the game loads fast - still, I have no OXPs at this stage). The thread I reference discusses an attempted fix. That fix - to do with `/etc/environment` - doesn't work on my laptop. I am using the same distro on the desktop and laptop, namely, Mint (64-bit, Cinnamon flavour).

Will I have to try Nightly (though it seems I won't have to compile it myself, thank goodness . .).

Re: Screen tearing

Posted: Fri Dec 07, 2018 6:52 am
by another_commander
Screen tearing happens because the video card does not do v-sync. Oolite on Linux will look for the GLX_SGI_swap_control or the GLX_MESA_swap_control OpenGL extensions for enabling v-sync and it is possible that your Intel card may not support it. Until some experienced Linux user chimes in, try to see if there is a way to enable vertical sync at the driver level, or see if hard-locking the game's framerate to the monitor refresh rate helps. To hard-lock the framerate, you can use the animation_timer_interval .GNUsetpDefaults key and set it to be equal to 1.0 / desiredFramerate. For example, if your monitor refreshes at 60Hz (and therefore you would want to lock fps at 60), you would use animation_timer_interval = 0.0167;

[Solved] Re: Screen tearing

Posted: Fri Dec 07, 2018 5:52 pm
by UK_Eliter
Thanks, another_commander. I solved the problem in the following way.

1a) Ensure this package installed: xserver-xorg-video-intel

1b) Have this /etc/X11/xorg.conf:

Code: Select all

Section "Device"
   Identifier  "Intel Graphics"
   Driver      "intel"
   Option      "AccelMethod" "sna"
   Option      "TearFree" "true"
EndSection
Possibly (it is unclear whether it makes a difference) 2) add this to /etc/environment file:

Code: Select all

 CLUTTER_PAINT=disable-clipped-redraws:disable-culling
 CLUTTER_VBLANK=True