Bug 277827 - x11/nvidia-driver: NVidia driver causes kernel crash during boot when it is loaded from /boot/loader.conf
Summary: x11/nvidia-driver: NVidia driver causes kernel crash during boot when it is l...
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: Alexey Dokuchaev
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-03-20 04:39 UTC by Yuri Victorovich
Modified: 2024-04-01 06:42 UTC (History)
2 users (show)

See Also:
bugzilla: maintainer-feedback? (danfe)


Attachments
screenshot.png (317.94 KB, image/png)
2024-03-20 04:39 UTC, Yuri Victorovich
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Yuri Victorovich freebsd_committer freebsd_triage 2024-03-20 04:39:05 UTC
After port and kernel update the system began to crash at boot, when /boot/loader.conf has nvidia-modeset_load="YES".

See the attached screenshot.

Interestingly, the same driver loads successfully manually using kldload(8).
This puzzles me.

No other kernel modules are involved.

I had to prevent nvidia-modeset.ko during boot in order to boot the system at all.

nvidia-driver-550.54.14
FreeBSD 14.0-STABLE #2 stable/14-n267000-d45714ade3de: Tue Mar 19 03:37:12 PDT 2024
Comment 1 Yuri Victorovich freebsd_committer freebsd_triage 2024-03-20 04:39:48 UTC
Created attachment 249319 [details]
screenshot.png
Comment 2 Yuri Victorovich freebsd_committer freebsd_triage 2024-03-20 04:59:25 UTC
NVIDIA GeForce RTX 2060
Comment 3 Bartek Jasicki 2024-03-25 08:51:04 UTC
Seems like duplicate of #277364 for me. The reason: the driver is too big for the FreeBSD's loader and shouldn't be loaded via loader.conf. More details in bug #277028, comment #15
Comment 4 Yuri Victorovich freebsd_committer freebsd_triage 2024-03-26 03:24:56 UTC
bug#277967 The loader should fail gracefully when /boot/loader.conf attempts to load a module that is too large
Comment 5 russo 2024-03-31 22:25:26 UTC
Is /usr/ports/UPDATING no longer the right place for information like this?

Having used nvidia-driver for many, many years and having been in the habit of loading it in /boot/loader.conf, this issue bit me today, too.  I managed to recover from it relatively easily, and after recovering finally read the pkg-message printed by the driver on install.  The pkg-message for the driver had apparently been changed to recommend kld_list and NOT loader.conf back in 2020, but the fact is that those pkg-message outputs often scroll off the screen before I can read them during a big port upgrade run so I never noticed it and it never kernel panicked for me before this latest update.

Since I *am* in the habit of reading "pkg updating" before upgrading, having a warning about trying to load the nvidia driver through the loader.conf method show up there would have caught my attention long ago.

Perhaps you can add an entry to UPDATING that makes it more obvious that the old loader.conf recommendations are now recommendations to NEVER load graphics modules via loader.conf?
Comment 6 Graham Perrin 2024-04-01 06:42:14 UTC
(In reply to russo from comment #5)

Re: your bug 277364 comment 10

Don't cross-post in that way; and see my response there.