Bug 434604 - Use of volatile connector IDs to identify monitors can cause newly-plugged-in monitors to inappropriately re-use the configurations of older ones that may not make sense for them
Summary: Use of volatile connector IDs to identify monitors can cause newly-plugged-in...
Status: CONFIRMED
Alias: None
Product: KScreen
Classification: Plasma
Component: common (show other bugs)
Version: 5.18.5
Platform: Kubuntu Linux
: NOR major
Target Milestone: 1.0
Assignee: kscreen-bugs-null@kde.org
URL:
Keywords:
: 437973 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-03-19 04:06 UTC by Dan
Modified: 2022-11-08 23:08 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dan 2021-03-19 04:06:36 UTC
SUMMARY
I have a Dell E6440 laptop with a dual-monitor docking station, with two monitors connected to it via mini-DisplayPort.  I recently upgraded both monitors (but separately, I bought one, then a couple weeks later got another).  Between various unplugging and re-plugging of all the different monitors, I saw multiple problems where, when a particular monitor was plugged in, the system would simply not use that monitor, and would continually say a new monitor was plugged in, then quickly say a monitor has been unplugged, over and over endlessly. It seemed like one of my monitors had gone bad.  But then I saw the same thing with one of the new monitors.

I was able to debug this problem, and determined that the screen configuration was being stored in ~/.local/share/kscreen (which I found odd, and made it really hard to find this, because it seems like most KDE config stuff is in ~/.config these days).  In that directory is one randomly-named JSON file with entries for all the connected monitors, including their ID number, name, refresh rate, size, and position, and other info.  In the "outputs" subdirectory within this directory are files named with those ID numbers, and containing basically the exact same info.

What I found ultimately was that, in the top-level file, there was still an entry for one of my old monitors, and in addition (and I believe this was the actual source of the bug), my two new monitors had the same name (they were both called "DP-1").

I cleaned up this directory, deleting the references to the old monitor, and renaming the two new monitors so they had unique names ("DP-1" and "DP-2", and "eDP-1" for the laptop's screen), and restarted.  Ever since then, I haven't had any trouble, though I have not yet tried undocking and redocking, or unplugging and re-plugging the monitors.

It seems to me that what's needed here is for some logic to ensure that any newly-detected monitor does not have the same name as any other that's already been detected, or if such logic exists, there must be some bug with it.


STEPS TO REPRODUCE
1. Plug in 2 monitors
2. Unplug one, plug in a 3rd
3. Play around with unplugging and replugging the monitors, using different ports

OBSERVED RESULT
System will refuse to use one of the monitors, and constantly change configuration as if a monitor is being plugged in and immediately unplugged 2 seconds later.


EXPECTED RESULT
System should be able to handle any combination of monitor plugging and unplugging into any port.


SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: Kubuntu 20.04.2
(available in About System)
KDE Plasma Version: 5.18.5
KDE Frameworks Version: 5.68.0
Qt Version: 5.12.8
Kernel Version: 5.4.0-67-generic

ADDITIONAL INFORMATION
Dell Latitude E6440, Radeon GPU
Comment 1 Nate Graham 2022-11-08 23:08:28 UTC
*** Bug 437973 has been marked as a duplicate of this bug. ***