Intel UHD Graphics 630 support - No screens found - FreeBSD 12.0-RELEASE

Got a new server built on an Asrock Phantom Z390 ITX motherboard with an Intel core i9 9900 with integrated UHD Graphics 630, model BX80684I99900 (not the 9900K - this is the 65w version). The integrated graphics on this chipset are not supported by drm-kmod, or it's variant pkgs. I found this thread:


and it looks like the pci id of his processor was not in the code for this user. I think I may be in the same boat, but with a different pci id. I'm not sure where to find the correct id, and exactly where to put it in the code in ports. Or even if this is the correct action to take?

Here is the output of pcicontrol -lv | grep -B 4 VGA:

Code:
vgapci0@pci0:0:2:0:    class=0x030000 card=0x3e981849 chip=0x3e988086 rev=0x02 hdr=0x00
    vendor     = 'Intel Corporation'
    device     = 'UHD Graphics 630 (Desktop 9 Series)'
    class      = display
    subclass   = VGA

and my dmesg:

Code:
---<<BOOT>>---
Copyright (c) 1992-2018 The FreeBSD Project.
Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994
    The Regents of the University of California. All rights reserved.
FreeBSD is a registered trademark of The FreeBSD Foundation.
FreeBSD 12.0-RELEASE r341666 GENERIC i386
FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1)
VT(vga): resolution 640x480
CPU: Intel(R) Core(TM) i9-9900 CPU @ 3.10GHz (3096.14-MHz 686-class CPU)
  Origin="GenuineIntel"  Id=0x906ed  Family=0x6  Model=0x9e  Stepping=13
  Features=0xbfebfbff<FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CLFLUSH,DTS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,PBE>
  Features2=0x7ffafbff<SSE3,PCLMULQDQ,DTES64,MON,DS_CPL,VMX,SMX,EST,TM2,SSSE3,SDBG,FMA,CX16,xTPR,PDCM,PCID,SSE4.1,SSE4.2,x2APIC,MOVBE,POPCNT,TSCDLT,AESNI,XSAVE,OSXSAVE,AVX,F16C,RDRAND>
  AMD Features=0x2c100000<NX,Page1GB,RDTSCP,LM>
  AMD Features2=0x121<LAHF,ABM,Prefetch>
  Structured Extended Features=0x29c6fbf<FSGSBASE,TSCADJ,SGX,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,NFPUSG,MPX,RDSEED,ADX,SMAP,CLFLUSHOPT,PROCTRACE>
  Structured Extended Features2=0x40000000<SGXLC>
  Structured Extended Features3=0xbc000400<IBPB,STIBP,L1DFL,ARCH_CAP,SSBD>
  XSAVE Features=0xf<XSAVEOPT,XSAVEC,XINUSE,XSAVES>
  IA32_ARCH_CAPS=0x2b<RDCL_NO,IBRS_ALL,SKIP_L1DFL_VME>
  VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
  TSC: P-state invariant, performance statistics
real memory  = 34359738368 (32768 MB)
avail memory = 1498333184 (1428 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table: <ALASKA A M I >
FreeBSD/SMP: Multiprocessor System Detected: 16 CPUs
FreeBSD/SMP: 1 package(s) x 8 core(s) x 2 hardware threads
random: unblocking device.
ioapic0 <Version 2.0> irqs 0-119 on motherboard
Launching APs: 1 13 3 12 4 2 5 7 9 10 14 6 11 8 15
Timecounter "TSC-low" frequency 1548071146 Hz quality 1000
random: entropy device external interface
kbd1 at kbdmux0
[ath_hal] loaded
module_register_init: MOD_LOAD (vesa, 0x15f8f40, 0) error 19
random: registering fast source Intel Secure Key RNG
random: fast provider: "Intel Secure Key RNG"
nexus0
vtvga0: <VT VGA driver> on motherboard
cryptosoft0: <software crypto> on motherboard
acpi0: <ALASKA A M I > on motherboard
acpi0: Power Button (fixed)
unknown: memory range not supported
cpu0: <ACPI CPU> on acpi0
hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 24000000 Hz quality 950
Event timer "HPET" frequency 24000000 Hz quality 350
Event timer "HPET1" frequency 24000000 Hz quality 340
Event timer "HPET2" frequency 24000000 Hz quality 340
Event timer "HPET3" frequency 24000000 Hz quality 340
Event timer "HPET4" frequency 24000000 Hz quality 340
Event timer "HPET5" frequency 24000000 Hz quality 340
Event timer "HPET6" frequency 24000000 Hz quality 340
Event timer "HPET7" frequency 24000000 Hz quality 340
attimer0: <AT timer> port 0x40-0x43,0x50-0x53 irq 0 on acpi0
Timecounter "i8254" frequency 1193182 Hz quality 0
Event timer "i8254" frequency 1193182 Hz quality 100
Timecounter "ACPI-fast" frequency 3579545 Hz quality 900
acpi_timer0: <24-bit timer at 3.579545MHz> port 0x1808-0x180b on acpi0
pcib0: <ACPI Host-PCI bridge> port 0xcf8-0xcff on acpi0
pci0: <ACPI PCI bus> on pcib0
pcib1: <ACPI PCI-PCI bridge> irq 16 at device 1.0 on pci0
pci1: <ACPI PCI bus> on pcib1
vgapci0: <VGA-compatible display> port 0x3000-0x303f mem 0xcb000000-0xcbffffff,0x80000000-0x8fffffff irq 16 at device 2.0 on pci0
vgapci0: Boot video device
xhci0: <XHCI (generic) USB 3.0 controller> mem 0xcc220000-0xcc22ffff irq 16 at device 20.0 on pci0
xhci0: 32 bytes context size, 64-bit DMA
usbus0: waiting for BIOS to give up control
xhci_interrupt: host controller halted
usbus0 on xhci0
usbus0: 5.0Gbps Super Speed USB v3.0
pci0: <memory, RAM> at device 20.2 (no driver attached)
pci0: <network> at device 20.3 (no driver attached)
pci0: <simple comms> at device 22.0 (no driver attached)
ahci0: <AHCI SATA controller> port 0x3090-0x3097,0x3080-0x3083,0x3060-0x307f mem 0xcc238000-0xcc239fff,0xcc23e000-0xcc23e0ff,0xcc23d000-0xcc23d7ff irq 16 at device 23.0 on pci0
ahci0: AHCI v1.31 with 4 6Gbps ports, Port Multiplier not supported
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich1: <AHCI channel> at channel 1 on ahci0
ahcich2: <AHCI channel> at channel 2 on ahci0
ahcich3: <AHCI channel> at channel 3 on ahci0
ahciem0: <AHCI enclosure management bridge> on ahci0
ahciem0: EM timeout
device_attach: ahciem0 attach returned 6
pcib2: <ACPI PCI-PCI bridge> irq 16 at device 27.0 on pci0
pci2: <ACPI PCI bus> on pcib2
nvme0: <Generic NVMe Device> mem 0xcc100000-0xcc103fff irq 16 at device 0.0 on pci2
pcib3: <ACPI PCI-PCI bridge> irq 16 at device 27.4 on pci0
pci3: <ACPI PCI bus> on pcib3
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
hdac0: <Intel Coffelake HDA Controller> mem 0xcc230000-0xcc233fff,0xcc000000-0xcc0fffff irq 16 at device 31.3 on pci0
pci0: <serial bus> at device 31.5 (no driver attached)
em0: <Intel(R) PRO/1000 Network Connection> mem 0xcc200000-0xcc21ffff irq 16 at device 31.6 on pci0
em0: attach_pre capping queues at 1
em0: using 1024 tx descriptors and 1024 rx descriptors
em0: msix_init qsets capped at 1
em0: Unable to map MSIX table
em0: Using an MSI interrupt
em0: allocated for 1 tx_queues
em0: allocated for 1 rx_queues
em0: Ethernet address: 70:85:c2:c3:fe:a0
acpi_button0: <Sleep Button> on acpi0
acpi_button1: <Power Button> on acpi0
acpi_syscontainer0: <System Container> on acpi0
ata0: <ATA channel> at port 0x1f0-0x1f7,0x3f6 irq 14 on isa0
ata0: non-PNP ISA device will be removed from GENERIC in FreeBSD 12.
ata1: <ATA channel> at port 0x170-0x177,0x376 irq 15 on isa0
ata1: non-PNP ISA device will be removed from GENERIC in FreeBSD 12.
atkbdc0: <Keyboard controller (i8042)> at port 0x60,0x64 on isa0
atkbd0: <AT Keyboard> irq 1 on atkbdc0
kbd0 at atkbd0
atkbd0: [GIANT-LOCKED]
atkbdc0: non-PNP ISA device will be removed from GENERIC in FreeBSD 12.
atrtc0: <AT realtime clock> at port 0x70 irq 8 on isa0
atrtc0: Warning: Couldn't map I/O.
atrtc0: registered as a time-of-day clock, resolution 1.000000s
Event timer "RTC" frequency 32768 Hz quality 0
atrtc0: non-PNP ISA device will be removed from GENERIC in FreeBSD 12.
ppc0: parallel port not found.
coretemp0: <CPU On-Die Thermal Sensors> on cpu0
est0: <Enhanced SpeedStep Frequency Control> on cpu0
ZFS NOTICE: Prefetch is disabled by default on i386 -- to enable,
            add "vfs.zfs.prefetch_disable=0" to /boot/loader.conf.
ZFS WARNING: Recommended minimum kmem_size is 512MB; expect unstable behavior.
             Consider tuning vm.kmem_size and vm.kmem_size_max
             in /boot/loader.conf.
ZFS filesystem version: 5
ZFS storage pool version: features support (5000)
Timecounters tick every 1.000 msec
ugen0.1: <0x8086 XHCI root HUB> at usbus0
uhub0: <0x8086 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
nvd0: <Samsung SSD 970 EVO Plus 250GB> NVMe namespace
nvd0: 238475MB (488397168 512 byte sectors)
hdacc0: <Realtek ALC1220 HDA CODEC> at cad 0 on hdac0
hdaa0: <Realtek ALC1220 Audio Function Group> at nid 1 on hdacc0
pcm0: <Realtek ALC1220 (Rear Analog 5.1/2.0)> at nid 20,22,21 and 24,26 on hdaa0
pcm1: <Realtek ALC1220 (Front Analog)> at nid 27 and 25 on hdaa0
pcm2: <Realtek ALC1220 (Rear Digital)> at nid 30 on hdaa0
hdacc1: <Intel Kabylake HDA CODEC> at cad 2 on hdac0
hdaa1: <Intel Kabylake Audio Function Group> at nid 1 on hdacc1
pcm3: <Intel Kabylake (HDMI/DP 8ch)> at nid 3 on hdaa1
Trying to mount root from zfs:zroot/ROOT/default []...
Root mount waiting for: usbus0
Root mount waiting for: usbus0
uhub0: 26 ports with 26 removable, self powered
ugen0.2: <BTC USB Multimedia Keyboard> at usbus0
ukbd0 on uhub0
ukbd0: <BTC USB Multimedia Keyboard, class 0/0, rev 1.10/1.10, addr 1> on usbus0
kbd2 at ukbd0
Root mount waiting for: usbus0
ugen0.3: <PixArt HP USB Optical Mouse> at usbus0
Root mount waiting for: usbus0
ugen0.4: <vendor 0x8087 product 0x0aaa> at usbus0
lo0: link state changed to UP
uhid0 on uhub0
uhid0: <12242003> on usbus0
ums0 on uhub0
ums0: <PixArt HP USB Optical Mouse, class 0/0, rev 2.00/1.00, addr 2> on usbus0
ums0: 3 buttons and [XYZ] coordinates ID=0
ubt0 on uhub0
ubt0: <vendor 0x8087 product 0x0aaa, class 224/1, rev 2.00/0.02, addr 3> on usbus0
em0: link state changed to UP
WARNING: attempt to domain_add(bluetooth) after domainfinalize()
WARNING: attempt to domain_add(netgraph) after domainfinalize()
ubt0: ubt_ctrl_write_callback:782: control transfer failed: USB_ERR_TIMEOUT
ng_hci_process_command_timeout: ubt0hci - unable to complete HCI command OGF=0x3, OCF=0x3. Timeout
Security policy loaded: MAC/ntpd (mac_ntpd)

Can anyone point me in the right direction on how to find the correct pci id and where to update the code for the i915pciids.h?


Thanks.
 
Last edited by a moderator:
Got a new server built on
Why do you need i915drm kernel module for a server? Most servers are console only around here.
If you are trying to improve your console graphics they are handled through gop settings on EFI installations. vidconsole on legacy.
Too small a screen? Fonts look bad?

If you need Xorg then the problem is your CPU video might be too new.
Have you considered running the generic scfb driver? It is included with our Xorg now and needs a small config file.
Step 4 here is all that is needed.
 
I think I may be in the same boat, but with a different pci id. I'm not sure where to find the correct id, and exactly where to put it in the code in ports. Or even if this is the correct action to take?

Here is the output of pcicontrol -lv | grep -B 4 VGA:

vgapci0@pci0:0:2:0: class=0x030000 card=0x3e981849 chip=0x3e988086 rev=0x02 hdr=0x00
It's right there!!! What you need is the decoder ring. Mine says 8086 is Intels VID/vendorID/idVendor. Where do you see that?
Now transfer that work to the end of the next blob. That is your ProductID/PID/idProduct=1849

The information to need to bounce against the patch is = 0x3e98
Which is exactly what was patched:

So apply this patch and have a blast.
 
With the age of that patch being 1 year there is a chance this is already baked into the graphics/drm-kmod port.
What I would do is use the ports tree and make the port to checkout the build files.
So move to the directory cd usr/ports/graphics/drm-fbsd12.0-kmod/ and then run make to check the build contents to see whether the port already has the patch applied.
 
Ok. So this took a bit of work.

First I had to update my ports tree, because the ports tree that installs with 12.0-RELEASE does not have the graphics/drm-fbsd12.0-kmod in it. So:

- portsnap fetch
- portsnap extract
- portsnap update

now the /usr/ports/graphics/drm-fbsd12.0-kmod exists. Run make in it. Check the code. The 3E98 support was not in the include/drm/i915_pciids.h file. I had to add it:

cd work/kms-drm-dd4831c/include/drm
vi i915_pciids.h
search for 3E96 (/3E96 - it is included in the code)
copy that line and paste it (yyp)
move to the 96 and change it to 98

INTEL_VGA_DEVICE(0x3E98, info), /* SRV GT2 */ \

save and exit (ZZ)

Then in graphics/drm-fbsd12.0-kmod/work I did:

- rm .{build,patch,stage}_done*

to force the make to do those steps again. Clean the source:

cd graphics/drm-fbsd12.0-kmod/work/kms-drm-dd4831c/
make clean

Then go to graphics/drm-fbsd12.0-kmod and run:

make install

It rebuilds the drivers and installs them.

Make sure this is in the rc.conf:

kld_list="/boot/modules/i915kms.ko"

Make sure the users that need graphics are in the video group in /etc/groups.

Reboot.

Now I'm getting lots of drm notices!:

drmn0: <drmn> on vgapci0
vgapci0: child drmn0 requested pci_enable_io
vgapci0: child drmn0 requested pci_enable_io
[drm] Unable to create a private tmpfs mount, hugepage support will be disabled(-19).
[drm:i915_ggtt_probe_hw] We never expected a Global GTT with more than 32bits of address space! Found 0M!
[drm] Got stolen memory base 0x0, size 0x1
[drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
[drm] Driver supports precise vblank timestamp query.
[drm] Connector DP-1: get mode from tunables:
[drm] - kern.vt.fb.modes.DP-1
[drm] - kern.vt.fb.default_mode
[drm] Connector HDMI-A-1: get mode from tunables:
[drm] - kern.vt.fb.modes.HDMI-A-1
[drm] - kern.vt.fb.default_mode
[drm] Connector DP-2: get mode from tunables:
[drm] - kern.vt.fb.modes.DP-2
[drm] - kern.vt.fb.default_mode
[drm] Connector HDMI-A-2: get mode from tunables:
[drm] - kern.vt.fb.modes.HDMI-A-2
[drm] - kern.vt.fb.default_mode
[drm] Connector DP-3: get mode from tunables:
[drm] - kern.vt.fb.modes.DP-3
[drm] - kern.vt.fb.default_mode
[drm] Connector DP-4: get mode from tunables:
[drm] - kern.vt.fb.modes.DP-4
[drm] - kern.vt.fb.default_mode
[drm] Initialized i915 1.6.0 20171222 for drmn0 on minor 0
name=drmn0 flags=0x0 stride=7680 bpp=32
drmn0: fb0: inteldrmfb frame buffer device
drmn0: successfully loaded firmware image with name: i915/kbl_dmc_ver1_04.bin
[drm] Finished loading DMC firmware i915/kbl_dmc_ver1_04.bin (v1.4)

and during boot the screen flashes and now I'm seeing much better resolution in the console.

But gdm and startx are still not working. X starts to a black screen with a single cursor in the upper left corner and the mouse pointer in the center of the screen.

Here is the output of pciconf -lv | grep -B 4 VGA (which used to be pcicontrol - weird):

vgapci0@pci0:0:2:0: class=0x030000 card=0x3e981849 chip=0x3e988086 rev=0x02 hdr=0x00
vendor = 'Intel Corporation'
device = 'UHD Graphics 630 (Desktop 9 Series)'
class = display
subclass = VGA

time for bed. Some progress made. I'll have to work on it more tomorrow.

I wish the 3E98 pci id was just included in the code by default. It's definitely a valid id.
 
I figured it out. I needed to install the X windows intel drivers:

pkg install xf86-video-intel

gdm works! Time to install graphics/mesa-demos and check out glxgears performance.
 
Back
Top