Dual monitor loses settings after screen sleep

Bug #1573345 reported by Richard Johnson on 2016-04-22
110
This bug affects 23 people
Affects Status Importance Assigned to Milestone
kscreen
New
Medium
kscreen (Ubuntu)
Undecided
Unassigned

Bug Description

If I leave my computer until the desktop locks & then the screen goes black, when I log back in I still have dual monitors. however my config isn't used. It goes to using laptop display as main display & HDMI as a secondary display. Weird thing is, it does use the screen positioning portion of the config & the resolution, just moves bar to other screen & HDMI screen is just black. This happens every time, so yes it is reproducible.

Reproducible: Always

Steps to Reproduce:
1. Let screen lock & go black (aka sleep)
2. Move mouse to wake screen up
3. Log in to unlock desktop

Actual Results:
HDMI is no longer primary, laptop screen becomes primary. HDMI screen doesn't have desktop background settings nor panel, nor right click functions.

Expected Results:
My display settings should be used where HDMI is primary & laptop is secondary. Plasma panel should be on the HDMI screen & not the laptop screen.

My current work around is after unlocking the desktop log out & log back in. Everything goes back to normal until the next time the screen goes to sleep.

If I leave my computer until the desktop locks & then the screen goes black, when I log back in I still have dual monitors. however my config isn't used. It goes to using laptop display as main display & HDMI as a secondary display. Weird thing is, it does use the screen positioning portion of the config & the resolution, just moves bar to other screen & HDMI screen is just black. This happens every time, so yes it is reproducible.

Reproducible: Always

Steps to Reproduce:
1. Let screen lock & go black (aka sleep)
2. Move mouse to wake screen up
3. Log in to unlock desktop

Actual Results:
HDMI is no longer primary, laptop screen becomes primary. HDMI screen doesn't have desktop background settings nor panel, nor right click functions.

Expected Results:
My display settings should be used where HDMI is primary & laptop is secondary. Plasma panel should be on the HDMI screen & not the laptop screen.

My current work around is after unlocking the desktop log out & log back in. Everything goes back to normal until the next time the screen goes to sleep.

Changed in kscreen:
importance: Unknown → Medium
status: Unknown → New
JohnEverest (john-everest) wrote :

I have this bug. It was in Kubuntu 15.04 and 15.10. It occurs after some system changes and often after an update. I have not been able to find exactly what changes cause the loss of configuration.

I have dual monitors on an Nvidia GTX750 graphics card.

this sounds like your XServer "loses" the output - which should not happen on power management. Could you please check whether that's the case in e.g. /var/log/Xorg.0.log?

G. Guzmics (g4b) wrote :

I think I can confirm this.
I did not have this behaviour in 15.04, which I used until recently with the same setup for years.

When I upgraded to xenial, I got the same behaviour, just the other way around: I do have primary screen set to the laptop (LVDS1), while my monitor is secondary (using a larger resolution).
Upon disconnecting HDMI and closing the lid, plasmas main bar gets resized as if its on the external monitor (so it gets moved over and back?), reconnecting hdmi with closed lid however moves primary screen to the monitor - otherwise I would not have even realized, why the main bar gets resized in such a weird fashion.

Logging out and back in fixes the problem.
Graphics card is intel.

cengopon (pognonec) wrote :

Similar here I guess:
Dual screen (different resolutions and sizes). After sleep, windows that were opened are not found were they were (on the other screen, and on other workspace).

Something else: sometimes wake up does not work properly. Have to go TTY and back to GUI to get my desktop.

This is with Ubuntu 16.10, NVIDIA GF119, driver NVIDIA 367.57

Mike (mikemilleris) wrote :

Kubuntu 16.04, KDE plasma 5.5.5, Qt 5.5.1

Using Sky Lake Integrated Graphics with driver=i915_bpo

Using dual monitors with different configurations and resolutions. On waking the screens the desktop shown on HDMI2 monitor crashes. The background is black and the KDE panel is gone. The primary display is unaffected. I am still able to run application windows on the crashed desktop and the app windows will take up the space of the missing panel. To resolve I run

killall plasmashell; sleep 3; plasmashell

This brings the desktop wallpaper and panel back as expected and application windows on the crashed desktop will resize to fit the panel.

K4LiN (kalinq) wrote :

Hi,

I think I had similar issue. Mine was more related to suspend on lid close, but maybe you'll find something useful. My second screen position was resetting and overlaying primary laptop screen after resuming from suspend.

I noticed that in my journalctl that during lid close kscreen.kded is sending

"Lid closed, waiting to see if the computer goes to sleep..."
(https://github.com/KDE/kscreen/blob/master/kded/daemon.cpp#L291)

After timeout, which is set here btw:

m_lidClosedTimer->setInterval(1000);
(https://github.com/KDE/kscreen/blob/master/kded/daemon.cpp#L110)

it triggered this code:

"Lid closed without system going to suspend -> turning off the screen"
(https://github.com/KDE/kscreen/blob/master/kded/daemon.cpp#L324)

which is causing turning off the screen and saving info about that in new config. Then, after resume from suspend, position of second monitor is set to (0,0) and is overlaying the primary one..

The thing is that it should not trigger that function on timeout, because my system is going to suspend and counting down should be stopped. The thing is that function which is responsible for stopping the timer is not triggering.
(https://github.com/KDE/kscreen/blob/master/kded/daemon.cpp#L125)

And that is because of other error during kscreen daemon start:
kscreen.kded: PowerDevil SuspendSession action not available!
kscreen.kded: "The name org.kde.Solid.PowerManagement was not provided by any .service files"
(https://github.com/KDE/kscreen/blob/master/kded/device.cpp#L77)

I am not very familiar with all that stuff, but it looks like kscreen daemon is starting too soon and there's no power devil yet, so kscreen deamon doesn't have a reference to powerdevil "aboutToSuspend" signal or something...

Anyway. When I reload kscreen in KDE settings or from command line - suspend on lid close is working as expected.

Adding this script to KDE autostart works for me as an workaround of the issue:

sleep 10 && qdbus org.kde.kded5 /kded org.kde.kded5.unloadModule kscreen && qdbus org.kde.kded5 /kded org.kde.kded5.loadModule kscreen

Best!

Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in kscreen (Ubuntu):
status: New → Confirmed
AB (aborka) wrote :

This is totally happening for me since a long while now. It was there in 17.x , it is there in 18.04 beta.
No matter if we use KDE or Cinnamon.
No matter if we use noveau or NVIDIA drivers.

I have 2 monitors for my desktop, a big one in front and a smaller one on the left. The big one is supposed to be the main desktop screen.

Once the screen saver timer kicks in to turn off the monitors, the big one never comes back to life after entering the password (can only enter it on the secondary-left side monitor). The big one stays without any image, it even says there is no signal when turned on/off.

Have to reboot to fix it.

AB (aborka) wrote :

update: Executing "xset -dpms" at startup
(System Settings -> Startup and Shutdown -> Automatically Started Applications)
solves the problem (on KUbuntu 18.04 Beta + NVIDIA-390 Drivers, didn't test the other mentioned ones) for me.

Kenny Stier (kestier19) wrote :

I have the same issue, only I'm running the 18.04 beta on Gnome.
I have yet to try the workaround.

Kenny Stier (kestier19) wrote :

I can confirm that the "Executing "xset -dpms" at startup" workaround fixes the issue for me. I don't believe the issue is with kscreen though, as I'm running a Gnome stack and had the same issue starting with 18.04.

Vlad (servervd) wrote :

I used to use two screens with outputs on VGA and DP(with converter to HDMI as monitor has only HDMI input) and this worked fine as long as I used it. Now I have upgraded screen and am using two DP where one screen is 4k and other is using DP2HDMI(same screen as used before).

Previous configuration was fine as screens came up quite swiftly but now my 4k screen takes longer to show up and this messes up whole config. (Cairo-dock is showing on left screen in the middle when mouse over right screen's edge etc..).

I believe this whole thing is down to timing when xorg is expecting all screens be ready to accept signal and reply with "Ready" signal but first screen responds faster and second may not respond in time and xorg believes that screen is off or not available so adjust config accordingly.

I don't know what dpms at startup does but I can live with this bug for now as all it does, shuffles my windows all over the place and cairo dock can be reconfigured quickly.

This bug should be submitted to xorg not kscreen I guess.

CPU: Intel® Core™ i5-3570 CPU @ 3.40GHz × 4
GPU: Intel® Ivybridge Desktop
Base Sys: Debian GNU/Linux 9 (stretch) 64-bit
Gnome: Ver 3.22.2

Rion (rion4ik) wrote :
Jeff.m (vsteel) wrote :

I have this problem. Everything works great with my two monitor setup until my screen blanker comes on. After I wake the system (which my secondary monitor seems to wake up a couple of seconds faster) when I click the application launcher, the screen opens up on my secondary monitor. All windows I open show up on the secondary monitor. If I log out and in that will fix the issue and things will open on the correct monitor.

Nivdia driver 410.78 Nvidia 2080 video card.
Primary monitor: Dell AW3418DW on display port. 3440x1440 resolution
Secondary monitor: Dell 2407WFP on HDMI 1920x1200 resolution

Operating System: Kubuntu 18.10
KDE Plasma Version: 5.14.4
Qt Version: 5.11.1
KDE Frameworks Version: 5.52.0
Kernel Version: 4.18.0-12-generic
OS Type: 64-bit
Processors: 16 × AMD Ryzen 7 1800X Eight-Core Processor
Memory: 31.4 GiB of RAM

This is reproducible every time.

swisswuff (wuff) wrote :

Since I started to run xset -dpms, now also as part of a startup script, the problem seems to have gone. Otherwise it was specifically there, when I connected an external monitor to my laptop, using the display port connector. Using the HDMI connector would not provoke the error, which was having all applications closed when simply locking the display using WINDOWS-L or by mouse/menu. The display port connector was the one to use to get the really good resolution going though.

FiNeX (finex) wrote :

I'm experiencing the same bug on Arch Linux when one monitor is connected using Display Port (and two with DVI).

Eugene (tsura-evgeniy) wrote :

I had the same issue, my system:
Linux 4.15.0-45-generic #48-Ubuntu SMP Tue Jan 29 16:28:13 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux
Steps:
 - connect and external monitor via HDMI
 - disconnect external monitor, select laptop monitor only
 - put system to sleep mode
 - wake up system, enter login and password in prompt
Result:
 - screen is black, i need to connect external HDMI monitor and choose "laptop only" in dialog on external display to activate laptop display
This issue reproduces every time after system sleep. Even if i choose laptop only every time.

I can confirm this bug too. Using MSI GS 73 with Ubuntu 18.04.2 + latest official kubuntu desktop.
The notebook has 4k display and I'm using external dispaly LG 27UL850-W, which is 4k too.

As it was mentioned in the thread, it seems to be related to the "Screen energy saving" checkbox in the "Power managment settings". Once the timeout for this option passes both displays goes to power saving mode and becomes blank black. After you resume a session by moving a mouse, you can actually notice, how all windows first goes to the laptop display, then, all windows moves to external display.

This is a MAJOR usability bug. Need to manually re-position all windows again and again.

Using `xset -dpms` indeed seems to fix the problem, however, the external display does not become blank. This is not healthy for the display's matrice - in the manual, they recommend to not keep the same image on the screen for too long.

Anyone know a workaround similar to `xset -dpms` but with external screen blanking?

I've just checked and Gnome does not suffer from this bug.

`Bug #1573345 reported by Richard Johnson on 2016-04-22`

Any chance this issue can be solved properly? Is this tracker monitored by KDE developers at all?

Joshua Ogburn (ogburn-joshua) wrote :

This is affecting me too.

OS: Linux Mint 19.2 Cinnamon,
Kernel: 4.15.0-58-generic,
GPU: Advanced Micro Devices, Inc. [AMD/ATI] Ellesmere [Radeon RX 470/480/570/570X/580/580X]

Vyacheslav N. Boyko (bvn13) wrote :

Have the same annoying issue on Ubuntu 18.04.3 LTS

kernel 5.0.0-29-generic
Gnome 3.28.2

I have tried to fix it with xrandr with no result.

Also I have investigated changes of ~/.config.monitors.xml - it does not changes when this bug occurres.

Jussi (jusaus) wrote :

Confirmed here too.

Deepin 15.11
4.15.0-30deepin-generic
Intel HD5500

Marco Seravalli (mseravalli) wrote :

Same issue

Debian rodete
Linux 4.19.67-2rodete2-amd64
Cinnamon 3.8.8
NVIDIA Driver Version 430.50

Stefan Haubenthal (polluks) wrote :

annoying

Mint 19.2
4.15.0-70-generic
Mate
Intel Corporation Device 3ea5

Jeff.m (vsteel) wrote :

I have this issue, even my sound preferences change. I have my onboard sound as default and after waking the monitors it defaults back to the HDMI sound device.

Graphics card - NVIDIA 2080
NVIDIA driver version - 440.36
Monitors - Dell AW3418DW (DP-4) and a DELL2407WFP (HDMI-0) the HDMI display is physically rotated 90 degrees clockwise
Operating System: Kubuntu 19.10
KDE Plasma Version: 5.17.4
KDE Frameworks Version: 5.64.0
Qt Version: 5.12.4
Kernel Version: 5.3.0-24-generic
OS Type: 64-bit
Processors: 16 × AMD Ryzen 7 3800X 8-Core Processor
Memory: 31.3 GiB of RAM

jp (jorp) wrote :

I might not belong here, but I come with some additional info. I've had this same issue as well with xfce. I also do believe it may have to do with xorg.

I've opened this bug report with xfce (although it may not be filed correctly):
https://bugzilla.xfce.org/show_bug.cgi?id=16430

and I found this related forum post here:
https://forum.xfce.org/viewtopic.php?pid=56538#p56538

Monitors: 3x ASUS VS239
OS: Fedora 31
Xfce 4.14

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.