Hello world :-)
I have just upgraded my machine from 12.0-RELEASE to 12.1-RELEASE with `freebsd-update upgrade -r 12.1-RELEASE`. Unfortunately the DRM module causes machine to reboot on load. I had to get into single mode and remove DRM and i915 modules from rc.conf. I cannot see a DRM for 12.1 yet. Rebuilding module does not help. I am without DRM right now unable to use external monitor/projector.
Any hints welcome :-)
FreeBSD 0xCFMX4 12.1-RELEASE FreeBSD 12.1-RELEASE r354233 GENERIC amd64
0xCFMX4% pkg info drm-kmod
Name : drm-kmod
Version : g20190710
Installed on : Thu Nov 7 11:55:49 2019 CET
Origin : graphics/drm-kmod
Architecture : FreeBSD:12:*
Prefix : /usr/local
Categories : graphics
Maintainer : x11@FreeBSD.org
WWW : https://github.com/FreeBSDDesktop/kms-drm
Comment : Metaport of DRM modules for the linuxkpi-based KMS components
Flat size : 0.00B
amdgpu, i915, and radeon DRM modules for the linuxkpi-based KMS components on
amd64, i915 and radeonkms DRM modules from the former base DRM component on
Metaport for different versions of Linux DRM based on the FreeBSD version
in use. This port encompasses the recommendations of the FreeBSDDesktop team
of DRM versions for FreeBSD versions based on the last update to the LinuxKPI
in that code base. In general, the most recent supported stable DRM for a give
FreeBSD version will be installed. CURRENT receives the most recent development
This port does not however hinder the expert user to make other decisions and
continue to install DRM ports directly.
Could that be related?
*** This bug has been marked as a duplicate of bug 241101 ***
Why not just create two additional ports?
These already exist:
Create these (along with packages against 11.3 and 12.1 source):
Treating older 12.0 version as 'more important' instead of newer 12.1 seems out of logic.
I fully agree, this module is highly experimental, not production ready, should be banned from a RELEASE and PKG because it breaks them in many ways on a production environments.
The problem with PKG is that 12.1 packages are built on 12.0 system, while this module changed KERNEL API and this is the root cause of the problem. SO LINUX :-(
Here is a bug to follow: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=241101
(In reply to vermaden from comment #3)
That won't help the situation.
The problem is that ports are built on the lowest common platform, which means, for 12 it is built on 12.0 until 12.0 is EOL (same for 11.2 and 11.3).
The issue here is that while the kernel modules are indeed compatible with their respective branch (drm-fbsd11.2-kmod works on 11.3 and 11-stable, and 12.0-kmod on 12.1 and 12-stable), they have to be built together with kernel sources of the same version of the kernel actually running the module.
Creating drm-fbsd12.1-kmod, or 11.3-kmod would not help, they would either be built on 12.0 and 11.2 respectively (well, 11.2 is EOL now, so the 11.2 module should work on 11.3 out of the box these days), or not built at all, depending on how the version check in the ports' Makefile is set up.
I can agree that the naming of the modules are unfortunate and somewhat confusing, but renaming 11.2-kmod to 11.3-kmod was ruled out when Rene removed 11.2 support from the ports tree. See https://reviews.freebsd.org/D21974 for that discussion.
In the end, the ambition is to have the user simply install drm-kmod and let that port pick the proper kernel module port for your specific system.
FreeBSD Graphics Team.
PS. Please keep the discussion in the open PR (or the github issue, it gets more visibility that way).
(In reply to Niclas Zeising from comment #5)
That is the root cause of the problem. Packages for 12.1 should be built on 12.1.
Other - more important aspect of such bugs/problems - why FreeBSD would instantly panic on loading a module with wrong version? This is so Windows like.
It was the same with VirtualBox package between 11.2 and 11.3 when VNET became the default on 11.3.
IMHO the first thing to do should be making these modules NOT INSTANTLY PANIC entire system.
Second should be separate package repositories for each version, currently for 'Production' releases which means - 12.1 / 12.0 / 11.3 - as stated on FreeBSD page.
Current situation is far from 'production ready'.
(In reply to vermaden from comment #6)
> Packages for 12.1 should be built on 12.1.
If we did that, as soon as 12.1 came out, we would have stranded the users of pkg on 12.0 (you can't assume you can go downwards).
Or, we could buy enough hardware to have every single branch built -- plus, enough people to look after the build results. (disclaimer: I am one of the people that looks after the build results)
No, it can't be farmed out to virtual instances somewhere, due to security implications.
tl:dr; some thought has actually gone into these decisions. This is the one rare case where we've been bitten.
(In reply to vermaden from comment #6)
> That is the root cause of the problem. Packages for 12.1 should be built on 12.1.
I would humbly point that the root cause is Kernel API changes between releases of the same major number.. maybe even different major number.
If we had an architecture designed first in a way that would provide stable Kernel API there would be no problem at all.
Kernel API changes between each release is so Linux.
It smells like a maintenance nightmare we are observing right now because we try to fix the problem that creates a complication with a new complications.
Is it really necessary here in FreeBSD? I don't think so.
Is there really no way to avoid it?