Bug 462050

Summary: Settings for 3 external screens connected via DisplayLink dongle get lost after each reboot
Product: [Plasma] KScreen Reporter: ProstMeister <colombo.gab>
Component: commonAssignee: kscreen-bugs-null <kscreen-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: normal CC: colombo.gab, dpbasti, florian, nate
Priority: NOR    
Version First Reported In: 5.26.3   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description ProstMeister 2022-11-20 07:49:01 UTC
SUMMARY
***
Screen settings get lost each time you reboot. No matter if you change the screen settings by enabling/disabling a specific screen, rearranging the screen positions, setting a particular screen as primary: after rebooting, the settings will revert to default.
I'm using an ASUS laptop with a DisplayLink dongle and 3 HDMI monitors. 2 of them are connected to the dongle, the 3rd one is connected to the laptop HDMI port. I'm not using the laptop screen (it sits on my desk with its lid closed).
This is my normal setup:
*. 2 external HDMI screens are set side-to-side, with the left one being the primary display;
*. The 3rd external HDMI screen is set on the bottom of the first two, centered with respect of the aforementioned couple of screens;
*. The laptop internal screen is disabled.

Each time I reboot, the laptop internal screen reverts to enabled and primary, and the 3rd external monitor is moved far on the left side. When entering power saving mode (not sleep mode, the screens just turn off), the screen settings are retained.

Every time I set the desired arrangement again, a new config file is created within ~/.local/share/kscreen/. I can post any of them, if needed. 
The various config files created every time are identical (just compared 2 of them with Kompare).
It seems that kscreen just ignores any previously created config file and keeps creating a new one every time you change your screens settings.

This worked before, I started observing this behavior from Plasma 5.26.0. 

***
STEPS TO REPRODUCE
1. Set the screen according your desired configuration; 
2. Apply the layout and select "keep";
3. Reboot;
4. Observe that the screen arrangement reverted to default.
5. Observe that a new file has been created into ~/.local/share/kscreen/

OBSERVED RESULT
The screen layout reverts to default after a reboot.

EXPECTED RESULT
The screen layout is kept as it is between reboots.

SOFTWARE/OS VERSIONS
Kernel version: 6.0.9-Arch1-1
KDE Plasma Version: 5.26.3 
KDE Frameworks Version: 5.100.0
Qt Version: 5.15.7
Session: X11

ADDITIONAL INFORMATION
kscreen-doctor -o output BEFORE fixing the screen settings:
Output: 66 eDP1 enabled connected primary Panel Modes: 72:1920x1080@60*! 190:1680x1050@60 193:1280x1024@60 201:1024x768@60 205:800x600@60 206:800x600@56 213:640x480@60 1574:1400x1050@60 1575:1600x900@60 1576:1600x900@60 1577:1600x900@60 1578:1400x900@60 1579:1400x900@60 1580:1280x960@60 1581:1368x768@60 1582:1368x768@60 1583:1368x768@60 1584:1280x800@60 1585:1280x800@60 1586:1280x720@60 1587:1280x720@60 1588:1280x720@60 1589:1024x576@60 1590:1024x576@60 1591:1024x576@60 1592:960x540@60 1593:960x540@60 1594:960x540@60 1595:864x486@60 1596:864x486@60 1597:864x486@60 1598:720x405@60 1599:720x405@60 1600:720x405@59 1601:640x360@60 1602:640x360@59 1603:640x360@60 Geometry: 0,0 1920x1080 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown primary
Output: 67 DP1 disabled disconnected  DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown 
Output: 68 HDMI1 disabled disconnected  HDMI Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown 
Output: 69 HDMI2 enabled connected  HDMI Modes: 73:1920x1200@60*! 187:1920x1080@60 188:1920x1080@50 189:1920x1080@60 192:1280x1024@75 193:1280x1024@60 195:1152x864@75 196:1280x720@60 197:1280x720@50 198:1280x720@60 199:1024x768@75 201:1024x768@60 204:800x600@75 205:800x600@60 207:720x576@50 208:720x480@60 209:720x480@60 210:640x480@75 212:640x480@60 213:640x480@60 214:720x400@70 1604:1920x1080@60 1605:1920x1080@50 1606:1920x1080@24 1607:1920x1080@60 1608:1920x1080@24 1609:1600x1200@60 1610:720x576@50 1611:720x480@60 1612:720x480@60 Geometry: 950,1080 1920x1200 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown 
Output: 70 VIRTUAL1 disabled disconnected  Unknown Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown 
Output: 185 DVI-I-2-1 enabled connected  DVI Modes: 187:1920x1080@60*! 188:1920x1080@50 189:1920x1080@60 190:1680x1050@60 191:1600x900@60 192:1280x1024@75 193:1280x1024@60 194:1440x900@60 195:1152x864@75 196:1280x720@60 197:1280x720@50 198:1280x720@60 199:1024x768@75 200:1024x768@70 201:1024x768@60 202:832x624@75 203:800x600@72 204:800x600@75 205:800x600@60 206:800x600@56 207:720x576@50 208:720x480@60 209:720x480@60 210:640x480@75 211:640x480@73 212:640x480@60 213:640x480@60 214:720x400@70 Geometry: 1920,0 1920x1080 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown 
Output: 246 DVI-I-3-2 enabled connected  DVI Modes: 187:1920x1080@60*! 188:1920x1080@50 189:1920x1080@60 190:1680x1050@60 191:1600x900@60 192:1280x1024@75 193:1280x1024@60 194:1440x900@60 195:1152x864@75 196:1280x720@60 197:1280x720@50 198:1280x720@60 199:1024x768@75 200:1024x768@70 201:1024x768@60 202:832x624@75 203:800x600@72 204:800x600@75 205:800x600@60 206:800x600@56 207:720x576@50 208:720x480@60 209:720x480@60 210:640x480@75 211:640x480@73 212:640x480@60 213:640x480@60 214:720x400@70 Geometry: 3840,0 1920x1080 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown 
Output: 279 DVI-I-4-3 disabled disconnected  DVI Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown 
Output: 312 DVI-I-5-4 disabled disconnected  DVI Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown 


kscreen-doctor -o AFTER fixing the screen settings:
Output: 66 eDP1 disabled connected  Panel Modes: 72:1920x1080@60! 190:1680x1050@60 193:1280x1024@60 201:1024x768@60 205:800x600@60 206:800x600@56 213:640x480@60 1574:1400x1050@60 1575:1600x900@60 1576:1600x900@60 1577:1600x900@60 1578:1400x900@60 1579:1400x900@60 1580:1280x960@60 1581:1368x768@60 1582:1368x768@60 1583:1368x768@60 1584:1280x800@60 1585:1280x800@60 1586:1280x720@60 1587:1280x720@60 1588:1280x720@60 1589:1024x576@60 1590:1024x576@60 1591:1024x576@60 1592:960x540@60 1593:960x540@60 1594:960x540@60 1595:864x486@60 1596:864x486@60 1597:864x486@60 1598:720x405@60 1599:720x405@60 1600:720x405@59 1601:640x360@60 1602:640x360@59 1603:640x360@60 Geometry: 0,0 1920x1080 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown 
Output: 67 DP1 disabled disconnected  DisplayPort Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown 
Output: 68 HDMI1 disabled disconnected  HDMI Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown 
Output: 69 HDMI2 enabled connected  HDMI Modes: 73:1920x1200@60*! 187:1920x1080@60 188:1920x1080@50 189:1920x1080@60 192:1280x1024@75 193:1280x1024@60 195:1152x864@75 196:1280x720@60 197:1280x720@50 198:1280x720@60 199:1024x768@75 201:1024x768@60 204:800x600@75 205:800x600@60 207:720x576@50 208:720x480@60 209:720x480@60 210:640x480@75 212:640x480@60 213:640x480@60 214:720x400@70 1604:1920x1080@60 1605:1920x1080@50 1606:1920x1080@24 1607:1920x1080@60 1608:1920x1080@24 1609:1600x1200@60 1610:720x576@50 1611:720x480@60 1612:720x480@60 Geometry: 862,1080 1920x1200 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown 
Output: 70 VIRTUAL1 disabled disconnected  Unknown Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown 
Output: 185 DVI-I-2-1 enabled connected primary DVI Modes: 187:1920x1080@60*! 188:1920x1080@50 189:1920x1080@60 190:1680x1050@60 191:1600x900@60 192:1280x1024@75 193:1280x1024@60 194:1440x900@60 195:1152x864@75 196:1280x720@60 197:1280x720@50 198:1280x720@60 199:1024x768@75 200:1024x768@70 201:1024x768@60 202:832x624@75 203:800x600@72 204:800x600@75 205:800x600@60 206:800x600@56 207:720x576@50 208:720x480@60 209:720x480@60 210:640x480@75 211:640x480@73 212:640x480@60 213:640x480@60 214:720x400@70 Geometry: 0,0 1920x1080 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown primary
Output: 246 DVI-I-3-2 enabled connected  DVI Modes: 187:1920x1080@60*! 188:1920x1080@50 189:1920x1080@60 190:1680x1050@60 191:1600x900@60 192:1280x1024@75 193:1280x1024@60 194:1440x900@60 195:1152x864@75 196:1280x720@60 197:1280x720@50 198:1280x720@60 199:1024x768@75 200:1024x768@70 201:1024x768@60 202:832x624@75 203:800x600@72 204:800x600@75 205:800x600@60 206:800x600@56 207:720x576@50 208:720x480@60 209:720x480@60 210:640x480@75 211:640x480@73 212:640x480@60 213:640x480@60 214:720x400@70 Geometry: 1920,0 1920x1080 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown 
Output: 279 DVI-I-4-3 disabled disconnected  DVI Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown 
Output: 312 DVI-I-5-4 disabled disconnected  DVI Modes: Geometry: 0,0 0x0 Scale: 1 Rotation: 1 Overscan: 0 Vrr: incapable RgbRange: unknown
Comment 1 Nate Graham 2022-11-29 22:24:27 UTC
Does this happen if you connect the monitors directly? Or at least, as many as your laptop has internal ports for? These dongles are often really bad about this kind of thing. The kscreen-doctor output indicates that it's telling the system that one screen is DisplayPort, one is HDMI, and one is DVI, despite all three being HDMI screens. It's quite possible that the dongle is internally assigning each screen a different ID on every login, which we've also seen before.
Comment 2 ProstMeister 2022-11-30 13:25:08 UTC
(In reply to Nate Graham from comment #1)
> Does this happen if you connect the monitors directly? Or at least, as many
> as your laptop has internal ports for? These dongles are often really bad
> about this kind of thing. The kscreen-doctor output indicates that it's
> telling the system that one screen is DisplayPort, one is HDMI, and one is
> DVI, despite all three being HDMI screens. It's quite possible that the
> dongle is internally assigning each screen a different ID on every login,
> which we've also seen before.

I didn't try that, but I will and let you know.
Anyhow, I don't think it's related to the DisplayLink dongle, for the following reasons:
1. As I stated, this has been working before using exactly the same setup (same laptop, same distro, same set of monitors, same dongle), it got broken with Plasma 2.26;
2. The 2 monitors connected to the dongle retain their relative position and settings;
3. The only monitor that doesn't keep the setup after rebooting (or after logging in/out) is the laptop one: every time it turns back to "enabled" and set back to "primary".
Comment 3 ProstMeister 2022-11-30 17:22:34 UTC
I just tried to reproduce the problem by getting rid of the screens attached to the DisplayLink dongle, and I confirm you that the behaviour is the same: if I disable the laptop screen and reboot or logout and re-login, the laptop screen gets enabled and set as primary. Moreover, also the relative position gets lost, as the 2 screens get superimposed.
Please let me know if you need further information.
Comment 4 Bug Janitor Service 2022-12-15 05:14:22 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 5 Sebastian TurzaƄski 2023-02-19 15:35:07 UTC
I confirm the same behavior - to me it started with Plasma 5.27 on Opensuse Tumbleweed

1. Boot to KDE with a laptop connected to a USB-C docking station with external monitor
2. See both internal (laptop) display and external display working
3. Change preference via kcontrolcenter to switch off internal laptop display (switch to external display only)
4. Reboot


OBSERVED RESULT
Again both displays are on

EXPECTED RESULT
Settings should be persistant
Comment 6 Nate Graham 2023-02-21 19:26:26 UTC
That's a different bug, Sebastian. Can you submit another bug report for it? Thanks!

ProstMeister, can you reproduce this bug with Plasma 5.27?
Comment 7 Bug Janitor Service 2023-03-08 03:45:36 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 8 Bug Janitor Service 2023-03-23 03:45:43 UTC
This bug has been in NEEDSINFO status with no change for at least
30 days. The bug is now 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

Thank you for helping us make KDE software even better for everyone!