# How to use the "old" or the "new" i915kms driver for Intel integrated graphics with Xorg..



## k.jacker (Jul 16, 2018)

This is a short as possible overview over the "old" and the "new" kms video drivers for Intel integrated graphics and the how and when they should be used.

I wrote this as an attempt to clear up confusion and hopefully reduce the amount of threads with the same questions about that topic on the forum.

Yes, one could read the wiki or dig through the driver sources, but this one is aimed at the newbie or maybe even the experienced FreeBSD user that simply thinks a computer is a square box 


=== THE "NEW" AND THE "OLD" DRIVER ===

As the title suggests, since FreeBSD 11.2-RELEASE, we have two kms drivers with the same name. In FreeBSD 11.1-RELEASE there is only the i915kms.ko driver from the base system. Since FreeBSD 11.2-RELEASE there are two - the one in the base system and the new one in the ports. Both share the same name (i915kms.ko).
The driver in the base system is (like all kernel modules) located in /boot/kernel/, while the one from the ports will be in /boot/modules/ after building and installing it.

The base system i915kms.ko driver supports the Intel Core family processors up to the Haswell (4th) generation of Intel Core processors. The new i915kms.ko driver available from ports (graphics/drm-next-kmod) since FreeBSD 11.2-RELEASE, supports Intel Core family processors up to Kaby Lake (7th) generation.


=== IDENTIFYING YOUR PROCESSOR ===

On all desktop and mobile Core processors, e.g. the Intel Core i7-4600U in my laptop, Intel nicely matched the numbering with the processor's generation. This processor in my laptop is a Haswell generation processor, see the number 4xxx = 4th generation matches up. Easy to see. You can use the i915kms.ko driver from the base system with it's integrated graphics (HD 4000 series) in both FreeBSD 11.1-RELEASE and 11.2-RELEASE.

If you got something like what I have in my workstation, a Core i5-5675C, you can only use the graphics/drm-next-kmod driver from the ports in FreeBSD 11.2-RELEASE since this is a Broadwell processor (5th generation). See the number 5xxx = 5th generation matches nicely as well. Though Broadwell came after Haswell and the driver in the base system does not support this processors graphics.
Every processor from the 5th generation (Broadwell) or newer, needs the new driver from the ports that came with the FreeBSD 11.2-RELEASE to work. When buidling and installing the graphics/drm-next-kmod port, the new kms driver will be created as /boot/modules/i915kms.ko in the process.

When it comes to Pentium and Celeron processers, it's important to know, that they fall in two different categories: the cheap (Intel Atom like) SoC (System on a Chip) and the "normal" processors. The "normal" Pentium and Celeron processors are all supported by either the kms driver in the base system or that one from the ports, depending on the processors generation. Sadly their numbering doesn't match their generation, making them a little harder to identify.
A "normal" (none SoC) processor will fit into one of the 1155, 1150 or 1151 FCLGA (LGA = Land grid array) sockets (same as the Core i processors above), whereas the smaller SoC Celerons and Pentiums fit into some FCBGA socket (BGA = Ball grid array.
Those get soldered on, like in (modern) notebooks). The SoC are not neccessarily supported, some work, others not. Later more.

So how do you identify your processor?
If you don't know your processors name, run the following command:

```
% dmesg | grep CPU:
CPU: Intel(R) Core(TM) i7-4600U CPU @ 2.10GHz (2693.83-MHz K8-class CPU)
```



=== DECIDE WHICH DRIVER TO USE ===

The numbering in the table below shows the Intel Core i3, Core i5 and Core i7 family of processors,
including it's mobile and desktop parts:

2xxx    Sandy Bridge   (i915kms.ko in base)
3xxx    Ivy Bridge        (i915kms.ko in base)
4xxx    Haswell           (i915kms.ko in base)
5xxx    Broadwell        (i915kms.ko from ports graphics/drm-next-kmod)
6xxx    Skylake           (i915kms.ko from ports graphics/drm-next-kmod)
7xxx    Kaby Lake       (i915kms.ko from ports graphics/drm-next-kmod)
(I'm going a little deeper into, how you identify your Pentium, Celeron or Xeon processor in a minute)

First, for those who got one of the above processors and can't wait...

If your processor is supported by the i915kms.ko driver in the base system, add the following lines to /etc/rc.conf

```
kld_list="i915kms"
```
In case you have created a xorg.conf, remove it and reboot. That's it.

or...

If your processor is supported by the i915kms.ko driver from the ports, you have to install that one first.
Update to FreeBSD 11.2-RELEASE if you haven't already `# freebsd-update upgrade -r 11.2` (check the Handbook, if you have never done it before)
Fetch ports tree (if /usr/ports/ is emtpy) `# portsnap fetch extract` or update it `# portsnap fetch update`
Fetch sources `# svnlite co https://svn.freebsd.org/base/releng/11.2 /usr/src/`
`cd /usr/ports/graphics/drm-next-kmod`
`# make && make install`
Now add the following lines to /etc/rc.conf

```
kld_list="/boot/modules/i915kms.ko"
```
In case you have created a xorg.conf, remove it and reboot. That's it.


=== IDENTIFYING CELERON, PENTIUM & XEON ===

The "normal" (none SoC) Pentiums' and Celeron's numbering starts with a "G", like the Celeron G1820 I once had in my server. This is also a Haswell generation processor which isn't quite as easy to identify as with the Intel Core processors. As you see, the numbering starts with "1xxx" even if Haswell is 4th generation.
Let's try to identify the "normal" socketed 1155, 1150 and 1151 Celeronst:

G16xx    Ivy Bridge         (i915kms.ko in base)
G18xx    Haswell            (i915kms.ko in base)
G39xx    Skylake            (i915kms.ko from ports graphics/drm-next-kmod)
G49xx    Kaby Lake        (i915kms.ko from ports graphics/drm-next-kmod)


And here are the "normal" socketed 1155, 1150 and 1151 Pentiums:

G2xxx     Ivy Bridge            (i915kms.ko in base)
G3xxx     Haswell               (i915kms.ko in base)
G44xx    Skylake                (i915kms.ko from ports graphics/drm-next-kmod)
G45xx    Skylake & Kaby Lake  (i915kms.ko from ports graphics/drm-next-kmod)
G46xx    Kaby Lake            (i915kms.ko from ports graphics/drm-next-kmod)


As with Celeron and Pentium, also the Xeon processors fall into the categories of "normal" and SoC.
The "normal" Xeons processors, of which some models have integrated graphics, are all part of the Intel Xeon E3 family:

E3        Sandy Bridge    (i915kms.ko in base)
E3 v2    Ivy Bridge        (i915kms.ko in base)
E3 v3    Haswell            (i915kms.ko in base)
E3 v4    Broadwell        (i915kms.ko from ports graphics/drm-next-kmod)
E3 v5    Skylake            (i915kms.ko from ports graphics/drm-next-kmod)
E3 v6    Kaby Lake        (i915kms.ko from ports graphics/drm-next-kmod)

To make use of the integrated graphics of the above Pentiums, Celerons and Xeons use the appropriate i915kms.ko driver, either that one from the base system or from the ports, as explained before in the DECIDE WHICH DRIVER TO USE section.


=== THE INTEL GRAB BAG SOC, TRY YOUR LUCK ===

Last but not least, the SoC Pentiums and Celerons. There are many of them and I don't know them all. This is Intel's rubbish bin (Oops personal opinion here). Nobody knows what they contain, maybe not even Intel. I feel with every new generation they take some random previous generation parts, put them their rubbish bin and shake it until in the end... SURPRISE!!
We are presented with a yet another product that's has no clear specs about the graphics. Wikipedia often is more helpful then ark.intel.com

The Celeron N3160 (Braswell generation) SoC works with the new graphics/drm-next-kmod driver from the ports, as in this thread. If all Braswell Celerons work is beyond me. No clue about other generations of SoC either. They are not yet documented in the wiki, but I know at least there are some models in the "old" drivers source code.
Try the i915kms.ko driver from the base system first, and if that fails, try the new 915kms.ko driver from the ports!

To check if you have a Braswell SoC, check ark.intel.com on the web and enter you processor's name into the 'Search specifications' field. That will be e.g. "n3160" for a Celeron N3160. Look at the field "Code Name" here.
It can be helpful to look at the "Launch date" field and check that against the release dates of the of the Core family processors. So you'll know approximately which graphics (or parts of) is inside your SoC. Or even better: Never buy any of these.
EDIT:
Added release dates to check in which time frame a SoC graphics falls.
Release dates Intel Core series:
2011 Sandy Bridge
2012 Ivy Bridge
2013 Haswell
2015 Broadwell & Skylake
2016 Kaby Lake

Remember that the new i915kms.ko driver from the ports won't be available as package (pkg) before FreeBSD 11.1-RELEASE becomes EoL (End of Life) Around August 1. 2018. Until then, only the driver build from the ports will work.

I tried to keep this as straight to the topic as possible, this is not an Xorg tutorial. Read the Handbook (but ignore how to setup xorg.conf)


----------



## unitrunker (Jul 20, 2018)

Awesome stuff. Thank you!


----------



## rigoletto@ (Jul 20, 2018)

k.jacker 

Are you collecting Intel processors?


----------



## k.jacker (Jul 20, 2018)

unitrunker said:


> kld_list="i915kms"


Typo corrected, thanks!



lebarondemerde said:


> Are you collecting Intel processors?


Let's say I have had a lot of them. I have always been a (crazy) hardware enthusiast 

In the late `90s when I was low on money I thought about a way to get more performance out of my Pentium II system. At one point, I got hold of something really cool, the Gigabyte GA-5AA socket 7 motherboard used of ebay.
I trashed my old board (QDI I think it was) and moved my Pentium II 233 and my 24MB sdram, to my newly acquired board. This board was able to run the CPU at a blazing 140MHz FSB. So via the board's jumpers, I adjusted the FSB from 66MHz to 125MHz (which was the highest stable FSB) and reduced the multiplier from 3,5 to 2 (resulting in a light overclock at 250MHz, but the doubled FSB made it allmost take off. A friend of mine (the one who showed me FreeBSD existed) was very into databases and benchmarked it's mysql on his Pentium II 400 all the time. He installed the same setup on my new steroids loaded computer, and it outperformed his Pentium II 400 like a racecar would a bicycle. That was the moment I was hooked up .
That Gigabyte board had a Ali chipset, not Intel. I liked the times when there where other vendors of chipsets around, like Ali and Via. Boards with none Intel or none AMD chipsets usually had more functionality. I remember a AMD socket 754 motherboard with a VIA chipset, I once had, that I had running with a mobile Turion64, which wasn't possible with AMD's own chipsets.


----------



## k.jacker (Jul 25, 2018)

*intel-kms-pciid-checker.sh
Find out what graphics you got and what driver you need quick and easy.*

I made a little script that checks which kms driver to use with Intel integrated graphics.
It should work with all kinds of integrated graphics, even the old ones build into the northbridge of the motherboard and SoC.
(Only tested on more or less modern hardware where graphics sits inside the CPU)

It will fetch parts of the sources for both the driver in the base system (/boot/kernel/i915kms.ko) and graphics/drm-next-kmod that contain the pciids (thanks to tobik@).
Those are then matched against the pciid found in your hardware and showing the result.

Note: I couldn't find where to get the pciid file to check the pciids for graphics/drm-next-kmod so the script fetches the whole .tar.gz and just extracts that one file and throws the rest away.
That's might be a bit annoying if your internet connection is slow 
After you ran the script you may want to remove the fetched files: drm_pciids.h_BASE and i915_pciids.h_DRM-NEXT-KMOD.

That's how it looks....

```
% ./intel-kms-pciid-checker.sh
drm_pciids.h_BASE                             100% of   70 kB  838 kBps 00m00s
Makefile_DRM-NEXT-KMOD                        100% of 1064  B 7168 kBps 00m00s
PORTVERSION=4.11.g20180619
fetch: https://codeload.github.com/FreeBSDDesktop/kms-drm/tar.gz/a753215?dummy=/FreeBSDDesktop-kms-drm-4.11.g20180619-.tar.gz: size of remote file is not known
FreeBSDDesktop-kms-drm-4.11.g20180619-.tar.gz         6521 kB 1816 kBps 00m04s

Your CPU: Intel(R) Core(TM) i3-4170 CPU @ 3.70GHz (3700.09-MHz K8-class CPU)
pciid to match: 0x041e

Support in the base driver: {0x8086, 0x041E, 0, "Intel Haswell (GT2 desktop)"}, \

Support in drm-next-kmod: INTEL_VGA_DEVICE(0x041E, info), /* GT2 reserved */ \n

Result:
Your graphics is supported by the driver in base, no need to install drm-next-kmod.
To /etc/rc.conf, add the following line:
kld_list="i915kms"
In case you have created xorg.conf or driver-intel.conf remove it.
Reboot. That's it.
```

And here is that little helper......

```
#!/bin/sh

# Short:
#    Checks which kms driver to use with your Intel integrated graphics.
#
# File:
#    intel-kms-pciid-checker.sh
#
# Description:
#    Downloads the parts of the driver source that contain the pciids and then matches the pciid
#    of your Intel integrated graphics against the sourcecode.
#    Does not use svn or portsnap, so nothing is installed or changed in your FreeBSD installation.
#    The relevant files are simply fetched from svn.freebsd.org and Github and stored in the
#    directory this script is run from. No need for elevated permissions.
#
# Howto:
#    Simply put it in your home directory and run it.
#
# Author:
#    madde
#
# Date:
#    25.07.2018


if [ ! -f drm_pciids.h_BASE ]; then
    fetch -o drm_pciids.h_BASE https://svn.freebsd.org/base/releng/11.2/sys/dev/drm2/drm_pciids.h
fi


if [ ! -f i915_pciids.h_DRM-NEXT-KMOD ]; then
    fetch -o Makefile_DRM-NEXT-KMOD https://svn.freebsd.org/ports/head/graphics/drm-next-kmod/Makefile
    PORTVERSION=`grep PORTVERSION Makefile_DRM-NEXT-KMOD | cut -f 2`
    GH_TAGNAME=`grep GH_TAGNAME Makefile_DRM-NEXT-KMOD | cut -f 2`
    echo PORTVERSION=$PORTVERSION

    fetch https://codeload.github.com/FreeBSDDesktop/kms-drm/tar.gz/$GH_TAGNAME?dummy=/FreeBSDDesktop-kms-drm-$PORTVERSION-$GH_TAGNAME_GH0.tar.gz
    tar -Oxf FreeBSDDesktop-kms-drm-$PORTVERSION-$GH_TAGNAME_GH0.tar.gz --include *i915_pciids.h > i915_pciids.h_DRM-NEXT-KMOD
    rm Makefile_DRM-NEXT-KMOD FreeBSDDesktop-kms-drm-$PORTVERSION-$GH_TAGNAME_GH0.tar.gz
fi


pciid=`pciconf -l | grep ^vga | cut -d " " -f 3 | cut -c 6-11`
printf "\nYour "
dmesg | grep -m1 CPU:
echo "pciid to match: $pciid"


base_result=`grep -i $pciid drm_pciids.h_BASE | cut -f 2`
drm_next_kmod_result=`grep -i $pciid i915_pciids.h_DRM-NEXT-KMOD | cut -f 2`
printf "\nSupport in the base driver: ${base_result:-No match}"
printf "\n\nSupport in drm-next-kmod: ${drm_next_kmod_result:-No match}\n\n\n"


echo "Result:"
if [ -z "$base_result" ]; then
    printf "Your graphics isn't supported "
    if [ -z "$drm_next_kmod_result" ]; then
        echo "by neither the driver in base or drm-next-kmod.";exit
        else
            printf "by the driver in base,\nbut the drm-next-kmod port supports it.\n"
            echo "Fetch or update your ports tree:"
            echo "# portsnap fetch extract"
            echo "or..."
            echo "# portsnap fetch update"
            echo "Fetch sources:"
            echo "# svnlite co https://svn.freebsd.org/base/releng/11.2 /usr/src/"
            echo "% cd /usr/ports/graphics/drm-next-kmod"
            echo "# make && make install"
            echo "To /etc/rc.conf, add the following line:"
            echo "kld_list=\"/boot/modules/i915kms.ko\""
            echo "In case you have created xorg.conf or driver-intel.conf remove it."
            echo "Reboot. That's it.";exit
    fi
fi
  
echo "Your graphics is supported by the driver in base, no need to install drm-next-kmod."
echo "To /etc/rc.conf, add the following line:"
echo "kld_list=\"i915kms\""
echo "In case you have created xorg.conf or driver-intel.conf remove it."
echo "Reboot. That's it."
```


----------



## mufeng (Jul 26, 2018)

Hello there!
My CPU is j4105, Processor Graphics is  Intel® UHD Graphics 600.

I installed FreeBSD 11.2-release. Which driver should I use?
Thank you!


----------



## k.jacker (Jul 26, 2018)

mufeng said:


> Which driver should I use?


Please copy/paste the above script into an empty file, make it executable and run it.


----------



## Oleg P. (Jul 31, 2018)

Hi!
Well, I have got the next message:

```
Your CPU: Intel(R) Core(TM) i5-8500T CPU @ 2.10GHz (2112.10-MHz K8-class CPU)
pciid to match: 0x3e92

Support in the base driver: No match

Support in drm-next-kmod: No match


Result:
Your graphics isn't supported by neither the driver in base or drm-next-kmod.
```
And I am using my PC like server with XDM.


----------



## k.jacker (Jul 31, 2018)

That is a Coffee Lake generation processor. The generation that came after Kaby Lake.
Not supported.


----------



## vince66 (Sep 11, 2018)

Hello jacker,

maybe is not clear for me.
Surely I'd like to run your code on my PC's.

My apologize:



k.jacker said:


> And here is that little helper......



Is this the helper ? not the code ?
Where is the code ?
It seems the code to me.



k.jacker said:


> make it executable



in which a way a shell language program is made executable before running it ?

After copied in a text file (and named jacker_test.sh, for example) is it not just a matter of typing: :

`sh jacker_test.sh`

or

`./jacker_test.sh`

Thanks in advance.


----------



## vince66 (Sep 11, 2018)

k.jacker said:


> overview over the "old" and the "new" kms video drivers for Intel integrated graphics



Have you a pdf of this your article ?


----------



## Beastie (Sep 11, 2018)

vince66 said:


> in which a way a shell language program is made executable before running it ?
> 
> After copied in a text file (and named jacker_test.sh, for example) is it not just a matter of typing: :
> 
> ...


`chmod +x jacker_test.sh`
`./jacker_test.sh`


----------



## vince66 (Sep 11, 2018)

Beastie said:


> chmod +x jacker_test.sh
> ./jacker_test.sh



Very Good !

I've understood now.

Thanks very much.


----------



## markb (Nov 1, 2018)

Good eve!  Dell Chromebook 13 7310 (Broadwell) now running BSD11.2 XFCE after heading to and installing  /usr/ports/graphics/drm-next-kmod .
Sincere thanks!!
MarkB
PS: also boots Linux Mint19, and Kali Linux; 'grub customizer' allows me to pick my poison <G>.
PPS: do you have any pointers on getting the touchpad to function?


----------



## k.jacker (Nov 1, 2018)

Nice to hear.
Sorry, don’t know how to get your touchpad to work.
Just open a new thread on that topic so that it get’a better attention. Include the relevant output from `pciconf -lv` since not everybody has that chromebook of yours, but maybe the same touchpad in another laptop.


----------



## Sevendogsbsd (Nov 1, 2018)

Soon to be upgrading hardware to 7th gen Intel Pentium, much thanks!


----------



## yuripv (Nov 11, 2018)

This doesn't describe x11-drivers/xf86-video-intel at all, just thought it's worth mentioning that not having that installed will make xorg-server use builtin "modesetting" driver, which lacks any acceleration.


----------



## JAW (Nov 11, 2018)

yuripv said:


> This doesn't describe x11-drivers/xf86-video-intel at all, just thought it's worth mentioning that not having that installed will make xorg-server use builtin "modesetting" driver, which lacks any acceleration.



I could be wrong, but the modesetting driver can be accelerated via "glamor", which uses OpenGL calls to accelerate drawing.

https://www.freebsd.org/cgi/man.cgi?query=modesetting&sektion=4&manpath=freebsd-release-ports


----------



## rraj (Dec 2, 2018)

k.jacker said:


> This is a short as possible overview over the "old" and the "new" kms video drivers for Intel integrated graphics and the how and when they should be used.
> 
> I wrote this as an attempt to clear up confusion and hopefully reduce the amount of threads with the same questions about that topic on the forum.
> 
> ...


Hi
The command:
_svnlite co https://svn.freebsd.org/base/releng/11.2 /usr/src/_, returns:
*svn: E155016: The working copy database at '/usr/src/' is corrupt*.
What to do?
Thanks
Ravi


----------



## yuripv (Dec 2, 2018)

rraj said:


> What to do?



`rm -rf /usr/src/`, and then try again


----------



## rraj (Dec 3, 2018)

yuripv said:


> `rm -rf /usr/src/`, and then try again


Hi
It worked!
Thanks
Ravi


----------



## ShelLuser (Dec 3, 2018)

Actually...  `# svn cleanup /usr/src`, then try the same checkout command again. That way you don't have to continue downloading massive amounts of data.


----------



## puretone (Dec 8, 2018)

If anybody is interested, LattePanda Alpha 864, features an Intel M3-7Y30 CPU / Intel HD Graphics 615 GPU (just like a MacBook Air) and uses:

graphics/drm-next-kmod

works flawlessly.


----------



## k.jacker (Dec 16, 2018)

A litlle update...

FreeBSD 12.0-RELEASE has been released and I want to mention, that the script I posted in post #5, to check your CPU's pciid against the sources, doesn't work anymore.
Please, don't use it.

Doesn't matter though, it has become very easy to install the driver, for graphics used in Broadwell, Skylake, KabyLake and CoffyLake.
No matter what FreeBSD version you run (11.2-RELEASE or 12.0-RELEASE), simply install graphics/drm-kmod via pkg or ports, and you'll get the most recent stable drm for your FreeBSD version.
Still you have to checkout the sources for your FreeBSD version and add the following to /etc/rc.conf

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

CPUs released prior to Broadwell (Haswell and older) work with the kms driver that comes with the base system.
Add the following to /etc/rc.conf

```
kld_list="i915kms"
```

There is no need to install any Xorg drivers to use the kms drivers.


----------



## Sevendogsbsd (Dec 17, 2018)

Interestingly enough I tried the graphics/drm-kmod  "meta" port and lo and behold: now my vt resolution is exactly the same as my normal resolution. Doesn't help or hurt, but was a change from the graphics/drm-next-kmod driver.


----------



## kpedersen (Jan 1, 2019)

I recently migrated my X1 Carbon (2nd gen) from running OpenBSD to FreeBSD. It was working perfectly with Xenocara but setting it in FreeBSD / X11 was not a great experience to be honest. The only thing that was a great help was actually this threads tutorial 

The official handbook here: https://www.freebsd.org/doc/handbook/x-config.html
has been updated to an extent but doesn't mention anything about i915 from base and instead only mentions the ports version. It then doesn't mention a whole lot more such as how to use anything.

For example it misses off tips such as the i915kms will not work when added to /boot/loader.conf (i915kms_load="YES"). If it wasn't for the OPs tutorial and *kld_list*, I would have been quite stumped.

Is there any work to get this tutorial merged with the official handbook?


----------



## scottro (Jan 1, 2019)

Filing a PR if you have time and inclination might help.


----------



## kpedersen (Jan 2, 2019)

scottro said:


> Filing a PR if you have time and inclination might help.


Yes, I am going to wait around a week for the new year madness to calm down at work but then I am going to look into getting docbook working and contributing some patches to the handbook myself.
I use LaTeX a lot and I am quite convinced it can't be any more awkward than that haha.

There are a couple of things that I think the handbook is lacking, not just relating to Xorg.


----------



## tuaris (Aug 16, 2019)

I have a 3rd gen CPU and I had to use the module from ports.


```
CPU: Intel(R) Core(TM) i7-3520M CPU @ 2.90GHz (2893.49-MHz K8-class CPU)
```

Using the one in base would cause this error:


```
(EE) Cannot run in framebuffer mode. Please specify busIDs for all framebuffer devices
```

This is on 12-RELEASE.


----------



## k.jacker (Aug 16, 2019)

This is because the driver in the base system has been black listed. It isn’t updated anymore and very outdated compared to the drivers from the ports.
Ivy Bridge was supported by the base driver, but you can‘t load that driver anymore. Hence the framebuffer error message.


----------



## Deleted member 9563 (Aug 16, 2019)

So the latest i915kms is for a three year old (or older) chipset. I wonder if there is anything more recent, or if it matters.


----------



## k.jacker (Aug 16, 2019)

Yes, is does support the most recent and very old Intel graphics.

IvyBridge is actually from 2012, but the most recent i915kms driver supports even older north bridge integrated graphics, like the i915G(M), hence the name.
If I recall correctly, the oldest supported graphics is the Intel 855G Series from 2005, I saw it in the source code when I wrote this guide last year.


----------



## Deleted member 9563 (Aug 17, 2019)

k.jacker said:


> Yes, is does support the most recent and very old Intel graphics.


I asked because the OP states:


k.jacker said:


> The new i915kms.ko driver available from ports (graphics/drm-next-kmod) since FreeBSD 11.2-RELEASE, supports Intel Core family processors up to Kaby Lake (7th) generation.


Yes Kaby Lake is still being used and sold, but we're up to 9th generation now. I'm on Coffee Lake with Intel UHD Graphics 630, So if I your statement is correct then there is in fact an even newer version of i915kms. I haven't found anything lacking in the video display from my Intel Z390 chipset, so I'm not sure there's any benefit anyway.


----------



## freq (Aug 17, 2019)

OJ said:


> I asked because the OP states:
> 
> Yes Kaby Lake is still being used and sold, but we're up to 9th generation now. I'm on Coffee Lake with Intel UHD Graphics 630, So if I your statement is correct then there is in fact an even newer version of i915kms. I haven't found anything lacking in the video display from my Intel Z390 chipset, so I'm not sure there's any benefit anyway.



Do you use ports for the i915kms driver?


----------



## Deleted member 9563 (Aug 17, 2019)

freq said:


> Do you use ports for the i915kms driver?


I don't use the i915kms driver. I was just wondering if there was one for recent Intel chips since the OP seems to indicate there is* not*. In any case if there is some advantage I would consider trying it, but since it requires rebooting I'm not that keen on just randomly trying what's available.

Edit: I should also say that I've not been successful in my web search for what that driver actually does. What splendid improvement will impress me?   I am curious but that information seems to not be publicly available.


----------



## freq (Aug 17, 2019)

OJ said:


> I don't use the i915kms driver. I was just wondering if there was one for recent Intel chips since the OP seems to indicate there is* not*. In any case if there is some advantage I would consider trying it, but since it requires rebooting I'm not that keen on just randomly trying what's available.
> 
> Edit: I should also say that I've not been successful in my web search for what that driver actually does. What splendid improvement will impress me?   I am curious but that information seems to not be publicly available.



Just like you said: everything is working fine now... but: https://duckduckgo.com/?q=i915kms&t=ffab&ia=web  <-- these results might wet your whistle.


----------



## k.jacker (Aug 17, 2019)

Note, that I wrote this turorial a year ago. At that time, CoffeeLake was the most recent generation but wasn't yet supported by the i915kms driver, but the second most recent generation KabyLake was.
Read post #8 and my answer for reference and look at the date.

To answer your question, the i915kms driver now has support for CoffeeLake graphics and is the driver of choice.


----------



## Deleted member 9563 (Aug 17, 2019)

k.jacker said:


> To answer your question, the i915kms driver now has support for CoffeeLake graphics and is the driver of choice.


Thanks k.jacker That answers that question. I still can't find a description of any advantage this driver may have. I have excellent graphics performance so I'm guessing that this driver has no real purpose on a modern system anyway.


----------



## shkhln (Aug 17, 2019)

OJ said:


> I still can't find a description of any advantage this driver may have. I have excellent graphics performance so I'm guessing that this driver has no real purpose on a modern system anyway.



The proper driver provides accelerated video decoding and tear free rendering among other features. Are you sure you are actually on vesa/scfb? These things are instantly noticeable.


----------



## Deleted member 9563 (Aug 17, 2019)

shkhln said:


> The proper driver provides accelerated video decoding and tear free rendering among other things. Are you sure you are actually on vesa/scfb?


No I'm not sure and don't know anything about that. I just use FreeBSD with Xorg out of the box. I can't imagine it working any better, but am always interested. Since I'm using Intel integrated graphics it just seemed reasonable that this driver might be relevant in some ways. Like I said, the benefits and purposes of the driver seems to be a secret. Or I'm just really dumb


----------



## pinned (Aug 19, 2019)

k.jacker Thank you for this informational post!

I have FreeBSD 12.0-RELEASE-p9 on my laptop with SLiM as login manager and Lumina for a DE.

I had noticed these messages in dmesg...

```
info: [drm] Initialized drm 1.1.0 20060810
drmn0: =======================================================
drmn0: This code is obsolete abandonware. Install the graphics/drm-legacy-kmod pkg
drmn0: =======================================================
drmn0: Deprecated code (to be removed in FreeBSD 13): drm2 drivers
drmn0: =======================================================
drmn0: This code is obsolete abandonware. Install the graphics/drm-legacy-kmod pkg
drmn0: =======================================================
drmn0: Deprecated code (to be removed in FreeBSD 13): drm2 drivers
drmn0: <Intel IronLake> on vgapci0
info: [drm] MTRR allocation failed.  Graphics performance may suffer.
```

and so I went on to install drm-legacy-kmod, along with adding 
	
	



```
kld_list="/boot/modules/i915kms.ko"
```
 to /etc/rc.conf.

After a reboot, at the login screen, I was no longer able to switch to a console with Ctrl + Alt + Fn, as it did nothing. And if I hit those keys, I could no longer enter any text in the username field. The only way out was a reboot with a Ctrl + Alt + Del.

I even installed drm-kmod, which was the same. I did not have a "video" group to add my login id to which is what the pkg instructed to do after it was installed.

Anyways, I discovered this thread and realized that my CPU is old

```
CPU: Intel(R) Core(TM) i3 CPU       M 350  @ 2.27GHz (2261.05-MHz K8-class CPU)
```
 , so really did not need install any of those drm-* packages. I've reverted the changes, and all is good.

I'm not sure if this qualifies as a bug, but I think if the CPU is detected to be an older generation, then it would make sense to suppress the "Install the graphics/drm-legacy-kmod pkg" message, as it is confusing.


----------



## golpemortal (Oct 14, 2019)

Nice!!!


----------



## serjsk8 (Oct 23, 2019)

Hello everyone,
Someone knows why for new driver (i915kms.ko from ports graphics/drm-next-kmod) it is not necessary to create configuration for Xorg?
Simply leave file xorg.conf empty without specifying the driver .


----------



## laufdi (Dec 3, 2019)

Now suddenly in the middle of 12.1-stable I have to switch to drm-fbsd12.0-kmod for my i5-6200? It' a bit chaotic.


----------



## wimwauters (Dec 15, 2019)

laufdi said:


> Now suddenly in the middle of 12.1-stable I have to switch to drm-fbsd12.0-kmod for my i5-6200? It' a bit chaotic.



yep, not stable at all.

there's supposed to be meta packages that allegedly sort this out;
 like 'drm-kmod', 'drm-next-kmod' and 'drm-legacy-kmod'

I still don't get why we need a 'drm-legacy-kmod' if we have another set of drm-kmod in base; what's the difference between those 2? Or does the legacy pkg only make sense on FreeBSD-13, or/and FreeBSD-current ?


----------



## KenGordon (Feb 1, 2020)

Hello. FYI, I am working with an older Acer "Aspire One" laptop which has an Intel Atom processor with integrated graphics. Checking `pciconf -lv` and `dmesg -a|more`, then visiting several other bits of information on the web, I find that the graphics part of this processor is a Pineview, 3rd generation, dated 2010.

Doing `pkg install drm-kmod` and `pkg install libva-intel-driver`, and editing rc.conf, adding the line kld_list="/boot/modules/i915kms.ko", then rebooting, during the boot process, I can tell instantly when the video changes to a much higher resolution and everything looks great, BUT, when I start X, the screen blanks for a few seconds and then a fine "bar" of video appears across the screen and I am unable to read anything. 

I then have to restart the system, go into Single-user mode, and undo the edit I made to rc.conf then reboot.

Editing rc.conf by adding the line kld_list="i915kms.ko", I get the same result.

I have read everything I could find here and on the net about this issue, but so far have not found an answer to this.

Anyone have a clue?

Ken Gordon


----------



## kpedersen (Feb 1, 2020)

KenGordon said:


> I have read everything I could find here and on the net about this issue, but so far have not found an answer to this.



All I can tell you is that I get similar on my GMA 915 (Thinkpad Z61).

Either I get a high resolution console (with the kms driver loaded), or I can actually run X11 (using the default). I cannot have both.

So a fullscreen XTerm is my solution for that one


----------



## KenGordon (Feb 1, 2020)

Rats! 

I was afraid of that.

Well, although I got rid of the funny lines across my monitor by getting rid of xorg.conf (I renamed it), since it was trying to load the "vesa" driver on top, when I reboot, X refuses to load and I end up with the command prompt....at high resolution.

Nice...but useless for my purposes. I am trying to get this laptop usable by a bunch of computo-klutzes who are only barely familiar with WinDOZE. They would probably freak out if they saw a command prompt.

Gee... Sigh...

Ken Gordon


----------



## kpedersen (Feb 1, 2020)

Hmm, just to check; are you able to load up X11?

Remove any gpu related entries from xorg.conf, boot.conf and rc.conf and from a command line just run `startx`. Do you see the default twm window manager?

It should work with X11 (just not with the hi-res boot console). Once that is confirmed, install something like Xfce (Gnome 3 is probably a no go) and that should be good enough for computo-klutzes.


----------



## KenGordon (Feb 2, 2020)

Yes. Under those settings it works just fine. I guess I'll just have to be happy with it at 640 X 480. Darn!

BTW, the video processor is a GMA-3150, if that tells us anything...

Ken Gordon


----------



## kpedersen (Feb 2, 2020)

If you have no xorg.conf, it should default to the intel driver (not the KMS one or vesa).

For me (and my GMA915) I do get the native LCD resolution of 1280x768 (a weird size I know).
So it is surprising that it is only loading the vesa driver for you :/

If you use xrandr, what does it report?
Also, perhaps check glxinfo to see what card its reporting.


----------



## KenGordon (Feb 2, 2020)

I had an xorg.conf containing the pointer to the driver "vesa". Moving that file to xorg.old and rebooting resulted in a change, but I can't see a whole lot of difference yet.

Those two commands you detail above result in "Command not found".

`uname -a` returns "12.0 RELEASE FreeBSD 12.0 RELEASE r341166 GENERIC amd 64"

One reason I have been somewhat reluctant to leave things as they are is that circles look quite a bit like sideways ovals. That really isn't very important for our uses, but it bugs me as it isn't right.

Ken Gordon


----------



## KenGordon (Feb 2, 2020)

I think I'll upgrade the operating system to 12.1 RELEASE. That probably won't help this issue, but I think it should be done anyway.

Ken Gordon


----------



## memreflect (Feb 2, 2020)

KenGordon said:


> Hello. FYI, I am working with an older Acer "Aspire One" laptop which has an Intel Atom processor with integrated graphics. Checking `pciconf -lv` and `dmesg -a|more`, then visiting several other bits of information on the web, I find that the graphics part of this processor is a Pineview, 3rd generation, dated 2010.
> 
> Doing `pkg install drm-kmod` ...


Does using graphics/drm-legacy-kmod fix your issue instead of drm-kmod?  If it is dated 2010 as you say, it predates Intel's Haswell family by ~2 years, which is a requirement to use drm-kmod (Intel GMA - GMA 3150 confirms this; the section on the top-right side of that page names "Intel HD Graphics" as the "Successor").

Edit: FreeBSD 12.1-RELEASE's Hardware Notes don't mention Atom, GMA, or Pineview...  It's possible that it was an oversight, or you and kpedersen are just lucky to have the drm-kmod working at all in the first place...?


----------



## kpedersen (Feb 2, 2020)

I'm probably just doing a really bad job at explaining myself XD

There are 4 intel gma915 "compatible" drivers

drm-kmod
drm-legacy-kmod
inbuilt
vesa
For such an old card (like our GMA915), I notice that the inbuilt one is best for X11.
This means that we want to clear xorg.conf (so we don't load vesa). We also want to remove any boot.conf and rc.conf entries (so we don't load the drm*kmod versions).

Yep, my bad, glxinfo is from a package (mesa utilities). But after loading the inbuilt driver, what does `xrandr` say when run from inside X11? You should have all the possible resolutions available to you.


----------



## gnath (Feb 2, 2020)

In general, no need for xorg.conf, unless required. *Package* drm-kmod is enough for installing drm-fbsd11.2/12.0-kmod andlibdrm. For older intel CPU/GPU (Pineview), driver from base or with xf86-video-intel ,may do the job for high resolution. KMS drivers are only for hardware acceleration, required for movies/games and to avoid tearing, lagging of moving windows/graphics.


k.jacker said:


> To answer your question, the i915kms driver now has support for CoffeeLake graphics and is the driver of choice.


 My intel Whiskey Lake i5-8265 with HD620 has been running on VM. I use drm-kmod for 12.1-RELEASE.


----------



## KenGordon (Feb 2, 2020)

kpedersen said:


> All I can tell you is that I get similar on my GMA 915 (Thinkpad Z61).
> 
> Either I get a high resolution console (with the kms driver loaded), or I can actually run X11 (using the default). I cannot have both.
> 
> So a fullscreen XTerm is my solution for that one



Hello again. Well, this morning, I fixed my issue here with my old GMA-3150 video by following the advice in this thread:




https://forums.freebsd.org/threads/solved-concerns-over-the-intel-gma-3150-gpu.48280/

My circles are now real circles, and everything is working better and much faster. I did have to 1) get rid of my xorg.conf by renaming it, and 2) had to add `kern.vty=vt` to /boot/loader.conf. I also did 3) `pkg delete drm-kmod` and `pkg install xf86-video-intel`, then rebooted.

These may also fix your problem too. Please let me know if it does. I would like to return some of the help I have gotten here.

And thanks again for your help. It is much appreciated.

Ken Gordon​


----------



## klentaq (Nov 17, 2020)

Upon upgrading from a Intel BOXNUC7i7BNH running FreeBSD 11.0 to a few BOXNUC8i7BEH running FreeBSD 12.2, 
I could not run startx (Xorg) without getting only complaints that it could not handle FRAMEBUFFER devices and asking for dbus names.

I installed FreeBSD 12.2, which reported that it was a 12.0 for awhile.  After a week or so, uname did begin
to report that it was a 12.2.

I also upgraded a FreeBSD 12.0 to 12.2 using freebsd-update.

To successfully run X using startx, I did the following, which is an update to the top of this thread,
for which I am very thankful.

After updating the ports with

portsnap fetch
portsnap extract

I noticed that 
ls -laF /usr/ports/graphics | grep drm 

showed a directory "drm-fbsd12.0-kmod" that seemed
to be named for my new FreeBSD12.2, so I installed the Intel driver with

cd /usr/ports/graphics/drm-fbsd12.0-kmod
make all install

I edited /etc/rc.conf to have

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

Some 15 i*.ko files appeared with a fresh date in /boot/modules, including i915kms.ko

Now, startx pops up 3 X windows which can run my mission critical program, consed,
and the keyboard and mouse work well.  My rc.conf still has moused_enable="YES" , which
seems harmless.


----------

