Bug 486504 - Primary display changes to 640x480 resolution after suspend (wayland only)
Summary: Primary display changes to 640x480 resolution after suspend (wayland only)
Status: RESOLVED DUPLICATE of bug 484037
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (show other bugs)
Version: 6.0.4
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: multiscreen
Depends on:
Blocks:
 
Reported: 2024-05-03 13:01 UTC by Kalzi
Modified: 2024-05-23 04:39 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
screenshot to explain the issue (3.23 MB, image/jpeg)
2024-05-03 13:01 UTC, Kalzi
Details
another screenshot (2.94 MB, image/jpeg)
2024-05-03 13:02 UTC, Kalzi
Details
another screenshot (3.82 MB, image/jpeg)
2024-05-03 13:02 UTC, Kalzi
Details
drm_info_before (40.53 KB, text/plain)
2024-05-06 20:51 UTC, Kalzi
Details
drm_info_during (40.50 KB, text/plain)
2024-05-06 20:52 UTC, Kalzi
Details
drm_info_after (40.54 KB, text/plain)
2024-05-06 20:52 UTC, Kalzi
Details
kscreen-doctor-while (2.24 KB, text/plain)
2024-05-07 00:06 UTC, Kalzi
Details
waylandinfo (12.91 KB, text/plain)
2024-05-07 00:06 UTC, Kalzi
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kalzi 2024-05-03 13:01:49 UTC
Created attachment 169133 [details]
screenshot to explain the issue

***
If you're not sure this is actually a bug, instead post about it at https://discuss.kde.org

If you're reporting a crash, attach a backtrace with debug symbols; see https://community.kde.org/Guidelines_and_HOWTOs/Debugging/How_to_create_useful_crash_reports
***

SUMMARY
I have two 27" 4k monitors. The primary monitor switches to a very low resolution after I wake it up from suspend (640x480). This happens every single time. Things will show so massive that I can't really do much on the display. The cursor is also stuck on that same monitor. I then scramble around to find the panel and get to the display configurations and switch the monitors around so I can get my cursor to the other screen where I can get there and change the resolution to the correct one. Also, changing the resolution on the affected monitor doesn't do anything. The "apply" button stays grayed out. The primary monitor is a Dell and is connected to my RX580 GPU through DP

STEPS TO REPRODUCE
1. Run wayland and have 2 4k monitors 
2. suspend the machine and let it sit for a while 
3. wake it up

OBSERVED RESULT
Resolution switches to very low res

EXPECTED RESULT
Normal res

SOFTWARE/OS VERSIONS
Operating System: EndeavourOS 
KDE Plasma Version: 6.0.4
KDE Frameworks Version: 6.1.0
Qt Version: 6.7.0
Kernel Version: 6.8.8-arch1-1 (64-bit)
Graphics Platform: Wayland
Processors: 16 × AMD Ryzen 7 5700G with Radeon Graphics
Memory: 15.5 GiB of RAM
Graphics Processor: AMD Radeon RX 580 Series
Manufacturer: Gigabyte Technology Co., Ltd.
Product Name: A520I AC
System Version: -CF
ADDITIONAL INFORMATION
Comment 1 Kalzi 2024-05-03 13:02:24 UTC
Created attachment 169134 [details]
another screenshot
Comment 2 Kalzi 2024-05-03 13:02:46 UTC
Created attachment 169135 [details]
another screenshot
Comment 3 Zamundaaa 2024-05-03 21:37:34 UTC
Please attach the output of drm_info before, and after triggering the issue
Comment 4 Michael Butash 2024-05-05 00:26:37 UTC
Is it DP output to DP input, or some mode conversion to HDMI?  

I have this happen almost clockwork after a suspend awaken, reboot, even just a glitch of the power to the dock or something, and seems to come largely from having to use DP on dock to HDMI on TV conversion.  Often I'll see the display after reset come up instead of my Samsung TV's I use to display as generic "NVidia 640x480", and is usually all xrandr sees as well, indicating like the conversion chip in the cable/adapter glitches and EDID data doesn't resolve correctly on the host.  I often have to end up unplugging physically and resetting the DP end of the cable/adapter to fix it.

With my laptop dock with only DP out, this got annoying and problematic enough I bought specific EDID spoofers to keep this from changing any more than needed, but still occasionally I need to reset power to those as well, even re-seat the cable to get it back to sanity.  I've never had actual DP displays to see if this is any better, but HDMI-only displays are certainly a curse and four-letter word.

Quite annoying using ANY sort of conversion for me between DP and HDMI.  This has been going on damn near a decade for me I've dealt with in various ways across various devices, but it never seems to get better with adapters, video cards, docks, or any combination of.
Comment 5 Kalzi 2024-05-06 20:51:49 UTC
Created attachment 169249 [details]
drm_info_before
Comment 6 Kalzi 2024-05-06 20:52:17 UTC
Created attachment 169250 [details]
drm_info_during
Comment 7 Kalzi 2024-05-06 20:52:40 UTC
Created attachment 169251 [details]
drm_info_after
Comment 8 Kalzi 2024-05-06 20:53:33 UTC
(In reply to Zamundaaa from comment #3)
> Please attach the output of drm_info before, and after triggering the issue

I have attached three txt files that have the output of drm_info for before, during and after
Comment 9 Zamundaaa 2024-05-06 22:17:22 UTC
(In reply to Michael Butash from comment #4)
> Is it DP output to DP input, or some mode conversion to HDMI?  
> 
> I have this happen almost clockwork after a suspend awaken, reboot, even
> just a glitch of the power to the dock or something, and seems to come
> largely from having to use DP on dock to HDMI on TV conversion.  Often I'll
> see the display after reset come up instead of my Samsung TV's I use to
> display as generic "NVidia 640x480", and is usually all xrandr sees as well,
> indicating like the conversion chip in the cable/adapter glitches and EDID
> data doesn't resolve correctly on the host.  I often have to end up
> unplugging physically and resetting the DP end of the cable/adapter to fix
> it.
That's a NVidia driver bug, the proprietary driver has some issues with reading the EDID sometimes. You can report it at https://forums.developer.nvidia.com/c/gpu-graphics/linux/148


(In reply to Kalzi from comment #8)
> I have attached three txt files that have the output of drm_info for before,
> during and after

Okay, so the driver reports the correct mode list, and KWin has actually set the 640x480 mode. Can you also attach the output of
> kscreen-doctor -o
and
> wayland-info
while the output is wrongly in that 640x480 mode?

What I suspect is happening is that the driver temporarily reports 640x480 as the only supported mode at some point after the display goes to standby, and KWin doesn't automatically switch back to the correct mode (which shouldn't be very complicated to fix). If the display settings doesn't let you set the right mode though, there might be more going on
Comment 10 Kalzi 2024-05-07 00:06:04 UTC
Created attachment 169252 [details]
kscreen-doctor-while
Comment 11 Kalzi 2024-05-07 00:06:29 UTC
Created attachment 169253 [details]
waylandinfo
Comment 12 Kalzi 2024-05-07 00:07:39 UTC
(In reply to Zamundaaa from comment #9)
> (In reply to Michael Butash from comment #4)
> > Is it DP output to DP input, or some mode conversion to HDMI?  
> > 
> > I have this happen almost clockwork after a suspend awaken, reboot, even
> > just a glitch of the power to the dock or something, and seems to come
> > largely from having to use DP on dock to HDMI on TV conversion.  Often I'll
> > see the display after reset come up instead of my Samsung TV's I use to
> > display as generic "NVidia 640x480", and is usually all xrandr sees as well,
> > indicating like the conversion chip in the cable/adapter glitches and EDID
> > data doesn't resolve correctly on the host.  I often have to end up
> > unplugging physically and resetting the DP end of the cable/adapter to fix
> > it.
> That's a NVidia driver bug, the proprietary driver has some issues with
> reading the EDID sometimes. You can report it at
> https://forums.developer.nvidia.com/c/gpu-graphics/linux/148
> 
> 
> (In reply to Kalzi from comment #8)
> > I have attached three txt files that have the output of drm_info for before,
> > during and after
> 
> Okay, so the driver reports the correct mode list, and KWin has actually set
> the 640x480 mode. Can you also attach the output of
> > kscreen-doctor -o
> and
> > wayland-info
> while the output is wrongly in that 640x480 mode?
> 
> What I suspect is happening is that the driver temporarily reports 640x480
> as the only supported mode at some point after the display goes to standby,
> and KWin doesn't automatically switch back to the correct mode (which
> shouldn't be very complicated to fix). If the display settings doesn't let
> you set the right mode though, there might be more going on

attached both. Hope it helps. I still can't change the resolution on the blown out screen, I'd have to find a way to be able to get to the normal screen to change the correct resolution from there
Comment 13 Zamundaaa 2024-05-07 00:20:42 UTC
hmm, those outputs looks all correct - kscreen-doctor knows it's in the small mode, and it's sent to other wayland clients correctly as well. If you set the correct mode with kscreen-doctor, does that work at least? If not, can you set a different resolution first and then the correct one?
Comment 14 Kalzi 2024-05-07 01:55:15 UTC
(In reply to Zamundaaa from comment #13)
> hmm, those outputs looks all correct - kscreen-doctor knows it's in the
> small mode, and it's sent to other wayland clients correctly as well. If you
> set the correct mode with kscreen-doctor, does that work at least? If not,
> can you set a different resolution first and then the correct one?

I'm not sure I know how to set it with screen-doctor. Also, this issue only happens on the monitor that is connected via display port, if that helps at all.
Comment 15 Bug Janitor Service 2024-05-22 03:45:26 UTC
Dear Bug Submitter,

This bug has been in NEEDSINFO status with no change for at least
15 days. Please provide the requested information as soon as
possible and set the bug status as REPORTED. Due to regular bug
tracker maintenance, if the bug is still in NEEDSINFO status with
no change in 30 days the bug will be closed as RESOLVED > WORKSFORME
due to lack of needed information.

For more information about our bug triaging procedures please read the
wiki located here:
https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

If you have already provided the requested information, please
mark the bug as REPORTED so that the KDE team knows that the bug is
ready to be confirmed.

Thank you for helping us make KDE software even better for everyone!
Comment 16 Zamundaaa 2024-05-22 12:37:41 UTC
You can set a mode with kscreen-doctor with
> kscreen-doctor output.1.mode.0
(0 is the number of the mode in the list you want) or
> kscreen-doctor output.1.mode.3840x2160@60
Comment 17 Ed Tomlinson 2024-05-22 19:31:55 UTC
This has just started happening here.  Wayland, primary display is DP-1, no converters/switches involved (DP to DP cable).  Gathering info.
Comment 18 Zamundaaa 2024-05-22 20:33:30 UTC

*** This bug has been marked as a duplicate of bug 484037 ***
Comment 19 Kalzi 2024-05-22 23:58:31 UTC
(In reply to Zamundaaa from comment #16)
> You can set a mode with kscreen-doctor with
> > kscreen-doctor output.1.mode.0
> (0 is the number of the mode in the list you want) or
> > kscreen-doctor output.1.mode.3840x2160@60

I can try for sure, but the screen is so zoomed in I can't barely see or control anything.
Comment 20 Ed Tomlinson 2024-05-23 00:05:46 UTC
When the problem happens and your cursor is on the 640x480 screen, its not possible to move in onto the other screen.  If you select configure display settings, you can select the correct mode but cannot move the primary display since the window just too small.  You cannot select apply since the two displays are not touching...  Only way I have found to fix it is to unplug the primary display to force the cursor onto the secondary, open the dialog on the secondary, reconnect the primary then fix the settings.  It can be a real pita.  I'd really like to understand what changed on here on May 21 to start triggering this bug.   I have a 1440  @165 with hdr and 1080 @60 display. Here is a kscreen-doctor -o and wayland-info for my system.   https://zigbin.io/dfc78e
Comment 21 Nate Graham 2024-05-23 04:39:49 UTC

*** This bug has been marked as a duplicate of bug 484037 ***