Screen flickering caused by games

I recently started using Manjaro-i3 with an AMD graphics card. Certain action cause the screen to flicker.

By flickering I mean that a bottom part of the screen (of varying height) is momentarily filled with a solid color. This happens repeatedly very quickly until the X server is restarted.

This flickering is causes by launching a game in fullscreen mode. It either starts immediately or after the game is exited.

Another possible trigger: during watching a fullscreen Youtube video in a browser, xautolock locked the screen due to inactivity, when the screen was unlocked the flickering started.

The system information:

$ inxi -v7azy
System:
  Kernel: 5.15.89-1-MANJARO arch: x86_64 bits: 64 compiler: gcc v: 12.2.1
    parameters: BOOT_IMAGE=/boot/vmlinuz-5.15-x86_64
    root=UUID=ccbe7454-2b45-4a06-88d9-9e92253f9bd9 rw quiet apparmor=1
    security=apparmor resume=UUID=e20b6835-1d13-4165-a1c9-1e2565e4cfc4
    udev.log_priority=3
  Desktop: i3 v: 4.22 info: i3bar vt: 7 dm: LightDM v: 1.32.0
    Distro: Manjaro Linux base: Arch Linux
Machine:
  Type: Laptop System: ASUSTeK product: VivoBook_ASUSLaptop X513IA_D513IA
    v: 1.0 serial: <superuser required>
  Mobo: ASUSTeK model: X513IA v: 1.0 serial: <superuser required>
    UEFI: American Megatrends v: X513IA.306 date: 05/26/2021
Battery:
  ID-1: BAT0 charge: 40.4 Wh (100.0%) condition: 40.4/42.1 Wh (96.0%)
    volts: 11.8 min: 11.8 model: ASUSTeK ASUS Battery type: Li-ion serial: N/A
    status: not charging
Memory:
  RAM: total: 34.67 GiB used: 5.45 GiB (15.7%)
  RAM Report: permissions: Unable to run dmidecode. Root privileges required.
CPU:
  Info: model: AMD Ryzen 7 4700U with Radeon Graphics bits: 64 type: MCP
    arch: Zen 2 gen: 3 level: v3 note: check built: 2020-22
    process: TSMC n7 (7nm) family: 0x17 (23) model-id: 0x60 (96) stepping: 1
    microcode: 0x8600106
  Topology: cpus: 1x cores: 8 smt: <unsupported> cache: L1: 512 KiB
    desc: d-8x32 KiB; i-8x32 KiB L2: 4 MiB desc: 8x512 KiB L3: 8 MiB
    desc: 2x4 MiB
  Speed (MHz): avg: 1463 high: 1734 min/max: 1400/2000 boost: enabled
    scaling: driver: acpi-cpufreq governor: schedutil cores: 1: 1397 2: 1588
    3: 1734 4: 1397 5: 1397 6: 1397 7: 1397 8: 1397 bogomips: 31950
  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 ibrs 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 sha_ni skinit smap smca 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: mmio_stale_data status: Not affected
  Type: retbleed mitigation: untrained return thunk; SMT disabled
  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: Retpolines, IBPB: conditional, STIBP:
    disabled, RSB filling, PBRSB-eIBRS: Not affected
  Type: srbds status: Not affected
  Type: tsx_async_abort status: Not affected
Graphics:
  Device-1: AMD Renoir vendor: ASUSTeK driver: amdgpu v: kernel arch: GCN-5.1
    code: Vega-2 process: TSMC n7 (7nm) built: 2018-21 pcie: gen: 4
    speed: 16 GT/s lanes: 16 ports: active: eDP-1 empty: HDMI-A-1
    bus-ID: 03:00.0 chip-ID: 1002:1636 class-ID: 0300 temp: 40.0 C
  Device-2: IMC Networks USB2.0 HD UVC WebCam type: USB driver: uvcvideo
    bus-ID: 3-3:3 chip-ID: 13d3:56a8 class-ID: 0e02 serial: <filter>
  Display: x11 server: X.Org v: 21.1.6 compositor: Picom v: git-b700a driver:
    X: loaded: amdgpu unloaded: modesetting alternate: fbdev,vesa dri: radeonsi
    gpu: amdgpu display-ID: :0 screens: 1
  Screen-1: 0 s-res: 1920x1080 s-dpi: 96 s-size: 508x285mm (20.00x11.22")
    s-diag: 582mm (22.93")
  Monitor-1: eDP-1 mapped: eDP model: ChiMei InnoLux 0x15e7 built: 2016
    res: 1920x1080 hz: 60 dpi: 142 gamma: 1.2 size: 344x193mm (13.54x7.6")
    diag: 394mm (15.5") ratio: 16:9 modes: max: 1920x1080 min: 640x480
  API: OpenGL Message: Unable to show GL data. Required tool glxinfo missing.
Audio:
  Device-1: AMD Renoir Radeon High Definition Audio driver: snd_hda_intel
    v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 03:00.1
    chip-ID: 1002:1637 class-ID: 0403
  Device-2: AMD Family 17h/19h HD Audio vendor: ASUSTeK driver: snd_hda_intel
    v: kernel pcie: gen: 4 speed: 16 GT/s lanes: 16 bus-ID: 03:00.6
    chip-ID: 1022:15e3 class-ID: 0403
  Sound API: ALSA v: k5.15.89-1-MANJARO running: yes
  Sound Server-1: JACK v: 1.9.21 running: no
  Sound Server-2: PulseAudio v: 16.1 running: yes
  Sound Server-3: PipeWire v: 0.3.64 running: yes
Network:
  Device-1: Intel Wi-Fi 6 AX200 driver: iwlwifi v: kernel pcie: gen: 2
    speed: 5 GT/s lanes: 1 bus-ID: 01:00.0 chip-ID: 8086:2723 class-ID: 0280
  IF: wlp1s0 state: up mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: dynamic noprefixroute scope: global
  IP v6: <filter> type: noprefixroute scope: link
  Device-2: Realtek USB 10/100/1G/2.5G LAN type: USB driver: cdc_ncm
    bus-ID: 2-1:2 chip-ID: 0bda:8156 class-ID: 0a00 serial: <filter>
  IF: enp3s0f3u1c2 state: up speed: 100 Mbps duplex: half mac: <filter>
  IP v4: <filter> type: dynamic noprefixroute scope: global
    broadcast: <filter>
  IP v6: <filter> type: dynamic noprefixroute scope: global
  IP v6: <filter> type: noprefixroute scope: link
  WAN IP: <filter>
Bluetooth:
  Device-1: Intel AX200 Bluetooth type: USB driver: btusb v: 0.8 bus-ID: 3-2:2
    chip-ID: 8087:0029 class-ID: e001
  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: 931.51 GiB used: 34.9 GiB (3.7%)
  SMART Message: Required tool smartctl not installed. Check --recommends
  ID-1: /dev/nvme0n1 maj-min: 259:0 vendor: Crucial model: CT1000P2SSD8
    size: 931.51 GiB block-size: physical: 512 B logical: 512 B speed: 31.6 Gb/s
    lanes: 4 type: SSD serial: <filter> rev: P2CR033 temp: 29.9 C scheme: GPT
  Message: No optical or floppy data found.
Partition:
  ID-1: / raw-size: 100 GiB size: 97.87 GiB (97.87%) used: 16.05 GiB (16.4%)
    fs: ext4 dev: /dev/nvme0n1p3 maj-min: 259:3 label: N/A
    uuid: ccbe7454-2b45-4a06-88d9-9e92253f9bd9
  ID-2: /boot/efi raw-size: 500 MiB size: 499 MiB (99.80%)
    used: 288 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 maj-min: 259:1
    label: NO_LABEL uuid: F629-E408
  ID-3: /home raw-size: 827.12 GiB size: 813.06 GiB (98.30%)
    used: 18.85 GiB (2.3%) fs: ext4 dev: /dev/nvme0n1p4 maj-min: 259:4 label: N/A
    uuid: ee81e396-3304-4130-bbaa-5740ae93b9cb
Swap:
  Kernel: swappiness: 60 (default) cache-pressure: 100 (default)
  ID-1: swap-1 type: partition size: 3.91 GiB used: 0 KiB (0.0%) priority: -2
    dev: /dev/nvme0n1p2 maj-min: 259:2 label: N/A
    uuid: e20b6835-1d13-4165-a1c9-1e2565e4cfc4
Unmounted:
  Message: No unmounted partitions found.
USB:
  Hub-1: 1-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: 1-3:2 info: Logitech USB Keyboard type: Keyboard,HID
    driver: hid-generic,usbhid interfaces: 2 rev: 1.1 speed: 1.5 Mb/s power: 90mA
    chip-ID: 046d:c34b class-ID: 0300
  Device-2: 1-4:3 info: Primax 0Y357C PMX-MMOCZUL (B) [Dell Laser Mouse]
    type: Mouse driver: hid-generic,usbhid interfaces: 1 rev: 2.0 speed: 1.5 Mb/s
    power: 100mA chip-ID: 0461:4d51 class-ID: 0301
  Hub-2: 2-0:1 info: Super-speed hub ports: 2 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
  Device-1: 2-1:2 info: Realtek USB 10/100/1G/2.5G LAN
    type: Communication,CDC-Data driver: cdc_ncm interfaces: 2 rev: 3.2
    speed: 5 Gb/s power: 256mA chip-ID: 0bda:8156 class-ID: 0a00
    serial: <filter>
  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-2:2 info: Intel AX200 Bluetooth type: Bluetooth driver: btusb
    interfaces: 2 rev: 2.0 speed: 12 Mb/s power: 100mA chip-ID: 8087:0029
    class-ID: e001
  Device-2: 3-3:3 info: IMC Networks USB2.0 HD UVC WebCam type: Video
    driver: uvcvideo interfaces: 2 rev: 2.0 speed: 480 Mb/s power: 500mA
    chip-ID: 13d3:56a8 class-ID: 0e02 serial: <filter>
  Hub-4: 4-0:1 info: Super-speed hub ports: 2 rev: 3.1 speed: 10 Gb/s
    chip-ID: 1d6b:0003 class-ID: 0900
Sensors:
  System Temperatures: cpu: 59.0 C mobo: N/A gpu: amdgpu temp: 41.0 C
  Fan Speeds (RPM): cpu: 0
Info:
  Processes: 277 Uptime: 2h 34m wakeups: 1 Init: systemd v: 252
  default: graphical tool: systemctl Compilers: gcc: 12.2.1 clang: 15.0.7
  Packages: pm: pacman pkgs: 1169 libs: 354 tools: pamac,yay Shell: Bash
  v: 5.1.16 running-in: kitty inxi: 3.3.24