New user, new install of FreeBSD 14.3 on Lenovo P520

Hi,

I installed the base system and then Xorg and the nvidia-drm-kmod. I followed the instructions in the handbook, and added nvidia-drm to /etc/rc.conf. I also created the 20-nvidia.conf file. I ran:
# pkg info nvidia-driver
to find that the Nvidia driver version is 570.169.1402000. When I try to run startx, I get two errors. The first error is Fatal server error: no screens found(EE) I found the second error in the log file:
Failed to initialize the Nvidia kernel module.

My Lenovo P520 is using an Nvidia GP104GL [Quadro P4000] graphics card.

Not sure what the issue is, but I have seen some posts about a bug. What I need to know is how to sort out my system and get X running. I am using a very basic system with Xorg and Spectrwm, and just logging in from the terminal and using the startx command, so rocket science shouldn't be involved...
 
Please post your /var/log/Xorg.0.log, you can easily do this with: cat /var/log/Xorg.0.log | nc termbin.com 9999 then post the URL here.
 
T-Aoki is trying to get them added to the kmods repository. And at the end of this month (tomorrow, 30 sept.) 14.2 will be EoL. Then both 'latest' and the new 2025Q5 quarterly package repository will be built for 14.3-RELEASE. Package repositories still had to support 14.2-RELEASE during the three month 'grace period'.

If you want a solution now, build graphics/nvidia-drm-kmod from ports.
 
T-Aoki is trying to get them added to the kmods repository.
I'm perhaps overlooking essential details, but given:
What I need to know is how to sort out my system and get X running. I am using a very basic system with Xorg and

@ T-Aoki: for OP, isn't
pkg install nvidia-driver*
on 14.3-RELEASE using quarterly sufficient (for now) to get version 570.169.1402000 up and running for X11 ('Xorg')?

___
* 14.3-RELEASE using quarterly:
Code:
# pkg rquery -x '[%R] %o %n %v' '^nvidia-driver'|column -t
[FreeBSD]  x11/nvidia-driver        nvidia-driver        570.169.1402000
[FreeBSD]  x11/nvidia-driver-304    nvidia-driver-304    304.137.1402000_10
[FreeBSD]  x11/nvidia-driver-340    nvidia-driver-340    340.108.1402000_4
[FreeBSD]  x11/nvidia-driver-390    nvidia-driver-390    390.157.1402000
[FreeBSD]  x11/nvidia-driver-470    nvidia-driver-470    470.256.02.1402000_1
[FreeBSD]  x11/nvidia-driver-devel  nvidia-driver-devel  575.64.1402000
 
@ T-Aoki: for OP, isn't
pkg install nvidia-driver*
on 14.3-RELEASE using quarterly sufficient (for now) to get version 570.169.1402000 up and running for X11 ('Xorg')?
No, for now. As SirDice noted in comment #3, current official pkgs in FreeBSD-ports repo are built against 14.2, and FreeBSD-kmod repo doesn't have nvidia stuff as of current strict limitations for builders used for FreeBSD-kmod repo.

What I'm trying to do on review D52178 is to allow FreeBSD-kmod builder to allow building kmod parts of nvidia stuff on it.

And SirDice noted in comment #4, upcoming new quarterly should be built against 14.3 as of EoL of 14.2. So binary installation / upgrading should work once
  • 2025Q4 is branched,
  • and full build of 2025Q4 is finished and available
regardless review D52178 is committed before branch or not. But I want it to be landed before branch to allow upcoming 15.0-Release to have it in its beginning.
 
T-Aoki is trying to get them added to the kmods repository. And at the end of this month (tomorrow, 30 sept.) 14.2 will be EoL. Then both 'latest' and the new 2025Q5 quarterly package repository will be built for 14.3-RELEASE. Package repositories still had to support 14.2-RELEASE during the three month 'grace period'.

If you want a solution now, build graphics/nvidia-drm-kmod from ports.
OK, I uninstalled the nvidia-drm-kmod*. make went OK for the module, but for install I just get a usage prompt. The /usr/ports/graphics/nvidia-drm-kmod/ directory contains the following:

Makefile
Makefile.common
pkg-descr
pkg-message
work

Not sure where to go from here…
 
OK, I uninstalled the nvidia-drm-kmod*. make went OK for the module, but for install I just get a usage prompt. The /usr/ports/graphics/nvidia-drm-kmod/ directory contains the following:

Makefile
Makefile.common
pkg-descr
pkg-message
work

Not sure where to go from here…
cd /usr/ports/graphics/nvidia-drm-kmod/ && make package && pkg install ./work/pkg/*.pkg
 
OK, now I have installed the ports version, confirmed by running:

pkg info nvidia-drm-kmod*
nvidia-drm-kmod-570.124.04


I have also added hw.nvidiadrm.modeset="1" to /boot/loader.conf and rebooted the system. Unfortunately, I get the same message when I try
startx. /var/log/Xorg.0.log contains the same as before.
kldstat confirms that the module isn't loading.

Any more ideas?
 
OK, I uninstalled the nvidia-drm-kmod*. make went OK for the module, but for install I just get a usage prompt. The /usr/ports/graphics/nvidia-drm-kmod/ directory contains the following:

Makefile
Makefile.common
pkg-descr
pkg-message
work

Not sure where to go from here…
FYI: work is the working directory for building.
Usually, it's not needed after build and install goes fine.
make clean
on the ports directory (here, /usr/ports/graphics/nvidia-drm-kmod) cleans it out.
 
OK, now I have installed the ports version, confirmed by running:

pkg info nvidia-drm-kmod*
nvidia-drm-kmod-570.124.04


I have also added hw.nvidiadrm.modeset="1" to /boot/loader.conf and rebooted the system. Unfortunately, I get the same message when I try
startx. /var/log/Xorg.0.log contains the same as before.
kldstat confirms that the module isn't loading.

Any more ideas?
To use graphics/nvidia-drm-kmod, related nvidia driver staff needs to be exactly the same version. For 14.3-Release, by default, these 2 ports,
which need to be built against exactly same /usr/src/sys/ contents as running (or to-be-run after reboot) kernel.

The latter is the actual driver to drive GPU, and the former is the interface layer between DRM codes and actual nvidia GPU driver.
Basically, nvidia-drm.ko, which is installed by the former, automatically pulls in the kmods provided by the latter (nvidia-modeset.ko and nvidia.ko) and others provided by graphics/drm-61-kmod.
 
Back
Top