Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Intel modesetting driver screen tearing
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
UX.MAN
n00b
n00b


Joined: 09 Mar 2013
Posts: 72

PostPosted: Mon Mar 04, 2019 3:28 am    Post subject: Intel modesetting driver screen tearing Reply with quote

Hello everyone,

I am having an awful time with the Intel modesetting driver on an Intel HD 620 as there is a lot of screen tearing. I did try to use the Intel DDX driver, but the results were even worse.

Is there a way of tuning the drivers to have VSYNC or something similar on?
Back to top
View user's profile Send private message
tholin
Apprentice
Apprentice


Joined: 04 Oct 2008
Posts: 203

PostPosted: Mon Mar 04, 2019 11:46 am    Post subject: Reply with quote

The modesetting driver will tear. https://bugs.freedesktop.org/show_bug.cgi?id=98876

You could try working around the problem by using a compositor with vsync but in my experience they are all garbage.

The x11-drivers/xf86-video-intel driver support tear free operation if you enable it. Put something like this in your xorg.conf
Code:
Section "Device"
        Driver     "intel"
        Option     "TearFree" "true"
EndSection


Even with that option enabled you'll still get some tearing. I suspect it's because the intel driver defaults to "adaptive vsync" meaning you'll still get tearing if the next frame isn't displayed in time. That can be a problem when emerging. Avoid watching movies while emerging is the only solution I got for that.

The intel driver also got a bug that disables the synchronization is you take a screenshot with kde-apps/spectacle. Strangely this only seem to happen with spectacle and no other screenshot utility. If you start getting tearing after screenshot you can force it on again by turning the output off and on.
Code:
xrandr --output HDMI1 --off && xrandr --output HDMI1 --auto

"Hello, IT. Have you tried turning it off and on again?"

If you are going to test the intel driver I suggest you start with commit 8f2d08016a12211205bb227296923cdebfcd3c38. The driver is really broken and finding any commit that works fine is difficult. That commit is the golden commit. I have the least amount of problems with it. You can install it by doing:
Code:
EGIT_COMMIT=8f2d08016a12211205bb227296923cdebfcd3c38 emerge =x11-drivers/xf86-video-intel-9999


The next commit after that one introduce massive amounts of frame drops so try not to use any version more recent than that. Overall the intel graphics support is kind of terrible so don't expect too much.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54234
Location: 56N 3W

PostPosted: Mon Mar 04, 2019 12:27 pm    Post subject: Reply with quote

UX.MAN,

Please put your /var/log/Xorg.0.log onto a pastebin site.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
mike155
Advocate
Advocate


Joined: 17 Sep 2010
Posts: 4438
Location: Frankfurt, Germany

PostPosted: Mon Mar 04, 2019 1:16 pm    Post subject: Reply with quote

https://wiki.archlinux.org/index.php/intel_graphics#Tearing
Back to top
View user's profile Send private message
Leio
Developer
Developer


Joined: 27 Feb 2003
Posts: 494
Location: Estonia

PostPosted: Mon Mar 04, 2019 2:18 pm    Post subject: Reply with quote

Maybe try wayland. The slogan of it is "every frame is perfect", meaning also that tearing is basically very hard to achieve by programs and they need to go out of their way to achieve that or some unfortunate Xwayland situation (not native wayland)
_________________
GNOME team lead; GStreamer; MIPS/ARM64
Back to top
View user's profile Send private message
UX.MAN
n00b
n00b


Joined: 09 Mar 2013
Posts: 72

PostPosted: Mon Mar 04, 2019 9:36 pm    Post subject: Reply with quote

Leio wrote:
Maybe try wayland. The slogan of it is "every frame is perfect", meaning also that tearing is basically very hard to achieve by programs and they need to go out of their way to achieve that or some unfortunate Xwayland situation (not native wayland)


I've tested Wayland, and to its credit it is a little better now. However, I feel I can get better performance on a Windows 10 environment while browsing on Firefox than on X.org/Wayland.

NeddySeagoon wrote:
Please put your /var/log/Xorg.0.log onto a pastebin site.


I have accidentally deleted the log file an now no log is being saved nor displayed in systemd's journal. Is there a way of fixing it?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54234
Location: 56N 3W

PostPosted: Mon Mar 04, 2019 9:52 pm    Post subject: Reply with quote

UX.MAN,

I don't use systemd, so I can't help.

I'm fairly sure its written to /var/log/Xorg.0.log every time Xorg is started even under systemd.
The capital X and digit zero in the file name are important.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
Leio
Developer
Developer


Joined: 27 Feb 2003
Posts: 494
Location: Estonia

PostPosted: Tue Mar 05, 2019 6:26 am    Post subject: Reply with quote

My /var/log/Xorg.0.log is from 2014, as with systemd it doesn't log twice, at least with my settings. I suspect that log before deletion may have been an ancient non-relevant one then too..
journalctl should have the log, for me under gdm-x-session (so I can filter to it with e.g. journalctl _COMM=gdm-x-session). You can get the current boots logs with journalctl -b0, previous boot with journalctl -b-1, etc. That way it might be small enough even if not filtering to the relevant components.
_________________
GNOME team lead; GStreamer; MIPS/ARM64
Back to top
View user's profile Send private message
UX.MAN
n00b
n00b


Joined: 09 Mar 2013
Posts: 72

PostPosted: Tue Mar 05, 2019 4:10 pm    Post subject: Reply with quote

Leio wrote:
I suspect that log before deletion may have been an ancient non-relevant one then too..


You were right, that log seemed to be old and all the output was at the journald records.
Here is the output:

https://pastebin.com/KtPYtbQm
Back to top
View user's profile Send private message
Leio
Developer
Developer


Joined: 27 Feb 2003
Posts: 494
Location: Estonia

PostPosted: Tue Mar 05, 2019 4:40 pm    Post subject: Reply with quote

That log only tells me what you seem to use gnome-shell, so it's kind of surprising to hear that you have tearing with modesetting. I'd expect that maybe from videos only.
Do you rotate the display or some such? Basic situations gnome-shell compositor should be able to take care of, as long as dri3 is enabled (with modesetting it should be by default, and your log is of intel SNA instead anyways)
_________________
GNOME team lead; GStreamer; MIPS/ARM64
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54234
Location: 56N 3W

PostPosted: Tue Mar 05, 2019 4:54 pm    Post subject: Reply with quote

UX.MAN

The log says
Code:
Mar 05 11:04:11 baldor /usr/libexec/gdm-x-session[4997]: (**) intel(0): TearFree enabled
that tells two things.
First, that you are using the Intel driver, not the mode switching driver and that the driver thinks that tear free is already enabled.

The log says
Code:
Mar 05 11:04:11 baldor /usr/libexec/gdm-x-session[4997]: (==) Using config directory: "/etc/X11/xorg.conf.d"
Mar 05 11:04:11 baldor /usr/libexec/gdm-x-session[4997]: (==) Using system config directory "/usr/share/X11/xorg.conf.d"
Mar 05 11:04:11 baldor /usr/libexec/gdm-x-session[4997]: (==) No Layout section.  Using the first Screen section.
Mar 05 11:04:11 baldor /usr/libexec/gdm-x-session[4997]: (==) No screen section available. Using defaults.
Mar 05 11:04:11 baldor /usr/libexec/gdm-x-session[4997]: (**) |-->Screen "Default Screen Section" (0)
Mar 05 11:04:11 baldor /usr/libexec/gdm-x-session[4997]: (**) |   |-->Monitor "<default monitor>"
Mar 05 11:04:11 baldor /usr/libexec/gdm-x-session[4997]: (==) No device specified for screen "Default Screen Section".
Mar 05 11:04:11 baldor /usr/libexec/gdm-x-session[4997]:         Using the first device section listed.
Mar 05 11:04:11 baldor /usr/libexec/gdm-x-session[4997]: (**) |   |-->Device "Intel Graphics"
Mar 05 11:04:11 baldor /usr/libexec/gdm-x-session[4997]: (==) No monitor specified for screen "Default Screen Section".
Mar 05 11:04:11 baldor /usr/libexec/gdm-x-session[4997]:         Using a default monitor configuration.
Mar 05 11:04:11 baldor /usr/libexec/gdm-x-session[4997]: (==) Automatically adding devices
Mar 05 11:04:11 baldor /usr/libexec/gdm-x-session[4997]: (==) Automatically enabling devices
Mar 05 11:04:11 baldor /usr/libexec/gdm-x-session[4997]: (==) Automatically adding GPU devices
which tells that Xorg is doing its own thing. Thats all the automatic setup.

There are a few things to try, make a file /etc/X11/xorg.conf.d/video_dev.conf with the following content.

Code:
Section "Device"
   Identifier "Manual Graphics Device Conf"
   Driver "intel"
   Option "SwapbuffersWait" "true"
EndSection


The intel man page says that's the default but is it really?

Other options that may bu useful with the Intel driver are
Code:
   Option "NoAccel" "true"
   Option "AccelMethod"  "uxa"

Feel free to mix and match. Unused options will be ignored with a warning in the log.
"NoAccel" "true" is a massive performance hit.

Lastly, you can try the modesettnig driver. Change
Code:
   Driver "intel"

to
Code:
   Driver "modesetting"

The other options will cause warnings in the log but will otherwise be ignored.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
UX.MAN
n00b
n00b


Joined: 09 Mar 2013
Posts: 72

PostPosted: Tue Mar 05, 2019 7:30 pm    Post subject: Reply with quote

@Leio and @NeddySeagoon,

I forgot to mention that I'm currently testing the DDX driver. I will try the settings NeddySeagoon has suggested and will get back to you.
Back to top
View user's profile Send private message
UX.MAN
n00b
n00b


Joined: 09 Mar 2013
Posts: 72

PostPosted: Wed Mar 06, 2019 3:03 pm    Post subject: [RESOLVED] Intel modesetting driver screen tearing Reply with quote

I made some final testing and was able to get better performance. I don't know what was causing the issues, but I can tell you what I did. I was using a genkernel, so I built a new one from scratch, removed the DDX driver and tested with Wayland and modesetting. Everything looks good now. Thanks for helping me out!
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum