Bug 459720 - Regression in 5.26 where Plasma falsely detects new display and checks for "unexisting screen", resetting the display's config
Summary: Regression in 5.26 where Plasma falsely detects new display and checks for "u...
Status: RESOLVED DUPLICATE of bug 459253
Alias: None
Product: KScreen
Classification: Plasma
Component: common (show other bugs)
Version: 5.25.90
Platform: Arch Linux Linux
: VHI major
Target Milestone: ---
Assignee: kscreen-bugs-null@kde.org
URL:
Keywords: regression
Depends on:
Blocks:
 
Reported: 2022-09-27 00:03 UTC by miranda
Modified: 2022-09-28 08:08 UTC (History)
4 users (show)

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


Attachments
Journal logs while issue occurs, see "ADDITIONAL INFORMATION" (24.80 KB, application/gzip)
2022-09-27 00:03 UTC, miranda
Details
Messed up display settings after reboot (1.36 MB, image/jpeg)
2022-09-27 00:06 UTC, miranda
Details
Fixed display settings (963.76 KB, image/jpeg)
2022-09-27 00:07 UTC, miranda
Details

Note You need to log in before you can comment on or make changes to this bug.
Description miranda 2022-09-27 00:03:43 UTC
Created attachment 152449 [details]
Journal logs while issue occurs, see "ADDITIONAL INFORMATION"

SUMMARY
***
I have three displays. A UHD TV, and two FHD desktop monitors. I'd like for the KDE to remember the TVs display configuration, but after every reboot, or after every login/logout, or after every time the TV is turned on (even if the TV is set to a different output), KDE forgets the configuration of that display. This is new to the 5.26 beta, rolling back to 5.25 resolves the issue.
***


STEPS TO REPRODUCE
1. Disable a display and save settings
2. Reboot the PC, or login/logout of KDE, or power on the disabled screen

OBSERVED RESULT
KDE forgets the config that I've set for that display, and places it at 0,0 overlayed on my monitors


EXPECTED RESULT
KDE should remember to keep the display disabled, and not reset its coordinates


SOFTWARE/OS VERSIONS
KDE Plasma Version: 5.25.90
KDE Frameworks Version: 5.98.0
Qt Version: 5.15.6
Kernel: 5.19.11-arch1-1 (64-bit)
Mesa Version: 22.1.7
Operating System: Arch Linux 64-bit
Graphics Processor: Radeon RX 6600 XT
Graphics Server: X11

ADDITIONAL INFORMATION

This used to work on 5.25. This started happening on the 5.26 beta, so this is a regression in behavior and separate from previous display related bugs. I can reliably roll back to 5.25 and the issue goes away.

The TV does not need to be powered on for this to happen, just rebooting the PC while the TV's HDMI is plugged in breaks it. When KDE forgets the TV display's config, it puts the TV's display at coordinates 0,0 and re-enables the display, meaning it's overlayed on my monitors. At my desktop I see a blown up wallpaper and windows that maximize both across and below both my monitors, so I'm stuck looking at a duplicated corner of a bigger display until I reset settings.

I'll attach a couple screenshots so you can get an idea of what I'm talking about. You'll want to zoom in and focus on the display settings window to see what's happened. The second, smaller screenshot shows what I keep having to flip it back to.

I've attached journal output of what occurs when this happens. When observing these logs keep in mind this was tested on the latest main git of plasma-workspace as of yesterday.

At 23:10:54, I powered on the television to view a different HDMI input (though, again, there are other ways to reproduce this, the TV could have been powered off and we just reboot the PC). We see a lot of xrandr output (it should be clear which screen is which, the TV is in 4K and there's two 1080p screens, the primary one set to coordinate 0,0 on the left). Eventually we're seeing some amdgpu blanking interval shenanigans (?), likely from the monitors input flipping off and back on, which is how I visually know everything's about to mess up. Then there's some more attempts at changing the config and a whole heap of spamming "requesting unexisting screen 4" and "requesting unexisting screen 3" and some warnings it couldn't read some null configuration properties? That's when the issue occurs, and it re-enables the TV.

I then wait a minute and change the settings back in the "Display Configuration" window. The only thing I did was click the TV from the dropdown and uncheck "enabled". I hit "apply" and "keep settings" starting at 23:12:27. We get more "unexisting screen" spam and then this fun when it attempts to apply the config:

```
ASSERT: "view->containment()->lastScreen() == id || view->containment()->lastScreen() == -1" in file /home/<username>/Git/plasma-workspace-git/src/plasma-workspace/shell/shellcorona.cpp, line 801
```

Followed by a coredump and what's clearly the shell crashing. Everything but my windows goes blank black and unresponsive for a few seconds (no wallpaper, no panels) before it recovers and puts everything back where it aught to.

Importantly, this particular behavior with the crash is specific to latest git main (5.26.80)! On the regular beta (5.25.90) instead of crashing it just loses the settings of my primary display. Both these issues are besides what I'm primarily concerned about, which is the TV continually getting re-enabled even when it's powered off.

I thought this looked similar to #459448, but they're referring to the "location" settings, rather than the location itself. Still, some awfully similar triggers.

I do not have a `/etc/X11/xorg.conf` file, so that shouldn't be interfering.

I've tested out both the latest release from git master, which includes revert-17774bc4. That did not fix the issue.
I've tested out the rejected branch work/fuf/BUG450443-alternate-way-fix. That did not fix the issue either.
The above two fixed related issues with the shells of displays going missing, but that's not what this is about.

#450068, which is slated for 5.27, may or may not end up fixing this, but that doesn't necessarily explain why this started happening in the 5.26 beta, and I'd prefer not to hold off on an entire release cycle just to test out a guess. I'd almost consider just plug and unplug my TV every time I'd like to use it (as annoying as that'd be when it's across the room and behind a stand in a pile of wires). But I don't think that should be necessary.
Comment 1 miranda 2022-09-27 00:06:28 UTC
Created attachment 152450 [details]
Messed up display settings after reboot
Comment 2 miranda 2022-09-27 00:07:27 UTC
Created attachment 152451 [details]
Fixed display settings
Comment 3 galder 2022-09-27 15:42:05 UTC
could be related to
https://bugs.kde.org/show_bug.cgi?id=459253
Comment 4 Vlad Zahorodnii 2022-09-28 08:08:19 UTC

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