Fix screen tearing on Debian 12 Xorg and i3

note, Jul 10, 2023 on Mitja Felicijan's blog

I have been experiencing some issues with Intel® Integrated HD Graphics 3000 under Debian 12 with Xorg and i3. Using picom compositor didn't help. To fix this issue create new file /etc/X11/xorg.conf.d/20-intel.conf as root and put -the following in the file.

Section "Device"
-  Identifier "Intel Graphics"
-  Driver "intel"
-  Option "TearFree" "true"
-EndSection
-

Reboot the system and that should be it.