Screen tearing with iris xe graphics

I’ve had a laptop with Iris Xe graphics for a while now. Here’s inxi -Fxxxrzc0: https://termbin.com/tuss

It has a combination of Iris Xe Integrated Graphics and a Nvidia dGPU. The dGPU is much worse than the integrated graphics, so I don’t use it.

Is it possible maybe it’s rendering on the Nvidia card itself? How could I fix that?

I have the nvidia package installed, and I’ve configured nvidia prime to keep the GPU not in use:

[user@vostro ~]$ cat /etc/X11/xorg.conf
Section "Device"
  Identifier "iGPU"
  Driver "modesetting"
EndSection

Section "Screen"
  Identifier "iGPU"
  Device "iGPU"
EndSection

Section "Device"
  Identifier "dGPU"
  Driver "nvidia"
EndSection

I can’t disable it in my BIOS sadly.

/etc/default/grub has this (and I’ve grub-mkconfig’ed):

GRUB_CMDLINE_LINUX_DEFAULT="quiet i915.enable_psr=0 resume=UUID=.... loglevel=3 nowatchdog"

I also have a /etc/X11/xorg.conf.d/20-intel.conf:

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

I’ve had this problem for a long while but i was too lazy to look into it, so I just used --vsync with picom, but that makes it lag when scrolling eg. I’ve removed xf86-video-intel, any ideas?

Can you install glxinfo and xdpyinfo , then post inxi -Gx to confirm my suspicions?

I suspect that you’re not using intel gpu/drivers because I don’t see them loaded
Display: x11 server: X.org 1.20.13 driver: loaded: modesetting,nvidia

I had to compile the former package from the AUR. Here’s inxi -Gx:

Graphics:
  Device-1: Intel TigerLake-LP GT2 [Iris Xe Graphics] vendor: Dell 
  driver: i915 v: kernel bus-ID: 00:02.0 
  Device-2: NVIDIA GP108M [GeForce MX330] vendor: Dell driver: nvidia 
  v: 470.57.02 bus-ID: 2c:00.0 
  Device-3: Realtek Integrated_Webcam_HD type: USB driver: uvcvideo 
  bus-ID: 3-6:4 
  Display: x11 server: X.Org 1.20.13 driver: loaded: modesetting,nvidia 
  resolution: 1920x1200~60Hz 
  OpenGL: renderer: Mesa Intel Xe Graphics (TGL GT2) v: 4.6 Mesa 21.1.6 
  direct render: Yes 

So it says driver: i915, but that it’s loaded modesetting. Weird…

Can you reinstall xf86-video-intel and use that?

EDIT : Also remove this line Option "DRI" "false" from 20-intel.conf

Still tears (and xf86-video-intel causes weird issues). I’ll try removing that option.

Edit: even after removing DRI and rebooting, the tearing persists.

In device iGPU change Driver "modesetting" to Driver "i915"

After that can you post a new inxi -Gx ?

1 Like

That bricked X11 (it just failed to show up); I had to go into a vty to change it back to modesetting.

try intel if it doesn’t work revert back to modesetting

Also after Driver you can add Option "TearFree" "True" (this should get rid of tearing this time, Option "TripleBuffer" "true" might or might not be necessary, test it)

EDIT : also in /etc/X11/xorg.conf.d/20-intel.conf change Driver "i915" to Driver "intel"

Have you have tried “i915.enable_psr=0” as a kernel parameter?

Yeah, check my original post

I couldn’t remember and was looking for it. :upside_down_face:

1 Like

Changing both to Driver "intel" worked, thank you!

1 Like

Btw, if you have some issues with HW acceleration in browsers/video players I suggest to install this : https://archlinux.org/packages/community/x86_64/intel-media-driver/

1 Like

I was going to ask why you had modesetting in the xorg file? But @Dev0ut beat me to it.

2 Likes

Actually, reopened because it isn’t a proper solution. I face the same issues that I did before removing xf86-video-intel (and removing it breaks X11 again); things like flameshot and simplescreenrecorder are broken.

Maybe after removing xf86-video-intel I need to change the name to i915 or modesetting??

hmm, you can try with modesetting and Option "TearFree" "True" in xorg.conf
Option "TripleBuffer" "true" is optional if you need it

EDIT : Don’t bother with i915 (if I’m not mistaken it’s for legacy stuff or deprecated, but you can still try it)
Also I guess that /etc/X11/xorg.conf.d/20-intel.conf is not being used at all because /etc/X11/xorg.conf has the priority, I might be wrong to

1 Like

@codic12
Just to be sure. Try modesetting means removing the intel driver (xf86-video-intel) so that it is running on the kernel module. Just in case you are misunderstanding.

Edit: If you have intel driver installed it isn’t running on modesetting.

1 Like

Changing it to modesetting in both places worked, thanks

No, I’m dumb, it still tears (I had picom on). I guess i’ll just use xf86 video intel…

Have you tried this way in xorg using Intel xf86-video-intel driver.

Have you tried using xf86-video-intel with the following in xorg file?

Section "Device"
    Identifier "Intel Graphics"
    Driver "intel"
    Option "AccelMethod" "sna"
    Option "TearFree" "true"
    Option "DRI" "3"
EndSection