[Solved] Screen tearing

For discussion of ports to POSIX based systems, especially using GNUStep.

Moderators: another_commander, winston, Getafix

Post Reply
UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1244
Joined: Sat Sep 12, 2009 11:58 pm
Location: Essex (mainly industrial and occasionally anarchic)

[Solved] Screen tearing

Post 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 . .).
Last edited by Getafix on Tue Jan 01, 2019 5:43 pm, edited 1 time in total.
Reason: Marked as Solved
another_commander
Quite Grand Sub-Admiral
Quite Grand Sub-Admiral
Posts: 6552
Joined: Wed Feb 28, 2007 7:54 am

Re: Screen tearing

Post 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;
UK_Eliter
---- E L I T E ----
---- E L I T E ----
Posts: 1244
Joined: Sat Sep 12, 2009 11:58 pm
Location: Essex (mainly industrial and occasionally anarchic)

[Solved] Re: Screen tearing

Post 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
Last edited by Getafix on Tue Jan 01, 2019 5:42 pm, edited 1 time in total.
Reason: Marked as Solved
Post Reply