Random patches on the screen after upgrading to Ubuntu 20.04

enter image description here

After upgrading my system from 19.04 to 20.04, some random patches started to appear. Those patterns appear only on the desktop, and not on other application windows nor terminal screens which can be accessed via CTRL+ALT+F. Also, interestingly, if I change a background image, they disappear for a while, then appear again.

I believe it's not an issue of physical devices. But I'm not sure if I'm just missing some crucial packages or some of the packages have bugs in it.

$ apt-cache policy xserver-xorg-video-intel
xserver-xorg-video-intel:
  Installed: 2:2.99.917+git20200226-1
  Candidate: 2:2.99.917+git20200226-1
  Version table:
  *** 2:2.99.917+git20200226-1 500
        500 http://archive.ubuntu.com/ubuntu focal/main amd64 Packages
        100 /var/lib/dpkg/status
$ lspci -nnk
... omitted ...
00:02.0 VGA compatible controller [0300]: Intel Corporation HD Graphics 5500 [8086:1616] (rev 09)
        DeviceName: 32
        Subsystem: Hewlett-Packard Company HD Graphics 5500 [103c:2248]
        Kernel driver in use: i915
        Kernel modules: i915
... omitted ...
$ uname -a
Linux ProBook 5.4.0-26-generic #30-Ubuntu SMP Mon Apr 20 16:58:30 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

Does anyone have any suggestions or have the same issue?


Solution 1:

This is what works for me:

Create /usr/share/X11/xorg.conf.d/20-intel.conf:

Section "Device"
  Identifier  "Intel Graphics"
  Driver      "intel"
  Option      "AccelMethod"  "uxa"
EndSection

Reboot

However, I found that the system is somewhat sluggish with above modification.

Much better results with:

Section "Device"
  Identifier  "Intel Graphics"
  Driver      "intel"
  Option      "DRI"  "3"
EndSection

One can experiment with values "FALSE", "1", "2", "3" for "DRI". On my system, "2" gives the patches again, and glxgears won't run.