Solved intel kmod screentearing again

Hello,
I have a problem with my X.org and intel kmod driver. No matter what I try, I still experience screentearing. When I scroll in ffox, I see a horizontal line, where the screen is unsychronized. When I watch video in mpv, it's almost unwatchable, because it is lagging all over the place.
>
I followed this advice #1 and tried all three methods, nothing solved the issue. (not to mention, that when I put the Driver "intel" line Xorg fails and ends with "EE: No Screens found", so I tried it by commenting the "Driver" line out and leaving the other options as they are).

I have xf86-video-intel installed:
Code:
~> pkg info | grep xf86-video-int
xf86-video-intel-2.99.917.909,1 X.Org legacy driver for Intel integrated graphics chipsets

and also drm-kmod installed.
Code:
~> pkg info | grep drm
drm-fbsd12.0-kmod-4.16.g20200221 DRM modules for the linuxkpi-based KMS components
drm-kmod-g20190710             Metaport of DRM modules for the linuxkpi-based KMS componentslib
drm-2.4.102,1               Userspace interface to kernel Direct Rendering Module services


I also tried advice #2 , again, I must leave the Driver "intel" section commented out, otherwise it does not start.
I have the relevant entry in my rc.conf

Code:
 ~> cat /etc/rc.conf | grep kms
kld_list="/boot/modules/i915kms.ko cuse"


According to some source, I cannot remember now (maybe the handbook?) the best I could do for my old hw is just do to kld_list=/boot/modules/i915kms.ko and configure nothing else, and everything should be running like a breeze, no xorg.conf, nothing. That is however not the case. Maybe I'm just missing something fundamental. My CPU is i5-4xxx and this is a desktop computer.
 
Your user should be in the video group: pw groupmod video -m <user>; log out & in to apply. Please tell
  • your freebsd-version
  • pciconf -vl | grep -B3 display
  • and append the /var/log/Xorg.0.log.
That error EE: No Screens found should not occur, instead the intel(4) driver should be autodetected IIUC, and of course, it should work.
 
Thanks mjollnir, you put me on the right track.

Yes, me not being in the video group was just one of the errors, don't know how I got myself removed from that group, because I remember going step-by-step by handbook and doing that.
Another error was apparently me being stupid and trying everything all over the place, instead of just sticking to the handbook.
~> pciconf -vl | grep -B3 display revealed that I still had my old nvidia card connected, which caused issues with this section right here:

Code:
~> cat /usr/local/etc/X11/xorg.conf.d/20-intel.conf
Section "Device"
    Identifier "Card0"
    Driver "intel"
    Option "DRI" "3"
    Option "AccelMethod" "sna"
    Option "TearFree" "true"
    BusID "PCI:0:2:0"
EndSection


So I physically removed that card from my PC and repaired BusID section and also "Card0" was nvidia at first, now, as I removed it physically, Card0 is the intel built-in card. That's what caused (probably) those "No screens found" errors. And also, stupidly copy-pasting commands without actually thinking that "Card0" can also refer to my nvidia PCIe card can also cause some unexpected errors, which are difficult to find, aren't they.

After doing this, I kept getting
Code:
libGL error: MESA-LOADER: failed to retrieve device information

which seem to be caused by broken packages. So I removed both drm-kmod and xf86-video-intel, did
pkg clean -a
and reinstalled them both.
Now, voila, 3D acceleration works (as shown by graphics/mesa-demos ) and also, so far, it seems, I have no issues with screentearing anymore.

Just to be complete:

This part is not used ATM:
Code:
~> grep i915 /boot/loader.conf
#drm.i915.enable_rc6=7
#drm.i915.semaphores="1"
#drm.i915.enable_fbc="1"
Here is the other relevant stuff:
Code:
~> grep kms /etc/rc.conf
kld_list="/boot/modules/i915kms.ko cuse"
~> freebsd-version
12.1-RELEASE-p10

~> pciconf -vl | grep -B3 display
vgapci0@pci0:0:2:0:    class=0x030000 card=0xd0001458 chip=0x04128086 rev=0x06 hdr=0x00
vendor     = 'Intel Corporation'device     = 'Xeon E3-1200 v3/4th Gen Core Processor Integrated Graphics Controller'
class      = display
Xorg.log


Everything seems to be working. glxgears are spinning without any visible tearing, ffox is scrolling also without any visible tearing. vlc is complaining about some VA errors, but that is for another day and unrelevant to this thread.
 
You can set the thread to solved: on the 1st post, click "..." -> edit thread -> Prefix: solved. This makes it easier for others who run into the same issue to see that it includes a solution when they search the forum.
 
  • Like
Reactions: a6h
Back
Top