Bug 322975

Summary: desktop render will twisted when the opengl application is closed.
Product: [Plasma] kwin Reporter: TOM Harrison <l12436.tw>
Component: scene-openglAssignee: KWin default assignee <kwin-bugs-null>
Status: RESOLVED WORKSFORME    
Severity: major CC: illumilore, kde.org, zhanghan
Priority: NOR Flags: thomas.luebking: NVIDIA+
Version: 4.10.95   
Target Milestone: ---   
Platform: unspecified   
OS: Linux   
See Also: https://bugs.kde.org/show_bug.cgi?id=344326
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: kwin information
kwin information
kwin information with no error.
output from my notebook.

Description TOM Harrison 2013-07-30 06:29:18 UTC
the desktop render will twisted when wake from hibernate or close the opengl application
ex minecraft
here is the image when it is twisted.
is ths config error or a bug.
and i have change my vsync.

here are the image when it is twisted.
and this happened when i start use the 4.10.80

http://i.imgur.com/XJhJFjW.png
http://i.imgur.com/5N5dqrx.png

Reproducible: Always

Steps to Reproduce:
1.run the minecraft with java
2.close the game
P.S. the minecraft need to open the advanced opengl feature in option.
Comment 1 Martin Flöser 2013-07-30 08:39:37 UTC
please attach output of:
qdbus org.kde.kwin /KWin supportInformation
Comment 2 TOM Harrison 2013-07-30 09:16:56 UTC
Created attachment 81445 [details]
kwin information
Comment 3 TOM Harrison 2013-07-30 09:17:37 UTC
i think it is the kwin problem because when i disable the animation.
the screen become normal.
Comment 4 Thomas Lübking 2013-07-30 09:37:00 UTC
You attached your BIOS.

Please attach the output of
   qdbus org.kde.kwin /KWin supportInformation
Comment 5 TOM Harrison 2013-07-30 10:11:05 UTC
sorry for the wrong attach.
i update the wrong attach.
please delete it.
Comment 6 TOM Harrison 2013-07-30 10:11:39 UTC
Created attachment 81448 [details]
kwin information
Comment 7 Thomas Lübking 2013-07-30 10:25:11 UTC
does it still happen when you disable the "fall apart" effect?
Comment 8 TOM Harrison 2013-07-30 11:40:25 UTC
i think is not.
when i disable it.
the screen will turned to black.
the soulation is also to disable the animation.
and when i logout and login.
the error is gone.

the wrong screen render become two type,  all black or twisted screen.
Comment 9 TOM Harrison 2013-07-30 13:13:17 UTC
i will upload a snapshot when the all black is happened again.
Comment 10 Thomas Lübking 2013-07-30 13:34:33 UTC
(In reply to comment #8)
> i think is not.
> when i disable it.
> the screen will turned to black.
> the soulation is also to disable the animation.
> and when i logout and login.
> the error is gone.

Can you please provide the output of "qdbus org.kde.kwin /KWin supportInformation" when the error is gone (to reflect the changes)
Thanks.
Comment 11 TOM Harrison 2013-07-30 13:56:01 UTC
Created attachment 81457 [details]
kwin information with no error.
Comment 12 TOM Harrison 2013-07-30 13:57:52 UTC
when my notebook back
i will upload that snapshot and kwin information.
that notebook is the most frequency that happened that problem.
every hibernate wake.
the screen will always black.
Comment 13 Thomas Lübking 2013-07-30 14:14:20 UTC
That's exactly the same output.
It soes not seem as if you had reconfigured something. (or you re-uploaded the old file ;-)
Comment 14 TOM Harrison 2013-07-30 14:16:07 UTC
yeah, i just logout and login.
it return normal.
that why i did not know why it happened.
Comment 15 Thomas Lübking 2013-07-30 14:34:26 UTC
(In reply to comment #14)
> yeah, i just logout and login.
> it return normal.

;-)
To just clear the display, press "Shift+Alt+F12" twice.

On a clear screen, disable the fall apart effect and try to re-cause the issue.
Comment 16 TOM Harrison 2013-07-30 14:36:04 UTC
(In reply to comment #15)
> (In reply to comment #14)
> > yeah, i just logout and login.
> > it return normal.
> 
> ;-)
> To just clear the display, press "Shift+Alt+F12" twice.
> 
> On a clear screen, disable the fall apart effect and try to re-cause the
> issue.


OK, i will try on the notebook.
that computer could test this.
it's hibernate always cause that problem
Comment 17 TOM Harrison 2013-07-31 02:30:53 UTC
yes, still existed, even i disable the fall apart
just change the tty8 to tty9 and change back, the screen render is twisted.

this will happened when you never disable animation and re-enable.
if you disable to clear the screen.
this will not happened.
i need to use the kwin --replace& to re-occur this problem.

i will try to find which animation effect occur this problem
Comment 18 TOM Harrison 2013-07-31 02:32:35 UTC
this is the another screen render error
http://i.imgur.com/MgB9oKl.png

this is the most frequent happened
Comment 19 TOM Harrison 2013-07-31 02:36:49 UTC
i see an error output from kwin 
kwin(6151) KWin::checkGLError: GL error ( update texture ):  "0x506"
Comment 20 TOM Harrison 2013-07-31 12:52:40 UTC
Created attachment 81479 [details]
output from my notebook.
Comment 21 TOM Harrison 2013-07-31 12:54:42 UTC
according to my notebook test.
when i disable the fall apart.
the error is gone.
but when i enable.
it also has no such error.
so i think it is not that problem.
Comment 22 TOM Harrison 2013-07-31 13:04:21 UTC
by the way, i use the opengl 3.1.
Comment 23 Thomas Lübking 2013-07-31 18:00:30 UTC
(In reply to comment #21)
> but when i enable it also has no such error.
> so i think it is not that problem.

You need a way to reproduce it - if it does never occur on that machine, there's not point in testing on it.

If you know how to reproduce it (hibernation), you'll have to see whether some particular setting causes this.

Eg. you set OpenGL to 2, then you hibernate, resume and see whether the issue still occurs. If yes, you try to disable the fall apart effect, hibernate and see whether the issue still occurs.

The issue will not suddenly appear just because you change some setting.
You will have to redo what initially caused it and see whether it still causes it to know whether the setup change had some impact.
Comment 24 TOM Harrison 2013-08-01 01:22:28 UTC
for now, i have tested.
there are two way seems to reduce the happened that screen twist.
1. change the compositing to Xrandr.
2. disable fall apart(possible)

disabling fall apart will reduce the screen twist happened, but could not stop that happened

there are some error output on the terminal
kwin(23686) KWin::checkGLError: GL error ( update texture ):  "GL_INVALID_OPERATION" 
kwin(23686) KWin::checkGLError: GL error ( PostPaint ):  "GL_OUT_OF_MEMORY" 
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::end: Painter not active, aborted
QPainter::begin: Paint device returned engine == 0, type: 2
QPainter::end: Painter not active, aborted
Comment 25 TOM Harrison 2013-08-02 02:46:57 UTC
according to my test today.
the fall apart could much reduce the screen twist happened.
but there are still a black screen will happened
Comment 26 Thomas Lübking 2013-08-02 06:29:05 UTC
simple question: did the scattered look of the first screenshot *ever* re-occur after turning off "fall apart" (and restarting the compositor)?
Comment 27 TOM Harrison 2013-08-02 06:40:07 UTC
according to my tested for now.
scattered look seems just occur by fall apart.
after disable it, most of render error is all black.
Comment 28 Thomas Lübking 2013-08-02 10:01:39 UTC
Ok, but from what i understood so far, that happens exclusively after waking up from hibernation, while the scatter (also) occured after closing a window, correct?

That would be different bugs.

Is the screen locked (you get a login window) when you wake up form hibernation or is there even a screensaver?
Comment 29 TOM Harrison 2013-08-02 11:31:00 UTC
wake from hibernate will be none lock screen.

this thing happen when the windows is closing, wake from hibernate or use the ctrl+alt+F1~F12 swtich to a new tty.

according today's closing windows test.
while closing minecraft window, the screen will flash for a short time.
the error is happened in that time.
Comment 30 Thomas Lübking 2013-08-04 06:04:04 UTC
(In reply to comment #29)
> wake from hibernate will be none lock screen.
> 
> this thing happen when the windows is closing
All windows or just "minecraft"?
Does minecraft run at a different resolution?

(Wake from STR and switch VT sounds like the GPU "just" forgets to repost memory, changing resolution could be bug #322970 resp. bug #322156)
Comment 31 TOM Harrison 2013-08-04 07:35:45 UTC
no, it is windowed and not change resolution.
just close that game will cause this problem
Comment 32 TOM Harrison 2013-08-04 07:36:34 UTC
for now, run application just minecraft will cause this problem.
Comment 33 TOM Harrison 2013-08-05 03:20:33 UTC
and since kde update to 4.10.97.
it did not occur the problem again.
i will tested more for correcting this problem is solve or not.
Comment 34 TOM Harrison 2013-08-05 03:21:38 UTC
now closing minecraft seems not cause that problem.
but switch to other tty still occur this problem
Comment 35 Thomas Lübking 2013-08-05 19:14:04 UTC
Can you try setting "tearing prevention" to "None"?
Comment 36 TOM Harrison 2013-08-05 23:40:30 UTC
i will try later.
and without reason, since upgrade to 4.10.97.
this problem is occured not so frequently
Comment 37 TOM Harrison 2013-08-06 02:29:30 UTC
tearing prevention is the same option of vsync?
Comment 38 Thomas Lübking 2013-08-06 06:40:16 UTC
(In reply to comment #37)
> tearing prevention is the same option of vsync?

Yes, "kcmshell4 kwincompositing", 3rd tab, first option in the OpenGL box.
Comment 39 TOM Harrison 2013-08-06 06:56:09 UTC
that did not work.
still cause that problem
Comment 40 Thomas Lübking 2013-08-15 02:19:54 UTC
This might be one or two bugs.

The issues when resuming from startup or switching between VTs imply junked VRAM, this is usually just a driver issue.

This might be related to a bug that seems related to the fall apart effect on closing certain (OpenGL) clients and might be a shader pollution.

Does either issue occur
- with downgraded nvidia drivers?
- with OpenGL shaders DISabled?
Comment 41 ZH 2013-09-07 14:15:38 UTC
I can confirm this. What i see is exactly the same as the reporter's.

But this just happen returning from suspend (sleep) , closing a opengl application doesn't trigger this.

The corrupted screen can be either twisted images or a black screen with a blurred box at the taskbar area.

At this time a re-toggling of compositing always resolves the problem. And suspend to RAM with composition turned off doesn't trigger this too.

I've tried Nvidia driver 319.32, 319.49 and 325.15 with kwin compositing type openGL 1.2, 2.0 and 3.1, also all the tearing prevention methods. The graphic card model is Quadro FX 1800M.

My system is KDE 4.11 on openSUSE 12.3 x64.

Here is my Kwin info: http://paste.kde.org/p09e87287/

I don't use fall apart effect.
Comment 42 Thomas Lübking 2013-09-09 22:30:59 UTC
*** Bug 324725 has been marked as a duplicate of this bug. ***
Comment 43 Thomas Lübking 2013-09-28 09:20:46 UTC
*** Bug 324725 has been marked as a duplicate of this bug. ***
Comment 44 Thomas Lübking 2013-10-10 09:03:36 UTC
FTR:
after a recent update to nvidia 325.15 the kernel hangs after resuming from STR - *regardless* of whether compositing or any OpenGL client was active.

-> That bug is *very* unlikely KWin related and a problem in the nvidia kernel module.

@l12436@yahoo.com.tw
Do you currently have issues when closing OpenGL clients in general or Mincraft in particular?
Comment 45 ZH 2013-10-31 13:42:42 UTC
(In reply to comment #44)
This makes some sense.
With a recently purged profile and no change in default kwinrc , this problem seems disappeared after wake from suspend.
But if one change some settings in kwin module of system settings, this problem would likely to come back again. At least it is true to me.
So it looks like this problem is not directly related to kwin, but it is possbile somewhere in kwin may triggers this.
Comment 46 TOM Harrison 2013-11-01 01:19:16 UTC
(In reply to comment #44)
> FTR:
> after a recent update to nvidia 325.15 the kernel hangs after resuming from
> STR - *regardless* of whether compositing or any OpenGL client was active.
> 
> -> That bug is *very* unlikely KWin related and a problem in the nvidia
> kernel module.
> 
> @l12436@yahoo.com.tw
> Do you currently have issues when closing OpenGL clients in general or
> Mincraft in particular?

it always happened.
and whenever i change 319.XX 325.XX 331.XX,it always happened
Comment 47 TOM Harrison 2013-11-01 01:41:40 UTC
according to my test,
the fall apart is on of the effect that cause this problem
Comment 48 TOM Harrison 2013-11-01 01:41:56 UTC
according to my test,
the fall apart is one of the effect that cause this problem
Comment 49 TOM Harrison 2013-11-01 01:42:56 UTC
according to my test,
the fall apart is one of the effect that cause this problem
Comment 50 TOM Harrison 2013-11-01 01:43:21 UTC
according to my test,
the fall apart is one of the effect that cause this problem
Comment 51 TOM Harrison 2013-11-01 02:38:27 UTC
sorry for dup msg.....
Comment 52 Thomas Lübking 2015-07-06 20:32:25 UTC
Likely related to bug #344326 and in this case worked-around by http://commits.kde.org/kwin/9f13e9b26035984906896a56d64e85e11522c581 in KWin 5.4.0
Comment 53 TOM Harrison 2016-05-13 02:29:45 UTC
I have saw that, the work around in kwin 5.4.0 seems nor work in kwin 4 due to the function did not exist in kwin 4
Comment 54 kde.org 2021-11-04 22:48:49 UTC
This bug report is quite old and has been reported to be fixed in 5.4. Can you still reproduce this issue with KDE 5.23?
Comment 55 Bug Janitor Service 2021-11-19 04:38:45 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 56 Bug Janitor Service 2021-12-04 04:38:34 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!