I cant really get the nvidia-drm to work aside from that everything works.

Hi,

I'm trying to get NVIDIA PRIME/offloading to work on a hybrid laptop running FreeBSD 15.1-RELEASE-p7.

Hardware

  • Intel Raptor Lake UHD Graphics — PCI 00:02.0
  • NVIDIA GeForce RTX 5050 Laptop GPU (GB207M) — PCI 01:00.0
  • Internal display connected to Intel.
  • Xorg with OXWM, started via startx.
Driver installation

I'm using NVIDIA 580 from Quarterly:

  • nvidia-driver-580-580.178.04_1
  • nvidia-kmod-580
  • nvidia-drm-612-kmod-580
  • drm-612-kmod
The proprietary NVIDIA driver and GSP firmware load successfully, and nvidia-smi works as well.

Problem

After loading the NVIDIA DRM driver:

doas kldload nvidia-drm
Both GPUs register with DRM/KMS:

hw.dri.0.name: i915 0x61
hw.dri.0.busid: pci:0000:00:02.0
hw.dri.1.name: nvidia-drm 0x62
hw.dri.1.busid: pci:0000:01:00.0
However, Xorg fails to start with:

modeset(G0): [DRI2] DRI driver: nouveau
(EE) modeset(G0): Failed to create pixmap
Fatal server error:
failed to create screen resources
This also happens with startx, so it isn't SLiM-specific.

After unloading both nvidia-drm and nvidia-modeset, Intel graphics starts successfully and OXWM works OK. The proprietary nvidia.ko module and GSP firmware remain loaded too.

Xorg configuration

I have an Intel OutputClass with PrimaryGPU "yes" and an explicitly defined Intel Device section.

The NVIDIA package-provided OutputClass matches nvidia-drm and specifies the proprietary nvidia Xorg driver. It does not contain PrimaryGPU "yes".

Questions

  1. Is there a known compatibility issue between NVIDIA 580 and DRM 6.12 on FreeBSD 15.1?
  2. Why does Xorg report nouveau as the DRI2 driver when the proprietary NVIDIA driver is installed?
  3. What is the recommended Intel-primary/NVIDIA-offload configuration on FreeBSD?
My goal is to keep Intel driving the internal display and use NVIDIA for selected applications.

I can provide the full Xorg logs, pciconf, devinfo, and package information.

btw if you are a mod and i made some mistakes let me know this my first
 
I'm not an expert, and I also struggle to make the mvidia-drm or nvidia-modeset and amdgpu work in couple of my olden, system as intended - one desktop with GTX960 and the other laptop with both amdgpu and on chip Intel GPUs. No matter which kmod and driver I tried in each system, the GPU's DRI doesn't function as it should, and the screen resolutions are not selectable. FreeBSD's 15.1-RELEASE (ai - automagic installer) configures X to run in VESA, despite the fact that all the required GPU modules are loaded, and "dmesg" indicates that the GPU hardware is recognized. Even if I don't indicate any GPU references with "kld_stat" in /etc/rc.conf, I do get X GUI, also in VESA mode :)

To get help from an expert on here you can start with dumping outputs of your:

Files:
/boot/loader.conf
/etc/rc.conf
/var/log/Xorg.0.log

Console commands:
pkg info drm-kmod
kldstat
xrandr
 
This also happens with startx, so it isn't SLiM-specific.
If an Operating System's GPU driver is not correct or correct but automagically misconfigured, including in: MSOS, *BSD or Linux variants, your GUI output won't function at all, or as intended. And there isn't known AI solution or automagic to fix that 😁
 
I'm not an expert, and I also struggle to make the mvidia-drm or nvidia-modeset and amdgpu work in couple of my olden, system as intended - one desktop with GTX960 and the other laptop with both amdgpu and on chip Intel GPUs. No matter which kmod and driver I tried in each system, the GPU's DRI doesn't function as it should, and the screen resolutions are not selectable. FreeBSD's 15.1-RELEASE (ai - automagic installer) configures X to run in VESA, despite the fact that all the required GPU modules are loaded, and "dmesg" indicates that the GPU hardware is recognized. Even if I don't indicate any GPU references with "kld_stat" in /etc/rc.conf, I do get X GUI, also in VESA mode :)

To get help from an expert on here you can start with dumping outputs of your:

Files:
/boot/loader.conf
/etc/rc.conf
/var/log/Xorg.0.log

Console commands:
pkg info drm-kmod
kldstat
xrandr
here is some really really useful logs :

1. NVIDIA DRM loaded kernel modules​

i915kms.ko
drm.ko
nvidia_gsp_ga10x_fw.ko
nvidia.ko
nvidia-drm.ko
nvidia-modeset.ko

2. Both GPUs registered with DRM/KMS​

hw.dri.1.modesetting: 1
hw.dri.1.busid: pci:0000:01:00.0
hw.dri.1.name: nvidia-drm 0x62

hw.dri.0.modesetting: 1
hw.dri.0.busid: pci:0000:00:02.0
hw.dri.0.name: i915 0x61

3. Xorg failure with NVIDIA DRM enabled​


[CODE]modeset(G0): glamor X acceleration enabled on NVIDIA GeForce RTX 5050
modeset(G0): [DRI2] DRI driver: nouveau
modeset(G0): [DRI2] VDPAU driver: nouveau
(EE) modeset(G0): Failed to create pixmap

Fatal server error:
failed to create screen resources

4. Working Intel-only state​

i915kms.ko
drm.ko
nvidia_gsp_ga10x_fw.ko
nvidia.ko
Xorg initializes Intel successfully:
modeset(0): glamor X acceleration enabled on Mesa Intel(R) Graphics (RPL-S)
modeset(0): glamor initialized
modeset(0): Output eDP-1 connected
modeset(0): Output eDP-1 using initial mode 1920x1080
modeset(0): [DRI2] Setup complete
modeset(0): [DRI2] DRI driver: iris
 
also :

/boot/loader.conf



boot_mute="YES"
efi_max_resolution="1920x1080"
screen.font="16x32"
vboxdrv_load="YES"
hw.nvidia.registry.EnableGpuFirmware=1
hw.nvidiadrm.modeset="1"



/etc/rc.conf



clear_tmp_enable="YES"
hostname="FreeBSD"
sshd_enable="NO"
ntpd_enable="YES"
local_unbound_enable="NO"
powerd_enable="YES"
powerd_flags="-a hiadaptive -b adaptive"
performance_cx_lowest="Cmax"
economy_cx_lowest="Cmax"
dumpdev="AUTO"
wlans_iwlwifi0="wlan0"
create_args_wlan0="country SA regdomain none"
ifconfig_wlan0="WPA DHCP"
kld_list="i915kms nvidia_gsp_ga10x_fw nvidia"
allscreens_flags="-f spleen-16x32"
linux_enable="YES"
slim_enable="YES"
dbus_enable="YES"
vboxnet_enable="YES"
devfs_system_ruleset="system"
pf_enable="YES"
pf_rules="/etc/pf.conf"
pflog_enable="NO"
pflog_logfile="/var/log/pflog"
unbound_enable="YES"
ntp_leapfile_expiry_days="30"
 
If an Operating System's GPU driver is not correct or correct but automagically misconfigured, including in: MSOS, *BSD or Linux variants, your GUI output won't function at all, or as intended. And there isn't known AI solution or automagic to fix that 😁
I dont agree the SLiM may work with a misconfiguration of Xorg However It wont launch Xorg .
 
Back
Top