Program windows are open and interactable, but all that is displayed is the desktop screen

Recently, I’ve somewhat often been experiencing an issue where the program window is open and interactable (eg the mouse cursor changes when hovering over a text box, the close button can be clicked, etc), but all that gets displayed is the desktop. If I open a new instance of that program, all is fine, but the original instance still has the issue, which can get supremely annoying if I’m in the middle of work. I’ve searched a few times to see if anyone else has had this issue, but I’ve had no luck in finding a solution. I have yet to consistently trigger the bug, but I suspect it’s connected to the ‘show desktop’ button (since there was a time or time when that happened right after clicking it). Here is my laptop info:

System:    Kernel: 5.13.13-1-MANJARO x86_64 bits: 64 compiler: gcc v: 11.1.0 Desktop: KDE Plasma 5.22.5 tk: Qt 5.15.2 
           wm: kwin_x11 vt: 1 dm: SDDM Distro: Manjaro Linux base: Arch Linux 
Machine:   Type: Laptop System: ASUSTeK product: VivoBook_ASUSLaptop X415JA_X415JA v: 1.0 serial: <filter> 
           Mobo: ASUSTeK model: X415JA v: 1.0 serial: <filter> UEFI: American Megatrends v: X415JA.300 date: 08/19/2020 
Battery:   ID-1: BAT0 charge: 30.1 Wh (89.3%) condition: 33.7/37.1 Wh (90.8%) volts: 7.8 min: 7.8 model: ASUSTeK ASUS Battery 
           type: Li-ion serial: N/A status: Charging cycles: 84 
Memory:    RAM: total: 7.52 GiB used: 6.5 GiB (86.5%) 
           RAM Report: permissions: Unable to run dmidecode. Root privileges required. 
CPU:       Info: Dual Core model: Intel Core i3-1005G1 bits: 64 type: MT MCP arch: Ice Lake rev: 5 cache: L2: 4 MiB 
           bogomips: 9524 
           Speed: 1102 MHz min/max: 400/3400 MHz Core speeds (MHz): 1: 1102 2: 1166 3: 1474 4: 1107 
           Flags: 3dnowprefetch abm acpi adx aes aperfmperf apic arat arch_capabilities arch_perfmon art avx avx2 
           avx512_bitalg avx512_vbmi2 avx512_vnni avx512_vpopcntdq avx512bw avx512cd avx512dq avx512f avx512ifma avx512vbmi 
           avx512vl bmi1 bmi2 bts clflush clflushopt cmov constant_tsc cpuid cpuid_fault cx16 cx8 de ds_cpl dtes64 dtherm dts 
           epb ept ept_ad erms est f16c flexpriority flush_l1d fma fpu fsgsbase fsrm fxsr gfni ht hwp hwp_act_window hwp_epp 
           hwp_notify hwp_pkg_req ibpb ibrs ibrs_enhanced ida intel_pt invpcid invpcid_single lahf_lm lm mca mce md_clear mmx 
           monitor movbe msr mtrr nonstop_tsc nopl nx ospke pae pat pbe pcid pclmulqdq pdcm pdpe1gb pebs pge pku pln pni 
           popcnt pse pse36 pts rdpid rdrand rdseed rdtscp rep_good sdbg sep sha_ni smap smep split_lock_detect ss ssbd sse 
           sse2 sse4_1 sse4_2 ssse3 stibp syscall tm tm2 tpr_shadow tsc tsc_adjust tsc_deadline_timer tsc_known_freq umip vaes 
           vme vmx vnmi vpclmulqdq vpid x2apic xgetbv1 xsave xsavec xsaveopt xsaves xtopology xtpr 
Graphics:  Device-1: Intel Iris Plus Graphics G1 vendor: ASUSTeK driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:8a56 
           class-ID: 0300 
           Device-2: IMC Networks USB2.0 VGA UVC WebCam type: USB driver: uvcvideo bus-ID: 1-5:3 chip-ID: 13d3:5a11 
           class-ID: 0e02 
           Display: x11 server: X.Org 1.20.13 compositor: kwin_x11 driver: loaded: modesetting alternate: fbdev,vesa 
           resolution: 1920x1200~60Hz s-dpi: 96 
           OpenGL: renderer: Mesa Intel UHD Graphics (ICL GT1) v: 4.6 Mesa 21.2.1 direct render: Yes 
Audio:     Device-1: Intel Ice Lake-LP Smart Sound Audio vendor: ASUSTeK driver: snd_hda_intel v: kernel bus-ID: 00:1f.3 
           chip-ID: 8086:34c8 class-ID: 0403 
           Sound Server-1: ALSA v: k5.13.13-1-MANJARO running: yes 
           Sound Server-2: JACK v: 1.9.19 running: no 
           Sound Server-3: PulseAudio v: 15.0 running: yes 
           Sound Server-4: PipeWire v: 0.3.34 running: yes 
Network:   Device-1: Intel Ice Lake-LP PCH CNVi WiFi driver: iwlwifi v: kernel port: 3000 bus-ID: 00:14.3 chip-ID: 8086:34f0 
           class-ID: 0280 
           IF: wlo1 state: up mac: <filter> 
           IP v4: <filter> type: dynamic noprefixroute scope: global broadcast: <filter> 
           IP v6: <filter> type: noprefixroute scope: link 
           WAN IP: <filter> 
Bluetooth: Device-1: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: USB driver: btusb v: 0.8 bus-ID: 1-10:4 
           chip-ID: 8087:0aaa class-ID: e001 
           Report: rfkill ID: hci0 rfk-id: 3 state: up address: see --recommends 
Logical:   Message: No logical block device data found. 
RAID:      Hardware-1: Intel 82801 Mobile SATA Controller [RAID mode] driver: ahci v: 3.0 port: 3060 bus-ID: 00:17.0 
           chip-ID: 8086.282a rev: 30 class-ID: 0104 
Drives:    Local Storage: total: 238.47 GiB used: 174.66 GiB (73.2%) 
           ID-1: /dev/nvme0n1 vendor: Western Digital model: PC SN530 SDBPNPZ-256G-1002 size: 238.47 GiB speed: 31.6 Gb/s 
           lanes: 4 type: SSD serial: <filter> rev: 21106000 temp: 34.9 C scheme: GPT 
           Message: No optical or floppy data found. 
Partition: ID-1: / size: 233.43 GiB used: 174.66 GiB (74.8%) fs: ext4 dev: /dev/nvme0n1p2 label: N/A 
           uuid: 6a6dea90-8fad-4730-9bac-87d4b3c118e8 
           ID-2: /boot/efi size: 299.4 MiB used: 312 KiB (0.1%) fs: vfat dev: /dev/nvme0n1p1 label: N/A uuid: 669B-77F5 
Swap:      Alert: No swap data was found. 
Unmounted: Message: No unmounted partitions found. 
USB:       Hub-1: 1-0:1 info: Full speed (or root) Hub ports: 12 rev: 2.0 speed: 480 Mb/s chip-ID: 1d6b:0002 class-ID: 0900 
           Device-1: 1-2:9 info: Logitech Keyboard K120 type: Keyboard,HID driver: hid-generic,usbhid interfaces: 2 rev: 1.1 
           speed: 1.5 Mb/s power: 90mA chip-ID: 046d:c31c class-ID: 0300 
           Device-2: 1-4:2 info: Realtek RTS5129 Card Reader Controller type: <vendor specific> 
           driver: rtsx_usb,rtsx_usb_ms,rtsx_usb_sdmmc interfaces: 1 rev: 2.0 speed: 480 Mb/s power: 500mA chip-ID: 0bda:0129 
           class-ID: ff00 serial: <filter> 
           Device-3: 1-5:3 info: IMC Networks USB2.0 VGA UVC WebCam type: Video driver: uvcvideo interfaces: 2 rev: 2.0 
           speed: 480 Mb/s power: 500mA chip-ID: 13d3:5a11 class-ID: 0e02 
           Device-4: 1-6:10 info: Logitech M105 Optical Mouse type: Mouse driver: hid-generic,usbhid interfaces: 1 rev: 2.0 
           speed: 1.5 Mb/s power: 100mA chip-ID: 046d:c077 class-ID: 0301 
           Device-5: 1-10:4 info: Intel Bluetooth 9460/9560 Jefferson Peak (JfP) type: Bluetooth driver: btusb interfaces: 2 
           rev: 2.0 speed: 12 Mb/s power: 100mA chip-ID: 8087:0aaa class-ID: e001 
           Hub-2: 2-0:1 info: Full speed (or root) Hub ports: 6 rev: 3.1 speed: 10 Gb/s chip-ID: 1d6b:0003 class-ID: 0900 
Sensors:   System Temperatures: cpu: 49.0 C mobo: N/A 
           Fan Speeds (RPM): cpu: 2500 
Info:      Processes: 260 Uptime: 9d 23h 28m wakeups: 32 Init: systemd v: 248 Compilers: gcc: 11.1.0 clang: 12.0.1 Packages: 
           pacman: 1535 Shell: Bash v: 5.1.8 running-in: konsole inxi: 3.3.06

Perhaps it’s something with compositing.
Try disabling and re-enabling the compositor when this happens.
Keyboard shortcut is alt+shift+f12.
Also any resize operation should cause the windows to be redrawn (like maximizing and un-maximizing meta+pgup).

Happened again, so I tried your suggestions; unfortunately, they do not seem to have worked. Cycling through the windows with alt+tab also does not display those windows (the programs not hit by the issue show up just fine)

EDIT: just happened a 2nd time, immediately after the unlock screen (that was what had happened the 1st time too)

So this is somehow (only?) happening after a screen locking/unlocking?
Does switching to a tty (ctrl+alt+f2) and back (ctrl+alt+f1) show the windows?

Hmm. Tried your suggestion, but apparently not only did it not work, but switching between tty and back seems to have caused other open windows to suffer from the same issue.

Does another kernel like latest LTS (5.10) or latest stable (5.14) produce better results?
You should drop 5.13 kernel anyway due to it now being EOL.

$ sudo mhwd-kernel -i linux514

Also see

Switched to 5.14 12 days ago, just happened again. Gonna try the LTS kernel now