godotengine / godot

Godot Engine – Multi-platform 2D and 3D game engine
https://godotengine.org
MIT License
90.91k stars 21.15k forks source link

Screen tearing with Linux Lite (Ubuntu) and intel driver #48564

Open dannygaray60 opened 3 years ago

dannygaray60 commented 3 years ago

Godot version:

3.3 (latest stable)

OS/device including version:

Linux Lite latest version (Ubuntu 20.04.02 lts derivated) Intel Graphics and Xfce environment

Issue description:

Godot projects has a screen tearing. I added etc/X11/xorg.conf.d/20-intel-graphics.conf file to resolve screen tearing with videos and godot games. With videos works but godot games still have a notorious tearing (no matter what vsync is on)

With gles2 : fps 58-60 with tearing

With gles3: 48 fps

Steps to reproduce: Add etc/X11/xorg.conf.d/20-intel-graphics.conf with this configuration:

Section "Device" Identifier "Intel Graphics" Driver "intel" Option "TripleBuffer" "true" Option "TearFree" "true" Option "DRI" "false" EndSection

Minimal reproduction project:

Calinou commented 3 years ago

Linux Lite latest version (Ubuntu 20.04.02 lts derivated) Intel Graphics and Xfce environment

Which IGP model is this exactly, and what CPU model do you have?

Can you reproduce this issue in other games and applications (even glxgears)?

dannygaray60 commented 3 years ago

CPU: Intel pentium 4415u 2.30 ghz

The graphic card is intel hd 610

And this issue is only for godot games

Glxgears works fine.

This problem just on linux, in the same pc with windows I don't have problems

Calinou commented 3 years ago

@dannygaray60 I wonder if https://github.com/godotengine/godot/pull/48555 could help with this. If you can build Godot from source, can you build lawnjelly's delta_sync branch and enable the option as described in the pull request?

lawnjelly commented 3 years ago

@dannygaray60 I wonder if #48555 could help with this. If you can build Godot from source, can you build lawnjelly's delta_sync branch and enable the option as described in the pull request?

I don't think that will help, it only changes the positions of the objects you render, not the timing of when frames are presented.

It does at the moment sound most like an OS / driver issue rather than godot. We essentially tell opengl to draw stuff, and tell it to swap buffers. And tell it to turn vsync on (or not). The rest is up to your system. But it is possible we are doing something your system doesn't like, or isn't able to handle (like the frame buffer etc).

But you don't say what this project is you are testing, whether it is window, full screen, what size window etc, so it is hard to say what you are experiencing, whether the engine should be struggling to keep up etc. Is it a single triangle on the screen, or a single sprite, or are you running a large demo or something?

I think Calinou's suggestion to try some other OpenGL apps and see how they perform is a good one.

Another thing you could potentially try is booting from a live usb flash drive with another linux distribution and repeating the tests.