NetBSD-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
xsrc/61102: RTX2060 nouveau X driver crashes during fallback to modesetting due to conflicting exported symbols
>Number: 61102
>Category: xsrc
>Synopsis: RTX2060 nouveau X driver crashes during fallback to modesetting due to conflicting exported symbols
>Confidential: no
>Severity: non-critical
>Priority: medium
>Responsible: xsrc-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Tue Dec 01 10:10:00 +0000 2026
>Originator: Zafer Aydogan
>Release: NetBSD-10 and NetBSD-11
>Organization:
Acme Signature Diff Inc.
>Environment:
NetBSD-10 amd64
>Description:
Both the nouveau and modesetting modules export a function named drmmode_pre_init(), but the function has a different signature in each driver. When Xorg detects that the old nouveau driver doesn't support the NV166 GPU, it falls back to modesetting. However, due to the conflicting symbol names, it ends up calling nouveau's version of drmmode_pre_init() instead of the one belonging to modesetting. This causes a crash because the two drivers expect different per-screen data structures.
nouveau: Bool drmmode_pre_init(ScrnInfoPtr, int fd, int cpp)
modesetting: Bool drmmode_pre_init(ScrnInfoPtr, drmmode_ptr, int cpp)
The patch adds -fvisibility=hidden to the nouveau module build, keeping internal functions private to prevent symbol conflicts with other X drivers allowing the RTX 2060 to work with X on NetBSD 10 through the modesetting driver.
>How-To-Repeat:
start X with RTX2060 will crash X
>Fix:
--- a/external/mit/xorg/server/drivers/xf86-video-nouveau/Makefile
+++ b/external/mit/xorg/server/drivers/xf86-video-nouveau/Makefile
@@ -41,6 +41,11 @@
CPPFLAGS+= -I${DESTDIR}${X11INCDIR}/libdrm
CPPFLAGS+= -DNV_DRIVER_DATE=${DRIVER_DATE}
+# Keep internal helpers (drmmode_pre_init) private to this
+# module; other video drivers use the same names with different ABIs.
+COPTS+= -fvisibility=hidden
+
.include "../Makefile.xf86-driver"
# XXX
~
~
Home |
Main Index |
Thread Index |
Old Index