You are not logged in.
I have an intel haswell laptop and am trying to get rid of screen tearing. I have tried many different desktop environments that have compositors which are able to get rid of tearing but then introduce quite a bit of stuttering when playing back video in players such as mpv. I have also tried using wayland sessions in the various desktop environments that support it which gets rid of tearing but still has massive stuttering. The only solution I have found for a tear free and stutter free experience is with the tear free option enabled in the intel driver. This works well in lubuntu but I can not get it working in arch linux. I check the xorg logs and it says that it is enabled but it clearly is not in practice with the same screen tearing being present. In lubuntu I can easily disable and enable it so I'm not sure why I can't in arch linux. Does anybody know what may be happening?
edit: I have now realized I probably should have posted this in the multimedia subforum.
Last edited by Xenphor (2017-06-24 19:41:55)
Offline
4th Gen Haswell laptop user here. What I have found works in Arch for my computer is...
1. Ensure Intel Ucode is installed.
2. Remove any xf86-video-intel driver you may have installed.
3. Remove any 20-intel.conf or related configuration file from /etc/x11/xorg.conf.d
4. Reboot
Last edited by c00ter (2017-06-24 19:47:02)
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. -- Doug Gwyn
Offline
That's actually what I had been doing originally, not even installing the xf86 driver, but I still get tons of tearing. And then when combining it with something like compton it removes the tearing but introduces so much stuttering.
edit: Just tried it in opensuse and tear free seems to be working there as well.
Last edited by Xenphor (2017-06-25 11:28:19)
Offline
Considering what you have stated, I would look closer at some of the xf86-video-intel dependencies, such as mesa-dri.
Regards
UNIX was not designed to stop you from doing stupid things, because that would also stop you from doing clever things. -- Doug Gwyn
Offline
Could you post your Xorg.0.log file?
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Well as an update I tried installing lxde instead of kde and the tearing seems to have gone while playing back video in chrome but I still get tearing while playing videos in mpv and in firefox. There is also still noticeably tearing on the desktop and while scrolling webpages in chrome. Here's my xorg log: https://pastebin.com/vcNgtsr8
Last edited by Xenphor (2017-06-25 17:56:10)
Offline
Did you try XFCE and xfwm4-git (AUR) yet? They recently improved vsync code in xfwm4. Vsync is finally working properly here (no more compton needed). I'm on nVidia/kernel modesetting though.
sys2064
Offline
You are using the Intel driver.
[ 6.803] (II) LoadModule: "intel"
[ 6.804] (II) Loading /usr/lib/xorg/modules/drivers/intel_drv.so
[ 6.825] (II) Module intel: vendor="X.Org Foundation"
[ 6.825] compiled for 1.19.3, module version = 2.99.917
[ 6.825] Module class: X.Org Video Driver
[ 6.825] ABI class: X.Org Video Driver, version 23.0
[ 6.825] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
[ 6.825] (II) intel: Driver for Intel(R) HD Graphics
[ 6.825] (II) intel: Driver for Intel(R) Iris(TM) Graphics
[ 6.825] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics
[ 6.826] (II) intel(0): Using Kernel Mode Setting driver: i915, version 1.6.0 20170123
[ 6.827] (II) intel(0): SNA compiled from 2.99.917-777-g6babcf15
[ 6.829] (--) intel(0): Integrated Graphics Chipset: Intel(R) HD Graphics 4400
[ 6.829] (--) intel(0): CPU: x86-64, sse2, sse3, ssse3, sse4.1, sse4.2, avx, avx2; using a maximum of 2 threads
[ 6.830] (II) intel(0): Creating default Display subsection in Screen section
My system, using the modesetting driver
[ 94.784] (II) LoadModule: "intel"
[ 94.799] (WW) Warning, couldn't open module intel
[ 94.799] (II) UnloadModule: "intel"
[ 94.799] (II) Unloading intel
[ 94.799] (EE) Failed to load module "intel" (module does not exist, 0)
[ 94.799] (II) LoadModule: "modesetting"
[ 94.799] (II) Loading /usr/lib/xorg/modules/drivers/modesetting_drv.so
[ 94.799] (II) Module modesetting: vendor="X.Org Foundation"
[ 94.799] compiled for 1.19.3, module version = 1.19.3
[ 94.799] Module class: X.Org Video Driver
[ 94.799] ABI class: X.Org Video Driver, version 23.0
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Yes I'm using the intel driver because as far as I know the modesetting driver doesn't have a tear free option.
Offline
Yes I'm using the intel driver because as far as I know the modesetting driver doesn't have a tear free option.
Have you tried it? I don't see tearing on my Intel system with that driver.
Also, I just saw you edit about moving to Multimedia. Consider it done. In the future, consider using the report function on the thread to ensure that one of the moderators see it.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way
Offline
Xenphor wrote:Yes I'm using the intel driver because as far as I know the modesetting driver doesn't have a tear free option.
Have you tried it? I don't see tearing on my Intel system with that driver.
Also, I just saw you edit about moving to Multimedia. Consider it done. In the future, consider using the report function on the thread to ensure that one of the moderators see it.
Yes I have tried the mode setting driver and it introduces lots of tearing.
Did you try XFCE and xfwm4-git (AUR) yet? They recently improved vsync code in xfwm4. Vsync is finally working properly here (no more compton needed). I'm on nVidia/kernel modesetting though.
I just tried it now and it does fix the tearing in firefox and mpv but introduces lots of stuttering.
Offline
I use the TearFree option and do not use any compositor, just plain Openbox. No tearing in mpv with that, also no stuttering. Two options to try with mpv are --vo=vaapi (this is what I use, it has tearing without the TearFree option, but works great with TearFree) and --video-sync=display-resample (haven't personally tried that one).
Offline
I use the TearFree option and do not use any compositor, just plain Openbox. No tearing in mpv with that, also no stuttering. Two options to try with mpv are --vo=vaapi (this is what I use, it has tearing without the TearFree option, but works great with TearFree) and --video-sync=display-resample (haven't personally tried that one).
That's weird because I've pretty much tried that exact setup but still got screen tearing.
Offline
@Xenphor:
After trying may things in the past, this is what I have:
1. xf86-video-intel - no custom config, no tearfree, nothing
2. libva-intel-driver-g45-h264 (AUR)
3. XFCE desktop environment
4. xfwm compositor disabled
This setup ensures that I do not get any screen tearing in mpv using fullscreen mode. I have hwdec=vaapi in my mpv.conf and I always use mpv in fullscreen mode. I enable xfwm compositor again when I'm not watching videos (this can be scripted).
Note that I get tearing if mpv is not fullscreen and while playing videos in a web browser. If I use compton, tearing issue is solved for all cases.
P.S. My hardware is different and I haven't update my system in over a month, so things might be different now.
Last edited by adesh (2017-06-26 05:59:58)
Offline
@Xenphor:
After trying may things in the past, this is what I have:
1. xf86-video-intel - no custom config, no tearfree, nothing
2. libva-intel-driver-g45-h264 (AUR)
3. XFCE desktop environment
4. xfwm compositor disabledThis setup ensures that I do not get any screen tearing in mpv using fullscreen mode. I have hwdec=vaapi in my mpv.conf and I always use mpv in fullscreen mode. I enable xfwm compositor again when I'm not watching videos (this can be scripted).
Note that I get tearing if mpv is not fullscreen and while playing videos in a web browser. If I use compton, tearing issue is solved for all cases.P.S. My hardware is different and I haven't update my system in over a month, so things might be different now.
Well that seems to work with mpv in fullscreen mode although I just use the normal libva-intel-driver. The problem is that I watch my videos usually in window mode in mpv or in a browser so I still get tearing. And if I use a compositor like compton then I get stuttering. Still it's interesting that there is no tearing in mpv fullscreen.
Offline
Still it's interesting that there is no tearing in mpv fullscreen.
Not at all. Fullscreen is much easier to manage for drivers, as there's only one surface to deal with. libva (or libva-intel-driver, I'm not sure) has code specifically for fullscreen, that's why no tearing there. Windowed mode is more complex, that one requires either a compositor or TearFree (but not both, they might conflict; the intel driver should disable TearFree automatically if it detects a compositor, but who knows if that's fully reliable). No clue why TearFree doesn't work for you, it's the magic option that solved all my problems
Offline
I've used compton to achieve tear free
compton --backend glx --paint-on-overlay --refresh-rate 60 --glx-no-stencil --glx-no-rebind-pixmap --glx-swap-method -1
https://ugjka.net
paru > yay | webcord > discord
pacman -S spotify-launcher
mount /dev/disk/by-...
Online
Maybe boot up Ubuntu again and check its environment for comparison (Xorg.0.log, drivers, modelines...)?
sys2064
Offline
I've used compton to achieve tear free
compton --backend glx --paint-on-overlay --refresh-rate 60 --glx-no-stencil --glx-no-rebind-pixmap --glx-swap-method -1
compton gets rid of tearing but then introduces a lot of stuttering for me.
Offline
mpv's default sync mode is 'audio' (audio=master, video=slave). It will drop/interpolate frames to keep up with audio. Maybe try mpv option '--video-sync=display-resample' that will resample audio to keep up with video instead. In case there are problems with sync clocks this could help.
Maybe EDID data is incorrect. It looks kinda weird in Xorg.0.log (with labeled refresh rate x0.0) and there is only one resolution at the end of the log. The line itself looks ok though. You could try to test another one manually (generated with 'cvt' or catch one from here).
Last edited by Maniaxx (2017-06-26 22:03:41)
sys2064
Offline
mpv's default sync mode is 'audio' (audio=master, video=slave). It will drop/interpolate frames to keep up with audio. Maybe try mpv option '--video-sync=display-resample' that will resample audio to keep up with video instead. In case there are problems with sync clocks this could help.
Maybe EDID data is incorrect. It looks kinda weird in Xorg.0.log (with labeled refresh rate x0.0) and there is only one resolution at the end of the log. The line itself looks ok though. You could try to test another one manually (generated with 'cvt' or catch one from here).
When using cvt for some reason it gives me an invalid modeline:
$ cvt 1366 768
# 1368x768 59.88 Hz (CVT) hsync: 47.79 kHz; pclk: 85.25 MHz
Modeline "1368x768_60.00" 85.25 1368 1440 1576 1784 768 771 781 798 -hsync +vsync
For some reason the resolution is 1368x768? Xrandr won't let me add it.
$ xrandr --addmode eDP1 1368x768_60.00
X Error of failed request: BadMatch (invalid parameter attributes)
Major opcode of failed request: 140 (RANDR)
Minor opcode of failed request: 18 (RRAddOutputMode)
Serial number of failed request: 33
Current serial number in output stream: 34
Anyway I tried hooking up the laptop to an external monitor and get the same results.
Offline
Okay I believe I have solved the problem. The issue is with using DRI3 vs DRI2. Apparently lubuntu was defaulting to DRI2 which works with tear free. Arch seems to be defaulting to DRI3 which does not work with tear free enabled. Some info about it here: https://bugs.freedesktop.org/show_bug.cgi?id=96847. Unfortunately using DRI2 on Arch with the gnome desktop results in very poor performance. It only seems to work well with something like openbox.
Offline
Can you post an xorg.0.log of modesetting/dri3 with all intel related configs from /etc/X11/xorg.conf.d/ removed?
sys2064
Offline
Offline
from xf86-video-intel PKGBUILD :
--with-default-dri=3
If you want to revert to xf86-video-intel with dri 2 , you'll have to build it yourself.
Note that when the intel X driver used dri 2 , tearffee often didn't deliver what the name suggests .
You should consider it a marketing term with many caveats that are not mentioned in the advertisement.
Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.
(A works at time B) && (time C > time B ) ≠ (A works at time C)
Offline