Bug 413486

Summary: Drawing becomes corrupted after resuming from sleep mode.
Product: [Applications] krita Reporter: Mark Smith <anonkun>
Component: OpenGL CanvasAssignee: Krita Bugs <krita-bugs-null>
Status: RESOLVED UPSTREAM    
Severity: normal CC: griffinvalley, halla
Priority: NOR    
Version First Reported In: 4.2.7.1   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:
Attachments: Corrupted graphics after resuming from sleep mode.

Description Mark Smith 2019-10-26 19:19:26 UTC
Created attachment 123502 [details]
Corrupted graphics after resuming from sleep mode.

SUMMARY
Drawing becomes corrupted after resuming from sleep mode.

STEPS TO REPRODUCE
1. Open Krita
2. Draw 
3. Enter sleep mode with Krita Open
4. Resume your session from sleep mode

OBSERVED RESULT
5. Krita canvas is completely corrupted


EXPECTED RESULT
Krita canvas still looks as I left it

SOFTWARE/OS VERSIONS
Linux/KDE Plasma: Manjaro KDE, Plasma 5.16.5
(available in About System)
KDE Plasma Version: 
KDE Frameworks Version: 5.62.0
Qt Version: 5.13.1

ADDITIONAL INFORMATION
I'm using Nvidia Driver version 435 and I think it's related to it. I don't think it happens on Nouveau.
Comment 1 Mark Smith 2019-10-26 19:20:37 UTC
By the way, the canvas can be refreshed and fixed by disabling and enabling layers.
Comment 2 Halla Rempt 2019-10-26 20:09:38 UTC
Yes... That's a known thing, but it's not really Krita specific. The texture memory of the gpu is reset to random after resuming, and it needs to be explicitly reset after that. Unfortunately, Krita doesn't get any signal that the system has been suspended and resumed, so, as far as we know, we just cannot do that programmatically!
Comment 3 wolthera 2020-04-25 09:52:31 UTC
I'll set this to confirmed then, in the offchance someone can come up with a fix.
Comment 4 Halla Rempt 2020-05-04 11:12:31 UTC
I think it's better to just close this issue; we cannot do anything about it, and it _is_ dependent on the driver.