Bug 98457

Summary: [NVD9] GPU lockup after resume from hibernation with Nouveau driver and firmware-nonfree
Product: Mesa Reporter: wadev
Component: Drivers/DRI/nouveauAssignee: Nouveau Project <nouveau>
Status: RESOLVED MOVED QA Contact: Nouveau Project <nouveau>
Severity: normal    
Priority: medium CC: mirh
Version: 10.3   
Hardware: Other   
OS: All   
See Also: https://bugs.freedesktop.org/show_bug.cgi?id=97462
Whiteboard:
i915 platform: i915 features:

Description wadev 2016-10-27 08:29:51 UTC
With 4.7.0-1-amd64 debian kernel and 4.8.4 upstream kernel, the following symptom happens after resume from hibernation:

Oct 27 09:59:37 terra kernel: [    4.615904] nouveau 0000:01:00.0: NVIDIA GF119 (0d90a0a1)
Oct 27 09:59:37 terra kernel: [    4.763654] nouveau 0000:01:00.0: bios: version 75.19.56.00.00
Oct 27 09:59:37 terra kernel: [    4.764202] nouveau 0000:01:00.0: fb: 2048 MiB DDR3
Oct 27 09:59:37 terra kernel: [    4.822165] nouveau 0000:01:00.0: DRM: VRAM: 2048 MiB
Oct 27 09:59:37 terra kernel: [    4.822166] nouveau 0000:01:00.0: DRM: GART: 1048576 MiB
Oct 27 09:59:37 terra kernel: [    4.822168] nouveau 0000:01:00.0: DRM: TMDS table version 2.0
Oct 27 09:59:37 terra kernel: [    4.822168] nouveau 0000:01:00.0: DRM: DCB version 4.0
Oct 27 09:59:37 terra kernel: [    4.822169] nouveau 0000:01:00.0: DRM: DCB outp 00: 02000300 00000000
Oct 27 09:59:37 terra kernel: [    4.822170] nouveau 0000:01:00.0: DRM: DCB outp 01: 01000302 00020030
Oct 27 09:59:37 terra kernel: [    4.822171] nouveau 0000:01:00.0: DRM: DCB outp 02: 02011362 00020010
Oct 27 09:59:37 terra kernel: [    4.822172] nouveau 0000:01:00.0: DRM: DCB outp 03: 04022310 00000000
Oct 27 09:59:37 terra kernel: [    4.822172] nouveau 0000:01:00.0: DRM: DCB conn 00: 00001030
Oct 27 09:59:37 terra kernel: [    4.822173] nouveau 0000:01:00.0: DRM: DCB conn 01: 00002161
Oct 27 09:59:37 terra kernel: [    4.822174] nouveau 0000:01:00.0: DRM: DCB conn 02: 00000200
Oct 27 09:59:37 terra kernel: [    4.894804] nouveau 0000:01:00.0: DRM: MM: using COPY0 for buffer copies
Oct 27 09:59:37 terra kernel: [    5.082142] nouveau 0000:01:00.0: DRM: allocated 1920x1080 fb: 0x60000, bo ffff8c2694bae000
Oct 27 09:59:37 terra kernel: [    5.082217] fbcon: nouveaufb (fb0) is primary device
Oct 27 09:59:37 terra kernel: [    5.162211] nouveau 0000:01:00.0: fb0: nouveaufb frame buffer device
Oct 27 09:59:37 terra kernel: [    5.176376] [drm] Initialized nouveau 1.3.1 20120801 for 0000:01:00.0 on minor 0
Oct 27 10:11:27 terra kernel: [  682.165720] nouveau 0000:01:00.0: DRM: suspending console...
Oct 27 10:11:27 terra kernel: [  682.165725] nouveau 0000:01:00.0: DRM: suspending display...
Oct 27 10:11:27 terra kernel: [  682.165747] nouveau 0000:01:00.0: DRM: evicting buffers...
Oct 27 10:11:27 terra kernel: [  682.264493] nouveau 0000:01:00.0: DRM: waiting for kernel channels to go idle...
Oct 27 10:11:27 terra kernel: [  682.264531] nouveau 0000:01:00.0: DRM: suspending client object trees...
Oct 27 10:11:27 terra kernel: [  682.264877] nouveau 0000:01:00.0: DRM: suspending kernel object tree...
Oct 27 10:11:27 terra kernel: [  683.204263] nouveau 0000:01:00.0: DRM: resuming kernel object tree...
Oct 27 10:11:27 terra kernel: [  683.261389] nouveau 0000:01:00.0: DRM: resuming client object trees...
Oct 27 10:11:27 terra kernel: [  683.261572] nouveau 0000:01:00.0: DRM: resuming display...
Oct 27 10:11:27 terra kernel: [  683.312957] nouveau 0000:01:00.0: DRM: resuming console...
Oct 27 10:11:27 terra kernel: [  683.313003] nouveau 0000:01:00.0: fifo: PBDMA0: 00010000 [] ch 1 [007fd51000 DRM] subc 0 mthd 0000 data 00000000
Oct 27 10:11:27 terra kernel: [  683.313019] nouveau 0000:01:00.0: fifo: PBDMA0: 00010000 [] ch 1 [007fd51000 DRM] subc 0 mthd 0000 data 00000000
Oct 27 10:11:27 terra kernel: [  683.313039] nouveau 0000:01:00.0: fifo: PBDMA0: 00010000 [] ch 1 [007fd51000 DRM] subc 0 mthd 0000 data 00000000
Oct 27 10:11:27 terra kernel: [  683.313052] nouveau 0000:01:00.0: fifo: PBDMA0: 00010000 [] ch 1 [007fd51000 DRM] subc 0 mthd 0000 data 00000000
Oct 27 10:11:27 terra kernel: [  683.313065] nouveau 0000:01:00.0: fifo: PBDMA0: 00010000 [] ch 1 [007fd51000 DRM] subc 0 mthd 0000 data 00000000
Oct 27 10:11:27 terra kernel: [  683.313079] nouveau 0000:01:00.0: fifo: PBDMA0: 00010000 [] ch 1 [007fd51000 DRM] subc 0 mthd 0000 data 00000000
Oct 27 10:11:27 terra kernel: [  683.313092] nouveau 0000:01:00.0: fifo: PBDMA0: 00010000 [] ch 1 [007fd51000 DRM] subc 0 mthd 0000 data 00000000
Oct 27 10:11:27 terra kernel: [  683.313106] nouveau 0000:01:00.0: fifo: PBDMA0: 00010000 [] ch 1 [007fd51000 DRM] subc 0 mthd 0000 data 00000000
Oct 27 10:11:27 terra kernel: [  683.313119] nouveau 0000:01:00.0: fifo: PBDMA0: 00010000 [] ch 1 [007fd51000 DRM] subc 0 mthd 0000 data 00000000
Oct 27 10:11:27 terra kernel: [  683.313133] nouveau 0000:01:00.0: fifo: PBDMA0: 00010000 [] ch 1 [007fd51000 DRM] subc 0 mthd 0000 data 00000000
Oct 27 10:11:27 terra kernel: [  683.313146] nouveau 0000:01:00.0: fifo: PBDMA0: 00010000 [] ch 1 [007fd51000 DRM] subc 0 mthd 0000 data 00000000
Oct 27 10:11:27 terra kernel: [  683.313160] nouveau 0000:01:00.0: fifo: PBDMA0: 00010000 [] ch 1 [007fd51000 DRM] subc 0 mthd 0000 data 00000000
Oct 27 10:11:27 terra kernel: [  683.313174] nouveau 0000:01:00.0: fifo: PBDMA0: 00010000 [] ch 1 [007fd51000 DRM] subc 0 mthd 0000 data 00000000
Oct 27 10:11:27 terra kernel: [  683.313187] nouveau 0000:01:00.0: fifo: PBDMA0: 00010000 [] ch 1 [007fd51000 DRM] subc 0 mthd 0000 data 00000000
Oct 27 10:11:27 terra kernel: [  683.313201] nouveau 0000:01:00.0: fifo: PBDMA0: 00010000 [] ch 1 [007fd51000 DRM] subc 0 mthd 0000 data 00000000
Oct 27 10:11:27 terra kernel: [  683.313214] nouveau 0000:01:00.0: fifo: PBDMA0: 00010000 [] ch 1 [007fd51000 DRM] subc 0 mthd 0000 data 00000000
Oct 27 10:11:27 terra kernel: [  683.313228] nouveau 0000:01:00.0: fifo: PBDMA0: 00010000 [] ch 1 [007fd51000 DRM] subc 0 mthd 0000 data 00000000
Oct 27 10:11:27 terra kernel: [  683.313244] nouveau 0000:01:00.0: fifo: PBDMA0: 00010000 [] ch 1 [007fd51000 DRM] subc 0 mthd 0000 data 00000000
Oct 27 10:11:27 terra kernel: [  683.313257] nouveau 0000:01:00.0: fifo: PBDMA0: 00010000 [] ch 1 [007fd51000 DRM] subc 0 mthd 0000 data 00000000
Oct 27 10:11:27 terra kernel: [  683.480999] nouveau 0000:01:00.0: DRM: GPU lockup - switching to software fbcon
Oct 27 10:11:33 terra kernel: [  690.449768] nouveau 0000:01:00.0: fifo: write fault at 00011b6000 engine 00 [PGRAPH] client 0f [GPC0/PROP] reason 02 [PAGE_NOT_PRESENT] on channel 2 [007fbb$
Oct 27 10:11:33 terra kernel: [  690.449896] nouveau 0000:01:00.0: fifo: gr engine fault on channel 2, recovering...

This happens when I suspend from tty0 (console) with "echo disk > /sys/power/state".
After that, no symptoms of the previous lockup (with the Firefox Google Maps rendering issue), that is, freezing, general unresponsiveness or similar; I get the console back and can restart the display manager, then all works OK (except that I have to kill instances of singleton-like processes probably clinging to the defunct display).

If I do the same from an X terminal, then at the end of the resume process, the system does a cold boot.

No probably related messages during the shutdown though.

Version info:

OpenGL vendor string: nouveau
OpenGL renderer string: Gallium 0.4 on NVD9
OpenGL core profile version string: 3.3 (Core Profile) Mesa 10.3.2
OpenGL core profile shading language version string: 3.30
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile

(I used gcc 4.9.2 to compile the kernel and modules, if that means anything.)

I'm going to try the "trunk" build or whatever when I will have some time.
Comment 1 wadev 2016-11-04 08:28:57 UTC
I tried the trunk (of 2016-10-27) of mesa, libdrm and xf86-video-nouveau, no dice.
I could not, however, try the kernel driver (which I presume is mainly for text mode and probably comprises the framebuffer backend of the libdrm), as I am at 4.8.4 now and the nouveau kernel driver repository is fit for some such arcane kernel version that it has been removed even from OpenVZ and such. :P

If anyone has some ideas on how to find an "edger" repository of the nouveau kernel driver object that is ahead of the kernel.org state (if any), please let me know.
Comment 2 wadev 2016-11-04 08:37:31 UTC
I've added #97462 as "related", since the symptom seems exactly the same.

The only difference is that while that one could have been reproduced - by me - only with Firefox Beta && ESR and Google Maps, presumably with all "force-enabled" settings, while suspend-to-disk and resume was unaffected,
this one is not reproduced by Firefox settings and websites, but instead happens on each and every resume from hibernation.

For the inexperienced eye, it might just appear that the computer is almost completely hung, with the desktop environment showing the time of the hibernation, and the mouse cursor is the only symptom of actual functionality, and even that is only for a while.

If, however, someone hibernates with "echo disk >/sys/power/state" from a real console (not an X terminal), one gets the messages below.

This explanation above is mainly added for search engine indexing reasons, may someone find their problem accordingly.
Comment 3 Pierre Moreau 2016-11-04 09:07:08 UTC
(In reply to wadev from comment #1)
> I tried the trunk (of 2016-10-27) of mesa, libdrm and xf86-video-nouveau, no
> dice.
> I could not, however, try the kernel driver (which I presume is mainly for
> text mode and probably comprises the framebuffer backend of the libdrm), as
> I am at 4.8.4 now and the nouveau kernel driver repository is fit for some
> such arcane kernel version that it has been removed even from OpenVZ and
> such. :P
> 
> If anyone has some ideas on how to find an "edger" repository of the nouveau
> kernel driver object that is ahead of the kernel.org state (if any), please
> let me know.

You could try https://github.com/skeggsb/linux/tree/linux-4.10 which has the latest patches, but is not an out-of-tree version. Or the latest image from https://nouveau.pmoreau.org/ (though it is not as recent as the previous link, as the image was generated on Monday).
Comment 4 wadev 2016-11-10 08:56:18 UTC
Moving this to Mesa since it seems that's where it belongs.
Comment 5 wadev 2016-11-10 08:59:16 UTC
(In reply to Pierre Moreau from comment #3)
> latest patches, but is not an out-of-tree version. Or the latest image from
> https://nouveau.pmoreau.org/ (though it is not as recent as the previous
> link, as the image was generated on Monday).

Thanks, I'm trying that now, and will report back.
Comment 6 mirh 2018-04-07 13:36:52 UTC
(In reply to wadev from comment #5)
> Thanks, I'm trying that now, and will report back.

So.. news then?
Comment 7 GitLab Migration User 2019-09-18 20:43:14 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/1113.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.