Strange graphics issue after upgrading to 18.04 that affects only one user account

After upgrading from 17.10 to 18.04, I started experiencing a strange graphics issue: text and background in scrollable parts of some windows were getting "scrambled". I performed a fresh installation of Ubuntu 18.04.1 when it became available (formatting the system partitions), but this did not resolve the problem.

However, I cannot reproduce this problem in a fresh account, even if I copy over my entire dconf configuration! I also tried resetting the dconf configuration in the affected account and disabling (all) GNOME Shell extensions, but it did not help.

The problem appears usually when I try to scroll the text in a scrollable area or resize the window. Maybe other parts of windows are also affected. Sometimes the problem appears immediately on opening a window.

When I scroll a scrollable area or resize the whole window, text and background get scrambled by overlapping on themselves. Sometimes black or transparent areas appear. GNOME Calculator 3.28.2 and gitg 3.26 windows are strongly affected. With GNOME Calculator the issue it the easiest to reproduce -- it suffices to launch it.

Which system or user settings could cause such problem?

I am attaching pictures which show the problem.

Glitch in GNOME Calculator

Glitch in Software Update

I have Intel HD Graphics 520 (Skylake GT2).

By the way, 3D gaming works fine.


Things I tried that did not help:

  1. sudo apt install xserver-xorg-video-intel,

  2. sudo update-initramfs -u.

  3. Reinstall Ubuntu 18.04.1 completely.

  4. dconf reset -f / and disable GNOME Shell extensions.


Solution 1:

I decided to clean up a bit some abandoned "dot-files" in my home folder (the home directory of the affected account) and managed to resolve the problem.

The problem was caused by my .xinputrc file that contained a single line of code:

run_im xim

In comments it was saying that it was created by im-config. (I do not remember why I executed im-config.) After I removed this file, the glitches were gone.


Update. It seems that the file got automatically regenerated with the following content:

# im-config(8) generated on Sun, 29 Jul 2018 09:11:43 +0200
run_im ibus
# im-config signature: 1badc17f2a2c24108e97cd2fd412e476  -

There is currently no problems with this new content. (I am not sure if the file was regenerated by Ubuntu.)

Solution 2:

I had the same graphical issues in Ubuntu 18.04 LTS (after upgrading from version 16.04.5 to 18.04.1), only the following command solved the problems:

$ dconf reset -f /org/gnome/

Solution 3:

Reinstall the Drivers

Per this answerr try reinstalling intel drivers:

sudo apt-get update
sudo apt-get install --reinstall xserver-xorg-video-intel xserver-xorg-core
sudo dpkg-reconfigure xserver-xorg

If this doesn't work, you might be able to fix it by tweaking settings with intel goodies:

sudo apt install intel-microcode inteltool intel-gpu-tools

But I don't know how to use them so you are on your own. Here is a reference manual for intel-gpu-tools and you can always read the manpages. eg

man intel-gpu-tools

Solution 4:

When you run update-initramfs you should not be getting error messages for missing skylake drivers.

Under Ubuntu 16.04 LTS:

$ sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-4.14.34-041434-generic
Adding /lib/firmware/i915/skl_guc_ver9_33.bin

Under Ubuntu 18.04 LTS:

$ sudo update-initramfs -u
update-initramfs: Generating /boot/initrd.img-4.15.0-20-generic
Adding /lib/firmware/i915/skl_guc_ver9_33.bin

In particular you should be seeing the last line. If not follow the instructions here: Updated kernel to 4.8 now missing firmware warnings