Ryzen 5 3400G – Fix Graphics Glitches and Artifacts with Ryzen 5 3400G APU

amd-ryzengraphics

I built a new computer and am now getting weird graphics glitches when browsing the web or streaming video in a browser.

https://i.imgur.com/hJJm5aY.png

https://i.imgur.com/X74isqn.png

https://i.imgur.com/2ka12zm.mp4 (this one isn't mine, but similar to what is happening to me)

My setup:

Ryzen 5 3400G processor with integrated graphics

Gigabyte B450M DS3H motherboard (BIOS is updated with latest firmware), 16GB (2x8GB) DDR4 3200

Connected to Samsung Q70R QLED Smart 4K TV (old computer and HDMI cable worked fine with this TV)

I have tried many of the fixes that I found searching online, but none of them seem to completely fix the problem. I have tried fresh installs of the latest Ubuntu 18.04 and 20.04 versions. I have tried a couple methods of updating or changing the kernel versions. Changing resolutions, refresh rates, or scaling does not fix the issue.

Current configuration after fresh 20.04 install:

lsb_release -a

Distributor ID: Ubuntu
Description:    Ubuntu 20.04 LTS
Release:    20.04
Codename:   focal

uname -a

Linux media-server 5.4.0-29-generic #33-Ubuntu SMP Wed Apr 29 14:32:27 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux

lspci | grep VGA

07:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Picasso (rev c8)

sudo lshw -c video

*-display                 
       description: VGA compatible controller
       product: Picasso
       vendor: Advanced Micro Devices, Inc. [AMD/ATI]
       physical id: 0
       bus info: pci@0000:07:00.0
       version: c8
       width: 64 bits
       clock: 33MHz
       capabilities: pm pciexpress msi msix vga_controller bus_master cap_list rom
       configuration: driver=amdgpu latency=0
       resources: irq:101 memory:e0000000-efffffff memory:f0000000-f01fffff ioport:e000(size=256) memory:fcb00000-fcb7ffff memory:c0000-dffff

Best Answer

Same problems can be observed with Ubuntu 20.04 LTS / Ryzen 3 3200G / Gigabyte B450M S2H / 16GB (2x8GB) DDR4 3200.

Workaround 1:

Disable IOMMU in BIOS.

Workaround 2:

Add iommu=pt to command line in /etc/default/grub following the steps below.

  1. Run

    sudo nano /etc/default/grub
    
  2. Make the GRUB_CMDLINE_LINUX_DEFAULT line look like this

    GRUB_CMDLINE_LINUX_DEFAULT="quiet splash iommu=pt"
    
  3. Update grub by

    sudo update-grub
    
  4. Reboot with

    sudo reboot
    
Related Question