Black screen on resume from suspend with 325.15 and KWin 4.11 with enabled compositing

After recent upgrades of nvidia drivers and KDE SC, time to time when resuming after suspend to ram, screen is black. Mouse cursor is rendered, sometimes some garbage is also present on the screen. Killing kwin or disabling compositing fixes the issue.

To reproduce issue, is necessary to have laptop suspended for longer time (i.e. overnight).

After initial failure, it can be repeated by killing kwin and launching kwin from terminal (VT), as restarting kwin from within X11 doesn’t trigger issue. If issue is present, it can be removed by disabling/enabling compositing in kwin. Subsequent switching to VT and back doesn’t trigger issue. Only kwin restart within VT after it has failed at first place triggers issue.

“NVreg_EnableMSI=0” doesn’t fix issue.
No error messages are logged in Xorg.log or dmesg.
When KWin fails, it emits following error: KWin::checkGLError: GL error ( PostPaint ): “0x506”

Bug report for KDE: https://bugs.kde.org/show_bug.cgi?id=323686

Attached log file is from the moment when system had black screen after resuming.
nvidia-bug-report.log.gz (70.7 KB)

I can confirm this.

Any news on this issue?
It happens only with nvidia.
Tested on a gtx750 and 9800gt
Intel is ok.

Occasional Post-SuspendToRAM/Resume screen corruption here too. Running latest Arch system with KDE Plasma 5.2 (!), Magic Lamp effect disabled.

The system would either wake up looking like this: http://dickens.com/images/corrupted.jpg (not my pic but similar), or it would seem normal but window parts would have corrupt edges or stuff like this afterwards.

Does not seem like a KDE-only issue, coz GNOME wallpaper corruption has been reported too. It rather seems like some kind of a memory buffer gets moved/corrupted leading to weird graphical effects afterwards. And depending on where the corruption was the effect gets not noticable to devastating.

Reports suggest that the issue apeared up kernel 3.12 and only with nvidia’s proprietary driver.

Running GTX 560Ti, no other hw/sw issues on this machine whatsoever. No WD Disks.

See also https://bugs.kde.org/show_bug.cgi?id=323686#c69

the issue happens on my brand new pc system also, latest nvidia driver, latest kernel. i tried everything! no fix out there. very annoying. suspend and hibernate mode are basics and i expect them just to work. now i can everyday instead of starting my system and have everything already restored, open every single app again.

PLEASE GET SERIOUS ABOUT THIS: many people seem to have the problem. please release a fix asap.

I can confirm this issue.

On Plasma 5, I usually get a lot of garbage on my screen. Enabling/Disabling compositing does not fix the issue, neither does switching virtual terminals. However, disabling compositing before hibernating avoids the issue.

Driver: 346.47

KWin compositor settings:
Rendering backend: OpenGL 3.1
OpenGL interface: GLX

@fratti

Thank you loads for the hint with enable/disable compositing before initiate hibernate or standby. i knew you could do that but i never tried if that fixes the problem.
Now i did try and indeed it is the only acceptable workarround for me.

Did two little script files (one for hibernation and one for suspending)

suspend with this code: open text editor and paste the lines, save as *nameitwhatever.sh", make it executable. and run it. this ofc. assumes that you have your compositor ON by default.

qdbus org.kde.kwin /KWin toggleCompositing
qdbus org.kde.Solid.PowerManagement /org/freedesktop/PowerManagement Suspend 
qdbus org.kde.kwin /KWin toggleCompositing

same for hibernation:

qdbus org.kde.kwin /KWin toggleCompositing
qdbus org.kde.Solid.PowerManagement /org/freedesktop/PowerManagement Hibernate 
qdbus org.kde.kwin /KWin toggleCompositing

Now you either can link to that scriptfile in your startmenu or run it by putting 2 links on your desktop.

i am currently looking for a plasmoid where i can just link the files and include it in my taskbar that way.

my sytem is kubuntu 14.04.2 x64 with all the latest updates, kernel 3.19.1 and these scripts are working for me.

found the quicklauncher plasmoid (default in kde 4.14.2), added 2 shortcuts and new icons, changed the Program name to something usefull:

i am happy and done.

Dear macstar

I’ve been fighting this seemingly-intractable problem for nearly 2 years, before recently discovering this page, & reading your solution. I eagerly deployed your script a week ago. This morning was my 7th post-script morning, 7th successful Resumption from my Tower’s overnight Sleep! That’s completely unprecedented; indeed, prior to this fix-deployment, even three consecutive successful Resumptions was extremely rare, & four simply never occurred, during the entire ~2 years’ history of this problem for me.

You have solved my problem… i sincerely thank you :-)