Solved DRM is dead after 13-RC2 install

Hello!

Performed an experiment with 13.0 RC2. Everything went well until the DRM needed to be reinstalled. Do you have any ideas how to proceed?

The system is up and working, even my persistent L2ARC from former OpenZFS is there. But I can not build the DRM.

Here is my log:

Code:
bectl create working_12.2

cd /usr/src/
svn checkout https://svn.freebsd.org/base/head/ .

cd /root/kernel/
cp TUNAR TUNAR13
ln -s /root/kernel/TUNAR13 /usr/src/sys/amd64/conf/

cd /usr/src/sys/amd64/conf/
diff  GENERIC /usr/src.12.2/sys/amd64/conf/GENERIC|grep "<"
diff  GENERIC /usr/src.12.2/sys/amd64/conf/GENERIC|grep ">"
vi TUNAR13

make -j 4 buildworld

--------------------------------------------------------------
>>> World build completed on Tue Mar 16 19:45:07 EET 2021
>>> World built in 15328 seconds, ncpu: 4, make -j4
--------------------------------------------------------------

make -j 4 buildkernel KERNCONF=TUNAR13

--------------------------------------------------------------
>>> Kernel build for TUNAR13 completed on Tue Mar 16 20:05:09 EET 2021
--------------------------------------------------------------
>>> Kernel(s)  TUNAR13 built in 830 seconds, ncpu: 4, make -j4
--------------------------------------------------------------

zfs snapshot -r flash@2021_latest

make -j 4 installkernel KERNCONF=TUNAR13

make installkernel KERNCONF=TUNAR

--------------------------------------------------------------
>>> Installing kernel TUNAR13 completed on Tue Mar 16 20:09:31 EET 2021
--------------------------------------------------------------


portupgrade -f graphics/drm-kmod

make installworld

--------------------------------------------------------------
>>> Installing everything completed on Tue Mar 16 20:13:07 EET 2021
--------------------------------------------------------------


vi /boot/loader.conf

reboot

uname -a

FreeBSD Demo 13.0-CURRENT FreeBSD 13.0-CURRENT #0 r369476: Tue Mar 16 20:05:07 EET 2021     root@Demo:/usr/obj/usr/src/amd64.amd64/sys/TUNAR13  amd64

pkg_deinstall drm-fbsd12.0-kmod

The system is up and running, but I can not install the graphics/drm-fbsd13-kmod not any other DRM port.

Tried even brute force and commented the OS version check out of Makefile, but the build ends like this:

Code:
--- linux_notifier.o ---
/usr/ports/graphics/drm-fbsd13-kmod/work/drm-kmod-drm_v5.4.92_2/linuxkpi/gplv2/src/linux_notifier.c:9:10: fatal error: 'linux/shrinker.h' file not found
#include <linux/shrinker.h>
         ^~~~~~~~~~~~~~~~~~
1 error generated.
*** [linux_notifier.o] Error code 1

make[3]: stopped in /usr/ports/graphics/drm-fbsd13-kmod/work/drm-kmod-drm_v5.4.92_2/linuxkpi
1 error

make[3]: stopped in /usr/ports/graphics/drm-fbsd13-kmod/work/drm-kmod-drm_v5.4.92_2/linuxkpi
===> Compilation failed unexpectedly.
Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to
the maintainer.
*** Error code 1

Stop.
make[1]: stopped in /usr/ports/graphics/drm-fbsd13-kmod
*** Error code 1

Stop.
make: stopped in /usr/ports/graphics/drm-fbsd13-kmod
 
CURRENT? Are you sure you aren't stuck with the pre-git-switch source code or something?
I see. It may be so. How can I get the latest source?

I understood that git is also mirrored to svn, but seems that this is not so.
 
See https://github.com/bsdimp/freebsd-git-docs/blob/main/mini-primer.md. There should be something in the Handbook as well, but I'm too lazy to check it.
Giving it another try. Appeared that git is total PITA. Does not build from the port devel/git and because I have all software installed from ports, the pkg install git complains and fails. The handbook seems not to be comprehensive enough to give a clear guidance of the whole source process. Must confess, that the traditional svn method was much more straightforward.

So, I downloaded the source from FTP wget ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/13.0-RC2/src.txz extracted it and hope I can build the DRM after upgrade. Will see how it goes.
 
Giving it another try. Appeared that git is total PITA. Does not build from the port devel/git and because I have all software installed from ports, the pkg install git complains and fails. The handbook seems not to be comprehensive enough to give a clear guidance of the whole source process. Must confess, that the traditional svn method was much more straightforward.

So, I downloaded the source from FTP wget ftp://ftp.freebsd.org/pub/FreeBSD/releases/amd64/13.0-RC2/src.txz extracted it and hope I can build the DRM after upgrade. Will see how it goes.
It is better now, but not OK. Kernel build completed:

DRM graphics/drm-fbsd13-kmod build also completed, but load fails (messages in dmesg -a):
Code:
--------------------------------------------------------------
>>> World build completed on Wed Mar 17 13:45:05 EET 2021
>>> World built in 14334 seconds, ncpu: 4, make -j4
--------------------------------------------------------------

--------------------------------------------------------------
>>> Kernel build for ARGENTUM completed on Wed Mar 17 15:32:19 EET 2021
--------------------------------------------------------------
>>> Kernel(s)  ARGENTUM built in 1275 seconds, ncpu: 4, make -j4
--------------------------------------------------------------

--------------------------------------------------------------
>>> Installing kernel ARGENTUM completed on Wed Mar 17 15:39:01 EET 2021
--------------------------------------------------------------

FreeBSD Demo 13.0-RC2 FreeBSD 13.0-RC2 #0: Wed Mar 17 15:21:11 EET 2021     root@Demo:/usr/obj/usr/src/amd64.amd64/sys/ARGENTUM  amd64

Code:
linker_load_file: /boot/modules/linuxkpi_gplv2.ko - unsupported file type
KLD drm.ko: depends on linuxkpi_gplv2 - not available or version mismatch
linker_load_file: /boot/modules/drm.ko - unsupported file type
KLD amdgpu.ko: depends on drmn - not available or version mismatch
linker_load_file: /boot/modules/amdgpu.ko - unsupported file type
kldload: an error occurred while loading module amdgpu. Please check dmesg(8) for more details.
/etc/rc: WARNING: Unable to load kernel module amdgpu
 
Wow! It is working now! Had to recompile also the graphics/gpu-firmware-kmod
kldstat
Code:
Id Refs Address                Size Name
 1  116 0xffffffff80200000  1f18740 kernel
 2    1 0xffffffff82119000   67fbc8 zfs.ko
 3    1 0xffffffff82799000     b7b8 opensolaris.ko
 4    1 0xffffffff82a00000   31fd70 amdgpu.ko
 5    2 0xffffffff82920000    7e4c8 drm.ko
 6    3 0xffffffff8299f000     cbc8 linuxkpi_gplv2.ko
 7    1 0xffffffff829ac000     2328 lindebugfs.ko
 8    1 0xffffffff829af000     e778 ttm.ko
 9    1 0xffffffff829be000     a038 amdgpu_polaris12_mc_bin.ko
10    1 0xffffffff829c9000     6370 amdgpu_polaris12_pfp_2_bin.ko
11    1 0xffffffff829d0000     6370 amdgpu_polaris12_me_2_bin.ko
12    1 0xffffffff829d7000     4370 amdgpu_polaris12_ce_2_bin.ko
13    1 0xffffffff829dc000     61f0 amdgpu_polaris12_rlc_bin.ko
14    1 0xffffffff82d20000    42380 amdgpu_polaris12_mec_2_bin.ko
15    1 0xffffffff82d63000    42380 amdgpu_polaris12_mec2_2_bin.ko
16    1 0xffffffff829e3000     5270 amdgpu_polaris12_sdma_bin.ko
17    1 0xffffffff829e9000     5270 amdgpu_polaris12_sdma1_bin.ko
18    1 0xffffffff82da6000    5db58 amdgpu_polaris12_uvd_bin.ko
19    1 0xffffffff82e04000    2ac78 amdgpu_polaris12_vce_bin.ko
20    1 0xffffffff82e2f000    21e30 amdgpu_polaris12_smc_bin.ko
21    1 0xffffffff829ef000     3378 acpi_wmi.ko
22    1 0xffffffff829f3000     3218 intpm.ko
23    1 0xffffffff829f7000     2180 smbus.ko
24    1 0xffffffff829fa000     2340 uhid.ko
25    1 0xffffffff82e51000     3380 usbhid.ko
26    1 0xffffffff82e55000     31f8 hidbus.ko
27    1 0xffffffff82e59000     3320 wmt.ko
28    1 0xffffffff82e5d000     4350 ums.ko
29    1 0xffffffff83000000   53a420 vmm.ko
30    1 0xffffffff829fd000     21cc nmdm.ko
31    1 0xffffffff82e62000     7638 if_bridge.ko
32    1 0xffffffff82e6a000     50d8 bridgestp.ko
33    1 0xffffffff82e70000     2a08 mac_ntpd.ko

uname -a
Code:
FreeBSD Demo 13.0-RC2 FreeBSD 13.0-RC2 #0: Wed Mar 17 15:21:11 EET 2021     root@Demo:/usr/obj/usr/src/amd64.amd64/sys/ARGENTUM  amd64

And persistent L2ARC:
zpool status; zpool iostat -v
Code:
  pool: flash
 state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
    still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
    the pool may no longer be accessible by software that does not support
    the features. See zpool-features(5) for details.
  scan: scrub repaired 0B in 00:28:37 with 0 errors on Thu Mar  4 10:08:47 2021
config:

    NAME        STATE     READ WRITE CKSUM
    flash       ONLINE       0     0     0
      gpt/zfs0  ONLINE       0     0     0
    cache
      ada1p4    ONLINE       0     0     0

errors: No known data errors
              capacity     operations     bandwidth
pool        alloc   free   read  write   read  write
----------  -----  -----  -----  -----  -----  -----
flash       66.7G  36.3G     14     42   412K  2.14M
  gpt/zfs0  66.7G  36.3G     14     42   412K  2.14M
cache           -      -      -      -      -      -
  ada1p4    14.8G   156M     19      6   669K   496K
----------  -----  -----  -----  -----  -----  -----

Still waiting for RELEASE before upgrading my main desktop and ZFS pool.
 
More good news with this 13.0 experiment - good surprise is that hw.syscons.disable=1 in /boot/loader.conf is not needed any more with EFI and AMD GPU. With now loader, the EFI conflict seems to be resolved. :)
 
FMLU the root cause was svn checkout https://svn.freebsd.org/base/head/ .
^^^^^^^^^^^^^^^^^^^^^^^^^​
which will checkout the last CURRENT source tree that was mirrored to subversion.
 
Back
Top