Bug 416430 - Plasma 5.18 beta does not save screen layout after reboot
Summary: Plasma 5.18 beta does not save screen layout after reboot
Status: RESOLVED NOT A BUG
Alias: None
Product: KScreen
Classification: Plasma
Component: libkscreen (show other bugs)
Version: 5.17.90
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: kscreen-bugs-null@kde.org
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-01-18 19:03 UTC by Darin Miller
Modified: 2020-04-09 03:06 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
correct config file (1.00 KB, text/plain)
2020-01-22 05:07 UTC, Darin Miller
Details
Mirrored File (1.01 KB, text/plain)
2020-01-22 05:09 UTC, Darin Miller
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Darin Miller 2020-01-18 19:03:52 UTC
SUMMARY
Screens are mirrored on reboot with 5.18 beta.

STEPS TO REPRODUCE
1. Using Kubuntu 19.10 with plasma beta ppa:
sudo add-apt-repository ppa:kubuntu-ppa/beta && sudo apt update && sudo apt full-upgrade -y
2. Set 4K screen as primary left left screen.  Using NVidia Settings, scale 2K screen to 4K to right of 4K screen.
3. Reboot

OBSERVED RESULT
Before reboot: https://imgur.com/lpbWdRz
After reboot: coming soon

EXPECTED RESULT
Save screen layout.


SOFTWARE/OS VERSIONS
Operating System: Kubuntu 19.10
KDE Plasma Version: 5.17.90
KDE Frameworks Version: 5.66.0
Qt Version: 5.12.4
Kernel Version: 5.3.0-26-generic
OS Type: 64-bit
Processors: 8 × Intel® Core™ i7-4771 CPU @ 3.50GHz
Memory: 15.6 GiB of RAM


ADDITIONAL INFORMATION
Comment 1 Darin Miller 2020-01-18 19:13:16 UTC
Strange... 3 consecutive reboots produced mirrored screens.  On the 4th reboot, where I attempted to grab a screenshot of mirrored displays, screens were no longer mirrored but my Font forced dpi was unchecked and defaulted to 96 (was 144 and checked).
Comment 2 Darin Miller 2020-01-18 19:26:26 UTC
5th reboot produced the mirrored screens:
https://imgur.com/tJnA69w
Comment 3 Darin Miller 2020-01-18 19:29:34 UTC
I have assigned the following script to a shortcut to deal with the issue. Note, I also restart plasma as weather widgets fail to initialize and location of other widgets are randomly scattered across the desktop (needs another bug report or search for existing...)

#!/bin/sh
nvidia-settings --assign CurrentMetaMode="DP-0:nvidia-auto-select+0+0"
sleep 1
nvidia-settings --assign CurrentMetaMode="DP-0:nvidia-auto-select+0+0, DP-2:2560x1440+3840+0 {viewportin=3840x2160}"
plasmashell --replace &
Comment 4 Roman Gilg 2020-01-21 13:34:33 UTC
How do the files in $HOME/.local/share/kscreen change before and after reboot?
Comment 5 Darin Miller 2020-01-22 05:07:58 UTC
Created attachment 125292 [details]
correct config file
Comment 6 Darin Miller 2020-01-22 05:09:13 UTC
Created attachment 125293 [details]
Mirrored File

Display and Monitor failed to save new settings to this file.
Comment 7 Darin Miller 2020-01-22 05:15:47 UTC
The files in $HOME/.local/share/kscreen were the problem.  However, after manually sync'ing kscreen with NVidia settings by manually updating System setting -> Display and Monitor, the screen layout failed to save to the corresponding config file after hitting Apply.  

To force save, I had to delete the bad file (file with monitors mirrored) and then run:
  plasmashell --replace

A new file with the same name was regenerated, this time with correct display settings. See above attached files.

Should kscreen "adopt" the resolution changes made via Nvidia settings?  Kscreen does not allow scaling of a 2k screen to 4K resolution on X (at least not on NVidia) and thus I have to use nvidia-settings to accomplish the scaling.

Regardless, the Display and Monitor is failing to save on my system.  I will attempt to replicate on another NVidia system tomorrow.
Comment 8 Roman Gilg 2020-01-22 08:11:56 UTC
After deletion of the files the problem is solved or is the configuration still corrupted on reboot?

Just to make clear that the screens are "mirrored" is not what you want, right?
Comment 9 Darin Miller 2020-01-25 01:56:28 UTC
I never manually mirrored the screens.  Kscreen seems to be working fine when all resolution  and monitor position adjustments are made via kscreen.  

However, kscreen does not detect the current monitor states. So changes made via nvidia-setting are never captured.  I upscale my 2k screen to 4K via nvidia setting as that is not possible with kscreen under xorg.
Comment 10 Darin Miller 2020-04-09 03:06:02 UTC
This appears to be NVidia-settings issue now that I have experience the issue in other circumstance.  Closing the bug.