# drm-next-kmod screen tearing?



## i-bsd (Jun 6, 2018)

Watching movies there's way too much screen tearing.

How do I fix this?


----------



## tankist02 (Jun 6, 2018)

How about details?


----------



## SirDice (Jun 6, 2018)

How To Ask Questions The Smart Way; Be precise and informative about your problem


----------



## scottro (Jun 6, 2018)

All videos? Have you tried as a different user?  What version of FreeBSD? Have you tried drm-stable?  
As has been said, more information would be useful.  If one is a beginner, it's not always plain what information is needed, but that's one of the purposes of forums like these, so people can learn. 

To get the version, run uname -a and  post that output.  If running CURRENT, use the GENERIC-no-debug kernel.  And so on. (We can keep guessing, buti giving us more information will, as the old customer service adage goes, from back when customer service was a thing, Help us help you.


----------



## Deleted member 48958 (Jun 6, 2018)

What GPU your're using, i-bsd? 
If you use intel integrated graphics,
it is possible to try the following,
add _Option "TearFree" "true"_
to _Device_ section of /etc/X11/xorg.conf:
	
	



```
Section "Device"
        Identifier  "Card0"
        Driver "intel"
        Option "AccelMethod" "sna"
        Option "TearFree" "true"
EndSection
```
_AccelMethod_ should be _sna_ to make _TearFree_ option work.


----------



## i-bsd (Jun 6, 2018)

X1 Carbon 6th gen. Intel HD using drm-next-kmod on 11.2BETA2 for those asking.

But I just realize that I've been using 'vesa' and not 'intel'.

Installed the intel driver which has eliminated screen tearing but now X is significantly slower while using compton (e.g. 1 second delay when opening a new urxvt terminal). I'm guessing this is an issue with drm-next and not my system which should easily handle this.


----------



## Tulkas (Jun 6, 2018)

I'm seeing a very similar effect when i use drm-next-kmod. Perhaps it is worth a try to install drm-stable-kmod instead which does a great job on my Lenovo T450.


----------



## tankist02 (Jun 8, 2018)

On XFCE I had to disable Compositing to get rid of tearing when playing videos. On Mate I could not completely get rid of tearing - some was always present.


----------



## xchris (Jun 10, 2018)

looks like the drm-* modules are half-backed, tearing on broadwell gpu too as well.


----------



## i-bsd (Jun 10, 2018)

Yeah I'm still getting poor performance with drm-next with and without compton running. Vesa driver ran exceptionally well (but I just can't watch movies without tearing).

So my choice is either: a) fast computer and good productivity or b) smooth videos.


----------



## Deleted member 48958 (Jun 10, 2018)

If you use intel integrated graphics, you got few options to try:

1. Use modesetting driver, add this to /etc/X11/xorg.conf and restart Xorg:

```
Section "Device"
        Identifier  "Card0"
        Driver "modesetting"
        Option "AccelMethod" "glamor"
EndSection
```

2. Use intel driver (x11-drivers/xf86-video-intel should be installed) with "SNA" acceleration,
add this to /etc/X11/xorg.conf and restart Xorg:

```
Section "Device"
        Identifier  "Card0"
        Driver "intel"
        Option "AccelMethod" "sna"
        Option "TearFree" "true"
EndSection
```

3. Use intel driver (x11-drivers/xf86-video-intel should be installed) with "UXA" acceleration,
add this to /etc/X11/xorg.conf and restart Xorg:

```
Section "Device"
        Identifier  "Card0"
        Driver "intel"
        Option "AccelMethod" "uxa"
EndSection
```


----------



## xchris (Jun 10, 2018)

ILUXA mate the accel methods you mention is working with older intel GPUs only, fBSD's drivers are in par with Linux's kernel 3.8


----------



## Deleted member 48958 (Jun 10, 2018)

Maybe  you're right and it won't work. I forgot, that he uses "X1 Carbon 6th gen",
personally I didn't try to use these drivers and acceleration methods with "6th gen",
but I tried to use it with graphics/drm-next-kmod and it's working fine,
nevertheless I suggest to try it.


----------



## i-bsd (Jun 11, 2018)

Tried all the above methods. Still not 100% what it should be.

Whether using intel, modesetting or vesa, I either get major performance issues or video tears. Have tried loads of different compton, mpv, xorg, .Xresources options and in the end, I think I have to conclude that it's an issue with my new hardware.

Problem is I haven't tested it with Windows or Linux so I have no idea what to compare it to but it's an 8th gen Core i7 and should be lightning fast (all I'm doing is running 3 urxvt terminals and a firefox browser in i3).

Still a great laptop for FreeBSD - just not optimized yet but I'm sure that someone will get on it before long.


----------



## abishai (Jun 11, 2018)

Are your user has access to /dev/drm ? You can easily check with mpv if you have acceleration (it complains in console).


----------



## goshanecr (Aug 26, 2018)

Guys, I'm solve my problems with chain FreeBSD+Xorg+Fluxbox+drm-next-kmod now by adding my user to groups (don't know which one solve exactly):

```
wheel:*:0:root,goshanecr
kmem:*:2:goshanecr
sys:*:3:goshanecr
operator:*:5:root,goshanecr
bin:*:7:goshanecr
games:*:13:goshanecr
video:*:44:goshanecr
goshanecr:*:1001:
messagebus:*:556:goshanecr
polkitd:*:565:goshanecr
polkit:*:562:goshanecr
haldaemon:*:560:goshanecr
```
Without this I have strange issues "Not redrawing windows", "characters typed in terminal (tilda) shows only after pressing ENTER"


----------



## tingo (Aug 29, 2018)

The video group, most likely.


----------



## goshanecr (Sep 2, 2018)

No, video group was active initially (I'm add right after xorg install). Some group related to dbus I think.


----------



## thesavo (Sep 9, 2018)

ILUXA said:


> If you use intel integrated graphics, you got few options to try:
> 
> 1. Use modesetting driver, add this to /etc/X11/xorg.conf and restart Xorg:
> 
> ...


Thank you.  Option 2 solved screen tearing for me.  I have TrueOS installed on a Dell Latitude E7450.  
It was tearing on vertical scrolling and in youtube videos.


----------

