When I start an application with optirun and/or primus and suspend my laptop, the application is frozen on resume. From what I gather of dmesg, the driver doesn’t seem to be able to wake up the card or restore its state properly.
Steps to reproduce:
That’s the easy part… run glxspheres (32bit or 64bit) through optirun, suspend, resume and voilà ! glxspheres should be frozen. The rest of the system works fine. Sometimes restarting the opengl app will work, sometimes a full system restart is needed.
This works with any OpenGL application that I try to run with optirun. it’s been happening since at least septembre (might be older.)
So far, the most useful logs I can produce are an extract of my dmesg with the whole suspend/resume process. File is attached. You should notice the mess here:
I’ll attach an nvidia-bug-report log. looks more and more like a bad driver bug.
I’l bee investigating the suspend process using the instructions here: Best practice to debug Linux* suspend/hibernate issues and it looks like while bumblebee does it’s job of loading and unloading the module on application start and stop, while the driver does indeed accept the call to suspend and to resume in a timely fashion, I still get some very bad looking Xid messages in the kernel logs and the usual application freeze. nvidia-bug-report.log.gz (152 KB)
Ok, I’ll add a new report to this “case” (in fact a forum post which feels really lonely).
This report was generated after the following procedure:
start an application with optirun (glxspheres64)
suspend to RAM
resume the system
----> nvidia report capture happens here
Kill the frozen app
Note that the report was generated with those 2 kernel command line option for more debug information on suspend stuff: initcall_debug no_console_suspend
Also, I’ve been using the following configuration for bumblebee (just being thorough even if the bug isn’t on bumblebee’s side IMHO):
Ok, so TL;DR suspend and resume works when I avoid using bumblebee.
On the other hand, I get gnome-shell crashes when starting it through GDM and I get a blackscreen of near-death when pluging in a screen on the HDMI port (gets back to normal when I unplug the monitor).
I’ll try to report the gnome-shell crash upstream. I’ll probably get the usual “stop using a proprietary driver” kind of response.
As for the secondary monitor issue, I have no idea what I can do.
Ok, both issues seem to be gnome related. For once, I’ve found an ubuntu bug report that actually accurately describes the issue. An accurate bug report on ubuntu means the end of the world is near, or that winter is coming :)
I’ll wait for a gnome fix and report back when I have news.
Oh, @sandipt, what do you think causes the driver crash on resume ? Bumblebee ? nvidia driver issue ? misuse of something ? I’ve got an ongoing bug report with bumblebee and I’d like to be able to give them some feedback on my findings.
I get screen corruption when resuming from suspend (I can make a screenshot if needed)
even when not using GDM which seems unable to start x properly when not using bumblebee, gnome-shell still gives me a black screen when pluging in a monitor on either HDMI or DP.
So, I can play games and suspend, but not much else…