Double gpu laptop xorg configuration problem

I have a double gpu laptop (with intel UHD 630 and Nvidia GTX 1050 ti mobile). Modules i915.ko, nvidia.ko, nvidia-modeset.ko, nvidia-drm.ko load normally (seen with kldstat).
I go and create config file
Code:
/usr/local/etc/X11/xorg.conf.d/20-drivers.conf
as instructed my handbook


Code:
#Intel onboard and Nvidia Gpu config file for X11
Section "Device"
         Identifier "intel"
         BusID      "pci0:0:2:0"
EndSection

Section "Device"
        Identifier "nvidia-modeset"
        BusID      "pci0:1:0:0"
EndSection

/var/log/Xorg.0.log shows that /usr/local/etc/X11/xorg.conf.d is used for configuration, and that intel and nvidia modules cant be loaded because they werent found.

If i remove /usr/local/etc/X11/xorg.conf.d/20-drivers.conf file startx works and xfce4 is started.

I have checked the pci adresses with
Code:
pciconf -lv | grep -B4 display
and they are correct. Any ideas about what is wrong with my 20-drivers.conf file? Thanks
 
as instructed my handbook


Code:
#Intel onboard and Nvidia Gpu config file for X11
Section "Device"
         Identifier "intel"
         BusID      "pci0:0:2:0"
EndSection

Section "Device"
        Identifier "nvidia-modeset"
        BusID      "pci0:1:0:0"
EndSection
Unfortunately the Handbook is wrong wrt the Xorg nvidia driver configuration; see message #13 and follow up message #15. Detailed info is below the horizontal divider: here. The version mismatch may be affecting you also when using quarterly packages: look above the horizontal divider.*

In short, in your Xorg configuration setting for the nvidia driver, use:
Code:
Section "Device"
        Identifier "GTX-1050"
        Driver     "nvidia"
        BusID      "pci0:1:0:0"
EndSection

The intel driver for Xorg is a legacy driver, with your intel UHD 630 graphics, try:
Code:
Section "Device"
         Identifier "UHD-630"
         Driver     "modesetting"
         BusID      "pci0:0:2:0"
EndSection
This is the modesetting(4) driver.

___
* Edit: minor changes for clarification.
 
Last edited:
Unfortunately the Handbook is wrong wrt the Xorg nvidia driver configuration; see message #13 and follow up message #15.
Detailed info is below the horizontal divider: here. The version mismatch may be affecting you also when using quarterly packages.

In short, in your Xorg configuration setting for the nvidia driver, use:
Code:
Section "Device"
        Identifier "GTX-1050"
        Driver     "nvidia"
        BusID      "pci0:1:0:0"
EndSection

The intel driver for Xorg is a legacy driver, with your intel UHD 630 graphics, try:
Code:
Section "Device"
         Identifier "UHD-630"
         Driver     "modesetting"
         BusID      "pci0:0:2:0"
EndSection
This is the modesetting(4) driver.
Have tried to
Code:
 kldunload i915kms
, screen went blank and system freezed. var/crash/vmcore.0 shows:
Code:
 [drm ERROR :nv_drm_init] [nvidia-drm] Version mismatch: nvidia-modeset.ko(580.105.108) nvidia-drm.ko(580.95.05)

How cure this mismatch?
 
Have tried to
Code:
 kldunload i915kms
,
screen went blank and system freezed. var/crash/vmcore.0 shows:
Code:
 [drm ERROR :nv_drm_init] [nvidia-drm] Version mismatch: nvidia-modeset.ko(580.105.108) nvidia-drm.ko(580.95.05)
In an ideal FreeBSD world you should be able to do a clean kldunload of a kernel module; unfortunately, as is often the case with complex and/or several chain-loaded kernel modules, they cannot be kldunload-ed safely. To get this done properly, change your config settings and reboot. If you have set the correct kernel modules and of the correct version in your configuration file(s), they should be kldload-ed automatically up boot. If you have disabled them to be loaded automatically you can kldload them explicitly manually.

Code:
 [drm ERROR :nv_drm_init] [nvidia-drm] Version mismatch: nvidia-modeset.ko(580.105.108) nvidia-drm.ko(580.95.05)
How cure this mismatch?
Detailed info is below the horizontal divider: here.
Perhaps, have a look at my message above the horizontal divider?
 
[drm ERROR :nv_drm_init] [nvidia-drm] Version mismatch: nvidia-modeset.ko(580.105.108) nvidia-drm.ko(580.95.05)
I may be mistaken, but I had a similar situation when updating (20251109) and received:
Code:
$ pkg info | grep nvidia
nvidia-driver-580.95.05        NVidia graphics card binary drivers for hardware OpenGL rendering
nvidia-kmod-580.105.08.1403000 kmod part of NVidia graphics card binary drivers for hardware OpenGL rendering
nvidia-settings-580.95.05      Display Control Panel for X NVidia driver
I deleted:
Code:
# pkg delete nvidia-driver
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        nvidia-driver: 580.95.05

Number of packages to be removed: 1

The operation will free 288 MiB.

Proceed with deinstalling packages? [y/N]: y
[1/1] Deinstalling nvidia-driver-580.95.05...
[1/1] Deleting files for nvidia-driver-580.95.05: 100%

# pkg delete nvidia-kmod
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        nvidia-kmod: 580.95.05.1403000

Number of packages to be removed: 1

The operation will free 210 MiB.

Proceed with deinstalling packages? [y/N]: y
[1/1] Deinstalling nvidia-kmod-580.95.05.1403000...
[1/1] Deleting files for nvidia-kmod-580.95.05.1403000: 100%
Then I installed, but first:
Code:
# pkg install nvidia-kmod-580.95.05.1403000
And then:
Code:
# pkg install nvidia-driver
If I'm not mistaken, it worked for me.

When attempting to simply install the nvidia driver, it installed an incompatible kmod:
Code:
# pkg install nvidia-driver
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
All repositories are up to date.
The following 2 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        nvidia-driver: 580.95.05 [FreeBSD]
        nvidia-kmod: 580.105.08.1403000 [FreeBSD-kmods]
 
I may be mistaken, but I had a similar situation when updating (20251109) and received:
Code:
$ pkg info | grep nvidia
nvidia-driver-580.95.05        NVidia graphics card binary drivers for hardware OpenGL rendering
nvidia-kmod-580.105.08.1403000 kmod part of NVidia graphics card binary drivers for hardware OpenGL rendering
nvidia-settings-580.95.05      Display Control Panel for X NVidia driver
I deleted:
Code:
# pkg delete nvidia-driver
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        nvidia-driver: 580.95.05

Number of packages to be removed: 1

The operation will free 288 MiB.

Proceed with deinstalling packages? [y/N]: y
[1/1] Deinstalling nvidia-driver-580.95.05...
[1/1] Deleting files for nvidia-driver-580.95.05: 100%

# pkg delete nvidia-kmod
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        nvidia-kmod: 580.95.05.1403000

Number of packages to be removed: 1

The operation will free 210 MiB.

Proceed with deinstalling packages? [y/N]: y
[1/1] Deinstalling nvidia-kmod-580.95.05.1403000...
[1/1] Deleting files for nvidia-kmod-580.95.05.1403000: 100%
Then I installed, but first:
Code:
# pkg install nvidia-kmod-580.95.05.1403000
And then:
Code:
# pkg install nvidia-driver
If I'm not mistaken, it worked for me.

When attempting to simply install the nvidia driver, it installed an incompatible kmod:
Code:
# pkg install nvidia-driver
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
All repositories are up to date.
The following 2 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        nvidia-driver: 580.95.05 [FreeBSD]
        nvidia-kmod: 580.105.08.1403000 [FreeBSD-kmods]
You should not use pkgs targeted 1403000 on FreeBSD 15, it will eventually break.
I strongly suggest ports or pkg -r 😄
 
I may be mistaken, but I had a similar situation when updating (20251109) and received:
Code:
$ pkg info | grep nvidia
nvidia-driver-580.95.05        NVidia graphics card binary drivers for hardware OpenGL rendering
nvidia-kmod-580.105.08.1403000 kmod part of NVidia graphics card binary drivers for hardware OpenGL rendering
nvidia-settings-580.95.05      Display Control Panel for X NVidia driver
I deleted:
Code:
# pkg delete nvidia-driver
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        nvidia-driver: 580.95.05

Number of packages to be removed: 1

The operation will free 288 MiB.

Proceed with deinstalling packages? [y/N]: y
[1/1] Deinstalling nvidia-driver-580.95.05...
[1/1] Deleting files for nvidia-driver-580.95.05: 100%

# pkg delete nvidia-kmod
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 1 packages (of 0 packages in the universe):

Installed packages to be REMOVED:
        nvidia-kmod: 580.95.05.1403000

Number of packages to be removed: 1

The operation will free 210 MiB.

Proceed with deinstalling packages? [y/N]: y
[1/1] Deinstalling nvidia-kmod-580.95.05.1403000...
[1/1] Deleting files for nvidia-kmod-580.95.05.1403000: 100%
Then I installed, but first:
Code:
# pkg install nvidia-kmod-580.95.05.1403000
And then:
Code:
# pkg install nvidia-driver
If I'm not mistaken, it worked for me.

When attempting to simply install the nvidia driver, it installed an incompatible kmod:
Code:
# pkg install nvidia-driver
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
Updating FreeBSD-kmods repository catalogue...
FreeBSD-kmods repository is up to date.
All repositories are up to date.
The following 2 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
        nvidia-driver: 580.95.05 [FreeBSD]
        nvidia-kmod: 580.105.08.1403000 [FreeBSD-kmods]
Black_N, from your message, I'm not sure if you are running 14.3-RELEASE or 15.0-RELEASE.

  1. The version mismatch between 580.95.05 and 580.105.08
  2. Having (leftover) packages on 15.0-RELEASE tagged 1403000
are two separate issues. However, they both can affect the use of correctly versioned packages.

If you have one such leftover package tagged 1403000 on FreeBSD 15.0-RELEASE, you'll likely have more. These are unusually hard to get rid of using the normally expected use of pkg-upgrade(8). For these leftover pcakages, see this thread (especially the messages near the end) pkg refuses to upgrade firmware packages to 15 version and how to get rid of them.
 
You should not use pkgs targeted 1403000 on FreeBSD 15, it will eventually break.
I strongly suggest ports or pkg -r
Black_N, from your message, I'm not sure if you are running 14.3-RELEASE or 15.0-RELEASE.
Sorry, I don't use 15.0-RELEASE. I described how I solved a similar problem for:
Code:
# freebsd-version -kru
14.3-RELEASE-p7
14.3-RELEASE-p7
14.3-RELEASE-p7
I admit, my mistake. I am sorry.

But if pkg nvidia-kmod-580.95.05 is available for FreeBSD 15.0-RELEASE, you can also try installing it before installing pkg nvidia-driver-580.95.05.
 
Back
Top