Solved [Freebsd 12.2/DRM] : kernel: device_attach: drmn0 attach returned 19

Machine Description :
HP NoteBook Elite Book 650
i5 4300M
Intel HD Graphics 4600

I encounter a display performance trouble with a fresh installation (less than a week).
This machine runs a i915 regarding its configuration.
From my point of view these is a problem with drm attachment.

I've noticed, these is a problem of drm-kmod package. Hence, previously to this post, I reinstall this module with ports.
As no improvement in view, I've rebuilt kernel too.

Hereafter the results of some commands that can enlight the current S/W and H/W configuration of this machine.

more bsdinstall
Code:
DEBUG: Running installation step: auto 
DEBUG: dialog.subr: DEBUG_SELF_INITIALIZE=[]
DEBUG: UNAME_S=[FreeBSD] UNAME_P=[amd64] UNAME_R=[12.2-RELEASE]
DEBUG: common.subr: Successfully loaded.

pciconf -l
Code:
vgapci0@pci0:0:2:0:     class=0x030000 card=0x1993103c chip=0x04168086 rev=0x06 hdr=0x00

pciconf -a vgapci0@pci0:0:2:0
Code:
vgapci0@pci0:0:2:0: attached

System info of KDE displays :
Code:
Operating System: FreeBSD 12.1 # Strange : I'm supposed having installed 12.2.
KDE Plasma Version: 5.20.5
KDE Frameworks Version: 5.78.0
Qt Version: 5.15.2
Kernel Version: 12.2-RELEASE
OS Type: 64-bit
Memory: 7.7 Gio of RAM
Graphics Processor: llvmpipe

uname -a
Code:
FreeBSD nimbus 12.2-RELEASE FreeBSD 12.2-RELEASE r369150 GENERIC  amd64

kldstat
Code:
Id Refs Address                Size Name
1 40 0xffffffff80200000 227ad00 kernel
[HIGHLIGHT]2 1 0xffffffff82a11000 12adfc i915kms.ko
3 1 0xffffffff82b3c000 75980 drm.ko[/HIGHLIGHT]
4 4 0xffffffff82bb2000 12d30 linuxkpi.ko
5 3 0xffffffff82bc5000 12f30 linuxkpi_gplv2.ko
6 2 0xffffffff82bd8000 6d0 debugfs.ko
7 1 0xffffffff82bd9000 4260 ng_ubt.ko
8 6 0xffffffff82bde000 9bd0 netgraph.ko
9 2 0xffffffff82be8000 9128 ng_hci.ko
10 3 0xffffffff82bf2000 9b0 ng_bluetooth.ko
11 1 0xffffffff82bf3000 caf0 ng_l2cap.ko
12 1 0xffffffff82c00000 1af20 ng_btsocket.ko
13 1 0xffffffff82c1b000 2150 ng_socket.ko
14 1 0xffffffff82c1e000 87d0 tmpfs.ko



more /var/log/messages
Code:
Jan 27 14:05:47 nimbus kernel: CPU: Intel(R) Core(TM) i5-4300M CPU @ 2.60GHz (2594.04-MHz K8-class CPU)[/I]
[...]
[I]Jan 27 14:05:47 nimbus kernel: module_register_init: MOD_LOAD (vesa, 0xffffffff81115e40, 0) error 19[/I]
[...]
Jan 27 14:05:47 nimbus kernel: vgapci0: <VGA-compatible display> port 0x3000-0x303f mem 0xd0000000-0xd03ffff
f,0xc0000000-0xcfffffff irq 16 at device 2.0 on pci0
Jan 27 14:05:47 nimbus kernel: vgapci0: Boot video device
[...]
[I]Jan 27 14:05:47 nimbus kernel: drmn0: <drmn> on vgapci0
Jan 27 14:05:47 nimbus [HIGHLIGHT]kernel: device_attach: drmn0 attach returned 19

more /var/log/Xorg.0.log
Code:
[    32.829] (EE) open /dev/dri/card0: No such file or directory
[    32.829] (WW) Falling back to old probe method for modesetting
[ 32.829] (EE) open /dev/dri/card0: No such file or directory
[ 32.829] (WW) VGA arbiter: cannot open kernel arbiter, no multi-card support
[ 32.829] (EE) Screen 0 deleted because of no matching config section.
[ 32.829] (II) UnloadModule: "modesetting"
[ 32.829] (II) Loading sub module "vbe"
[ 32.829] (II) LoadModule: "vbe"


Having an integrated GPU H/W but still in llvmpipe mode ...
May some among you help me to solve this mystery?

I thank you a lot

Didier
 
Code:
Operating System: FreeBSD 12.1
Strange : I'm supposed having installed 12.2.
Packages are still being built for 12.1. So any compiled in version strings are going to reference 12.1.

This also presents a problem specifically with graphics/drm-fbsd12.0-drm. You need to build it from ports. The package is created for 12.1 and doesn't work on 12.2.
 
Packages are still being built for 12.1. So any compiled in version strings are going to reference 12.1.

This also presents a problem specifically with graphics/drm-fbsd12.0-drm. You need to build it from ports. The package is created for 12.1 and doesn't work on 12.2.
I'm sorry. I've forgotted to write that I was aware of this because I've seen the tweet emitted about this broken package for 12.1.
So, before posting here, I've installed graphics/drm-fbsd12.0-drm from ports.
As a result, drm-fbsd12.0-kmod-4.16.g20201016 is already installed thanks to this command :
portmaster -P graphics/drm-fbsd12.0-drm

I've tried with the following command
cd graphics/[URL='http://www.freshports.org/graphics/drm-fbsd12.0-drm'][U]graphics/drm-fbsd12.0-drm[/U][/URL] && make reinstall

It is successful. Sorry. I guess I didn't master portmaster -P....
 
As a result, drm-fbsd12.0-kmod-4.16.g20201016 is already installed thanks to this command :
portmaster -P graphics/drm-fbsd12.0-drm

The -P option causes the package to be installed (because a package is available, it just doesn't work).

Code:
 -P|--packages
	 use packages, but build port if not available
 
Thread necromancy, I know, but just adding that I had this problem and fixed, it, and want to document it.

For me, it was just that I had updated my /usr/src tree, but hadn't updated my system using it. So a miss-matched source tree and system will also cause this - another thing to check.

For Google, "'(EE) open /dev/dri/card0: No such file or directory' in the Xorg logs is another symptom.
 
Back
Top