Graphical bugs in Emacs and GIMP

I’ve been having graphical bugs in Emacs and GIMP recently. They look like the green pixels in the image below. In Emacs they mainly appear in my dashboard’s banner and in the modeline. In GIMP they appear when I’m saving or opening an image. If I highlight the area affected the pixels sometimes disappear. What could this be caused by and how could I fix it?
graphicalbugs

System information:

System:
  Kernel: 5.15.2-2-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0
  parameters: BOOT_IMAGE=/boot/vmlinuz-5.15-x86_64
  root=UUID=bc0a07fc-17dc-4ec8-8cac-7c24849df69e rw quiet apparmor=1
  security=apparmor amd_iommu=on
  resume=UUID=e9d39b3a-cde0-445c-a571-aff94958acde udev.log_priority=3
  Desktop: KDE Plasma 5.23.3 tk: Qt 5.15.2 wm: kwin_x11 vt: 1 dm: SDDM
  Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Desktop Mobo: ASRock model: B450 Steel Legend
  serial: <superuser required> UEFI: American Megatrends v: P3.40
  date: 06/04/2020
Battery:
  Message: No system battery data found. Is one present?
Memory:
  RAM: total: 15.55 GiB used: 5.77 GiB (37.1%)
  RAM Report: permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: 6-Core model: AMD Ryzen 5 3600 bits: 64 type: MT MCP arch: Zen 2
  family: 17 (23) model-id: 71 (113) stepping: 0 microcode: 8701021 cache:
  L1: 384 KiB L2: 3 MiB L3: 32 MiB bogomips: 86276
  Speed: 3623 MHz min/max: 2200/3600 MHz boost: enabled Core speeds (MHz):
  1: 4190 2: 3894 3: 2186 4: 2159 5: 3871 6: 2129 7: 2378 8: 2219 9: 4027
  10: 3937 11: 4014 12: 1983
  Flags: 3dnowprefetch abm adx aes aperfmperf apic arat avic avx avx2 bmi1
  bmi2 bpext cat_l3 cdp_l3 clflush clflushopt clwb clzero cmov cmp_legacy
  constant_tsc cpb cpuid cqm cqm_llc cqm_mbm_local cqm_mbm_total cqm_occup_llc
  cr8_legacy cx16 cx8 de decodeassists extapic extd_apicid f16c flushbyasid
  fma fpu fsgsbase fxsr fxsr_opt ht hw_pstate ibpb ibs irperf lahf_lm lbrv lm
  mba mca mce misalignsse mmx mmxext monitor movbe msr mtrr mwaitx nonstop_tsc
  nopl npt nrip_save nx osvw overflow_recov pae pat pausefilter pclmulqdq
  pdpe1gb perfctr_core perfctr_llc perfctr_nb pfthreshold pge pni popcnt pse
  pse36 rapl rdpid rdpru rdrand rdseed rdt_a rdtscp rep_good sep sev sev_es
  sha_ni skinit smap smca sme smep ssbd sse sse2 sse4_1 sse4_2 sse4a ssse3
  stibp succor svm svm_lock syscall tce topoext tsc tsc_scale umip v_spec_ctrl
  v_vmsave_vmload vgif vmcb_clean vme vmmcall wbnoinvd wdt xgetbv1 xsave
  xsavec xsaveerptr xsaveopt xsaves
  Vulnerabilities: Type: itlb_multihit status: Not affected
  Type: l1tf status: Not affected
  Type: mds status: Not affected
  Type: meltdown status: Not affected
  Type: spec_store_bypass
  mitigation: Speculative Store Bypass disabled via prctl and seccomp
  Type: spectre_v1
  mitigation: usercopy/swapgs barriers and __user pointer sanitization
  Type: spectre_v2 mitigation: Full AMD retpoline, IBPB: conditional, STIBP:
  conditional, RSB filling
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Navi 10 [Radeon RX 5600 OEM/5600 XT / 5700/5700 XT]
  vendor: XFX Pine driver: amdgpu v: kernel bus-ID: 0c:00.0 chip-ID: 1002:731f
  class-ID: 0300
  Device-2: Microdia USB Live camera type: USB driver: snd-usb-audio,uvcvideo
  bus-ID: 3-4:2 chip-ID: 0c45:6536 class-ID: 0102 serial: <filter>
  Display: x11 server: X.Org 1.21.1.1 compositor: kwin_x11 driver:
  loaded: amdgpu,ati unloaded: modesetting,radeon alternate: fbdev,vesa
  display-ID: :0 screens: 1
  Screen-1: 0 s-res: 3600x1080 s-dpi: 96 s-size: 952x285mm (37.5x11.2")
  s-diag: 994mm (39.1")
  Monitor-1: DisplayPort-0 res: 1920x1080 hz: 60 dpi: 82
  size: 598x336mm (23.5x13.2") diag: 686mm (27")
  Monitor-2: HDMI-A-0 res: 1680x1050 hz: 60 dpi: 99
  size: 430x270mm (16.9x10.6") diag: 508mm (20")
  OpenGL: renderer: AMD Radeon RX 5600 XT (NAVI10 DRM 3.42.0 5.15.2-2-MANJARO
  LLVM 13.0.0)
  v: 4.6 Mesa 21.2.5 direct render: Yes
Audio:
  Device-1: AMD Navi 10 HDMI Audio driver: snd_hda_intel v: kernel
  bus-ID: 0c:00.1 chip-ID: 1002:ab38 class-ID: 0403
  Device-2: AMD Starship/Matisse HD Audio vendor: ASRock driver: snd_hda_intel
  v: kernel bus-ID: 0e:00.4 chip-ID: 1022:1487 class-ID: 0403
  Device-3: Microdia USB Live camera type: USB driver: snd-usb-audio,uvcvideo
  bus-ID: 3-4:2 chip-ID: 0c45:6536 class-ID: 0102 serial: <filter>
  Sound Server-1: ALSA v: k5.15.2-2-MANJARO running: yes
  Sound Server-2: sndio v: N/A running: no
  Sound Server-3: JACK v: 1.9.19 running: no
  Sound Server-4: PulseAudio v: 15.0 running: yes
  Sound Server-5: PipeWire v: 0.3.40 running: yes
Network:
  Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
  vendor: ASRock driver: r8169 v: kernel port: d000 bus-ID: 09:00.0
  chip-ID: 10ec:8168 class-ID: 0200
  IF: enp9s0 state: up speed: 1000 Mbps duplex: full mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
  broadcast: <filter>
  IP v6: <filter> type: noprefixroute scope: link
  IF-ID-1: virbr0 state: down mac: <filter>
  IP v4: <filter> scope: global broadcast: <filter>
  IF-ID-2: zt5u4zhvi6 state: unknown speed: 10 Mbps duplex: full mac: <filter>
  IP v4: <filter> scope: global broadcast: <filter>
  IP v6: <filter> scope: link
  WAN IP: <filter>
Bluetooth:
  Device-1: Broadcom BCM20702A0 Bluetooth 4.0 type: USB driver: btusb v: 0.8
  bus-ID: 1-3:4 chip-ID: 0a5c:21ec class-ID: fe01 serial: <filter>
  Report: rfkill ID: hci0 rfk-id: 0 state: up address: see --recommends
Logical:
  Message: No logical block device data found.
RAID:
  Message: No RAID data found.
Drives:
  Local Storage: total: 4.55 TiB used: 3.09 TiB (67.8%)
  SMART Message: Unable to run smartctl. Root privileges required.
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Crucial model: CT1000P1SSD8
  size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
  lanes: 4 type: SSD serial: <filter> rev: P3CR021 temp: 40.9 C scheme: GPT
  ID-2: /dev/sda maj-min: 8:0 vendor: Seagate model: ST4000DM004-2CV104
  size: 3.64 TiB block-size: physical: 4096 B logical: 512 B speed: 6.0 Gb/s
  type: HDD rpm: 5425 serial: <filter> rev: 0001 scheme: MBR
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 914.09 GiB size: 898.75 GiB (98.32%)
  used: 645.43 GiB (71.8%) fs: ext4 dev: /dev/nvme0n1p2 maj-min: 259:2
  label: N/A uuid: bc0a07fc-17dc-4ec8-8cac-7c24849df69e
  ID-2: /boot/efi raw-size: 300 MiB size: 299.4 MiB (99.80%)
  used: 300 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1 label: N/A
  uuid: D741-AF70
  ID-3: /mnt/4TB raw-size: 3.64 TiB size: 3.58 TiB (98.40%)
  used: 2.45 TiB (68.6%) fs: ext4 dev: /dev/sda maj-min: 8:0 label: 4TB
  uuid: ab5b97f0-18a3-4d41-9fd4-a8eacf3c28be
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 17.12 GiB used: 117.5 MiB (0.7%)
  priority: -2 dev: /dev/nvme0n1p4 maj-min: 259:3 label: N/A
  uuid: e9d39b3a-cde0-445c-a571-aff94958acde
Unmounted:
  Message: No unmounted partitions found.
USB:
  Hub-1: 1-0:1 info: Hi-speed hub with single TT ports: 10 rev: 2.0
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 1-3:4 info: Broadcom BCM20702A0 Bluetooth 4.0 type: Bluetooth
  driver: btusb interfaces: 4 rev: 2.0 speed: 12 Mb/s chip-ID: 0a5c:21ec
  class-ID: fe01 serial: <filter>
  Device-2: 1-7:2 info: Microdia Redragon Mitra RGB Keyboard
  type: Keyboard,Mouse driver: hid-generic,usbhid interfaces: 2 rev: 2.0
  speed: 12 Mb/s power: 400mA chip-ID: 0c45:5004 class-ID: 0301
  Device-3: 1-10:3 info: Holtek Gaming Mouse [Redragon M711]
  type: Mouse,Keyboard,HID driver: hid-generic,usbhid interfaces: 3 rev: 2.0
  speed: 12 Mb/s power: 100mA chip-ID: 04d9:fc30 class-ID: 0300
  Hub-2: 2-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s
  chip-ID: 1d6b:0003 class-ID: 0900
  Hub-3: 3-0:1 info: Hi-speed hub with single TT ports: 4 rev: 2.0
  speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900
  Device-1: 3-4:2 info: Microdia USB Live camera type: Video,Audio
  driver: snd-usb-audio,uvcvideo interfaces: 5 rev: 2.0 speed: 480 Mb/s
  power: 500mA chip-ID: 0c45:6536 class-ID: 0102 serial: <filter>
  Hub-4: 4-0:1 info: Super-speed hub ports: 4 rev: 3.1 speed: 10 Gb/s
  chip-ID: 1d6b:0003 class-ID: 0900
Sensors:
  Message: No sensor data found. Is lm-sensors configured?
Info:
  Processes: 383 Uptime: 2h 33m wakeups: 0 Init: systemd v: 249
  tool: systemctl Compilers: gcc: 11.1.0 alt: 10 clang: 13.0.0 Packages:
  pacman: 2636 lib: 571 flatpak: 0 Shell: Bash v: 5.1.8 running-in: konsole
  inxi: 3.3.09