maintainer-feedback requested: [Bug 296195] graphics/nvidia-drm-612-kmod, graphics/drm-612-kmod: General Protection Fault in __nv_drm_gem_nvkms_handle_vma_fault, lkpi_vmf_insert_pnf_prot_locked, vm_page_busy_acquire

[email protected]
Newsgroups gmane.os.freebsd.devel.x11
Message-ID <[email protected]/bugzilla/>
Bugzilla Automation <[email protected]> has asked freebsd-x11 (Nobody)
<[email protected]> for maintainer-feedback:
Bug 296195: graphics/nvidia-drm-612-kmod, graphics/drm-612-kmod: General
Protection Fault in __nv_drm_gem_nvkms_handle_vma_fault,
lkpi_vmf_insert_pnf_prot_locked, vm_page_busy_acquire
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=296195



--- Description ---
Hello, I have a host running an Nvidia RTX 3060 gpu as the only graphics card,
and an Intel i9-7980XE CPU, running without problems with the proprietary
nvidia-driver package under X11, with FreeBSD 15.1-RELEASE.

Since KDE is going to remove X11 support, I decided to start trying the nvidia
graphics stack under Wayland.

On that FreeBSD 15.1 machine, running the 'latest' ports branch, I first
installed nvidia-drm-kmod, mantaining the nvidia-driver package already
installed with its dependencies, all up to date, and loaded nvidia-drm via
rc.conf after nvidia-modeset. At the time of writing, this means obtaining
drm-66 binary packages since drm-612 while present in the ports tree has not
yet been compiled and published to the pkg repositories.

hw.nvidiadrm.modeset=1

was already present in loader.conf

When nvidia-drm with the 6.6 drm stack is loaded on that machine, starting any
X11 or Wayland application results in a kernel panic because of a page fault
while in kernel mode (trap 12), with fault code "supervisor read data, page not
present" caused by drm_stub_open. Kernel Panic picture attached as
"drm-66-x11.jpg"

I then decided to uninstall all the nvidia-driver, nvidia-kmod and drm bits,
went to the ports tree and manually built nvidia-drm-612-kmod, drm-612-kmod,
egl-wayland, egl-wayland2, nvidia-driver and nvidia-driver-kmod.

Upon rebooting, now X11 applications work with nvidia-drm (-6.12) loaded, and
the sddm login manager starts without issue and starts kde or other X11 desktop
environments. But trying then to select a Plasma6 Wayland session results in
another, different kernel panic (attached as "drm-612-wayland.jpg").

It now fails with "fatal trap 9: general protection fault while in kernel
mode", caused by kwin_wayland.

Parts of the relevant backtrace seems to be around

"
trap_fatal+0x68
calltrap+0x8
vm_page_busy_acquire+0x93
lkpi_vmf_insert_pnf_prot_locked+0x105
__nv_drm_gem_nvkms_handle_vma_fault+0x75
linux_cdev_pager_populate+0x112
"

The base system is 15.1-RELEASE installed through the official distribution
sets/freebsd-update
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.