Graphics glitches and artifacts with Ryzen 5 3400G APU
Solution 1
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.
-
Run
sudo nano /etc/default/grub
-
Make the
GRUB_CMDLINE_LINUX_DEFAULT
line look like thisGRUB_CMDLINE_LINUX_DEFAULT="quiet splash iommu=pt"
-
Update grub by
sudo update-grub
-
Reboot with
sudo reboot
Solution 2
Is there a third workaround ?
The prompt is displayed ok (same picture on both screen) Then my display is sliced horizontally Each slice is shifted
I disabled IOMMU in the bios, changed the grub conf Activated dual screen in bios too.
HDMI monitor on HDMI (full hd) VGA monitor on HDMI>VGA on a DP>HDMI passive adapter (1650x ???) This is not a hardware issue or bios setting issue as I have dual screen working
Fresh ubuntu 20.04 install with kernel 5.4
Found a 3rd workaround with this video https://www.youtube.com/watch?v=WWg8q_f7nI4
Solution 3
I'm currently using Ubuntu 20.10
While support for these devices has been in the kernel for a while, I've found I've had missing firmware when I see an update-initramfs. I also saw some AMDGPU-specific commits to upstream linux-firmware a little while ago, and tried the latest available deb package for Hirsute - it fixed all of my weird issues with the system, including requiring software IOMMU
YMMV, but try the 1.191 deb package under https://launchpad.net/ubuntu/+source/linux-firmware
Edit: step by step instructions as requested!
- Navigate to https://launchpad.net/ubuntu/+source/linux-firmware
- Expand the 1.191 arrow, under The Hirsute Hippo branch
- Download linux-firmware_1.191_all.deb
- Install the new firmware
sudo apt install /path/to/linux-firmware_1.191_all.deb
- Reboot
Edit2: For reference, I have two AMD systems this really helped with. One is a Dell Inspiron 5585 w/ AMD Ryzen 3500U, the other is one I built with an AMD Ryzen 3400G.
Related videos on Youtube
James
Updated on September 18, 2022Comments
-
James almost 2 years
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
-
James about 4 yearsDisabling IOMMU in the BIOS completely fixed the issue on my setup (Ubuntu 18.04 LTS / Ryzen 5 3400G / Gigabyte B450M DS3H / 16GB (2x8GB) DDR4 3200). Thank you so much for the response!
-
mahela007 about 4 yearsWhat does disabling this do?
-
Matteo about 4 yearsmy setup too was fixed by adding iommu=pt. my configuration is ubuntu 20, ryzen 3200g, Gigabyte GA-AB350M-DS3H, thanks a lot
-
graffe almost 4 yearsI also had to add iommu=pt on my ryzen 3400g. I would love to see a detailed technical explanation of why this fixes the problem!
-
Matthew over 3 yearsCould you please clarify what system you tested this on? It would be helpful to know a motherboard + APU combination that definitely works. And to have confirmation that you are using the integrated graphics, not a dedicated GPU.
-
Matthew over 3 yearsHave you tested this workaround on an APU, please? The video seems to be about AMD dedicated GPUs, which work very differently.
-
Jerome_B over 3 yearsMy hw is a B550 motherboard with a ryzen5 3400G (an APU) Since then, plenty of updates have reached my install like new linux firmware packages. I also gave 2G Ram for the graphics (at bios level). It was weird and angrying as dual screen worked on windows.
-
Matthew over 3 yearsThank you for confirming that you are using an APU. I have just bought a 3400G so it is very helpful to know that the 3rd workaround can be used.
-
Lyndon over 3 yearsSure thing, info added!
-
Matthew over 3 yearsThank you. I have just bought a 3400G to use with Ubuntu. Would you mind sharing what what motherboard you have found works? I have bought a B450 Mortar Max, but it's not too late for me to return it.
-
Lyndon over 3 yearsMatthew, I'm personally using an ASUS Prime A320I-K motherboard, with the AMD A320 chipset. That said, your B450 should be fine, and the process I've described for adding the newer AMD firmware should work for you
-
Matthew over 3 yearsI tried this workaround. Unfortunately it did not fix my graphics problem. However, my problem is slightly different: the graphics freeze and the system log reports
*ERROR* Waiting for fences timed out!
, as per this bug.