Solved startx fails with "no screens found"

I want to move over to FreeBSD from OpenBSD, but I'm having some problems right at the start.
Installation done, network connected, boots. Now I want to install X11. Start off with:
pkg install xorg
...and add my user to the video group.
Once that's done, check the graphics card:
Code:
pciconf -lv|grep -B4 VGA
And we get:
Code:
vgapci0@pci0:0:2:0:     class=0x030000 rev=0x07 hdr=0x00 vendor=0x1616 device=0x2057 subvendor=8086 subdevice=0x2057
    vendor     = 'Intel Corporation'
    device     = 'HD Graphics 5500'
    class      = display
    subclass   = VGA
So we install the Intel drivers:
pkg install drm-kmod
And we add it to the rc file:
sysrc kld_list+=i915kms
Now it's time to add the xorg configuration, so we create a new file /usr/local/etc/X11/xorg.conf.d/20-intel.conf:
Code:
Section "Device"
    Identifier "Card0"
    Driver     "intel"
EndSection
At this point, the manual is not very clear, and it seems the next steps all require X to be running. So I try startx. This gives the no screens found error message and then stops. The log file is as follows:
Code:
[  2477.610] 
X.Org X Server 1.21.1.8
X Protocol Version 11, Revision 0
[  2477.610] Current Operating System: FreeBSD desktop 13.2-RELEASE FreeBSD 13.2-RELEASE releng/13.2-n254617-525ecfdad597 GENERIC amd64
[  2477.610]  
[  2477.610] Current version of pixman: 0.42.2
[  2477.610]     Before reporting problems, check [URL]http://wiki.x.org[/URL]
    to make sure that you have the latest version.
[  2477.610] Markers: (--) probed, (**) from config file, (==) default setting,
    (++) from command line, (!!) notice, (II) informational,
    (WW) warning, (EE) error, (NI) not implemented, (??) unknown.
[  2477.611] (==) Log file: "/var/log/Xorg.0.log", Time: Tue Oct  3 12:59:52 2023
[  2477.611] (==) Using config directory: "/usr/local/etc/X11/xorg.conf.d"
[  2477.611] (==) Using system config directory "/usr/local/share/X11/xorg.conf.d"
[  2477.611] (==) No Layout section.  Using the first Screen section.
[  2477.611] (==) No screen section available. Using defaults.
[  2477.611] (**) |-->Screen "Default Screen Section" (0)
[  2477.611] (**) |   |-->Monitor "<default monitor>"
[  2477.611] (==) No device specified for screen "Default Screen Section".
    Using the first device section listed.
[  2477.611] (**) |   |-->Device "Card0"
[  2477.611] (==) No monitor specified for screen "Default Screen Section".
    Using a default monitor configuration.
[  2477.611] (==) Automatically adding devices
[  2477.611] (==) Automatically enabling devices
[  2477.611] (==) Automatically adding GPU devices
[  2477.611] (==) Automatically binding GPU devices
[  2477.611] (==) Max clients allowed: 256, resource mask: 0x1fffff
[  2477.611] (==) 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
[  2477.611] (==) ModulePath set to "/usr/local/lib/xorg/modules"
[  2477.611] (II) The server relies on udev to provide the list of input devices.
    If no devices become available, reconfigure udev or disable AutoAddDevices.
[  2477.611] (II) Module ABI versions:
[  2477.611]     X.Org ANSI C Emulation: 0.4
[  2477.611]     X.Org Video Driver: 25.2
[  2477.611]     X.Org XInput driver : 24.4
[  2477.611]     X.Org Server Extension : 10.0
[  2477.614] (--) PCI:*(0@0:2:0) 8086:1616:8086:2057 rev 9, Mem @ 0xf6000000/16777216, 0xe0000000/268435456, I/O @ 0x0000f000/64, BIOS @ 0x????????/65536
[  2477.614] (II) LoadModule: "glx"
[  2477.614] (II) Loading /usr/local/lib/xorg/modules/extensions/libglx.so
[  2477.615] (II) Module glx: vendor="X.Org Foundation"
[  2477.615]     compiled for 1.21.1.8, module version = 1.0.0
[  2477.615]     ABI class: X.Org Server Extension, version 10.0
[  2477.615] (II) LoadModule: "intel"
[  2477.615] (WW) Warning, couldn't open module intel
[  2477.615] (EE) Failed to load module "intel" (module does not exist, 0)
[  2477.615] (EE) No drivers available.
[  2477.615] (EE) 
Fatal server error:
[  2477.615] (EE) no screens found(EE) 
[  2477.615] (EE) 
Please consult the The X.Org Foundation support 
     at [URL]http://wiki.x.org[/URL]
 for help. 
[  2477.615] (EE) Please also check the log file at "/var/log/Xorg.0.log" for additional information.
[  2477.615] (EE) 
[  2477.615] (EE) Server terminated with error (1). Closing log file.
This looks to me as though it can't find the Intel driver. Trouble is, I don't know where the driver is, or where it should be, and I also don't know how FreeBSD deals with such things.
Can anybody give me some pointers as to how to get things working?
 
Hurray! Thank you very much. Modesetting is the answer.
I have to add that this should be in the manual.
 
  • Thanks
Reactions: neb
Back
Top