# FreeBSD 12, Intel i5 Graphics not working



## GregTheHun (Dec 13, 2018)

Hello all,

I have just recently upgraded from 11.2 to 12.0 and my graphics settings are now borked. Previously I had the terminal resolution set to 1280x720 with this code in */boot/loader.conf*

It was using this:


```
i915kms_load="YES"
kern.vt.fb.default_mode="1280x720"
```

if I load it in manually after booting and loading it with *kldload i915kms,* it works just fine, otherwise it doesn't load at boot.

My most recent portion of dmesg is below (with edits):


```
.............................................
FreeBSD 12.0-RELEASE r341666 GENERIC amd64
.............................................

FreeBSD clang version 6.0.1 (tags/RELEASE_601/final 335540) (based on LLVM 6.0.1)
VT(vga): resolution 640x480
sysctl_warn_reuse: can't re-use a leaf (debug.mddebug)!
sysctl_warn_reuse: can't re-use a leaf (vm.md_malloc_wait)!
module_register: cannot register g_md from kernel; already loaded from geom_md.ko
Module g_md failed to register: 17

.............................................
CPU: Intel(R) Core(TM) i5-4570T CPU @ 2.90GHz (2893.38-MHz K8-class CPU)
  Origin="GenuineIntel"  Id=0x306c3  Family=0x6  Model=0x3c  Stepping=3
.............................................

  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=0x2c100800<SYSCALL,NX,Page1GB,RDTSCP,LM>
  AMD Features2=0x21<LAHF,ABM>
  Structured Extended Features=0x2fbb<FSGSBASE,TSCADJ,BMI1,HLE,AVX2,SMEP,BMI2,ERMS,INVPCID,RTM,NFPUSG>
  XSAVE Features=0x1<XSAVEOPT>
  VT-x: PAT,HLT,MTF,PAUSE,EPT,UG,VPID
  TSC: P-state invariant, performance statistics
real memory  = 8589934592 (8192 MB)
avail memory = 8066527232 (7692 MB)
Event timer "LAPIC" quality 600
ACPI APIC Table: <LENOVO TC-FB   >
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
FreeBSD/SMP: 1 package(s) x 2 core(s) x 2 hardware threads
random: unblocking device.
ioapic0 <Version 2.0> irqs 0-23 on motherboard
Launching APs: 1 2 3
Timecounter "TSC-low" frequency 1446687847 Hz quality 1000
random: entropy device external interface
The GEOM class MD is already loaded.
kbd1 at kbdmux0
netmap: loaded module
[ath_hal] loaded
module_register_init: MOD_LOAD (vesa, 0xffffffff810f9770, 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: <LENOVO TC-FB> on motherboard
acpi0: Power Button (fixed)
cpu0: <ACPI CPU> on acpi0
hpet0: <High Precision Event Timer> iomem 0xfed00000-0xfed003ff on acpi0
Timecounter "HPET" frequency 14318180 Hz quality 950
Event timer "HPET" frequency 14318180 Hz quality 550
Event timer "HPET1" frequency 14318180 Hz quality 440
Event timer "HPET2" frequency 14318180 Hz quality 440
Event timer "HPET3" frequency 14318180 Hz quality 440
Event timer "HPET4" frequency 14318180 Hz quality 440
atrtc0: <AT realtime clock> port 0x70-0x77 irq 8 on acpi0
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
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
vgapci0: <VGA-compatible display> port 0xf000-0xf03f mem 0xf7800000-0xf7bfffff,0xe0000000-0xefffffff irq 16 at device 2.0 on pci0
vgapci0: Boot video device
hdac0: <Intel Haswell HDA Controller> mem 0xf7c30000-0xf7c33fff irq 16 at device 3.0 on pci0
xhci0: <Intel Lynx Point USB 3.0 controller> mem 0xf7c20000-0xf7c2ffff irq 16 at device 20.0 on pci0
xhci0: 32 bytes context size, 64-bit DMA
xhci0: Port routing mask set to 0xffffffff
usbus0 on xhci0
usbus0: 5.0Gbps Super Speed USB v3.0
pci0: <simple comms> at device 22.0 (no driver attached)
uart2: <Intel Lynx Point KT Controller> port 0xf0e0-0xf0e7 mem 0xf7c3a000-0xf7c3afff irq 19 at device 22.3 on pci0
uart2: Using 1 MSI message
em0: <Intel(R) PRO/1000 Network Connection> port 0xf080-0xf09f mem 0xf7c00000-0xf7c1ffff,0xf7c39000-0xf7c39fff irq 20 at device 25.0 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: 00:23:24:54:7d:92
em0: netmap queues/slots: TX 1/1024, RX 1/1024
ehci0: <Intel Lynx Point USB 2.0 controller USB-B> mem 0xf7c38000-0xf7c383ff irq 16 at device 26.0 on pci0
usbus1: EHCI version 1.0
usbus1 on ehci0
usbus1: 480Mbps High Speed USB v2.0
ehci1: <Intel Lynx Point USB 2.0 controller USB-A> mem 0xf7c37000-0xf7c373ff irq 23 at device 29.0 on pci0
usbus2: EHCI version 1.0
usbus2 on ehci1
usbus2: 480Mbps High Speed USB v2.0
isab0: <PCI-ISA bridge> at device 31.0 on pci0
isa0: <ISA bus> on isab0
ahci0: <Intel Lynx Point AHCI SATA controller> port 0xf0d0-0xf0d7,0xf0c0-0xf0c3,0xf0b0-0xf0b7,0xf0a0-0xf0a3,0xf060-0xf07f mem 0xf7c36000-0xf7c367ff irq 19 at device 31.2 on pci0
ahci0: AHCI v1.30 with 5 6Gbps ports, Port Multiplier not supported
ahcich0: <AHCI channel> at channel 0 on ahci0
ahcich3: <AHCI channel> at channel 3 on ahci0
ahciem0: <AHCI enclosure management bridge> on ahci0
acpi_button0: <Power Button> on acpi0
acpi_tz0: <Thermal Zone> on acpi0
acpi_tz1: <Thermal Zone> on acpi0
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.
coretemp0: <CPU On-Die Thermal Sensors> on cpu0
est0: <Enhanced SpeedStep Frequency Control> on cpu0
ZFS filesystem version: 5
ZFS storage pool version: features support (5000)
Timecounters tick every 1.000 msec
hdacc0: <Intel Haswell HDA CODEC> at cad 0 on hdac0
hdaa0: <Intel Haswell Audio Function Group> at nid 1 on hdacc0
pcm0: <Intel Haswell (HDMI/DP 8ch)> at nid 3 on hdaa0
ugen2.1: <Intel EHCI root HUB> at usbus2
ugen0.1: <0x8086 XHCI root HUB> at usbus0
ugen1.1: <Intel EHCI root HUB> at usbus1
uhub0: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus2
uhub1: <Intel EHCI root HUB, class 9/0, rev 2.00/1.00, addr 1> on usbus1
uhub2: <0x8086 XHCI root HUB, class 9/0, rev 3.00/1.00, addr 1> on usbus0
ses0 at ahciem0 bus 0 scbus2 target 0 lun 0
ses0: <AHCI SGPIO Enclosure 1.00 0001> SEMB S-E-S 2.00 device
ses0: SEMB SES Device
ada0 at ahcich0 bus 0 scbus0 target 0 lun 0
ada0: <SAMSUNG MZ7TD128HAFV-000L1 DXT04L0Q> ACS-2 ATA SATA 3.x device
ada0: Serial Number S14TNSAD730639
ada0: 600.000MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)
ada0: Command Queueing enabled
ada0: 122104MB (250069680 512 byte sectors)
ada0: quirks=0x3<4K,NCQ_TRIM_BROKEN>
Trying to mount root from zfs:zroot/ROOT/default []...
Root mount waiting for: usbus2 usbus1 usbus0
uhub2: 21 ports with 21 removable, self powered
Root mount waiting for: usbus2 usbus1 usbus0
uhub0: 3 ports with 3 removable, self powered
uhub1: 3 ports with 3 removable, self powered
ugen0.2: <Realtek 802.11n NIC> at usbus0
rtwn0 on uhub2
rtwn0: <Realtek 802.11n NIC, class 0/0, rev 2.00/0.00, addr 1> on usbus0
rtwn0: MAC/BB RTL8188EU, RF 6052 1T1R
Root mount waiting for: usbus2 usbus1 usbus0
ugen2.2: <vendor 0x8087 product 0x8000> at usbus2
uhub3 on uhub0
uhub3: <vendor 0x8087 product 0x8000, class 9/0, rev 2.00/0.04, addr 2> on usbus2
ugen1.2: <vendor 0x8087 product 0x8008> at usbus1
uhub4 on uhub1
uhub4: <vendor 0x8087 product 0x8008, class 9/0, rev 2.00/0.04, addr 2> on usbus1
uhub4: 6 ports with 6 removable, self powered
uhub3: 8 ports with 8 removable, self powered
ugen0.3: <Logitech USB Receiver> at usbus0
ukbd0 on uhub2
ukbd0: <Logitech USB Receiver, class 0/0, rev 2.00/24.01, addr 2> on usbus0
kbd2 at ukbd0
wlan0: Ethernet address: d4:6e:0e:0f:25:00
lo0: link state changed to UP
ums0 on uhub2
ums0: <Logitech USB Receiver, class 0/0, rev 2.00/24.01, addr 2> on usbus0
ums0: 16 buttons and [XYZT] coordinates ID=2
uhid0 on uhub2
uhid0: <Logitech USB Receiver, class 0/0, rev 2.00/24.01, addr 2> on usbus0
pflog0: promiscuous mode enabled
Security policy loaded: MAC/ntpd (mac_ntpd)
wlan0: link state changed to UP
```

If any other data is needed, just tell me the commands to run.

Thanks all


----------



## Eric A. Borisch (Dec 13, 2018)

Install drm-legacy-kmod and add

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

To rc.conf. It will load the module after the init process starts. Comment out the module load line but leave the by mode line in loader.conf.


----------



## GregTheHun (Dec 13, 2018)

Installed legacy, removed load line (changed to kld_list line), and kept by mode line.

Didn't work


----------



## Eric A. Borisch (Dec 13, 2018)

But you can manually load it and it works? Odd.


----------



## T-Daemon (Dec 13, 2018)

Hi GregTheHun,

There is a reference to i915kms in /boot/defaults/loader.conf  (note - this file is read first before /boot/loader.conf) as it is blacklisted by module_blacklist=.

From 12.0-RELEASE Release Notes.
6.3. Deprecated Drivers


> .....
> “The DRM driver for modern graphics chipsets has been marked deprecated and marked for removal in FreeBSD 13. The DRM kernel modules are available from graphics/drm-stable-kmod or graphics/drm-legacy-kmod in the Ports Collection as well as via pkg(8). Additionally, the kernel modules have been added to the lua loader.conf(5) module_blacklist, as installation from the Ports Collection or pkg(8) is strongly recommended.”



Install the module from ports/pkg and put an entry to /etc/rc.conf. I presume with kld_list=, but I'm not sure.


----------

