Bug 361750 - Multi-Screen configuration lost
Summary: Multi-Screen configuration lost
Status: RESOLVED FIXED
Alias: None
Product: KScreen
Classification: Plasma
Component: common (show other bugs)
Version: git
Platform: Neon Linux
: NOR normal
Target Milestone: 1.0
Assignee: Sebastian Kügler
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-14 06:08 UTC by Martin Riethmayer
Modified: 2016-10-15 23:04 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
diff output of complete home directory after powering off/on one of the monitors (4.59 KB, text/plain)
2016-04-14 06:11 UTC, Martin Riethmayer
Details
xrandr -q output before AND after powering off/on (1.84 KB, text/plain)
2016-04-14 06:12 UTC, Martin Riethmayer
Details
Output of hwinfo (just in case, I don't think this actually is a hardware issue) (743.91 KB, text/x-log)
2016-04-14 06:13 UTC, Martin Riethmayer
Details
Log of kded5 debug output, config files of kscreen (734 bytes, application/gzip)
2016-06-17 07:30 UTC, Martin Riethmayer
Details
Screenshot KDE Neon 2016-07-19 (75.47 KB, image/jpeg)
2016-07-19 10:06 UTC, Martin Riethmayer
Details
output of kscreen bug (2016.07-09) (19.19 KB, text/plain)
2016-07-19 10:15 UTC, Martin Riethmayer
Details
Outpu of kscreen-console bug and kscreen config files before, during and after (3.83 KB, application/gzip)
2016-07-19 12:14 UTC, Martin Riethmayer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Martin Riethmayer 2016-04-14 06:08:29 UTC
After powering off and on one monitor, the configuration is completely broken

Reproducible: Always

Steps to Reproduce:
1. Set-up a Multi-Monitor environment: 2 screens (1xHDMI / 1xDVI->HDMI, monitors next to each other)
2. Turn off the left monitor
3. Turn the left monitor back on again

Actual Results:  
The off/on Monitor does not regain it's setup

Expected Results:  
The Multi-Monitor setup should not change in any way.

If it is possible (which I don't know) I'd prefer that there'd be no change at all just because a monitor powers off - only change something if a monitor physically gets disconnected, though I'm afraid that this is probably impossible to distinguish. 

At least there should not be any change if monitors are powered of by Powerdevil or other system-energy-saving tools (I believe that this happened to me before, but I'm not 100% sure).

This is most likely related to https://bugs.kde.org/show_bug.cgi?id=356225 but I'm not on a Laptop and I'm not physically unplugging a monitor (i.e. pulling a cable) but simply powering off/on.

xrandr -q is identical after powering off/on one of the monitors (so xrandr actually get's it right) - could it be some timing issue / race condition?

Additionally, after going to systemsettings and deactivating / re-activating the "broken" monitor, I sometimes do not get my panels back on the original spot.

I'm attaching some files in the next comment(s) (it's not possible to make attachments in the original report, is it?)
Comment 1 Martin Riethmayer 2016-04-14 06:11:03 UTC
Created attachment 98391 [details]
diff output of complete home directory after powering off/on one of the monitors

I copied my complete home directory before powering off one of the monitors.

Powered off one monitor, powered it back on and made a diff of the backup-home-directory and my new "live" home directory. Only .xsession-errors changed, which you can see in the attachment.
Comment 2 Martin Riethmayer 2016-04-14 06:12:25 UTC
Created attachment 98392 [details]
xrandr -q output before AND after powering off/on

There's no change in the output of xrandr -q before and after powering one monitor off, then on again
Comment 3 Martin Riethmayer 2016-04-14 06:13:48 UTC
Created attachment 98393 [details]
Output of hwinfo (just in case, I don't think this actually is a hardware issue)
Comment 4 Martin Riethmayer 2016-04-14 19:34:43 UTC
One more thing (sorry, this just happened and I wasn't aware of this before): 
My system is a two-user-system. If I turn off one monitor while being logged in as user1, the configuration of user2 (not logged in at that moment) is changed and not restored to the correct settings. 

Reproducible: I think it's always, but it's a bit harder to test

Steps to reproduce: 
1.) Set up two (or more) users
2.) Log in as user1
3.) Turn off one monitor, than on again
4.) Log off as user1, log on as user2

Expected results:
The configuration of user2 should not have changed in any way

Actual result:
The multi-monitor setup of user2 is broken
Comment 5 Martin Riethmayer 2016-06-17 07:29:29 UTC
This is still happening with the latest versions of kscreen in OpenSUSE Factory from GIT:

kscreen5: 5.6.90git~20160613T210802~b0e02c9-12.1
libkscreen2-plugin: 5.6.90git~20160614T154913~2792f55-16.1

Steps to reproduce:

1.) Start a VirtualBox VM with up-to-date OpenSUSE factory and two monitors for the VM
2.) Place the monitors side-by-side in KCM
3.) Go to a konsole and run "xrandr --output VGA-2 --off", then "xrandr --output VGA-2 --auto"

Expected result:
The monitors should be configured side-by-side again

Actual result:
The monitors are in "clone" mode

Reproducible:
Always

I'll attach the kscreen log. I've set kscreen.*=true in qtdebugging.ini and restarted kded5.
I'll also attach the config files after each step, e.g. the initial state is "xyz.0", after applying the side-by-side config once in KCM "xyz.1", second apply is "xyz.2", xrandr off is "xyz.3" and xrandr auto is "xyz.4"

At the time of restarting kded5, my monitors where in "clone" mode (config file ".0"), so I went to the KCM and positioned them side-to-side. After hitting "Apply" once, the config is saved twice (e.g. the log was written up to and including line 16) (config file ".1")
The KCM still believes that there are changes to apply, so after hitting "Apply" for the second time, the log gets written up to and including line 24. (config file ".2")
After running "xrandr --output VGA-2 --off", log is written including line 32 (config file ".3")
After running "xrandr --output VGA-2 --auto", log is written until the last line. (config file ".4")

I noted that the filename of the kscreen config is always the same - I don't know if this is the way it's supposed to be?
Comment 6 Martin Riethmayer 2016-06-17 07:30:48 UTC
Created attachment 99544 [details]
Log of kded5 debug output, config files of kscreen
Comment 7 Martin Riethmayer 2016-06-20 07:42:25 UTC
This is also happening in KDE Neon ( neon-devedition-gitstable-20160619-1048-amd64.iso )
Comment 8 Martin Riethmayer 2016-07-06 13:10:36 UTC
Still happening in neon-useredition-20160705-0929-amd64 and also openSUSE Tumbleweed (5.7.0)

It has improved slightly as long as I don't turn of the primary monitor. However, when I turn off primary, everything is still misconfigured when turning it back on again:
- panels gone or on the wrong screen
- second user's configuration (not logged in at that time) scrambled: sometimes with a black background, no panels, I can see the mouse but can't right click, sometimes only the panels are misconfigured, sometimes
- in the VM, monitors are still set to clone instead of side-by-side after off/on

Unfortunately, http://vizzzion.org/blog/2016/05/multiscreen-in-plasma-5-7-and-beyond/ did not solve this
Comment 9 Martin Flöser 2016-07-06 13:39:21 UTC
Adding sebas for further investigation.
Comment 10 Martin Riethmayer 2016-07-19 10:03:59 UTC
It's getting a bit weird now - latest KDE neon dev stable with apt-get update and apt-get upgrade:

The initial bug (kind of) persists: after xrandr --off and xrandr --auto of VGA-2 (in the VirtualBox VM) my screen configuration is broken. I had set an empty panel on screen two, now both panels are shown on both screens, the konsole-window is shown on both screens (and in sync when typing) BUT the mouse courser is in only one screen and can be moved as if they are side-by-side.

Again: everything (including the KCM kscreen config) appears to have the two screens in "Clone" mode - except the mouse courser which I can move from left to right screen and is only shown in one screen.

I also noticed that the resize-handle of the mouse is appearing a couple of pixels to the right and to the bottom of where they should actually appear (I'll attach a screenshot).

If I update the config in the KCM the panels appear in the correct screen. 

Note: xrandr can only turn off VGA-2 in this snapshot, trying to turn off VGA-1 has an effect in the KCM only (where the resolution of VGA-1 is increased and the display is labelled to be disabled (i.e. the "Enabled" checkbox is off)) but the screen actually stays active.

I'll also attach the output of "kscreen-console bug"
Comment 11 Martin Riethmayer 2016-07-19 10:06:10 UTC
Created attachment 100164 [details]
Screenshot KDE Neon 2016-07-19

"Cloned" desktop (except mouse cursor) and resize-handle misplaced
Comment 12 Martin Riethmayer 2016-07-19 10:15:43 UTC
Created attachment 100165 [details]
output of kscreen bug (2016.07-09)
Comment 13 Sebastian Kügler 2016-07-19 10:49:45 UTC
Thanks for the report, could you attach the configurations in ~/.local/share/kscreen (please keep the file name intact)?
Comment 14 Martin Riethmayer 2016-07-19 12:14:47 UTC
Created attachment 100166 [details]
Outpu of kscreen-console bug and kscreen config files before, during and after
Comment 15 Martin Riethmayer 2016-10-15 23:04:42 UTC
This is no longer happening in Plasma 5.8.0, Qt 5.7.0.

Marking as resolved fixed - thanks for your work on MultiScreen-Issues!