Solved Using drm-next-kmod on FreeBSD 11-STABLE

I tried experimental module from the graphics/drm-next-kmod, however looks like it's not loading up.
I added kld_list="/boot/modules/i915kms.ko" to the rc.conf
I see the following during boot:
Code:
warning: KLD '/boot/modules/drm.ko' is newer than the linker.hints file
warning: KLD '/boot/modules/linuxkpi_gplv2.ko' is newer than the linker.hints file
warning: KLD '/boot/modules/debugfs.ko' is newer than the linker.hints file
[drm] Initialized
link_elf_obj: symbol intel_gtt_install_pte undefined
Warning: memory type linux leaked memory on destroy (514 allocations, 65680 bytes leaked).
linker_load_file: Unsupported file type

Code:
abishai@sphinx:~ % uname -aU
FreeBSD sphinx.abinet.ru 11.1-STABLE FreeBSD 11.1-STABLE #4 r329508: Sun Feb 18 12:46:33 MSK 2018     root@sphinx.abinet.ru:/usr/obj/usr/src/sys/ECHIDNA  amd64 1101510

Maybe I missed something important ?
 
Yep, it looks like the required LinuxKPI stuff got MFC'ed recently, to get it ready to be included for 11.2-RELEASE. That will probably make a lot of people really happy. But there may be some issues though, I'm sure those will be ironed out in the next couple of days.
 
I'll have to check, then, and will give it a few days before doing so. That would be good, as right now, these forums discourage discussion of CURRENT but most laptops less than 3 years old or so require it.

The latest Makefile now says not supported on 10.x or older so that's a great sign. :)

At that point I'll update the page, and in the interim, will mention this (that it should work with 11.x now) when I spam my page on these forums.
 
I use another computer with poudriere to build up everything and act as a local repository. It runs CURRENT with STABLE jail. This is not recommended for kernel modules, but works. I suppose, you can't use official packages as the port requires kernel source and marked as IGNORE. However, as kmod has (almost) no dependencies, you can build it really fast anywhere.
If you have custom kernel, consider to add
Code:
PORTS_MODULES=graphics/gpu-firmware-kmod graphics/drm-next-kmod
to the /etc/make.conf - make kernel will build and add modules automagically. As living on STABLE require compiling, probably it's worth to add it in any case to be sure that kernel ABI in sync with kmod..
 
Still marked as IGNORE, and no package available as of Feb 22, 2018 in 11.1-RELEASE
There seems to be some confusion here. 11.1-RELEASE is not (and will likely never be) supported by graphics/drm-next-kmod. It requires kernel changes that are now also available on the STABLE/11 branch which will become 11.2-RELEASE eventually.

There will not be a package on pkg.FreeBSD.org until the package builder jails are switched over to 11.2-RELEASE. This will happen 3 months after 11.2-RELEASE since that is the time 11.1-RELEASE will be end of life. So you will probably see a package for graphics/drm-next-kmod at the end of September 2018.
 
Tested. Yesterday I upgraded FreeBSD on my Toshiba Satellite Z30-B-10W to latest FreeBSD 11.1-stable
Code:
tingo@kg-z30b$ uname -a
FreeBSD kg-z30b.kg4.no 11.1-STABLE FreeBSD 11.1-STABLE #1 r329829: Thu Feb 22 21:28:43 CET 2018     root@kg-z30b.kg4.no:/usr/obj/usr/src/sys/GENERIC  amd64
The machine has Intel HD Graphics 5500. After booting with the new i915kms module loaded there is serious lag on the text console, making it hard to use (I can type a whole command before text shows on the screen). Luckily, I only need to log in and run startxfce4.

The good news is that the Xorg intel driver now works. Various info from Xorg.0.log
Code:
[   209.201] (--) intel(0): Integrated Graphics Chipset: Intel(R) HD Graphics 5500

[   209.224] (II) intel(0): [DRI2]   DRI driver: i965
[   209.224] (II) intel(0): [DRI2]   VDPAU driver: va_gl

[   209.225] (II) intel(0): DRI2: Enabled
[   209.225] (II) intel(0): DRI3: Disabled
No tuning has been done yet, and I haven't done any measurements on performance. Details can be found on my page for FreeBSD on this machine:
https://sites.google.com/site/tingox/toshiba_satellite_z30-b-10w_freebsd

Update: this is now reported as Issue #38.
 
Last edited:
Details can be found on my page for FreeBSD on this machine:
Do you have reason to use intel, not modesetting ? I found that Linux (Debian, Fedora) is gravitating away from intel. Personally, I use modesetting with FreeBSD and [yet] found no issues with my skylake.

Good news, though, even though there's trouble in console. For now, sticking with CURRENT. :)
Well, I don't observe any troubles in the console. I can read and type without any delay.
 
Do you have reason to use intel, not modesetting ? I found that Linux (Debian, Fedora) is gravitating away from intel. Personally, I use modesetting with FreeBSD and [yet] found no issues with my skylake.
Well, the point of this specific exercise was to test drm-next with the intel driver. I haven't tried the modesetting(4) driver, but the FreeBSD manual page mentions that this driver is non-accelerated. I have used the scfb(4) driver which also is a non-accelerated driver, and it has a performance below the level which I find good enough. If the performance of the modesetting driver is on par with the performance of the scfb driver, I would not use it if I can avoid it.

Drivers in different operating systems are very different. In FreeBSD I use the drivers that works best if I can. I do the same in Linux. I see no value in using the same drivers across operating systems (after all, it might just be the name that is the same). YMMV.
 
Tested on a ASRock BeeBox-S 7100U, which have a i3-7110U (Kaby Lake) cpu and Intel HD 620 graphics
Code:
root@kg-bsbox# uname -a
FreeBSD kg-bsbox.kg4.no 11.1-STABLE FreeBSD 11.1-STABLE #0 r329909: Sat Feb 24 18:53:43 CET 2018     root@kg-bsbox.kg4.no:/usr/obj/usr/src/sys/GENERIC  amd64
everything works nicely. Xorg.0.log reports
Code:
[   783.827] (--) intel(0): Integrated Graphics Chipset: Intel(R) HD Graphics 620

[   784.141] (II) intel(0): [DRI2]   DRI driver: i965
[   784.141] (II) intel(0): [DRI2]   VDPAU driver: va_gl

[   784.142] (II) intel(0): DRI2: Enabled
[   784.142] (II) intel(0): DRI3: Disabled
There is an error message in dmesg output, but it doesn't seem to affect anything:
Code:
drmn0: fb0: inteldrmfb frame buffer device
i915/kbl_dmc_ver1_01.bin: could not load firmware image, error 2
[drm] Finished loading i915/kbl_dmc_ver1_01.bin (v1.1)
HTH
 
I haven't tried the modesetting(4) driver, but the FreeBSD manual page mentions that this driver is non-accelerated.
Well, I believe this is a mistake. modesetting uses glamor for acceleration (and glamor uses OpenGL). Any ideas how can I test performance ?

i915/kbl_dmc_ver1_01.bin: could not load firmware image, error 2
This one enables power saving for graphics. I have the same error, not good for laptops.
 
not solved for me.
I have FreeBSD localhost 11.1-RELEASE-p6 FreeBSD 11.1-RELEASE-p6 #2: Mon Feb 19 18:10:39 +05 2018
drm-next-kmod says
Code:
/usr/ports/graphics/drm-next-kmod# make install clean
===>  drm-next-kmod-4.11.g20180224 not supported on 10.x or older, no kernel
support.
*** Error code 1

Stop.
how use this patch https://svnweb.freebsd.org/changeset/base/329527 ?
 
Looks like you need the firmware from Intel
It's already installed by graphics/gpu-firmware-kmod. tingo Maybe i915_kbl_dmc_ver1_01_bin.ko needs to be loaded manually.
not solved for me.
i have FreeBSD localhost 11.1-RELEASE-p6 FreeBSD 11.1-RELEASE-p6 #2: Mon Feb 19 18:10:39 +05 2018
drm-next-kmod says
/usr/ports/graphics/drm-next-kmod# make install clean
===> drm-next-kmod-4.11.g20180224 not supported on 10.x or older, no kernel
support.
*** Error code 1

Stop.

how use this patch https://svnweb.freebsd.org/changeset/base/329527 ?
Read the thread. It's not supported on 11.1-RELEASE.
 
Back
Top