I upgraded my PC from i3 6100 to Ryzen3 3200g. Only on Ubuntu, these issue happen, not in Windows 10. On Firefox, Chromium, wine windows, Clion and other programs.
These issues appear on screenshots too:
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It only takes a minute to sign up.Sign up to join this community
As explained here the issues are because of the IOMMU, do:
iommu=ptto kernel command line in
sudo nano /etc/default/grub
Edit the line beginging
GRUB_CMDLINE_LINUX_DEFAULTto look like this
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash iommu=pt"