Fix screen tearing in Xfce (Intel)

Post Reply
User avatar
ivanovnegro
Donor
Posts: 36
Joined: 5. Jul 2021, 22:07

Fix screen tearing in Xfce (Intel)

Post by ivanovnegro »

I use an old Thinkpad with Intel integrated graphics that always has problems with screen tearing while watching videos, also in the web browser as in scrolling on websites. That typically happens with Xfce's inbuilt window manager xfwm4 when you enable compositing but I want to use compositing because it actually helps in many cases to reduce screen tearing outside the video content.

In order to have some transparency effects and the compositor working without screen tearing under Xfce I added a configuration file to my system in

Code: Select all

/usr/share/X11/xorg.conf.d/


I named it 10-intel.conf and that is its content:

Code: Select all

Section "Device"
	 Identifier  "Intel Graphics"
	 Driver      "intel"
	 Option "TearFree" "true"
EndSection
Then disable the option "Synchronize drawing to vertical blank" from the window manager settings if enabled.
It works perfectly after a reboot.

Now that is a little bit hacky but it gets the job done. I know in the newest iterations they fixed that problem in Xfce or you can apply OpenGL rendering in Xfconf in my case. But here we are speaking of Slackware's Xfce 4.12. Another solution would be to use an external compositor like compton and later picom.
User avatar
Artim
Donor
Posts: 69
Joined: 9. Feb 2019, 13:21
Contact:

Re: Fix screen tearing in Xfce (Intel)

Post by Artim »

I find that using Compton instead fixes my issue with screen tearing. I think this old issue will be all behind us in Slackware 15.
User avatar
ivanovnegro
Donor
Posts: 36
Joined: 5. Jul 2021, 22:07

Re: Fix screen tearing in Xfce (Intel)

Post by ivanovnegro »

Artim wrote: 18. Jul 2021, 09:59 I think this old issue will be all behind us in Slackware 15.
I think it definitely will.
User avatar
akts
Posts: 7
Joined: 8. Oct 2021, 04:42
Location: /dev/null
Contact:

Re: Fix screen tearing in Xfce (Intel)

Post by akts »

Thanks for this ivan

Installing compton from Sourcery failed for me, so this helped. Since 15.0 is around the corner, I'm feeling lazy to debug the installation issue :mrgreen:

Cheers!
Image
User avatar
ivanovnegro
Donor
Posts: 36
Joined: 5. Jul 2021, 22:07

Re: Fix screen tearing in Xfce (Intel)

Post by ivanovnegro »

akts wrote: 17. Oct 2021, 03:42 Installing compton from Sourcery failed for me...
That is unfortunate but it is unmaintained anyway. At least we can fix it ourselves. ;)
User avatar
hakerdefo
Posts: 91
Joined: 9. Dec 2012, 08:12
Contact:

Re: Fix screen tearing in Xfce (Intel)

Post by hakerdefo »

ivanovnegro wrote: 17. Oct 2021, 14:08
akts wrote: 17. Oct 2021, 03:42 Installing compton from Sourcery failed for me...
That is unfortunate but it is unmaintained anyway. At least we can fix it ourselves. ;)
You can try the modesetting DDX driver instead of the Intel one. Fixes issue on many Intel GPUs. Do as root,

Code: Select all

mv /usr/share/X11/xorg.conf.d/10-intel.conf /usr/share/X11/xorg.conf.d/10-intel.conf.old
touch /usr/share/X11/xorg.conf.d/10-intel.conf
ln -s /usr/share/X11/xorg.conf.d/10-intel.conf /etc/X11/xorg.conf.d/10-intel.conf
And open that file in a text-editor,

Code: Select all

nano /usr/share/X11/xorg.conf.d/10-intel.conf
And add the following snippet to it,

Code: Select all

Section "Device"
        Identifier  "Intel Graphics"
        Driver      "modesetting"
        Option      "AccelMethod"    "glamor"
        Option      "DRI"            "3"
EndSection
Save the file, reboot and test.
Post Reply