My notebook is placed right of the TFT display. Closing the lid switches it off and it comes on when I open the lid. But when I shutdown the system with lid closed this setting is stored and the option enabled gets unchecked. Additionally, KScreen doesn't store the position which is quite annoying since it makes realignment neccessary too. Would be a different bug although. Reproducible: Always Steps to Reproduce: 1. Close lid 2. Restart 3. Lid open does not activates the screen 4. Enable display in KScreen Actual Results: Screen off after reboot Expected Results: Screen on/off depends only on lid position and settings are persistent after restart
What happens here is the that configuration profile for open lid is moved out of the way once it's closed. It would move back if you open the lid while it's running, but if you shut the machine down with the lid closed, the config won't be found on next reboot (with the lid open). (That's what the code does, as far as I can see.) Does this match your observed behavior?
Mostly it does. Me have to wait until the system is fully shut down until the lid can be closed safely. Playing with the lid is very error-prone in respect to Plasma in general. I have control bars on bottom and top of the desktop at both screens. On the notebook there are also some plasmoids showing the system state (i.e. load, hard disc, network). It happens often that the control bars are placed on the first screen after lid close. The plasmoids never move. Sometimes screens are reversed, left/right. So from what you say, moving config files around, which sounds weird, I'd confirm your diagnosis.
Screen configuration and widgets moving around are two different things, I'll concentrate on getting the screen setup right here. Widget moving around needs to be fixed elsewhere (perhaps https://git.reviewboard.kde.org/r/125451/ will help there). I'll have a look at this specific case, though, hopefully we can easily make the lid closing state work better.
I was able to reproduce the problem. We need to check if the lid state has changed when the config was saved last, and restore a config that was saved when the lid was opened if it is. This also makes the positioning work, which isn't saved if only one display is enabled. Proposed patch: https://phabricator.kde.org/D2465
Aaaaaand fixed. Thanks for helping to identify the problem!
(In reply to Sebastian Kügler from comment #5) > Aaaaaand fixed. Thanks for helping to identify the problem! Best comment ever. Thanks for all your work!