startx fails after upgrade to 15.1 from 15.0

As titled, my workstation worked just fine on 15.0. After the upgrade to 15.1, startx fails. I tried deleting nvidia-driver and nvidia-kmod and reinstalled them. Didn't help.
I can, however, log into XFCE desktop via XRDP.
Code:
% pkg info | grep nvidia
libva-nvidia-driver-0.0.17     NVDEC-based backend for VAAPI
linux-nvidia-libs-595.84       NVIDIA graphics libraries and programs (Linux)
nvidia-driver-595.84           NVIDIA graphics driver userland
nvidia-drm-66-kmod-595.84.1500068_1 NVIDIA DRM Kernel Module
nvidia-kmod-595.84.1500068     NVIDIA graphics driver kernel module
nvidia-settings-595.84         Display Control Panel for NVIDIA graphics
nvidia-xconfig-595.84          NVIDIA graphics X configuration utility

/var/log/Xorg.0.log
Code:
X.Org X Server 1.21.1.24
X Protocol Version 11, Revision 0
[   757.834] Current Operating System: FreeBSD amd_wkst 15.1-RELEASE-p2 FreeBSD 15.1-RELEASE-p2 releng/15.1-n283596-aadd58dddcbc GENERIC amd64
[   757.834]  
[   757.834] Current version of pixman: 0.46.4
[   757.834]     Before reporting problems, check [URL]http://wiki.x.org[/URL]
    to make sure that you have the latest version.
[   757.834] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   757.834] (==) Log file: "/var/log/Xorg.0.log", Time: Tue Aug 11 17:42:28 2026
[   757.834] (==) Using config directory: "/usr/local/etc/X11/xorg.conf.d"
[   757.834] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
[   757.834] (==) No Layout section.  Using the first Screen section.
[   757.834] (==) No screen section available. Using defaults.
[   757.834] (**) |-->Screen "Default Screen Section" (0)
[   757.834] (**) |   |-->Monitor "<default monitor>"
[   757.834] (==) No device specified for screen "Default Screen Section".
    Using the first device section listed.
[   757.834] (**) |   |-->Device "NVIDIA Card"
[   757.834] (==) No monitor specified for screen "Default Screen Section".
    Using a default monitor configuration.
[   757.834] (**) Allowing byte-swapped clients
[   757.834] (==) Automatically adding devices
[   757.834] (==) Automatically enabling devices
[   757.834] (==) Automatically adding GPU devices
[   757.834] (==) Automatically binding GPU devices
[   757.834] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   757.835] (WW) The directory "/usr/local/share/fonts/util/" does not exist.
[   757.835]     Entry deleted from font path.
[   757.835] (**) FontPath set to:
    /usr/local/share/fonts/100dpi/,
    /usr/local/share/fonts/75dpi/,
    /usr/local/share/fonts/TTF/,
    /usr/local/share/fonts/Type1/,
    /usr/local/share/fonts/encodings/,
    /usr/local/share/fonts/misc/,
    /usr/local/share/fonts/dejavu/,
    /usr/local/share/fonts/urwfonts/,
    /usr/local/share/fonts/urwfonts-ttf/,
    /usr/local/share/fonts/webfonts/,
    /usr/local/share/fonts/terminus-font/,
    /usr/local/share/fonts/TerminusTTF/,
    /usr/local/share/fonts/wqy/,
    /usr/local/share/fonts/Liberation/,
    /usr/local/share/fonts/OTF/,
    /usr/local/share/fonts/LinLibertineG/,
    /usr/local/share/fonts/linuxlibertine/,
    /usr/local/share/fonts/MS_TrueType/,
    /usr/local/share/fonts/bitstream-vera/,
    /usr/local/share/fonts/Carlito/,
    /usr/local/share/fonts/Caladea/,
    /usr/local/share/fonts/GentiumBasic/,
    /usr/local/share/fonts/cyrillic/,
    /usr/local/share/fonts/twemoji-color-font-ttf/,
    /usr/local/share/fonts/misc/,
    /usr/local/share/fonts/TTF/,
    /usr/local/share/fonts/OTF/,
    /usr/local/share/fonts/Type1/,
    /usr/local/sha
[   757.835] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[   757.835] (II) The server relies on udev to provide the list of input devices.
    If no devices become available, reconfigure udev or disable AutoAddDevices.
[   757.835] (II) Module ABI versions:
[   757.835]     X.Org ANSI C Emulation: 0.4
[   757.835]     X.Org Video Driver: 25.2
[   757.835]     X.Org XInput driver : 24.4
[   757.835]     X.Org Server Extension : 10.0
[   757.841] (II) xfree86: Adding drm device (/dev/dri/card0)
[   757.841] (II) Platform probe for /dev/dri/card0
[   757.841] (EE) /dev/dri/card0: failed to query DRM version
[   757.841] (--) PCI:*(43@0:0:0) 10de:2786:1458:40e6 rev 161, Mem @ 0xfb000000/16777216, 0x7800000000/17179869184, 0x7c00000000/33554432, I/O @ 0x0000e000/128, BIOS @ 0x????????/65536
[   757.841] (II) "glx" will be loaded by default.
[   757.841] (II) LoadModule: "glx"
[   757.841] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[   757.842] (II) Module glx: vendor="X.Org Foundation"
[   757.842]     compiled for 1.21.1.24, module version = 1.0.0
[   757.842]     ABI class: X.Org Server Extension, version 10.0
[   757.842] (II) LoadModule: "nvidia"
[   757.842] (II) Loading /usr/local/lib/xorg/modules/drivers/nvidia_drv.so
[   757.843] (II) Module nvidia: vendor="NVIDIA Corporation"
[   757.843]     compiled for 1.16.99.901, module version = 1.0.0
[   757.843]     Module class: X.Org Video Driver
[   757.843] (II) NVIDIA dlloader X Driver  595.84  Wed Jun 10 20:28:24 UTC 2026
[   757.843] (II) NVIDIA Unified Driver for all Supported NVIDIA GPUs
[   757.843] (--) Using syscons driver with X support (version 2.0)
[   757.843] (--) using VT number 9

[   757.865] (EE) Segmentation fault at address 0x0
[   757.865] (EE) 
Fatal server error:
[   757.865] (EE) Caught signal 11 (Segmentation fault). Server aborting
[   757.865] (EE) 
[   757.865] (EE) 
Please consult the The X.Org Foundation support 
     at [URL]http://wiki.x.org[/URL]
 for help. 
[   757.865] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[   757.865] (EE) 
[   757.888] (EE) Server terminated with error (1). Closing log file.

Code:
% kldstat
Id Refs Address                Size Name
 1  164 0xffffffff80200000  2351f30 kernel
 2    1 0xffffffff82553000     8180 ums.ko
 3    1 0xffffffff8255c000     4b48 if_ipheth.ko
 4    4 0xffffffff82561000     5e78 uether.ko
 5    1 0xffffffff82567000     8808 cryptodev.ko
 6    1 0xffffffff82571000     7058 if_urndis.ko
 7    1 0xffffffff82579000     76d8 amdtemp.ko
 8    2 0xffffffff82581000     3728 amdsmn.ko
 9    1 0xffffffff82585000    21428 geom_mirror.ko
10    1 0xffffffff825a7000   628ca0 zfs.ko
11    1 0xffffffff82bd0000     9cf0 if_cdce.ko
12    1 0xffffffff82bda000    2d048 fusefs.ko
13    1 0xffffffff82c08000     e090 tpm.ko
14    1 0xffffffff83e80000     3578 fdescfs.ko
15    1 0xffffffff83e84000    14a98 nvidia-drm.ko
16    1 0xffffffff83e99000    8a190 drm.ko
17    1 0xffffffff83f24000     22b8 iic.ko
18    1 0xffffffff83f27000     4120 linuxkpi_video.ko
19    2 0xffffffff83f2c000     7358 dmabuf.ko
20    1 0xffffffff83f34000     3378 lindebugfs.ko
21    2 0xffffffff84000000  5b7e838 nvidia.ko
22    2 0xffffffff83f38000    32240 linux.ko
23    2 0xffffffff83f6b000     6da8 mqueuefs.ko
24    6 0xffffffff83f72000     cdc8 linux_common.ko
25    1 0xffffffff89b7f000   14d2f8 nvidia-modeset.ko
26    1 0xffffffff83f7f000     3390 acpi_wmi.ko
27    1 0xffffffff83f83000     21e8 hcons.ko
28    4 0xffffffff83f86000     30a8 hidmap.ko
29    1 0xffffffff83f8a000     21e8 hsctrl.ko
30    1 0xffffffff83f8d000     3220 intpm.ko
31    1 0xffffffff83f91000     2178 smbus.ko
32    1 0xffffffff83f94000    2f300 linux64.ko
33    1 0xffffffff83fc4000     2278 pty.ko
34    1 0xffffffff83fc7000     73c0 linprocfs.ko
35    1 0xffffffff83fcf000     440c linsysfs.ko
36    1 0xffffffff83fd4000     8810 if_bridge.ko
37    1 0xffffffff83fdd000     6120 bridgestp.ko
38    1 0xffffffff83fe4000     21e8 hms.ko
39    1 0xffffffff83fe7000     21e8 hgame.ko
40    1 0xffffffff83fea000     21e8 pflog.ko
41    1 0xffffffff89ccd000    64c08 pf.ko
42    1 0xffffffff89e00000   340438 vmm.ko
43    1 0xffffffff83fed000     21dc nmdm.ko
44    1 0xffffffff83ff0000     5bf8 autofs.ko
45    1 0xffffffff83ff6000     2a80 mac_ntpd.ko
46    1 0xffffffff83ff9000     4b40 nullfs.ko
 
I tried deleting nvidia-driver and nvidia-kmod and reinstalled them.
Make sure to install the ones from the FreeBSD-ports-kmods repository. The ones in the FreeBSD-ports repository are newer but built for 15.0 and do not work on 15.1.
 
I don't have nvidia-drm... Maybe because my card is as old as me. :)
What do you get with dmesg | grep nvidia?
Graphics card is rtx4070.
% dmesg | grep nvidia
nvidia0: <NVIDIA GeForce RTX 4070> on vgapci0
vgapci0: child nvidia0 requested pci_enable_io
vgapci0: child nvidia0 requested pci_enable_io
nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms 595.84 Wed Jun 10 20:27:42 UTC 2026
[drm] [nvidia-drm] [GPU ID 0x00002b00] Loading driver
[drm] Initialized nvidia-drm 0.0.0 20160202 for nvidia0 on minor 0
nvidia0: <NVIDIA GeForce RTX 4070> on vgapci0
vgapci0: child nvidia0 requested pci_enable_io
vgapci0: child nvidia0 requested pci_enable_io
nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms 595.84 Wed Jun 10 20:27:42 UTC 2026
[drm] [nvidia-drm] [GPU ID 0x00002b00] Loading driver
[drm] Initialized nvidia-drm 0.0.0 20160202 for nvidia0 on minor 0
nvidia0: <NVIDIA GeForce RTX 4070> on vgapci0
vgapci0: child nvidia0 requested pci_enable_io
vgapci0: child nvidia0 requested pci_enable_io
nvidia-modeset: Loading NVIDIA Kernel Mode Setting Driver for UNIX platforms 595.84 Wed Jun 10 20:27:42 UTC 2026
[drm] [nvidia-drm] [GPU ID 0x00002b00] Loading driver
[drm] Initialized nvidia-drm 0.0.0 20160202 for nvidia0 on minor 0
 
Make sure to install the ones from the FreeBSD-ports-kmods repository. The ones in the FreeBSD-ports repository are newer but built for 15.0 and do not work on 15.1.

To do this, do I modify /etc/pkg/FreeBSD.conf or /usr/local/etc/pkg/repos/FreeBSD.conf to enable only FreeBSD-ports-kmods section?
 
Not really an old card this one. ;)
I have all the drivers compiled for 15.0 (I'm on 15.1), but maybe it's different for you, concerning drm drivers.
T-Aoki is the one that knows this field.
 
Sorry for the trouble. I've only used pkg install. Maybe I should try building from ports.
Yes. Currently it's really needed for users of 15.1 and upcoming 14.4 (now BETA1). Also, main (aka CURRENT) and any of stable branches.

But anyone who don't use DRM/KMS (graphics/nvidia-drm-*-kmod*) and using GPUs supported by Production Branch of drivers (currently at 595.91.07) may be safe to use pkg (kmods repo builder builds x11/nvidia-kmod only for NVIDIA GPU kmods).

You'll be safe to use pkg from first full rebuild of pkg repo after Sep.30, 2026 (EoL of 15.0, so pkg for 15.* are started to be built using 15.1).
 
Back
Top