Bug 424681 - kwin_x11 graphic reset on wakeup from suspend with nvidia 450.57 driver
Summary: kwin_x11 graphic reset on wakeup from suspend with nvidia 450.57 driver
Status: RESOLVED DUPLICATE of bug 424311
Alias: None
Product: kwin
Classification: Plasma
Component: compositing (show other bugs)
Version: 5.19.3
Platform: Arch Linux Linux
: NOR normal
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-07-26 11:40 UTC by br1ghtch1p
Modified: 2020-07-30 13:05 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
Stack trace of crash (6.98 KB, text/plain)
2020-07-26 11:40 UTC, br1ghtch1p
Details
nvidia-bug-report (309.17 KB, application/gzip)
2020-07-28 17:52 UTC, br1ghtch1p
Details
compositor_crash_on_wakeup (364.95 KB, image/png)
2020-07-29 11:16 UTC, br1ghtch1p
Details
notification_after_wakeup_from_suspend (150.59 KB, image/png)
2020-07-29 11:17 UTC, br1ghtch1p
Details
system_settings_after_graphics_reset (144.54 KB, image/png)
2020-07-29 11:17 UTC, br1ghtch1p
Details

Note You need to log in before you can comment on or make changes to this bug.
Description br1ghtch1p 2020-07-26 11:40:24 UTC
Created attachment 130406 [details]
Stack trace of crash

SUMMARY
This behavior only started with the nvidia 450.57 driver. Everytime I wake from suspend, I get the message 'Desktop effects were restarted due to graphics reset'. But then if I go to KDE Settings, the left panel are all black. If I restart kwin_x11 by issuing kwin_x11 --replace, kwin_x11 crashes. I have attached a coredump of the crash.

STEPS TO REPRODUCE
1. Put desktop to Sleep
2. Wake up
3. Restart kwin_x11 with kwin_x11 --replace

OBSERVED RESULT
Upon wakeup, I get the message 'Desktop effects were restarted due to graphics reset. 

kwin_x11 --replace produces a crash.

Note that this behavior only started with the nvidia-450.57 driver. I downgraded previous driver to test and there are no problems. 

EXPECTED RESULT
There shouldn't be any message 'Desktop effects were restarted due to graphics reset'.
kwin_x11 --replace shouldn't crash

SOFTWARE/OS VERSIONS
OS: Arch Linux
Kernel: x86_64 Linux 5.7.10-arch1-1
KDE Plasma Version: KDE 5.72.0 / Plasma 5.19.3
Qt Version: 5.15.0
Nvidia Driver: nvidia-450-57

ADDITIONAL INFORMATION
Problem only reproducible with the nvidia-450-57 driver.
Comment 1 Arix 2020-07-26 21:41:24 UTC
I've experienced similar behavior, especially what you mentioned with the left half of KDE settings being black on Nvidia 450.57 when the entire compositor isn't completely broken for me, and some other bugs I reported here  https://bugs.kde.org/show_bug.cgi?id=424311

Glad to see I'm not the only one with issues on the 450 driver.
Comment 2 br1ghtch1p 2020-07-26 22:41:23 UTC
I opened a thread in the Archlinux forum:
https://bbs.archlinux.org/viewtopic.php?id=257327

It's possible that the driver has the bug.
Comment 3 Arix 2020-07-27 00:53:04 UTC
I see. I'd like to be able to blame it on a driver bug but I just haven't found any issues with any other applications at all. Even in that thread it seems like the issues are still solely with KDE/plasma. Everything but kwin has been working fine on 450 for me, like other compositors and OpenGL applications. So the issue may have been caused because of upstream changes but it could also be a faulty implementation that finally broke with the 450 driver. 

Note this thread on Nvidia's site about the upgrade: https://forums.developer.nvidia.com/t/nvidia-gpu-driver-440-xx-450-xx-bugs/142236

All KDE users.
Comment 4 br1ghtch1p 2020-07-27 07:51:30 UTC
I also don't have problem with other OpenGL applications and the bugs only occur with kwin and kscreenlocker with the 450 driver. My feeling is both nvidia and KDE needs to have a serious talk to sort this out. 

I have also submitted a bug report to nvidia.

@Arix You can also submit a bug report to nvidia if you haven't - making more noise could help make our case stronger:
  1. Run this in terminal:
sudo nvidia-bug-report.sh
This will create nvidia-bug-report.log.gz file
  2.Send this file and how to reproduce issue to this email: linux-bugs [ at ] nvidia [ dot ] com
Comment 5 Arix 2020-07-28 02:41:38 UTC
Quick update, did some more experimenting, this is no longer an issue with just KDE. Picom with GLX instead of software rendering crashes horribly on the 450 driver (and of course was also fine on 440). So this is definitely an Nvidia issue now. I filed a report with them like you suggested and I guess the best thing to do at this point is roll back to 440.
Comment 6 br1ghtch1p 2020-07-28 07:19:47 UTC
@Arix Thanks for the update. It is an nvidia bug but I also think KDE can meet nvidia halfway. I am staying put with the 450. A downgrade can be complicated in with a rolling release like Archlinux since packages are built pretty much together. 450 is fine in my system as long as I don't put my PC to suspend.
Comment 7 Christoph Feck 2020-07-28 13:46:25 UTC
Please add the link to the NVIDIA bug here.

I can only guess. NVIDIA drivers require applications to use a custom extension to notify applications of the graphics context resets, but now rejects applications that do not start using a new context.

Applications that didn't handle these resets used to show corrupted graphics (bug 364766) and developers weren't motivated to add NVIDIA-specific workarounds. Now they are forced to handle these context resets.
Comment 8 br1ghtch1p 2020-07-28 17:52:09 UTC
Created attachment 130464 [details]
nvidia-bug-report
Comment 9 br1ghtch1p 2020-07-28 17:55:21 UTC
I inadvertently deleted the original nvidia-bug-report I submitted. I created a new one and looking at it, the contents seem almost identical to the older one.
I have attached it here.

Hope this helps.
Comment 10 br1ghtch1p 2020-07-29 11:15:44 UTC
Just to say I have heard from Amrit Singh in nvidia and they will prepare a setup to try to reproduce the problem. Meanwhile I have attached some screenshots of the problem for reference.
Comment 11 br1ghtch1p 2020-07-29 11:16:50 UTC
Created attachment 130480 [details]
compositor_crash_on_wakeup
Comment 12 br1ghtch1p 2020-07-29 11:17:19 UTC
Created attachment 130481 [details]
notification_after_wakeup_from_suspend
Comment 13 br1ghtch1p 2020-07-29 11:17:50 UTC
Created attachment 130482 [details]
system_settings_after_graphics_reset
Comment 14 Nate Graham 2020-07-30 13:05:27 UTC

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