Solved Yet another 12.2 and i915kms OpenGL thread

Hi,

I've compiled my own packages with synth, on 12.2.

My procedure after boot is basically. kldload i915kms; startx

X works fine, except anything OpenGL. If I do glxgears, I get this.

Code:
zsh# glxgears
libGL error: MESA-LOADER: failed to retrieve device information
Running synchronized to the vertical refresh.  The framerate should be
approximately the same as the monitor refresh rate.
intel_do_flush_locked failed: Input/output error


# dmesg....
VT: Replacing driver "vga" with new "fb".
info: [drm] Initialized i915 1.6.0 20080730 for drmn0 on minor 0
composite sync not supported
composite sync not supported
error: [drm:pid12:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... GPU hung
info: [drm] capturing error event; look for more information in sysctl hw.dri.0.info.i915_error_state
error: [drm:pid12:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... GPU hung
error: [drm:pid0:init_ring_common] *ERROR* render ring initialization failed ctl 0001f001 head 00003000 tail 00000000 start 00003000
error: [drm:pid12:i915_hangcheck_hung] *ERROR* Hangcheck timer elapsed... GPU hung
error: [drm:pid0:i915_reset] *ERROR* GPU hanging too fast, declaring wedged!
error: [drm:pid0:i915_reset] *ERROR* Failed to reset chip.

Any ideas or things I should add? This is on a Thinkpad T400 laptop.

Thank you.
 
drm-fbsd12.0-kmod, obviously.
Code:
$ pkg info | grep drm
drm-fbsd12.0-kmod-4.16.g20201016_1 DRM modules for the linuxkpi-based KMS components
drm-kmod-g20190710_1           Metaport of DRM modules for the linuxkpi-based KMS components
libdrm-2.4.103,1               Userspace interface to kernel Direct Rendering Module services
$ pkg info drm-fbsd12.0-kmod
drm-fbsd12.0-kmod-4.16.g20201016_1
Name           : drm-fbsd12.0-kmod
Version        : 4.16.g20201016_1
Installed on   : Sun Jan 31 22:46:46 2021 UTC
Origin         : graphics/drm-fbsd12.0-kmod
Architecture   : FreeBSD:12:amd64
Prefix         : /usr/local
Categories     : graphics kld
Licenses       : BSD2CLAUSE, GPLv2, MIT
Maintainer     : x11@FreeBSD.org
WWW            : https://github.com/FreeBSDDesktop/kms-drm
Comment        : DRM modules for the linuxkpi-based KMS components
Options        :
        DEBUG          : off
Annotations    :
        FreeBSD_version: 1202000
        repo_type      : binary
        repository     : local
Flat size      : 9.95MiB
Description    :
amdgpu, i915, and radeon DRM modules for the linuxkpi-based KMS components.
Currently corresponding to Linux 4.16 DRM.
This version is for FreeBSD 12.0.
amdgpu and radeonkms are known to fail with EFI boot.

WWW: https://github.com/FreeBSDDesktop/kms-drm
 
It looks like you are running glxgears as root.
Make sure to run it under the same user that started the X11 environment.
 
Is the drm-kmod installed from port? 12.2 is at the moment going to be rebuild for the packages for it.
 
Is the drm-kmod installed from port? 12.2 is at the moment going to be rebuild for the packages for it.
All of my packages are built from ports, on 12.2.

Make sure you're loading /boot/modules/i915kms.ko NOT /boot/kernel/i915kms.ko.
Interesting. I have both files.

Code:
$ ls -l /boot/kernel/i915kms.ko
-r-xr-xr-x  1 root  wheel  966064 Feb  1 05:14 /boot/kernel/i915kms.ko
$ ls -l /boot/modules/i915kms.ko
-r-xr-xr-x  1 root  wheel  2124816 Jan 31 21:21 /boot/modules/i915kms.ko

What is the purpose of /boot/kernel/ vs /boot/modules/? How can I pick which one is loaded? Do I need /boot/kernel/ and /boot/modules/?
 
The /boot/kernel/i915kms.ko is the old driver that came with the OS. It's going to be removed in 13.0. The /boot/modules/i915kms.ko is the driver that gets installed with graphics/drm-fbsd12.0-kmod, that's the one you need to use.


Read pkg info -D drm-fbsd12.0-kmod
Fantastic, thank you!

I did not know about sysctl kern.module_path. That makes sense.

OpenGL stuff working really well, XVideo as well. Even suspend works!

I appreciate it!
 
Back
Top