Bug 343433 - Plasma is glitching after suspend to RAM (maybe after suspend to HDD too)
Summary: Plasma is glitching after suspend to RAM (maybe after suspend to HDD too)
Status: RESOLVED DUPLICATE of bug 344326
Alias: None
Product: kwin
Classification: Plasma
Component: general (show other bugs)
Version: unspecified
Platform: Arch Linux Linux
: NOR grave
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-01-28 03:57 UTC by Alexander Nestorov
Modified: 2015-02-19 14:11 UTC (History)
6 users (show)

See Also:
Latest Commit:
Version Fixed In:
thomas.luebking: NVIDIA+


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alexander Nestorov 2015-01-28 03:57:14 UTC
After suspending and resuming my PC, plasma just renders garbage on the screen. It's somewhere in the middle between graphical glitches and pure garbage.

I can see areas of the things I should see, but most of the time is either garbage or that same area, but glitched.

Something like this: http://i.stack.imgur.com/fsvAb.png

Reproducible: Always
Comment 1 Marco Martin 2015-01-28 10:35:42 UTC
AMD catalyst drivers? (had that with an old version of them, recent don't do that anymore)
try alt+shift+f12 to disable/reenable composite
Comment 2 Martin Flöser 2015-01-28 10:43:00 UTC
please provide output of:
qdbus org.kde.KWin /KWin supportInformation
Comment 3 Thomas Lübking 2015-01-28 11:19:16 UTC
possibly bug #323686 (alexander has an nvidia sli setup, multiscreen)
also see https://forum.kde.org/viewtopic.php?f=111&t=121590

the problem seems nvidia specific and there are claims that invoking the magic lamp effect is a trigger.
Comment 4 Alexander Nestorov 2015-01-28 12:59:21 UTC
Thomas is right. I'm on an NVIDIA SLI with NVIDIA's driver. But I haven't used that magic lamp thing.
I just suspend the PC and then turn it back on.
Comment 5 Alexander Nestorov 2015-01-28 13:02:05 UTC
I forgot to attach the output of support info: https://paste.kde.org/pmn2yfgzx
Comment 6 Thomas Lübking 2015-01-28 15:51:34 UTC
Can you try to disable _all_ effects (but not compositing, save ~/.config/kwinrc to restore your previouis config) and restart

   kwin_x11 --replace &

Then after the next resume from STR, see whether this still happens?
(In that case we'd have an effect list which likely contains one trigger)
Comment 7 Alexander Nestorov 2015-01-29 12:55:37 UTC
I tried this, and I have only bad news.

First one: Disabling everything but leaving compositing enabled doesn't fix the bug. I get the same glitches after suspend mode.

Second one: After running the command you pasted (kwin replace) the entire X server crashes. I could get this output: https://paste.kde.org/pnfhomsgb
Comment 8 Chuck 2015-01-30 19:48:08 UTC
I think I'm hitting this bug too.  
I'm on the Plasma 5.2 release of kwin_x11 (version 5.2.0) under Arch linux.

I'm using an Nvidia GTX-770 non-SLI just one display at 1920x1200 resolution with the 346.35 drivers.

Steps to reproduce:
1. Suspend to RAM.
2. Resume. The lock screen shows up without any corruption.
3. Login through the lock screen, and the desktop looks like a bad Picasso painting.  
4. I can recover by killing & restarting kwin_x11. No need to log out of the session, once kwin restarts the corruption disappears.
Comment 9 Chuck 2015-01-30 19:51:11 UTC
In response to Martin's request for debug information:

qdbus org.kde.KWin /KWin supportInformation
KWin Support Information:
The following information should be used when requesting support on e.g. http://forum.kde.org.
It provides information about the currently running instance, which options are used,
what OpenGL driver and which effects are running.
Please post the information provided underneath this introductory text to a paste bin service
like http://paste.kde.org instead of pasting into support threads.

==========================

Version
=======
KWin version: 5.2.0                                                                                                                                                                                                                                                                         
Qt Version: 5.4.0                                                                                                                                                                                                                                                                           
                                                                                                                                                                                                                                                                                            
Operation Mode: X11 only                                                                                                                                                                                                                                                                    
                                                                                                                                                                                                                                                                                            
Decoration                                                                                                                                                                                                                                                                                  
==========
Plugin: org.kde.breeze
Theme: 
Blur: 0
onAllDesktopsAvailable: true
alphaChannelSupported: true
closeOnDoubleClickOnMenu: false
decorationButtonsLeft: 0, 2
decorationButtonsRight: 6, 3, 4, 5
borderSize: 2
gridUnit: 10
font: Oxygen-Sans,10,-1,0,50,0,0,0,0,0
smallSpacing: 2
largeSpacing: 10

Options
=======
focusPolicy: 1
nextFocusPrefersMouse: true
clickRaise: true
autoRaise: true
autoRaiseInterval: 750
delayFocusInterval: 100
shadeHover: false
shadeHoverInterval: 250
separateScreenFocus: false
placement: 4
focusPolicyIsReasonable: true
borderSnapZone: 10
windowSnapZone: 10
centerSnapZone: 0
snapOnlyWhenOverlapping: false
showDesktopIsMinimizeAll: false
rollOverDesktops: true
focusStealingPreventionLevel: 2
legacyFullscreenSupport: false
operationTitlebarDblClick: 5000
operationMaxButtonLeftClick: 5000
operationMaxButtonMiddleClick: 5015
operationMaxButtonRightClick: 5014
commandActiveTitlebar1: 0
commandActiveTitlebar2: 30
commandActiveTitlebar3: 2
commandInactiveTitlebar1: 4
commandInactiveTitlebar2: 30
commandInactiveTitlebar3: 2
commandWindow1: 7
commandWindow2: 8
commandWindow3: 8
commandWindowWheel: 31
commandAll1: 10
commandAll2: 3
commandAll3: 14
keyCmdAllModKey: 16777251
showGeometryTip: false
condensedTitle: false
electricBorderMaximize: true
electricBorderTiling: true
electricBorderCornerRatio: 0.25
borderlessMaximizedWindows: false
killPingTimeout: 5000
hideUtilityWindowsForInactive: true
inactiveTabsSkipTaskbar: false
autogroupSimilarWindows: false
autogroupInForeground: true
compositingMode: 1
useCompositing: true
compositingInitialized: true
hiddenPreviews: 1
unredirectFullscreen: true
glSmoothScale: 1
colorCorrected: false
xrenderSmoothScale: false
maxFpsInterval: 16666666
refreshRate: 0
vBlankTime: 6000000
glStrictBinding: false
glStrictBindingFollowsDriver: true
glCoreProfile: true
glPreferBufferSwap: 99
glPlatformInterface: 1

Screen Edges
============
desktopSwitching: false
desktopSwitchingMovingClients: true
cursorPushBackDistance: 1x1
timeThreshold: 400
reActivateThreshold: 450
actionTopLeft: 0
actionTop: 0
actionTopRight: 0
actionRight: 0
actionBottomRight: 0
actionBottom: 0
actionBottomLeft: 0
actionLeft: 0

Screens
=======
Multi-Head: no
Active screen follows mouse:  no
Number of Screens: 1
Screen 0 Geometry: 0,0,1920x1200

Compositing
===========
Compositing is active
Compositing Type: OpenGL
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: GeForce GTX 770/PCIe/SSE2
OpenGL version string: 3.1.0 NVIDIA 346.35
OpenGL platform interface: GLX
OpenGL shading language version string: 1.40 NVIDIA via Cg compiler
Driver: NVIDIA
Driver version: 346.35
GPU class: Unknown
OpenGL version: 3.1
GLSL version: 1.40
X server version: 1.16.3
Linux kernel version: 3.17.2
Direct rendering: Requires strict binding: no
GLSL shaders:  yes
Texture NPOT support:  yes
Virtual Machine:  no
OpenGL 2 Shaders are used
Painting blocks for vertical retrace:  yes

Loaded Effects:
---------------
zoom
slidingpopups
kwin4_effect_login
slide
screenshot
minimizeanimation
kwin4_effect_translucency
flipswitch
desktopgrid
resize
kwin4_effect_fade
kwin4_effect_maximize
presentwindows
highlightwindow
kwin4_effect_dialogparent
blur
contrast
logout
dashboard
startupfeedback
screenedge
kscreen

Currently Active Effects:
-------------------------
blur
contrast

Effect Settings:
----------------
zoom:
zoomFactor: 1.2
mousePointer: 0
mouseTracking: 0
enableFocusTracking: false
followFocus: true
focusDelay: 350
moveFactor: 20
targetZoom: 1

slidingpopups:
fadeInTime: 150
fadeOutTime: 250

kwin4_effect_login:

slide:

screenshot:

minimizeanimation:

kwin4_effect_translucency:

flipswitch:
tabBox: true
tabBoxAlternative: false
duration: 200
angle: 30
xPosition: 0.330000013113022
yPosition: 1
windowTitle: true

desktopgrid:
zoomDuration: 250
border: 10
desktopNameAlignment: 0
layoutMode: 0
customLayoutRows: 2
usePresentWindows: false

resize:
textureScale: true
outline: false

kwin4_effect_fade:

kwin4_effect_maximize:

presentwindows:
layoutMode: 0
showCaptions: true
showIcons: true
doNotCloseWindows: false
ignoreMinimized: false
accuracy: 120
fillGaps: true
fadeDuration: 150
showPanel: false
leftButtonWindow: 1
rightButtonWindow: 2
middleButtonWindow: 0
leftButtonDesktop: 2
middleButtonDesktop: 0
rightButtonDesktop: 0

highlightwindow:

kwin4_effect_dialogparent:

blur:
blurRadius: 12
cacheTexture: true

contrast:

logout:
useBlur: true

dashboard:
brightness: 0.5
saturation: 0.5
blur: false

startupfeedback:
type: 0

screenedge:

kscreen:
Comment 10 Alexander Nestorov 2015-02-02 02:17:27 UTC
Can I get this bug in a "Confirmed" state?
Comment 11 Alexander Nestorov 2015-02-06 03:56:04 UTC
This doesn't happen with Noveau. It happens only with NVIDIA driver.

Anyways, because saying "can't fix it here, it's an upstream bug", note that this bug isn't happening with KDE4 and NVIDIA driver.
Comment 12 Bhushan Shah 2015-02-06 04:22:57 UTC
> Anyways, because saying "can't fix it here, it's an upstream bug", note that this bug isn't happening with KDE4 and NVIDIA driver.

Just my 2 cents on your comment,

I am not sure why you are saying this.. no one have marked it as upstream bug here.. and still Plasma 5 and KDE4 is not same thing. There are too many technical changes in between so saying this doesn't happen with KDE4 so this shouldn't happen with Plasma 5 is very wrong.

Sorry, no developers will appreciate this kind of comments..
Comment 13 Thomas Lübking 2015-02-06 10:43:08 UTC
Please run
KWIN_EXPLICIT_SYNC=0 kwin_x11 --replace &

afaics, the nvidia blob seems about the only driver announcing fences support and that interferes w/ the X11 command stream AND it's buggy in the 304 driver for sure.
Comment 14 Chuck 2015-02-07 02:39:52 UTC
The KWIN_EXPLICIT_SYNC=0  environment variable is working here.
Comment 15 Saygın Bakşi 2015-02-11 03:16:47 UTC
I have the same problem here, fedora 21. After resume, the sddm works properly, but after logging in the screen is corrupted in a similar fashion to the provided screenshot. disabling/enabling composition (alt+shift+f12) solves the problem without replacing kwin.

output of qdbus org.kde.KWin /KWin supportInformation: https://paste.kde.org/pohjkvssa
Comment 16 Andrew de Quincey 2015-02-15 18:59:56 UTC
Same problem here: Arch Linux, nvidia binary 346.35-6, Quadro K3000M on a Dell M6700.

alt-shift-f12 doesn't help, neither does KWIN_EXPLICIT_SYNC=0. Only manually killing kwin_x11 and restarting it fixes it.

On  de-hibernate, the login screen is scrambled for me as well.
Comment 17 Thomas Lübking 2015-02-15 21:52:19 UTC
@ Alexander
Did you unconfirm the bug due to the 1.17 update?
Comment 18 Thomas Lübking 2015-02-15 21:54:29 UTC
(In reply to Andrew de Quincey from comment #16)

> alt-shift-f12 doesn't help
Can you elaborate on this? The corruption is there with compositing.
Then you suspend the compositor and it's still there? (And remains after restarting it)

Does the corruption affect all windows or eg. only the desktop (and panels)?
Comment 19 Alexander Nestorov 2015-02-15 21:55:25 UTC
No, I unconfirmed it because KDE triage team told me "Unconfirmed" doesn't actually mean what we think it means. Or said in another way, "Confirmed" means a KDE dev already spotted the bug and no further questions are needed to fix it.
Comment 20 Andrew de Quincey 2015-02-15 22:08:26 UTC
Hi so:
1. My machine is running normally, with compositing working.
2. I hibernate it, then un-hibernate it.
3. It comes back, and the screen is corrupted (as in the attached screenshot).
4. I tried using alt-shift-f12 several times to turn off+on compositing. Screen remains corrupt.

To fix it, I switched to another virtual terminal, killall kwin, then switched back to to X, run a terminal, restart kwin, all is sorted.

I also tried "KWIN_EXPLICIT_SYNC=0 kwin_x11 --replace &" as above, and hibernating etc, but the same issue.

Happy to try other things, provide other information, try out patches etc.
Comment 21 Andrew de Quincey 2015-02-15 22:23:00 UTC
Actually, this bug seems a little inconsistent. I tried turning off "lock screen on resume" and now it has stopped doing it on resume... for the moment anyway!

However, I have just plugged an external monitor in to my (running) laptop (all my previous tests were with only the laptop's screen), and it *immediately* did the scrambled thing across both monitors. However, doing this is usually ok.

Sounds like a real nasty one to track down!
Comment 22 Thomas Lübking 2015-02-15 23:05:32 UTC
> 4. I tried using alt-shift-f12 several times to turn off+on compositing. Screen remains corrupt.

Could you somehow confirm that the shortcut was really operating?
You might as well try to suspend the compositor from VT1 (or better: ssh)

qdbus --address "`tr '\0' '\n' < /proc/$(pidof kwin_x11)/environ | grep DBUS_SESSION_BUS_ADDRESS | cut -d"=" -f2-`" org.kde.KWin /Compositor suspend

(that's one giant line)

> However, I have just plugged an external monitor in to my (running) laptop (all my previous tests were with only the laptop's screen), and it *immediately* did the scrambled thing across both monitors.

Try to suspend the compositor for this (there should be no issues like the keyboard has not been fully re-setup "yet" like would be possible in the resume from STR case)
Comment 23 Thomas Lübking 2015-02-19 14:11:34 UTC

*** This bug has been marked as a duplicate of bug 344326 ***