Xorg not working on fresh install

I have installed FreeBSD on my system, and now I'm trying to get Xorg running. I went on my regular account and made a .xinitrc with one line to just launch i3.
However, running startx I get the following error:
Code:
xauth: file /home/Silly/.serverauth.2122 does not exist
I checked to see if maybe .Xauthority was not owned by me, but that was not the case. So I looked at Xorg.0.log:
Code:
[   166.641] 
X.Org X Server 1.21.1.13
X Protocol Version 11, Revision 0
[   166.641] Current Operating System: FreeBSD lol 14.0-RELEASE FreeBSD 14.0-RELEASE #0 releng/14.0-n265380-f9716eee8ab4: Fri Nov 10 05:57:23 UTC 2023     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
[   166.641]  
[   166.641] Current version of pixman: 0.42.2
[   166.641]     Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[   166.641] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   166.642] (==) Log file: "/var/log/Xorg.0.log", Time: Sun May  5 16:30:30 2024
[   166.644] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
[   166.646] (==) No Layout section.  Using the first Screen section.
[   166.646] (==) No screen section available. Using defaults.
[   166.646] (**) |-->Screen "Default Screen Section" (0)
[   166.646] (**) |   |-->Monitor "<default monitor>"
[   166.647] (==) No monitor specified for screen "Default Screen Section".
    Using a default monitor configuration.
[   166.647] (**) Allowing byte-swapped clients
[   166.647] (==) Automatically adding devices
[   166.647] (==) Automatically enabling devices
[   166.647] (==) Automatically adding GPU devices
[   166.647] (==) Automatically binding GPU devices
[   166.648] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   166.656] (==) FontPath set to:
    /usr/local/share/fonts/misc/,
    /usr/local/share/fonts/TTF/,
    /usr/local/share/fonts/OTF/,
    /usr/local/share/fonts/Type1/,
    /usr/local/share/fonts/100dpi/,
    /usr/local/share/fonts/75dpi/,
    catalogue:/usr/local/etc/X11/fontpath.d
[   166.656] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[   166.656] (II) The server relies on udev to provide the list of input devices.
    If no devices become available, reconfigure udev or disable AutoAddDevices.
[   166.656] (II) Module ABI versions:
[   166.656]     X.Org ANSI C Emulation: 0.4
[   166.656]     X.Org Video Driver: 25.2
[   166.656]     X.Org XInput driver : 24.4
[   166.656]     X.Org Server Extension : 10.0
[   166.664] (--) PCI:*(0@0:2:0) 8086:46a3:17aa:384a rev 12, Mem @ 0x6000000000/16777216, 0x4000000000/268435456, I/O @ 0x00003000/64, BIOS @ 0x????????/65536
[   166.664] (II) LoadModule: "glx"
[   166.665] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[   166.674] (II) Module glx: vendor="X.Org Foundation"
[   166.674]     compiled for 1.21.1.13, module version = 1.0.0
[   166.674]     ABI class: X.Org Server Extension, version 10.0
[   166.675] (==) Matched intel as autoconfigured driver 0
[   166.675] (==) Matched modesetting as autoconfigured driver 1
[   166.675] (==) Matched scfb as autoconfigured driver 2
[   166.675] (==) Matched vesa as autoconfigured driver 3
[   166.675] (==) Assigned the driver to the xf86ConfigLayout
[   166.675] (II) LoadModule: "intel"
[   166.676] (WW) Warning, couldn't open module intel
[   166.676] (EE) Failed to load module "intel" (module does not exist, 0)
[   166.676] (II) LoadModule: "modesetting"
[   166.677] (II) Loading /usr/local/lib/xorg/modules/drivers/modesetting_drv.so
[   166.682] (II) Module modesetting: vendor="X.Org Foundation"
[   166.682]     compiled for 1.21.1.13, module version = 1.21.1
[   166.682]     Module class: X.Org Video Driver
[   166.682]     ABI class: X.Org Video Driver, version 25.2
[   166.683] (II) LoadModule: "scfb"
[   166.683] (II) Loading /usr/local/lib/xorg/modules/drivers/scfb_drv.so
[   166.683] (II) Module scfb: vendor="X.Org Foundation"
[   166.683]     compiled for 1.21.1.13, module version = 0.0.5
[   166.683]     ABI class: X.Org Video Driver, version 25.2
[   166.683] (II) LoadModule: "vesa"
[   166.684] (II) Loading /usr/local/lib/xorg/modules/drivers/vesa_drv.so
[   166.684] (II) Module vesa: vendor="X.Org Foundation"
[   166.684]     compiled for 1.21.1.13, module version = 2.5.0
[   166.684]     Module class: X.Org Video Driver
[   166.684]     ABI class: X.Org Video Driver, version 25.2
[   166.684] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[   166.684] (II) scfb: driver for wsdisplay framebuffer: scfb
[   166.685] (II) VESA: driver for VESA chipsets: vesa
[   166.685] (--) Using syscons driver with X support (version 2.0)
[   166.685] (--) using VT number 9

[   166.686] (EE) open /dev/dri/card0: No such file or directory
[   166.686] (WW) Falling back to old probe method for modesetting
[   166.686] (EE) open /dev/dri/card0: No such file or directory
[   166.686] (WW) Falling back to old probe method for scfb
[   166.686] scfb trace: probe start
[   166.686] (II) scfb(1): using default device
[   166.686] scfb trace: probe done
[   166.686] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[   166.686] (EE) Screen 0 deleted because of no matching config section.
[   166.686] (II) UnloadModule: "modesetting"
[   166.686] (EE) 
Fatal server error:
[   166.686] (EE) Cannot run in framebuffer mode. Please specify busIDs        for all framebuffer devices
[   166.686] (EE) 
[   166.687] (EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
[   166.687] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[   166.687] (EE) 
[   166.688] (EE) Server terminated with error (1). Closing log file.

Seeing the lines (EE) open /dev/dri/card0: No such file or directory and (EE) Failed to load module "intel" (module does not exist, 0) I assumed the problem is the video driver. Since I have an intel Integrated GPU, I installed drm-kmod for i915kms.
However, attempting to either manually load i915kms with kldload or to load it with sysrc at rc.conf causes the computer to freeze entirely.

The line (EE) Screen 0 deleted because of no matching config section makes it seem like a config file issue, but virtually everywhere I've ever read says to not do Xorg config files, so I am reluctant to try that route...
 
Well, I know of cases where xorg runs without xorg.conf... but I am not a fan of that.

I think you find what you are looking for here.
 
Since I have an intel Integrated GPU, I installed drm-kmod for i915kms.
However, attempting to either manually load i915kms with kldload or to load it with sysrc at rc.conf causes the computer to freeze entirely.
Getting the i915kms module to attach (and not freeze) is the first step before trying with Xorg. Without this in place the Xorg modesetting drivers won't work (as can be seen in the xorg log).

That said, you might be able to get away with fallback VESA or EFI framebuffer drivers but it will probably be sluggish, use more energy and be limited by screen resolutions, etc. If this was for a server, it might be good enough but won't be as nice for a i.e workstation / desktop.

Does SSH (or even serial) remain responsive when you attach i915kms? (Don't run Xorg just yet, just # kldload i915kms).
If so, is there any output in the dmesg once you have done so?
 
Getting the i915kms module to attach (and not freeze) is the first step before trying with Xorg. Without this in place the Xorg modesetting drivers won't work (as can be seen in the xorg log).

That said, you might be able to get away with fallback VESA or EFI framebuffer drivers but it will probably be sluggish, use more energy and be limited by screen resolutions, etc. If this was for a server, it might be good enough but won't be as nice for a i.e workstation / desktop.

Does SSH (or even serial) remain responsive when you attach i915kms? (Don't run Xorg just yet, just # kldload i915kms).
If so, is there any output in the dmesg once you have done so?
Unfortunately ssh does not work. And on the physical computer, even the power button stops responding after I load the module (I have to hold it to turn off the PC).
I used syslog to create a logfile with everything, and here is the output after that boot:
Code:
May  6 08:20:49 lol kernel: drmn0: <drmn> on vgapci0
May  6 08:20:49 lol kernel: vgapci0: child drmn0 requested pci_enable_io
May  6 08:20:49 lol kernel: drmn0: [drm] Incompatible option enable_guc=-1 - undocumented flag
May  6 08:20:49 lol kernel: [drm] Unable to create a private tmpfs mount, hugepage support will be disabled(-19).
May  6 08:20:49 lol kernel: [drm] Got stolen memory base 0x4c800000, size 0x3c00000
May  6 08:20:49 lol kernel: lkpi_iic0: <LinuxKPI I2C> on drmn0
May  6 08:20:49 lol kernel: lkpi_iic1: <LinuxKPI I2C> on drmn0
May  6 08:20:49 lol kernel: lkpi_iic2: <LinuxKPI I2C> on drmn0
May  6 08:20:49 lol kernel: lkpi_iic3: <LinuxKPI I2C> on drmn0
May  6 08:20:49 lol kernel: lkpi_iic4: <LinuxKPI I2C> on drmn0
May  6 08:20:49 lol kernel: lkpi_iic5: <LinuxKPI I2C> on drmn0
May  6 08:20:49 lol kernel: lkpi_iic6: <LinuxKPI I2C> on drmn0
May  6 08:20:49 lol kernel: lkpi_iic7: <LinuxKPI I2C> on drmn0
May  6 08:20:49 lol kernel: lkpi_iic8: <LinuxKPI I2C> on drmn0
May  6 08:20:49 lol kernel: drmn0: successfully loaded firmware image 'i915/adlp_dmc_ver2_10.bin'
May  6 08:20:49 lol kernel: drmn0: [drm] Finished loading DMC firmware i915/adlp_dmc_ver2_10.bin (v2.10)
May  6 08:20:49 lol kernel: drmn0: successfully loaded firmware image 'i915/adlp_guc_62.0.3.bin'
May  6 08:20:49 lol kernel: drmn0: successfully loaded firmware image 'i915/tgl_huc_7.9.3.bin'
May  6 08:29:35 lol kernel: drmn0: <drmn> on vgapci0
May  6 08:29:35 lol kernel: vgapci0: child drmn0 requested pci_enable_io
May  6 08:29:35 lol kernel: drmn0: [drm] Incompatible option enable_guc=-1 - undocumented flag
May  6 08:29:35 lol kernel: [drm] Unable to create a private tmpfs mount, hugepage support will be disabled(-19).
May  6 08:29:35 lol kernel: [drm] Got stolen memory base 0x4c800000, size 0x3c00000
May  6 08:29:35 lol kernel: lkpi_iic0: <LinuxKPI I2C> on drmn0
May  6 08:29:35 lol kernel: lkpi_iic1: <LinuxKPI I2C> on drmn0
May  6 08:29:35 lol kernel: lkpi_iic2: <LinuxKPI I2C> on drmn0
May  6 08:29:35 lol kernel: lkpi_iic3: <LinuxKPI I2C> on drmn0
May  6 08:29:35 lol kernel: lkpi_iic4: <LinuxKPI I2C> on drmn0
May  6 08:29:35 lol kernel: lkpi_iic5: <LinuxKPI I2C> on drmn0
May  6 08:29:35 lol kernel: lkpi_iic6: <LinuxKPI I2C> on drmn0
May  6 08:29:35 lol kernel: lkpi_iic7: <LinuxKPI I2C> on drmn0
May  6 08:29:35 lol kernel: lkpi_iic8: <LinuxKPI I2C> on drmn0
May  6 08:29:35 lol kernel: drmn0: successfully loaded firmware image 'i915/adlp_dmc_ver2_10.bin'
May  6 08:29:35 lol kernel: drmn0: [drm] Finished loading DMC firmware i915/adlp_dmc_ver2_10.bin (v2.10)
May  6 08:29:35 lol kernel: drmn0: successfully loaded firmware image 'i915/adlp_guc_62.0.3.bin'
May  6 08:29:35 lol kernel: drmn0: successfully loaded firmware image 'i915/tgl_huc_7.9.3.bin'
May  6 08:34:06 lol kernel: kld_list:  -> i915kms
May  6 08:34:06 lol kernel: kld_list: i915kms -> i915kms
May  6 08:34:06 lol kernel: kld_list: i915kms -> i915kms
May  6 08:34:06 lol kernel: kld_list: i915kms -> i915kms
May  6 08:34:06 lol kernel: kld_list: i915kms -> i915kms
May  6 08:34:06 lol kernel: kld_list: i915kms -> i915kms
May  6 08:34:06 lol kernel: kld_list: i915kms -> i915kms
May  6 08:34:06 lol kernel: kld_list: i915kms -> i915kms
May  6 08:34:06 lol kernel: kld_list: i915kms -> i915kms
May  6 08:34:06 lol kernel: kld_list: i915kms -> i915kms

Dmesg does not mention drm, kms, i915 or UHD, but it does mention iichid0. I am not sure if that's relevent, but I'm providing it here:
Code:
iichid0: <FTCS0038:00 2808:0101 I2C HID device> at addr 0x38 on iicbus1
iichid0: Interrupt setup failed. Fallback to sampling
hidbus0: <HID bus> on iichid0

The reason I think it might be relevent is because when I load the module, I get this:
Code:
iic0: <I2C generic I/O> on iicbus0
iic1: <I2C generic I/O> on iicbus1
 
Hmm, darn, nothing really stands out as wrong to me personally (not sure about the iicX stuff). This might be one for the mailing list...

As a workaround, I do notice mention of scfb so presumably the machine does have an uefi framebuffer in place. Perhaps you can go for that instead? It won't be as good as a proper working modesetting driver but it might be enough for your uses?

In your xorg.conf (or i.e: /usr/local/etc/X11/xorg.conf.d/driver-scfb.conf), something such as:

Code:
Section "Device"
     Identifier    "Card0"
     Driver        "scfb"
EndSection

Some misc info about it here. Admittedly I have only used it on OpenBSD (thanks nvidia) but the docs here do suggest it still works with the current FreeBSD vt(4) and isn't all completely deprecated or ripped out.
 
Maybe can help, thereis 2 packages and ports for drm modules

Code:
drm-510-kmod-5.10.163_9        DRM drivers modules                                                                            
drm-515-kmod-5.15.118_4        DRM drivers modules                                                                            
drm-kmod-20220907_3            Metaport of DRM modules for the linuxkpi-based KMS components

I dont know on what version drm-kmod sits
try with the 3

I never had a problem with the i915kms module, but allways build a custom kernel before(that is not the cause of your problem) It should
work on a normal installation,but who knows..
 
Thats a very good point.
If there are multiple versions of the driver in packages at the moment. Perhaps the OP can also just try the other one.
yes, if a recall well, in the past there is only one version
you have a problem with the i915kms module, when you have it working in console without hangout then move to the X configuration
 
Maybe can help, thereis 2 packages and ports for drm modules

Code:
drm-510-kmod-5.10.163_9        DRM drivers modules                                                                       
drm-515-kmod-5.15.118_4        DRM drivers modules                                                                       
drm-kmod-20220907_3            Metaport of DRM modules for the linuxkpi-based KMS components

I dont know on what version drm-kmod sits
try with the 3

I never had a problem with the i915kms module, but allways build a custom kernel before(that is not the cause of your problem) It should
work on a normal installation,but who knows..
Progress! I downloaded drm 510-kmod, and now when I manually load using kldload /boot/modules/i915kms.ko, it doesn't hang. However sysrc kld_list+=/boot/modules/i915kms.ko still causes the problem where it repeats it a bunch of times, and the module is not loaded after I login.

In addition, trying to run startx still says (EE) cannot run in framebuffer mode. So I created /usr/local/etc/X11/xorg.conf.d/20-intel.conf like the handbook says, but now I get error no screens found.
The full log:

Code:
[   587.692]
X.Org X Server 1.21.1.13
X Protocol Version 11, Revision 0
[   587.692] Current Operating System: FreeBSD lol 14.0-RELEASE-p6 FreeBSD 14.0-RELEASE-p6 #0: Tue Mar 26 20:26:20 UTC 2024     root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
[   587.692]
[   587.692] Current version of pixman: 0.42.2
[   587.693]     Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[   587.693] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   587.693] (==) Log file: "/var/log/Xorg.0.log", Time: Mon May  6 18:07:13 2024
[   587.693] (==) Using config directory: "/usr/local/etc/X11/xorg.conf.d"
[   587.693] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
[   587.694] (==) No Layout section.  Using the first Screen section.
[   587.694] (==) No screen section available. Using defaults.
[   587.694] (**) |-->Screen "Default Screen Section" (0)
[   587.694] (**) |   |-->Monitor "<default monitor>"
[   587.694] (==) No device specified for screen "Default Screen Section".
    Using the first device section listed.
[   587.694] (**) |   |-->Device "Card0"
[   587.694] (==) No monitor specified for screen "Default Screen Section".
    Using a default monitor configuration.
[   587.694] (**) Allowing byte-swapped clients
[   587.694] (==) Automatically adding devices
[   587.694] (==) Automatically enabling devices
[   587.695] (==) Automatically adding GPU devices
[   587.695] (==) Automatically binding GPU devices
[   587.695] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   587.695] (==) FontPath set to:
    /usr/local/share/fonts/misc/,
    /usr/local/share/fonts/TTF/,
    /usr/local/share/fonts/OTF/,
    /usr/local/share/fonts/Type1/,
    /usr/local/share/fonts/100dpi/,
    /usr/local/share/fonts/75dpi/,
    catalogue:/usr/local/etc/X11/fontpath.d
[   587.695] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[   587.695] (II) The server relies on udev to provide the list of input devices.
    If no devices become available, reconfigure udev or disable AutoAddDevices.
[   587.695] (II) Module ABI versions:
[   587.695]     X.Org ANSI C Emulation: 0.4
[   587.695]     X.Org Video Driver: 25.2
[   587.695]     X.Org XInput driver : 24.4
[   587.695]     X.Org Server Extension : 10.0
[   587.702] (--) PCI:*(0@0:2:0) 8086:46a3:17aa:384a rev 12, Mem @ 0x6000000000/16777216, 0x4000000000/268435456, I/O @ 0x00003000/64, BIOS @ 0x????????/65536
[   587.702] (II) LoadModule: "glx"
[   587.702] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[   587.703] (II) Module glx: vendor="X.Org Foundation"
[   587.703]     compiled for 1.21.1.13, module version = 1.0.0
[   587.703]     ABI class: X.Org Server Extension, version 10.0
[   587.703] (II) LoadModule: "intel"
[   587.704] (WW) Warning, couldn't open module intel
[   587.704] (EE) Failed to load module "intel" (module does not exist, 0)
[   587.704] (EE) No drivers available.
[   587.704] (EE)
Fatal server error:
[   587.704] (EE) no screens found(EE)
[   587.704] (EE)
Please consult the The X.Org Foundation support
     at http://wiki.x.org
 for help.
[   587.704] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[   587.704] (EE)
[   587.705] (EE) Server terminated with error (1). Closing log file.


(EE) Failed to load module "intel" (module does not exist, 0) It says. Maybe I made to config file wrong?

Code:
Section "Device"
    Identifier "Card0"
    Driver "intel"
EndSection

Not much to get wrong, and when I put in scfb instead, it works! Still, I would much rather use the intel driver, this seems like just a small hurdle...

EDIT:
Now the module does seem to load on startup, and after installing xf86-vide-intel, I now have a different error:
Code:
[    45.400] 
X.Org X Server 1.21.1.13
X Protocol Version 11, Revision 0
[    45.401] Current Operating System: FreeBSD lol 14.0-RELEASE-p6 FreeBSD 14.0-RELEASE-p6 #0: Tue Mar 26 20:26:20 UTC 2024     root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
[    45.401]  
[    45.401] Current version of pixman: 0.42.2
[    45.401]     Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[    45.401] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[    45.401] (==) Log file: "/var/log/Xorg.0.log", Time: Mon May  6 19:02:22 2024
[    45.404] (==) Using config directory: "/usr/local/etc/X11/xorg.conf.d"
[    45.404] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
[    45.405] (==) No Layout section.  Using the first Screen section.
[    45.405] (==) No screen section available. Using defaults.
[    45.405] (**) |-->Screen "Default Screen Section" (0)
[    45.405] (**) |   |-->Monitor "<default monitor>"
[    45.406] (==) No device specified for screen "Default Screen Section".
    Using the first device section listed.
[    45.406] (**) |   |-->Device "Card0"
[    45.406] (==) No monitor specified for screen "Default Screen Section".
    Using a default monitor configuration.
[    45.406] (**) Allowing byte-swapped clients
[    45.406] (==) Automatically adding devices
[    45.407] (==) Automatically enabling devices
[    45.407] (==) Automatically adding GPU devices
[    45.407] (==) Automatically binding GPU devices
[    45.408] (==) Max clients allowed: 256, resource mask: 0x1fffff
[    45.416] (==) FontPath set to:
    /usr/local/share/fonts/misc/,
    /usr/local/share/fonts/TTF/,
    /usr/local/share/fonts/OTF/,
    /usr/local/share/fonts/Type1/,
    /usr/local/share/fonts/100dpi/,
    /usr/local/share/fonts/75dpi/,
    catalogue:/usr/local/etc/X11/fontpath.d
[    45.416] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[    45.416] (II) The server relies on udev to provide the list of input devices.
    If no devices become available, reconfigure udev or disable AutoAddDevices.
[    45.416] (II) Module ABI versions:
[    45.416]     X.Org ANSI C Emulation: 0.4
[    45.416]     X.Org Video Driver: 25.2
[    45.416]     X.Org XInput driver : 24.4
[    45.416]     X.Org Server Extension : 10.0
[    45.424] (--) PCI:*(0@0:2:0) 8086:46a3:17aa:384a rev 12, Mem @ 0x6000000000/16777216, 0x4000000000/268435456, I/O @ 0x00003000/64, BIOS @ 0x????????/65536
[    45.424] (II) LoadModule: "glx"
[    45.425] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[    45.435] (II) Module glx: vendor="X.Org Foundation"
[    45.435]     compiled for 1.21.1.13, module version = 1.0.0
[    45.435]     ABI class: X.Org Server Extension, version 10.0
[    45.435] (II) LoadModule: "intel"
[    45.436] (II) Loading /usr/local/lib/xorg/modules/drivers/intel_drv.so
[    45.439] (II) Module intel: vendor="X.Org Foundation"
[    45.439]     compiled for 1.21.1.13, module version = 2.99.917
[    45.439]     Module class: X.Org Video Driver
[    45.440]     ABI class: X.Org Video Driver, version 25.2
[    45.440] (II) intel: Driver for Intel(R) Integrated Graphics Chipsets:
    i810, i810-dc100, i810e, i815, i830M, 845G, 854, 852GM/855GM, 865G,
    915G, E7221 (i915), 915GM, 945G, 945GM, 945GME, Pineview GM,
    Pineview G, 965G, G35, 965Q, 946GZ, 965GM, 965GME/GLE, G33, Q35, Q33,
    GM45, 4 Series, G45/G43, Q45/Q43, G41, B43
[    45.443] (II) intel: Driver for Intel(R) HD Graphics
[    45.443] (II) intel: Driver for Intel(R) Iris(TM) Graphics
[    45.443] (II) intel: Driver for Intel(R) Iris(TM) Pro Graphics
[    45.444] (--) Using syscons driver with X support (version 2.0)
[    45.444] (--) using VT number 9

[    45.448] (EE) No devices detected.
[    45.448] (EE) 
Fatal server error:
[    45.448] (EE) no screens found(EE) 
[    45.448] (EE) 
Please consult the The X.Org Foundation support 
     at http://wiki.x.org
 for help. 
[    45.448] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[    45.448] (EE) 
[    45.450] (EE) Server terminated with error (1). Closing log file.
 
I believe that intel driver is the old (non-kms) driver which you don't want.
https://cgit.freebsd.org/ports/tree/x11-drivers/xf86-video-intel

I would delete the xorg config file entirely and try running Xorg again.

Otherwise, try Driver "modesetting" instead. It should be the default (i.e without any xorg.conf).

https://man.freebsd.org/cgi/man.cgi?query=modesetting&sektion=4&n=1
I enabled modesetting, but still no dice.
/var/log/Xorg.0.log
Code:
[   186.498]
X.Org X Server 1.21.1.13
X Protocol Version 11, Revision 0
[   186.499] Current Operating System: FreeBSD lol 14.0-RELEASE-p6 FreeBSD 14.0-RELEASE-p6 #0: Tue Mar 26 20:26:20 UTC 2024     root@amd64-builder.daemonology.net:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64
[   186.499] 
[   186.499] Current version of pixman: 0.42.2
[   186.499]     Before reporting problems, check http://wiki.x.org
    to make sure that you have the latest version.
[   186.499] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[   186.499] (==) Log file: "/var/log/Xorg.0.log", Time: Tue May  7 11:53:26 2024
[   186.500] (==) Using config directory: "/usr/local/etc/X11/xorg.conf.d"
[   186.500] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
[   186.500] (==) No Layout section.  Using the first Screen section.
[   186.500] (==) No screen section available. Using defaults.
[   186.500] (**) |-->Screen "Default Screen Section" (0)
[   186.500] (**) |   |-->Monitor "<default monitor>"
[   186.500] (==) No device specified for screen "Default Screen Section".
    Using the first device section listed.
[   186.500] (**) |   |-->Device "Card0"
[   186.500] (==) No monitor specified for screen "Default Screen Section".
    Using a default monitor configuration.
[   186.501] (**) Allowing byte-swapped clients
[   186.501] (==) Automatically adding devices
[   186.501] (==) Automatically enabling devices
[   186.501] (==) Automatically adding GPU devices
[   186.501] (==) Automatically binding GPU devices
[   186.501] (==) Max clients allowed: 256, resource mask: 0x1fffff
[   186.501] (==) FontPath set to:
    /usr/local/share/fonts/misc/,
    /usr/local/share/fonts/TTF/,
    /usr/local/share/fonts/OTF/,
    /usr/local/share/fonts/Type1/,
    /usr/local/share/fonts/100dpi/,
    /usr/local/share/fonts/75dpi/,
    catalogue:/usr/local/etc/X11/fontpath.d
[   186.501] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[   186.501] (II) The server relies on udev to provide the list of input devices.
    If no devices become available, reconfigure udev or disable AutoAddDevices.
[   186.501] (II) Module ABI versions:
[   186.501]     X.Org ANSI C Emulation: 0.4
[   186.501]     X.Org Video Driver: 25.2
[   186.501]     X.Org XInput driver : 24.4
[   186.501]     X.Org Server Extension : 10.0
[   186.507] (--) PCI:*(0@0:2:0) 8086:46a3:17aa:384a rev 12, Mem @ 0x6000000000/16777216, 0x4000000000/268435456, I/O @ 0x00003000/64, BIOS @ 0x????????/65536
[   186.507] (II) LoadModule: "glx"
[   186.507] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[   186.508] (II) Module glx: vendor="X.Org Foundation"
[   186.508]     compiled for 1.21.1.13, module version = 1.0.0
[   186.508]     ABI class: X.Org Server Extension, version 10.0
[   186.508] (II) LoadModule: "modesetting"
[   186.508] (II) Loading /usr/local/lib/xorg/modules/drivers/modesetting_drv.so
[   186.509] (II) Module modesetting: vendor="X.Org Foundation"
[   186.509]     compiled for 1.21.1.13, module version = 1.21.1
[   186.509]     Module class: X.Org Video Driver
[   186.509]     ABI class: X.Org Video Driver, version 25.2
[   186.509] (II) modesetting: Driver for Modesetting Kernel Drivers: kms
[   186.509] (--) Using syscons driver with X support (version 2.0)
[   186.509] (--) using VT number 9

[   186.511] (EE) open /dev/dri/card0: No such file or directory
[   186.511] (WW) Falling back to old probe method for modesetting
[   186.511] (EE) open /dev/dri/card0: No such file or directory
[   186.511] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[   186.511] (EE) Screen 0 deleted because of no matching config section.
[   186.511] (II) UnloadModule: "modesetting"
[   186.511] (EE) Device(s) detected, but none match those in the config file.
[   186.511] (EE)
Fatal server error:
[   186.511] (EE) no screens found(EE)
[   186.511] (EE)
Please consult the The X.Org Foundation support
     at http://wiki.x.org
 for help.
[   186.511] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[   186.511] (EE)
[   186.512] (EE) Server terminated with error (1). Closing log file.



Again, as you said, this is Alder Lake, and this does not work without some manual effort yet.
Follow the link in my post above and you find all the information you need.
Even after removing the tigerlake firmware package, making sure the alderlake one is installed, and trying all kinds of combinations with them, nothing seems to change (even trying to run it without alderlake firmware made no difference somehow?). It maybe is worth noting that drm-info gives me drmGetDevices: No such file or directory.
I tried reinstalling libdrm, and doing pkg check on it, but that didn't seem to fix it.
 
It says "not supported on older than 14-STABLE 140058, no kernel support" Is there a way around that? Downloading an older kernel maybe? I'm considering trying 13.3-RELEASE or 15.0-CURRENT to see if it would do something.
 
Downloading an older kernel maybe?
No, it requires certain kernel features that aren't in 14.0 (or below). 14-STABLE is newer than 14.0-RELEASE. Those required kernel features will be available in the upcoming 14.1-RELEASE though.

I'm considering trying 13.3-RELEASE or 15.0-CURRENT to see if it would do something.
13.3-RELEASE doesn't have the required kernel features. I would suggest trying 14-STABLE, but this does require building and updating the base OS from source. Not that difficult to do, just time consuming.


You could try the BETA1 of 14.1-RELEASE, it should be available now.
 
Okay so- I reinstalled the whole OS, but 14.1-BETA1 this time. Tried install drm-61-kmod from ports, and managed to install it, but when I try to load i915kms from it, it says KLD i915kms.ko: depends on kernel - not available or version mismatch So I suppose the next step is trying 14-STABLE? Or is there not point?
 
it says KLD i915kms.ko: depends on kernel - not available or version mismatch
Right. You built graphics/drm-61-kmod from ports, that's good. It should have picked up the correct version. As you need a source tree in /usr/src/ I suspect you may have had the wrong version of the source checked out. How did you get /usr/src?

So I suppose the next step is trying 14-STABLE? Or is there not point?
No, 14-STABLE already moved beyond releng/14.1. The 14.1-BETA1 has all the right kernel features.
 
In my situation (problems with Radeon RX 6600) the following helped:

Code:
$ sudo git clone -b releng/14.1 https://git.freebsd.org/src.git /usr/src
$ git clone https://github.com/freebsd/drm-kmod.git
$ cd drm-kmod
$ git switch 6.1-lts
$ make -j 16
$ sudo make install

I'll try using the ports instead of this drm-kmod repo when I have time to play with FreeBSD
 
Alright! I did in fact install the wrong branch the first time, hence the error. Silly of me to not realize that :p Doing the same thing as tankist02 suggested, I managed to build and load the driver, and now X is running!

Thanks to everyone who's helped me here <3 The community is one of the reasons I chose FreeBSD and I am very happy. Tomorrow I will install the OS proper and (at long last) have my laptop up and running.
 
Code:
$ sudo git clone -b releng/14.1 https://git.freebsd.org/src.git /usr/src
If you already had a cloned source tree you can simply switch branches, git checkout releng/14.1. Although this won't work if you checked out a 'shallow' clone (--depth=1). There are ways to convert a 'shallow' clone to a full one but it's easier to just remove the directory and do a fresh new clone.

You can tell on which branch you are with git status or git branch.
 
If you already had a cloned source tree you can simply switch branches, git checkout releng/14.1. Although this won't work if you checked out a 'shallow' clone (--depth=1). There are ways to convert a 'shallow' clone to a full one but it's easier to just remove the directory and do a fresh new clone.

You can tell on which branch you are with git status or git branch.
Thank you, I know git a little bit :)
 
Back
Top