| Summary: | 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 | ||
|---|---|---|---|
| Product: | [Plasma] KScreen | Reporter: | Dan <daniel> |
| Component: | common | Assignee: | kscreen-bugs-null <kscreen-bugs-null> |
| Status: | RESOLVED UNMAINTAINED | ||
| Severity: | major | CC: | dodgexander, nate, plasma-bugs-null, xaver.hugl |
| Priority: | NOR | ||
| Version First Reported In: | 5.18.5 | ||
| Target Milestone: | 1.0 | ||
| Platform: | Kubuntu | ||
| OS: | Linux | ||
| Latest Commit: | Version Fixed/Implemented In: | ||
| Sentry Crash Report: | |||
*** Bug 437973 has been marked as a duplicate of this bug. *** Unfortunately, fixing weird edge cases like this is very difficult with KScreen's config system for X11, which will not be changed anymore to prevent worse regressions. The new system for the Wayland session definitely handles this correctly though. If you still experience such an issue on Wayland anyways, please open a bug report for KWin instead. |
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