Bug 205803 - Black screen with mouse after resume from suspend
Summary: Black screen with mouse after resume from suspend
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
Depends on:
Reported: 2009-08-31 17:32 UTC by Sergiu Bivol
Modified: 2016-02-09 17:29 UTC (History)
15 users (show)

See Also:
Latest Commit:
Version Fixed In:


Note You need to log in before you can comment on or make changes to this bug.
Description Sergiu Bivol 2009-08-31 17:32:04 UTC
Version:            (using KDE 4.3.0)
OS:                Linux
Installed from:    Ubuntu Packages

When returning from suspend, I'm sometimes presented with a black screen and a mouse pointer. The pointer changes shape when hovering over editable fields (like the Notes plasmoid).

Doing Alt+F2 and typing 'kwin --replace' brings everything back to normal.
This happens randomly, but can be reproduced after several tries.

Video: Intel x3100 GMA, dual-monitor setup (xrandr).
Comment 1 Martin Flöser 2009-09-01 16:23:37 UTC
you could try alt+shift+f12 to suspend compositing. That might work as well and doesn't require a kwin restart.
Comment 2 Alexander Gran 2009-10-12 00:55:41 UTC

I can confirm this bug, KDE 4.3.2, debian unstable, nvidia Beta 190.36 driver.

alt-shift-f12 works, but obviously composite is disabled then. reenabling doesn't fix the issue, also playing aournd with the settings in system-settings doesn't help. Only restarting kwin helps.

Comment 3 Tobias Wich 2009-12-02 14:22:44 UTC
I think I can restrict the bug to certain conditions when resuming a laptop.
My system is configured to go disable compositing when the power is unplugged, so my testing is based on suspend and resum with power plugged in and not. The bug only occurs to me when the power is connected before going to suspend and not connected when I resume. If the power cord is plugged in after the laptop has resumed, then the screen is black and I need to restart kwin to enable compositing (as described in the above comments).

My system is Thinkpad T61 with an NVIDIA NVS140, Debian testing (KDE 4.3.2) and the proprietary NVIDIA driver 190.42. This issue bugs me for a long time now and I can confirm, that it also happens with the stable 185 NVIDIA branch.
Comment 4 Alexander Gran 2009-12-04 02:22:49 UTC

I can confirm Tobias observations.

Comment 5 Victor Mataré 2010-01-15 22:12:16 UTC
yep, same here. Gentoo amd64, gcc 4.4.2, KDE 4.3.4, nvidia-drivers-180* thru 190*.
Comment 6 cgc281 2010-02-10 22:49:45 UTC
I can confirm this bug as well.

System: Arch Linux 64-bit; KDE SC 4.4.0; ATI Radeon X1250 (integrated graphics) with xf86-video-ati open source driver

Steps to reproduce the problem:
1. Initiate suspend (e.g., close laptop lid, issue pm-suspend command, etc.).
2. Wait for laptop to go to sleep.
3. Hit power button to resume.

Expected behavior: resume to functioning desktop.
Observed behavior: resume to black screen with functioning mouse cursor (but nothing else).

Additional notes:
1. Mouse cursor does not change shape (possibly suggesting that nothing else is working).
2. Keyboard does not work.
3. The only way to exit is to do a hard power down.
4. Disabling compositing before suspending (and then enabling it after resuming) appears to fix the problem for the most part. This is done automatically by adding a hook to /etc/pm/sleep.d and calling scripts which disable and enable compositing.
Comment 7 Ctibor Brančík 2010-02-14 11:53:21 UTC
I can also confirm this problem on Thinkpad X301 with intel graphics (GMA 4500). I can observe the behaviour same as in comment #3.
Comment 8 Thomas Lübking 2010-02-14 14:30:37 UTC
iff your keyboard (esp. ctrl+alt+backspace, though zapping is _not_ disabled) does not work, this is a kernel or X11 bug and there's nothing kwin or KDE could do about this.

If you just suffer from a black screen and pressing shift+alt+f12 will suspend/resume /compositing/ (not the computer) you might want to try* adding scripts 

to /etc/acpi/suspend.d
=== composite-off.sh ===
export DISPLAY=:0
if `qdbus org.kde.kwin /KWin compositingActive`; then
   qdbus org.kde.kwin /KWin toggleCompositing

and  /etc/acpi/resume.d
=== composite-on.sh ===
export DISPLAY=:0
if ! `qdbus org.kde.kwin /KWin compositingActive`; then
   qdbus org.kde.kwin /KWin toggleCompositing

you could also store the current compositing state on shutting down in /tmp/compositing_before_suspend and read it back from there

*i do not know whether this will actually work and prevent the black screen issue
Comment 9 mathias.buren 2010-02-21 13:24:35 UTC
System: Archlinux x86_64
NVIDIA 195.36
KDE 4.4.00

I'm suffering from the same bug in a different way. I've set up KDE so that whenever I unplug the AC adapter, compositing is disabled. If I plug it back in, it becomes enabled.
Whenever I leave the laptop for a while and close the lid, to make the screen go to sleep (I don't use suspend of any kind), it locks itself as it should.
However, when I open the lid I only see a black screen with a KDE mouse cursor which doesn't change shape. At this stage I can unplug the power adapter (to disable compositing) and I can see the login screen, and everything else works.
Comment 10 Jan Binder 2010-03-09 00:03:37 UTC
*** This bug has been confirmed by popular vote. ***
Comment 11 Jan Binder 2010-03-09 00:10:23 UTC
Same here.

Graphics driver: NVIDIA 190.53-1
KDE SC: 4.3.5
Linux: 2.6.32-5
Distribution: Debain Unstable
Comment 12 Jon Nelson 2010-03-26 18:53:03 UTC
Using an nvidia (proprietary driver for now) I have the same problems.
openSUSE 11.2, KDE 4.2, 4.3 and 4.4

Possibly related: bug 220211
Comment 13 Jon Nelson 2010-03-26 18:56:28 UTC
Also possibly related: bug 185127
Comment 14 Thomas McGuire 2010-04-23 13:25:08 UTC
Happens here too (KDE 4.2), like comment #9 describes. Either disabling compositing or unplugging the power works around the problem.
Comment 15 Bryan Stine 2010-05-07 21:38:18 UTC
Gentoo, KDE SC 4.4.3, xorg-server 1.8.0, xf86-video-intel 2.11.0

I'm experiencing the same thing as described in comment #9.

Ctrl+Alt+F12 (to disable compositing) or replacing kwin will solve that problem.

Additionally, this may be an unrelated bug: plasma-desktop exits normally (when run through gdb, with --nofork) after plugging the AC adapter back in with the lid closed. I assume this is due to some improper handling of RandR adapter events. Perhaps plasma believes the display is gone and it doesn't need to handle it anymore?
Comment 16 Michal Svoboda 2010-09-11 20:26:00 UTC
I have this bug too. Alt+shift+f12 doesn't do anything. kwin --replace will spawn another kwin along with a kwin_opengl_test process that seems to get stuck. Killing that process does not help. The only remedy is to terminate the whole X session :(
Comment 17 Michal Svoboda 2010-09-30 20:50:32 UTC
For me this thingy was fixed (hopefully) by upgrading xorg server to stable 1.9.0.
Comment 18 Victor Mataré 2011-07-16 19:09:32 UTC
I'm now with x.org 1.10, nvidia-drivers-275 and KDE 4.6.5 and I haven't seen this problem in a LONG time. I think this can be closed.
Comment 19 Martin Flöser 2011-07-16 19:11:51 UTC
thanks for the info -> worksforme
Comment 20 mohammed 2015-05-27 04:07:18 UTC
I'm using kde on Ubuntu LTS and changing the display resolution from 1366x768 to 1360x768 fixed it
Comment 21 Cengiz Gunay 2016-02-04 12:40:19 UTC
This bug still happens for me on a ThinkPad T440p with a Intel Corporation 4th Gen Core Processor Integrated Graphics Controller (rev 06) on KDE Frameworks 5.18.0. I'm running a 3.18.25-1-MANJARO kernel. My workaround is to type the password to unlock and bring the display back.
Comment 22 Thomas Lübking 2016-02-06 10:04:44 UTC
That sounds more like the screenlocker greeter doesn't render, less like a kwin issue.
=> move to another VT (ctrl+alt+f2) or login via ssh when this happens and check whether some kscreenlocker_greet process is running at all.
Comment 23 Cengiz Gunay 2016-02-06 13:30:53 UTC
Thanks, that's exactly what it looked like to me. I did what you said before and I could kill one of the kscreenlocker processes to get back to my session. I'll pay attention to whether _greet is present next time. Sorry for cluttering this thread.
Comment 24 Roman Priesol 2016-02-09 17:20:35 UTC
I have the same problem with kscreenlocker, but on openSUSE 42.1 with KDE Frameworks 5.16.0. At least killing this process works.
Comment 25 Thomas Lübking 2016-02-09 17:29:00 UTC
=> https://bugs.kde.org/describecomponents.cgi?product=kscreenlocker

Prettyplease everyone, do NOT post "I have a problem with *kscreenlocker*" to a (closed on top) *kwin* bug report - it'll be completely ignored and you're just wasting your time.