Skip to contentSkip to conversation

New: any OpenGL application crashes X, locks up machine with nouveau and PRIME

Bug 82152 [email protected] 1 participant 14 messages Aug 4, 2014 – Sep 18, 2019 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

https://bugs.freedesktop.org/show_bug.cgi?id=82152

Priority: medium
Bug ID: 82152
Assignee: [email protected]
Summary: any OpenGL application crashes X, locks up machine
with nouveau and PRIME
Severity: normal
Classification: Unclassified
OS: Linux (All)
Reporter: [email protected]
Hardware: x86-64 (AMD64)
Status: NEW
Version: 10.2
Component: Drivers/DRI/nouveau
Product: Mesa

Created attachment 104017
--> https://bugs.freedesktop.org/attachment.cgi?id=104017&action=edit
Full output of journalctl, including kernel logs, between system boot and poweroff after crash.

Any OpenGL application, even as minor as glxinfo, either crashes Xorg or locks up the machine entirely (no network, magic sysrq fails) when started with DRI_PRIME=1. Has happened across multiple Mesa and kernel versions, most recently with Mesa 10.2.4 and Linux 3.15.8 on Arch Linux.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

A message that is not in the archive (sent off-list or not yet received): bug-82152-8800-V0hAGp6uBxMKqLRl/[email protected]/

#2 lore raw

[Bug 82152] any OpenGL application crashes X, locks up machine with nouveau and PRIME

https://bugs.freedesktop.org/show_bug.cgi?id=82152

--- Comment #1 from Patrick Burroughs <[email protected]> --- Created attachment 104018
--> https://bugs.freedesktop.org/attachment.cgi?id=104018&action=edit
Output from crashing glxinfo.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#3 lore raw

[Bug 82152] any OpenGL application crashes X, locks up machine with nouveau and PRIME

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=82152

Patrick Burroughs <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

 Attachment #104017|0                           |1

is obsolete| |

--- Comment #2 from Patrick Burroughs <[email protected]> --- Created attachment 104019
--> https://bugs.freedesktop.org/attachment.cgi?id=104019&action=edit
Kernel logs filtered from journal output.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#4 lore raw

[Bug 82152] any OpenGL application crashes X, locks up machine with nouveau and PRIME

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=82152

--- Comment #3 from Patrick Burroughs <[email protected]> --- Created attachment 104020
--> https://bugs.freedesktop.org/attachment.cgi?id=104020&action=edit
Xorg.0.log from crash.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#5 lore raw

[Bug 82152] any OpenGL application crashes X, locks up machine with nouveau and PRIME

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=82152

--- Comment #4 from Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/[email protected]> --- There are two issues:

(a) The null deref in the kernel when putting the card back to sleep
(b) The fact that init of the card fails

To mitigate the first, you could boot with "nouveau.runpm=0". However you still wouldn't get working accel with nouveau.

The claim by NVIDIA was that the graph-not-powered-up problem was restricted to GK104/GK106. But looking at the latest code, it seems like it runs on GK107 as well (not in Ben's repo anymore, but still in linux-3.16) and perhaps has the reverse effect there.

I wonder if a patch like

nvkm/engine/graph/nve4.c +1 -1
index 51e0c07..4dd376e 100644
@@ -350,7 +350,7 @@ nve4_graph_oclass = &(struct nvc0_graph_oclass) {
                .ctor = nvc0_graph_ctor,
                .dtor = nvc0_graph_dtor,
                .init = nve4_graph_init,
-               .fini = nve4_graph_fini,
+               .fini = _nouveau_graph_fini,
        },
        .cclass = &nve4_grctx_oclass,
        .sclass = nve4_graph_sclass,

will help you out. (You'll need to apply it with care... cd into drivers/gpu/drm/nouveau/core and apply it with patch -p2 )

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#6 lore raw

[Bug 82152] [NVE7] NULL deref when putting card back to sleep after unsuccessful init (HUB_INIT timeout)

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=82152

Ilia Mirkin <imirkin-FrUbXkNCsVf2fBVCVOL8/[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

            Summary|any OpenGL application      |[NVE7] NULL deref when
                   |crashes X, locks up machine |putting card back to sleep
                   |with nouveau and PRIME      |after unsuccessful init
                   |                            |(HUB_INIT timeout)
Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#7 lore raw

[Bug 82152] [NVE7] NULL deref when putting card back to sleep after unsuccessful init (HUB_INIT timeout)

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=82152

--- Comment #5 from Patrick Burroughs <[email protected]> --- I get the same crash and HUB_INIT timeout after the patch. Attaching dmesg.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#8 lore raw

[Bug 82152] [NVE7] NULL deref when putting card back to sleep after unsuccessful init (HUB_INIT timeout)

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=82152

--- Comment #6 from Patrick Burroughs <[email protected]> --- Created attachment 104026
--> https://bugs.freedesktop.org/attachment.cgi?id=104026&action=edit
dmesg output post initial patch.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#9 lore raw

[Bug 82152] [NVE7] NULL deref when putting card back to sleep after unsuccessful init (HUB_INIT timeout)

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=82152

--- Comment #7 from Tobias Klausmann <[email protected]> --- If i look at the system + the kernel bug, this looks similar to a problem i was facing some weeks ago:

so i'd suggest to try DRI3 with the whole package:

Update your packages:
xf86-video-intel
mesa
(all dependencies of course)
Remove:
xf86-video-nouveau (with DRI3 you wont need it to do: DRI_PRIME=1 myprog)

you'll need a kernel with rendernodes enabled (boot with drm.rnodes=1) you may need to add a file to /etc/udev/rules.d/ containing:

SUBSYSTEM=="drm", IMPORT{builtin}="path_id"

to get ID_PATH tags for rendernodes.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#10 lore raw

[Bug 82152] [NVE7] NULL deref when putting card back to sleep after unsuccessful init (HUB_INIT timeout)

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=82152

--- Comment #8 from Patrick Burroughs <[email protected]> --- Created attachment 104031
--> https://bugs.freedesktop.org/attachment.cgi?id=104031&action=edit
dmesg output using DRI3

Using DRI3 defers all errors until after attempting to run an OpenGL application with DRI_PRIME=1, and prevents the crash from bringing down X or the kernel.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#11 lore raw

[Bug 82152] [NVE7] NULL deref when putting card back to sleep after unsuccessful init (HUB_INIT timeout)

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=82152

--- Comment #9 from Patrick Burroughs <[email protected]> --- Created attachment 104033
--> https://bugs.freedesktop.org/attachment.cgi?id=104033&action=edit
dmesg output using firmware ripped from the blob

Using DRI3 and the firmware from the blob I still get crashes, but finally have a different error message in dmesg.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list [email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#12 lore raw

[Bug 82152] [NVE7] NULL deref when putting card back to sleep after unsuccessful init (HUB_INIT timeout)

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=82152

--- Comment #10 from Patrick Burroughs <[email protected]> --- Tried again with Linux 3.19.3 and Mesa 10.5.2, no changes.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/nouveau

#13 lore raw

[Bug 82152] [NVE7] NULL deref when putting card back to sleep after unsuccessful init (HUB_INIT timeout)

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=82152

--- Comment #11 from Patrick Burroughs <celti-ND9dHWfaFg1BDLzU/[email protected]> --- Created attachment 122992
--> https://bugs.freedesktop.org/attachment.cgi?id=122992&action=edit
dmesg output with errors from successful load

With Linux 4.5.0-ARCH, Mesa 11.1.2-3, DRI3, and using modesetting_drv instead of intel_drv for the main display (not sure if that's relevant)... everything works! (If "everything" consists of glxinfo, glxgears, and a few minutes of Darwinia.)

I do still get errors in dmesg, though, as attached. I'll be happy to follow along and do whatever digging is necessary to eradicate them, if someone wants to take up that task.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau

#14 lore raw

[Bug 82152] [NVE7] NULL deref when putting card back to sleep after unsuccessful init (HUB_INIT timeout)

In reply to a message not in the archive

https://bugs.freedesktop.org/show_bug.cgi?id=82152

GitLab Migration User <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|---                         |MOVED

--- Comment #12 from GitLab Migration User <[email protected]> --- -- 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/1066.

Signature · 2 lines
You are receiving this mail because:
You are the assignee for the bug.

_______________________________________________
Nouveau mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/nouveau