Bug 426644 - Screens go black / unresponsive after sleep or lock
Summary: Screens go black / unresponsive after sleep or lock
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: multi-screen (show other bugs)
Version: 5.18.8
Platform: Other Other
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords: efficiency
Depends on:
Blocks:
 
Reported: 2020-09-17 16:37 UTC by agilob
Modified: 2023-06-30 22:14 UTC (History)
19 users (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Display bad (800.88 KB, image/jpeg)
2020-09-20 08:30 UTC, Bob English
Details
Display as it should be (1016.94 KB, image/jpeg)
2020-09-20 08:31 UTC, Bob English
Details

Note You need to log in before you can comment on or make changes to this bug.
Description agilob 2020-09-17 16:37:16 UTC
SUMMARY
Some screens go black and are unresponsive after screen is locked or computer wakes up from sleep.

STEPS TO REPRODUCE
1. Lock screen (timeout?) or choose sleep option manually
2. Wait a moment
3. Login
4. Some screens are black or unresponsive, panel bar in in wrong location, application bar doesn't display screens from current screen as it should

Fix, one of:

1. Go to display settings, move screens around and save, move screens to original location and save again.

2. alt+f2 -> plasmashell --replace


When two option above fail:

3. Reboot


It started happening occasionally ~3 weeks ago. 

EXPECTED RESULT

Operating System: Arch Linux
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.15.1
Kernel Version: 5.8.8-arch1-1
OS Type: 64-bit
Processors: 12 × AMD Ryzen 5 3600 6-Core Processor
Memory: 31.4 GiB of RAM
Graphics Processor: Radeon RX 570 Series

ADDITIONAL INFORMATION

More people reporting similar symptoms here https://www.reddit.com/r/archlinux/comments/iuji67/kde_plasma_sddm_gets_black_screen_with_cursor/
Comment 1 Bob English 2020-09-20 08:30:24 UTC
Created attachment 131796 [details]
Display bad

The problem.
Comment 2 Bob English 2020-09-20 08:31:51 UTC
Created attachment 131797 [details]
Display as it should be

Normal and good
Comment 3 Bob English 2020-09-20 08:33:51 UTC
I am having a similar but likely related problem that started about a week ago:

First of all I have two monitors on the same Nvidea graphics card (proprietary drivers). Stacked on top of each other.  The Desktop at top is secondary at 1920x1080, whereas the Desktop at bottom is primary at 3840x2160.  I made my own wallpapers at those sizes, and each monitor uses the slide show view and wallpapers in their native resolution.

When I first start the computer the OS loads as usual, but after I enter my password, the KDE logo starts in the right place on both monitors, but the one at the top suddenly jumps to the left, and partially off screen.  When the desktop appears, the wallpapers are way off, as are the icons, but the toolbars (on auto hide) are where they belong and work right.

If I let the PC go into power saving mode (STR), when I wake it up it looks the same, but the toolbars go missing, and are nowhere to be found.

Here too running [plasmashell --replace] from the terminal fixes it, but only until the next reboot.

I have attached two screen shots, Good and Bad for reference.  the screen capture utility captures an image of 3840x3762, and not 3840x3240 (the actual total height of both screens together).  I have no idea why that would be.  I have reduced thier size to keep the attachment size down.

Operating System: Arch Linux
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.15.1
Kernel Version: 5.8.10-arch1-1
OS Type: 64-bit
Processors: 4 × Intel® Core™ i5-2500K CPU @ 3.30GHz
Memory: 31.3 GiB of RAM
Graphics Processor: GeForce GTX 1050/PCIe/SSE2

If you need a copy of any system files, please tell me where I will find them, and I will attach them ASAP.

Thanks for all your great work.
Comment 4 ChrisD 2020-11-27 07:06:56 UTC
Currently having a similar issue. Was actually having a more dramatic version where the xserver would crash when locking or sleeping the PC, but I got fed up looking for solutions and finding none so I ended up trying a reinstall. 

On my current install it's not consistent, but generally after some arbitrary amount of inactivity, my main monitor comes up blank with a lock screen showing on the right and left secondary monitors. When I try to unlock, the password field on the right side won't work, but the left side usually will. A couple of times all screens were unresponsive and I had to restart sddm to be able to log in graphically. I've tried everything I can think of to reliably reproduce this or locate some shred of information on what's going wrong, but I'm out of ideas.

Operating System: Kubuntu 20.10
KDE Plasma Version: 5.19.5
KDE Frameworks Version: 5.74.0
Qt Version: 5.14.2
Kernel Version: 5.8.0-29-generic
OS Type: 64-bit
Processors: 12 × Intel® Xeon® CPU E5-1650 v2 @ 3.50GHz
Memory: 31.3 GiB of RAM
Graphics Processor: Radeon RX 580 Series
Comment 5 agilob 2020-11-27 09:34:33 UTC
I think it will be a kernel issue, my problems (OP here) went away after changing display port tables to HDMI.
Comment 6 philip mirabelli 2020-12-04 16:21:10 UTC
Similar problem to the one I am having with version 5.9.11-arch2-1 running plasma version 5.20.4 Qt version 5.15.2 & Kde Frameworks version 5.76.0 on  a fujitsu lifebook U938 running a Mesa UHD graphics 620.  When the notebook is in sleep mode upon reboot the disk sleep plasmashell remains in sleep mode. It exits sleep mode after about 5 minutes. Tried plasmashell --replace but no change.
Comment 7 elman 2020-12-07 14:28:55 UTC
Maybe similar issue here. I have notebook and 2 external monitors connected via docking station. My default config is that notebook display is disabled and I only use external monitors. When I disconnect docking station, display is correctly switched to notebook display. When I reconnect docking station, plasma correctly switches to external monitors and for a brief time (maybe 1 second) I see output and then both external monitors turn black. Nothing I can do but switch to another tty and reboot. However if I disconnect docking station, plasma correctly switches to notebook display.

Arch, Plasma 5.20.4, KF 5.76.0, Qt 5.9.12
Comment 8 elman 2020-12-07 14:29:44 UTC
Forgot to mention I'm using X11.
Comment 9 sebastian.schultz.1991 2021-01-03 03:21:55 UTC
Possibly related issue on Plasma 5.20.4,FW 5.77.0, Qt 5.15.2, Kernel 5.10.4 (Gentoo-x64)

Trying to resume from sleep, display is only cursor on black screen. Can access tty but I am unable to resolve issue.
Comment 10 agilob 2021-08-05 17:18:31 UTC
I no longer have this problem and there was no activity on this ticket for a few months. Does anyone can still reproduce it?
Comment 11 Nik Spyratos 2021-08-28 07:30:32 UTC
I have this issue on a fresh install of Plasma 5.18.7 on Linux Mint 20.2 Uma. Searching for the following shows many years of this issue:

- linux "sddm" black screen after suspend
- KDE black screen on resume after suspend

Some with different solutions. About 2 years ago this was blamed on Nvidia drivers, and further back on the Arch forums (https://bbs.archlinux.org/viewtopic.php?id=166964) it mentions adding exceptions for the greeters to the "background opacity exception list", but the menus have since changed and I can't find anything like this anywhere.

The only common thread I could see here was that sddm or gdm3 were being used and nvidia drivers may be involved. I myself am using sddm and a 2070 Super, and had it happen both on resume from suspend and resume from monitor switchoff after 10min.

Took a look through journalctl but I'm not too clued up there so don't know what I'm looking for.
Comment 12 Nik Spyratos 2021-08-29 08:50:20 UTC
Update: I turned off screen energy saving yesterday and haven't had this issue since. So I'm inclined to say it's related to what I mentioned about the greeter and lock screen.
Comment 13 nl.smart 2021-09-28 15:01:54 UTC
Hi, same issue here.

I set the screen energy saving to switch off after 10 minutes, unfortunately the screen stay off after the switch off, not possible to wake up screen and computer after the switch off.
mouse and keyboard are on, I mean the led are on
hibernate after a period of inactivity is disable…

Operating System: Manjaro 21.1.4 Pahvo
KDE Plasma Version: 5.22.5
KDE Frameworks Version: 5.86.0
Qt Version: 5.15.2
Kernel Version: x86_64 Linux 5.13.19-2-MANJARO
OS Type: 64-bit
Processors: Intel Celeron J4105
Memory: 7.6 GiB of RAM
Graphics Processor: Mesa Intel(R) UHD Graphics 600 (GLK 2)
Comment 14 nl.smart 2021-11-30 07:28:13 UTC
Hi,

The issue is persistent with KDE 

I set the screen energy saving to switch off after 10 minutes, unfortunately the screen stay off after the switch off, not possible to wake up screen and computer after the switch off.
mouse and keyboard are on, I mean the led are on
hibernate after a period of inactivity is disable…

Operating System: Manjaro 21.2.0 Qonos
KDE Plasma Version: 5.23.3
KDE Frameworks Version: 5.88.0
Qt Version: 5.15.2
Kernel Version: x86_64 Linux 5.14.18-1-MANJARO
OS Type: 64-bit
Processors: Intel Celeron J4105
Memory: 7.6 GiB of RAM
Graphics Processor: Mesa Intel(R) UHD Graphics 600 (GLK 2)

I made the test with different x86 devices, same issue.
Comment 15 nl.smart 2021-12-28 19:12:15 UTC
Hi,

I solved the issue by installing the 5.4 LTS kernel
I hope it will be solve with the future kernels...

https://forum.manjaro.org/t/solved-fail-to-restart-after-suspend/96039/11
Comment 16 caleb 2022-04-13 00:56:32 UTC
If anyone wants to troubleshoot, I can reproduce this consistently on my laptop. It is not a kernel issue - happens with 5.15 all the way to 5.17. It is not an Nvidia issue - this laptop is strictly Intel. I can reproduce on Kubuntu 22.04, Fedora 36, and Arch. Close lid or let laptop go to sleep. Laptop wakes, but screen comes back black with occasional flickering. Other desktop environments work as expected.
Comment 17 Bob English 2022-05-26 00:11:27 UTC
Well, for me the problem subsided a while ago after a few updates, but I still have some minor issues with apps all ending up on one screen after sleep, and even some completely off screen with no way to grab them and bring into focus., with a reboot doing the trick for most, accept for a popup from Gnome Evolution that I got lucky and found an edge showing on another desktop!

These and other multi-monitor problems have been annoying me for years, and I am about to reinstall my OS to make some changes and in doing so, will try Wayland.  I sure hope it doesn't turn out to be a disaster!  I will still stick to KDE Plasma though, as Gnome has become cumbersome in getting rid of standard menus (A standard since the first ever GUI) with the hamburger menu just adding clicks and making navigation all messed up, lack of app functionality... and other DE's and bundled apps just not being up to my power user standards.

I built a new box, same OS...:
Operating System: EndeavourOS
KDE Plasma Version: 5.24.5
KDE Frameworks Version: 5.94.0
Qt Version: 5.15.4
Kernel Version: 5.17.9-arch1-1 (64-bit)
Graphics Platform: X11
Processors: 16 × AMD Ryzen 7 5700X 8-Core Processor
Memory: 62.8 GiB of RAM
Graphics Processor: NVIDIA GeForce GTX 1050/PCIe/SSE2
Comment 18 Nate Graham 2022-05-27 14:51:09 UTC
(In reply to Bob English from comment #17)
> Well, for me the problem subsided a while ago after a few updates, but I
> still have some minor issues with apps all ending up on one screen after
> sleep, and even some completely off screen with no way to grab them and
> bring into focus., with a reboot doing the trick for most, accept for a
> popup from Gnome Evolution that I got lucky and found an edge showing on
> another desktop!

That's a different issue from what's reported here. Please report it separately, in another bug report. Thanks!

> These and other multi-monitor problems have been annoying me for years, and
> I am about to reinstall my OS to make some changes and in doing so, will try
> Wayland.  I sure hope it doesn't turn out to be a disaster!  I will still
> stick to KDE Plasma though, as Gnome has become cumbersome in getting rid of
> standard menus (A standard since the first ever GUI) with the hamburger menu
> just adding clicks and making navigation all messed up, lack of app
> functionality... and other DE's and bundled apps just not being up to my
> power user standards.

If you're reinstalling, I might recommend not only trying the Wayland session, but also the Plasma 5.25 beta (or the full release in a month). We did a lot of multimonitor work for that release.

Anyway based on the description, this seems to be Bug 353975.
Comment 19 Nate Graham 2022-05-27 14:51:15 UTC

*** This bug has been marked as a duplicate of bug 353975 ***
Comment 20 caleb 2022-05-27 19:08:39 UTC
I don't see how this is a duplicate bug - 353975 is an issue with multi-monitors. This issue impacts a single monitor after sleep. And it occurs whether I use X11 or Wayland.
Comment 21 Bob English 2022-05-27 20:37:18 UTC
(In reply to Nate Graham from comment #18)
> (In reply to Bob English from comment #17)
> > Well, for me the problem subsided a while ago after a few updates, but I
> > still have some minor issues with apps all ending up on one screen after
> > sleep, and even some completely off screen with no way to grab them and
> > bring into focus., with a reboot doing the trick for most, accept for a
> > popup from Gnome Evolution that I got lucky and found an edge showing on
> > another desktop!
> 
> That's a different issue from what's reported here. Please report it
> separately, in another bug report. Thanks!
> 
> > These and other multi-monitor problems have been annoying me for years, and
> > I am about to reinstall my OS to make some changes and in doing so, will try
> > Wayland.  I sure hope it doesn't turn out to be a disaster!  I will still
> > stick to KDE Plasma though, as Gnome has become cumbersome in getting rid of
> > standard menus (A standard since the first ever GUI) with the hamburger menu
> > just adding clicks and making navigation all messed up, lack of app
> > functionality... and other DE's and bundled apps just not being up to my
> > power user standards.
> 
> If you're reinstalling, I might recommend not only trying the Wayland
> session, but also the Plasma 5.25 beta (or the full release in a month). We
> did a lot of multimonitor work for that release.
> 
> Anyway based on the description, this seems to be Bug 353975.

Beta?  I'm scared!  I can wait, you guys get stuff done real quick, and I may not get around to reinstalling any time soon.

So many little issues with screen/display stuff, it's hard for some of us to understand how they may, or may not be related.  It's why I come here where the pro's are, and don't go to Reddit...
Comment 22 caleb 2022-05-28 23:18:43 UTC
I installed the beta using the PPA for Kubuntu 22.04. Same exact issue - when laptop wakes from sleep, I get a black screen. Occasionally the desktop is available briefly, but it is non-responsive. What I never see is the expected SDDM screen to unlock after sleep.
Comment 23 caleb 2022-06-02 01:11:22 UTC
Since I had 5.25 installed, I went ahead and did some more testing. Really seems to be something going on with SDDM and graphics. Adding nomodeset as a kernel parameter actually makes this issue go away (though it seems to cause other problems).
Comment 24 Alex 2022-12-08 21:50:44 UTC
I'm seeing the same issue on Plasma 5.26 on Debian Testing (Bookworm). Any news about this issue? Or a fix?
Comment 25 Thorolf E.R. Weißhuhn 2023-03-24 18:47:42 UTC
Same here with internal laptop display as secondary screen.

Deleting `~/.local/share` (suggested in the Manjaro forum[*]) worked for a day or so.

Quick workaround: 
In system tray open Display Configuration, click a preset different from your current settings; screen lights up, shows normal display. Click back to your original setting, done.

Manjaro
KDE Plasma 5.26.5
KDE Frameworks 5.103.0
Qt 5.15.8
Kernel 6.1.19-1-MANJARO (64-bit)
Graphics X11
Graphics Processor: Mesa Intel® Xe Graphics

[*] https://forum.manjaro.org/t/only-one-monitor-working-after-latest-update-11-02-22/125876
Comment 26 Thorolf E.R. Weißhuhn 2023-03-25 09:08:15 UTC
Additional observation:

Internal (secondary) screen goes partially black when external hdmi monitor is plugged in. A vertical strip of ~1/8 screen width adjoining the active screen (no overlap in display settings) shows desktop background. Desktop icons (on secondary) absent.

At other test, open windows on internal secondary displayed, only desktop black. 

Everything displayed as expected after tray Display Configuration switch (extend other side, and back).
Comment 27 Nate Graham 2023-03-28 17:14:20 UTC
This original issue was indeed about multi-monitor issues, then various people started reporting similar and likely not-quite--the-same-thing in here, which unfortunately confuses everything.

Let's use this bug report only for the originally reported issue with multiple screens. If you have anything else going on, please submit a new bug report for it.

agilob, is this still an issue on Plasma 5.27 for you? If it is, can you try with a new user account and see if it's fixed there?

Thanks everyone!
Comment 28 Bug Janitor Service 2023-04-12 03:45:51 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 29 Bug Janitor Service 2023-04-27 03:46:01 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!
Comment 30 Mend 2023-06-19 23:06:05 UTC
(In reply to Bug Janitor Service from comment #29)
> 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!

How can I gather information on this? I've had this issue for years on multiple distributions. From KDE's own distro, to Arch, to NixOS. I'm fed up with not being able to put my computer to sleep without having to hold the power button down to hard reset my hardware(very bad for my pc) so anything I can do to get this resolved please let me know.
Comment 31 Thorolf E.R. Weißhuhn 2023-06-22 08:45:20 UTC
(In reply to Thorolf E.R. Weißhuhn from comment #26)
> Additional observation:
> 
> Internal (secondary) screen goes partially black when external hdmi monitor
> is plugged in. A vertical strip of ~1/8 screen width adjoining the active
> screen (no overlap in display settings) shows desktop background. Desktop
> icons (on secondary) absent.
> 
> At other test, open windows on internal secondary displayed, only desktop
> black. 
> 
> Everything displayed as expected after tray Display Configuration switch
> (extend other side, and back).

Please ignore. That seems to be related to screen flicker caused by panel self refresh, and can be mitigated with kernel parameter `i915.enable_psr=0`.
Comment 32 Thorolf E.R. Weißhuhn 2023-06-22 08:52:10 UTC
I see no mention of USB in this thread, so the following may be irrelevant.

USB autosuspend has been suggested as a cause for HDMI adapters downstream on USB.

https://community.frame.work/t/solved-hdmi-screen-black-after-wake-from-hibernation-only-on-left-front-port/31045/8