Resolution fixed to 640x480 after Standby

Often, when EOS goes into Standby, resolution after wakeup ist fixed to 640x480.
Even a reboot does NOT fix this. The monitor changed to unknown.

Only fix is unplugging the DP cable and plugging it in again. (Same DP port.) The monitor is also recognized as DELL again.

Machine data: ‘inxi --edid’

Graphics:
  Device-1: Advanced Micro Devices [AMD/ATI] Navi 23 [Radeon RX 6650 XT /
    6700S 6800S] vendor: XFX driver: amdgpu v: kernel arch: RDNA-2
    code: Navi-2x process: TSMC n7 (7nm) built: 2020-22 pcie: gen: 4
    speed: 16 GT/s lanes: 16 ports: active: DP-1 empty: DP-2, DP-3, HDMI-A-1,
    Writeback-1 bus-ID: 08:00.0 chip-ID: 1002:73ef class-ID: 0300
  Display: wayland server: X.org v: 1.21.1.15 with: Xwayland v: 24.1.4
    compositor: kwin_wayland driver: X: loaded: amdgpu
    unloaded: modesetting,radeon alternate: fbdev,vesa dri: radeonsi
    gpu: amdgpu display-ID: 0
  Monitor-1: DP-1 res: 1920x1080 size: N/A modes: N/A
  API: EGL v: 1.5 hw: drv: amd radeonsi platforms: device: 0 drv: radeonsi
    device: 1 drv: swrast gbm: drv: kms_swrast surfaceless: drv: radeonsi
    wayland: drv: radeonsi x11: drv: radeonsi
  API: OpenGL v: 4.6 compat-v: 4.5 vendor: amd mesa v: 24.3.3-arch1.1
    glx-v: 1.4 direct-render: yes renderer: AMD Radeon RX 6650 XT (radeonsi
    navi23 LLVM 18.1.8 DRM 3.59 6.12.8-arch1-1) device-ID: 1002:73ef
    memory: 7.81 GiB unified: no display-ID: :1.0
  API: Vulkan v: 1.4.303 layers: 5 device: 0 type: discrete-gpu name: AMD
    Radeon RX 6650 XT (RADV NAVI23) driver: N/A device-ID: 1002:73ef
    surfaces: xcb,xlib,wayland

xrandr while broken:

Screen 0: minimum 16 x 16, current 640 x 480, maximum 32767 x 32767
DP-1 connected primary 640x480+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
   640x480       59.38*+
   320x240       59.29  
   640x400       59.20  
   320x200       58.14  
   640x350       59.28 

xrandr after un- and replugging DP cable:

Screen 0: minimum 16 x 16, current 1920 x 1080, maximum 32767 x 32767
DP-1 connected primary 1920x1080+0+0 (normal left inverted right x axis y axis) 475mm x 267mm
   1920x1080     59.96*+
   1440x1080     59.99  
   1400x1050     59.98  
   1280x1024     59.89  
   1280x960      59.94  
   1152x864      59.96  
   1024x768      59.92  
   800x600       59.86  
   640x480       59.38  
   320x240       59.29  
   1680x1050     59.95  
   1440x900      59.89  
   1280x800      59.81  
   1152x720      59.97  
   960x600       59.63  
   928x580       59.88  
   800x500       59.50  
   768x480       59.90  
   720x480       59.71  
   640x400       59.95  
   320x200       58.14  
   1600x900      59.95  
   1368x768      59.88  
   1280x720      59.86  
   1024x576      59.90  
   864x486       59.92  
   720x400       59.27  
   640x350       59.28  

I am running Wayland with KDE on a single monitor setup, but even starting a X11 session after reboot does not fix the problem.
Sadly I can’t reproduce it right know with enforced standby. But it happens nearly daily.

Does anyone have an idea, what could be the reason?
Also let me know, if you need additional logs.

Not being a guru around here I’ll take a wild swing…

Do you have a file (like monitor.sh) somewhere in a default location that xrandr looks to in order to establish your preferred screen resolution?

And if so, is it possible that the line of code referencing that monitor setting in your startup files got deleted/changed recently?

I use i3, in which there are various places where such resolution setting for xrandr can be placed … but not knowing what environment you’re operating in makes it hard to suggest much more (… and my grasp of the ins & outs of other EOS environments is limited, so others would need to step in).

No monitor.sh involved.

I guess it’s an drm error.
Because during wakeup I get this error in dmesg:

Also the edid file is missing for the DP-1 connector and the modes are limited:

$ cat /sys/class/drm/card1-DP-1/edid
$ cat /sys/class/drm/card1-DP-1/modes 
640x480

After unplug and replug the files are different (as they should be).

$ cat /sys/class/drm/card1-DP-1/edid
�������H�L8G0�0:|��TN�'PT�KqO����:�▒q8-@X,E�
                                            �D09VR35Q0G8L
�DELL U2212HM
�8LS
$ cat /sys/class/drm/card1-DP-1/modes 
1920x1080
1680x1050
1280x1024
1280x1024
1440x900
1280x800
1152x864
1280x720
1024x768
1024x768
800x600
800x600
640x480
640x480
720x400

Seems like somebody in the arch forums encountered the same problem:
https://bbs.archlinux.org/viewtopic.php?id=298124

But deploying a static edid seems like only a workaround for me. The right edid is created when the DP cable is connected. So the question is, why is a corrupt one created on wakeup?

It’s probably caused by the gpu not waking properly.