I'm going to explain in better detail.
I have two monitors:
[VGA] [HDMI]
HDMI (right monitor) should be the primary monitor, while the VGA the secondary monitor.

I have energy saving and lock screen enabled, the issue is that when energy saving kicks in and monitors go to sleep, they immediately wake up and stay on. Also all the windows and cursor move to the left-most monitor (where primary is not checked).
I observed this using Ubuntu (XFCE and KDE).
I also tried Regolith, similar issue happened when monitors went to sleep, but there each second a new virtual desktop was created endlessly, instead of switching programs windows.
Also as you can notice in the screenshot "An output has been removed. Settings have been reloaded". This message is showed after the monitor wakes up immediately after sleep.
What I tried:
- Partially resolved the wake up disabling Kscreen2 on KDE, but it is not an ideal solution.
- udevadm control --stop, this prevents the wake up and windows switching, but it's even a worse solution.
I want also to add that during boot the following message is showed:
ACPI BIOS Error (bug): Could not resolve symbol [\_SB.PCI0.GP17.VGA.LCD._BCM.AFN7]
System Info:
uname:
- Linux finch-desktop 5.15.0-67-generic #74-Ubuntu SMP Wed Feb 22 14:14:39 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
inxi:
System:
Host: finch-desktop Kernel: 5.15.0-67-generic x86_64 bits: 64 compiler: gcc
v: 11.3.0 Desktop: KDE Plasma 5.24.7
Distro: Ubuntu 22.04.2 LTS (Jammy Jellyfish)
Machine:
Type: Desktop Mobo: ASRock model: A320M-HDV R4.0
serial: <superuser required> UEFI: American Megatrends v: P7.20
date: 04/27/2022
CPU:
Info: 6-core model: AMD Ryzen 5 5600G with Radeon Graphics bits: 64
type: MT MCP arch: Zen 3 rev: 0 cache: L1: 384 KiB L2: 3 MiB L3: 16 MiB
Speed (MHz): avg: 2863 high: 4450 min/max: 1400/4464 boost: enabled
cores: 1: 2384 2: 2400 3: 2396 4: 2400 5: 2400 6: 2999 7: 2401 8: 3559
9: 4450 10: 3560 11: 2415 12: 2998 bogomips: 93601
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
Device-1: AMD Cezanne driver: amdgpu v: 5.18.13 bus-ID: 06:00.0
Display: x11 server: X.Org v: 1.21.1.3 driver: X: loaded: amdgpu,ati
unloaded: fbdev,modesetting,vesa gpu: amdgpu resolution: 1: 1920x1080~60Hz
2: 1920x1080~60Hz
OpenGL: renderer: RENOIR (renoir LLVM 15.0.3 DRM 3.48 5.15.0-67-generic)
v: 4.6 Mesa 22.3.0-devel direct render: Yes
Audio:
Device-1: AMD Renoir Radeon High Definition Audio driver: snd_hda_intel
v: kernel bus-ID: 06:00.1
Device-2: AMD Family 17h HD Audio vendor: ASRock driver: snd_hda_intel
v: kernel bus-ID: 06:00.6
Device-3: Logitech Headset H340 type: USB
driver: hid-generic,snd-usb-audio,usbhid bus-ID: 1-2:2
Sound Server-1: ALSA v: k5.15.0-67-generic running: yes
Sound Server-2: PulseAudio v: 15.99.1 running: yes
Sound Server-3: PipeWire v: 0.3.48 running: yes
Network:
Device-1: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet
vendor: ASRock driver: r8169 v: kernel port: f000 bus-ID: 05:00.0
IF: enp5s0 state: up speed: 100 Mbps duplex: full mac: a8:a1:59:5b:4d:4b
IF-ID-1: docker0 state: down mac: 02:42:f8:4c:05:70
IF-ID-2: ham0 state: unknown speed: 10 Mbps duplex: full
mac: 7a:79:19:3e:f8:72
Drives:
Local Storage: total: 5.01 TiB used: 737.2 GiB (14.4%)
ID-1: /dev/sda vendor: Western Digital model: WD5002ABYS-02B1B0
size: 465.76 GiB
ID-2: /dev/sdb vendor: Crucial model: CT500MX500SSD1 size: 465.76 GiB
ID-3: /dev/sdc vendor: Toshiba model: DT01ACA050 size: 465.76 GiB
ID-4: /dev/sdd type: USB vendor: Kingston model: DataTraveler 3.0
size: 7.2 GiB
ID-5: /dev/sdf type: USB vendor: Toshiba model: EXTERNAL USB
size: 3.64 TiB
Partition:
ID-1: / size: 456.89 GiB used: 165.52 GiB (36.2%) fs: ext4 dev: /dev/sdb2
ID-2: /boot/efi size: 512 MiB used: 6.1 MiB (1.2%) fs: vfat
dev: /dev/sda2
Swap:
ID-1: swap-1 type: file size: 2 GiB used: 0 KiB (0.0%) file: /swapfile
Sensors:
System Temperatures: cpu: N/A mobo: N/A gpu: amdgpu temp: 28.0 C
Fan Speeds (RPM): N/A
Info:
Processes: 383 Uptime: 46m Memory: 10.57 GiB used: 4.2 GiB (39.7%)
Init: systemd runlevel: 5 Compilers: gcc: 11.3.0 Packages: 2278 Shell: Bash
v: 5.1.16 inxi: 3.3.13
lspci:
00:00.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne Root Complex
00:01.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:02.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:02.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne PCIe GPP Bridge
00:08.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Renoir PCIe Dummy Host Bridge
00:08.1 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus
00:08.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Renoir Internal PCIe GPP Bridge to Bus
00:14.0 SMBus: Advanced Micro Devices, Inc. [AMD] FCH SMBus Controller (rev 51)
00:14.3 ISA bridge: Advanced Micro Devices, Inc. [AMD] FCH LPC Bridge (rev 51)
00:18.0 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 0
00:18.1 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 1
00:18.2 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 2
00:18.3 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 3
00:18.4 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 4
00:18.5 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 5
00:18.6 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 6
00:18.7 Host bridge: Advanced Micro Devices, Inc. [AMD] Cezanne Data Fabric; Function 7
01:00.0 USB controller: Advanced Micro Devices, Inc. [AMD] Device 43bc (rev 02)
01:00.1 SATA controller: Advanced Micro Devices, Inc. [AMD] Device 43b8 (rev 02)
01:00.2 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 43b3 (rev 02)
02:04.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset PCIe Port (rev 02)
02:06.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset PCIe Port (rev 02)
02:07.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] 300 Series Chipset PCIe Port (rev 02)
05:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
06:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Cezanne (rev c9)
06:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Renoir Radeon High Definition Audio Controller
06:00.2 Encryption controller: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) Platform Security Processor
06:00.3 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne USB 3.1
06:00.4 USB controller: Advanced Micro Devices, Inc. [AMD] Renoir/Cezanne USB 3.1
06:00.6 Audio device: Advanced Micro Devices, Inc. [AMD] Family 17h (Models 10h-1fh) HD Audio Controller
07:00.0 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 81)
07:00.1 SATA controller: Advanced Micro Devices, Inc. [AMD] FCH SATA Controller [AHCI mode] (rev 81)
udevadm monitor logs when the issue happens:
KERNEL[626.770830] change /devices/pci0000:00/0000:00:08.1/0000:06:00.0/drm/card0 (drm)
ACTION=change
DEVPATH=/devices/pci0000:00/0000:00:08.1/0000:06:00.0/drm/card0
SUBSYSTEM=drm
HOTPLUG=1
DEVNAME=/dev/dri/card0
DEVTYPE=drm_minor
SEQNUM=4457
MAJOR=226
MINOR=0
UDEV [626.777794] change /devices/pci0000:00/0000:00:08.1/0000:06:00.0/drm/card0 (drm)
ACTION=change
DEVPATH=/devices/pci0000:00/0000:00:08.1/0000:06:00.0/drm/card0
SUBSYSTEM=drm
HOTPLUG=1
DEVNAME=/dev/dri/card0
DEVTYPE=drm_minor
SEQNUM=4457
USEC_INITIALIZED=4036211
ID_PATH=pci-0000:06:00.0
ID_PATH_TAG=pci-0000_06_00_0
ID_FOR_SEAT=drm-pci-0000_06_00_0
MAJOR=226
MINOR=0
DEVLINKS=/dev/dri/by-path/pci-0000:06:00.0-card
TAGS=:snap_barrier_barriers:snap_remmina_remmina:seat:snap_barrier_barrierc:uaccess:snap_barrier_barrier:snap_chromium_chromium:snap_telegram-desktop_telegram-desktop:snap_firefox_geckodriver:snap_chromium_chromedriver:master-of-seat:snap_firefox_firefox:
CURRENT_TAGS=:snap_barrier_barrier:master-of-seat:snap_firefox_geckodriver:snap_firefox_firefox:snap_chromium_chromedriver:uaccess:snap_barrier_barrierc:snap_barrier_barriers:snap_telegram-desktop_telegram-desktop:seat:snap_remmina_remmina:snap_chromium_chromium:
KERNEL[627.349125] change /devices/pci0000:00/0000:00:08.1/0000:06:00.0/drm/card0 (drm)
ACTION=change
DEVPATH=/devices/pci0000:00/0000:00:08.1/0000:06:00.0/drm/card0
SUBSYSTEM=drm
HOTPLUG=1
DEVNAME=/dev/dri/card0
DEVTYPE=drm_minor
SEQNUM=4458
MAJOR=226
MINOR=0
UDEV [627.355763] change /devices/pci0000:00/0000:00:08.1/0000:06:00.0/drm/card0 (drm)
ACTION=change
DEVPATH=/devices/pci0000:00/0000:00:08.1/0000:06:00.0/drm/card0
SUBSYSTEM=drm
HOTPLUG=1
DEVNAME=/dev/dri/card0
DEVTYPE=drm_minor
SEQNUM=4458
USEC_INITIALIZED=4036211
ID_PATH=pci-0000:06:00.0
ID_PATH_TAG=pci-0000_06_00_0
ID_FOR_SEAT=drm-pci-0000_06_00_0
MAJOR=226
MINOR=0
DEVLINKS=/dev/dri/by-path/pci-0000:06:00.0-card
TAGS=:master-of-seat:snap_barrier_barrier:snap_barrier_barrierc:snap_chromium_chromedriver:snap_remmina_remmina:uaccess:snap_chromium_chromium:snap_barrier_barriers:snap_telegram-desktop_telegram-desktop:snap_firefox_firefox:snap_firefox_geckodriver:seat:
CURRENT_TAGS=:snap_remmina_remmina:snap_chromium_chromedriver:snap_firefox_geckodriver:snap_telegram-desktop_telegram-desktop:snap_firefox_firefox:snap_barrier_barrier:master-of-seat:snap_chromium_chromium:uaccess:snap_barrier_barrierc:seat:snap_barrier_barriers:
Thank you for reading.
Edit:
- Tried Fedora KDE, same issue
- Solus KDE, same issue
- Solus Budgie, same issue