I am developing Latte and I think Plasma/KDE stack should find a way to respond to that more consistently. Please correct me if I am missing something. 1. Plasma in order to identify screens and load its desktops accordingly is using QScreen::name() 2. In Latte I used the same approach in order to assign containment ids to screens 3. For KWin I do not know how is handling things ---- [1] / [2] has the issue that the screen name is not consistent, it can break multiple times and at the same time it definitely breaks between X11 and wayland. The same monitor returns a different name when used in X11 and a different name when used in wayland. This situation can create missing workflows/applets/settings for the users because if the screen name is NOT identified properly then all the past settings assigned to it in Plasma and Latte will be lost. In Plasma 5.17, (case [3]) the same problem still occurs with KWin new implementation. The screens assignments are not translated between X11/Wayland. For wayland the user must reasssign the screen settings through plasma systemsettings -> Screens. So I would like to ask if there is a concrete way to identify screens through Qt. I tested any function through QScreen, manufacturer(),model(),serialNumber() none of them returns concrete and trustful results. I tried to search if there is a way to access EDID through Qt but I didnt find any yet... Even though that I have read that EDID is not to be trusted at all times, there are cases that EDID information are faulty sometimes.
There's quite a lot of things in this report There is not a good unique identifier. Within plasma we have a codepath that says if something was on the primary screen and we have a new primary screen move things. This alleviates some of the common issues. There is an issue that on wayland we have even worse screen IDs, and especially they're not consistent with what we see on X. Hopefully support for XdgOuptutV2 will fix that. That needs implementing in KWayland, Kwin and Qt (which will be Qt5.15 at the earliest) and is a known bug. Assuming Wayland had QScreen::name return the same thing as X is there anything else to fix?
(In reply to David Edmundson from comment #1) > Within plasma we have a codepath that says if something was on the primary > screen and we have a new primary screen move things. This alleviates some of > the common issues. > Latte is also doing the same thing for panels/docks that are assigned to Primary Screen but as you described for those that are assigned to explicit screens, in plasma language when lastScreen>=1 then there is a big chance that the user will lost its settings for the desktop and panels at some point. To give you an example for plasma screen connectors: [ScreenConnectors] 0=HDMI-1 1=eDP-1 2=eDP-1-unknown 3=eDP-1-1 5=Screen26 6=Screen36 7=Screen27 In my system I use only TWO monitors > There is an issue that on wayland we have even worse screen IDs, and > especially they're not consistent with what we see on X. > Hopefully support for XdgOuptutV2 will fix that. That needs implementing in > KWayland, Kwin and Qt (which will be Qt5.15 at the earliest) and is a known > bug. > let's hope > Assuming Wayland had QScreen::name return the same thing as X is there > anything else to fix? in that case things would be improved. Generic screen names on the other hand could create issues also. For example HDMI-1 could be used from two totally different monitors, one at home and one at the office when I connect my laptop to one of them and in such case the user wouldnt be able to set two different environments (of course this goal might not be of plasma design concerning multi-screen environments).
Currently, the best way to identify outputs is by their connector names. It's not perfect. kwin internally tries to take EDID into account. in either case, let's discuss better unique output identifiers on gitlab. but in hindsight, connector names seem like the best option so far.