updating kmod ports procedure?

I asked this at the end of a previous thread, but maybe it's better to ask separately, instead of titled under a symptom:

What is the best procedure for rebuilding graphics/drm-kmod after release upgrades?

If I simply go to graphics/drm-kmod and 'make uninstall ; make reinstall' nothing meaningful happens, because it's a metaport. I ended up uninstalling it, then doing a 'pkg autoremove' to remove the "dependencies" and then doing the 'make install'. Then the underlying ports actually (re)build.

What is the best or most straightforward way to do this?

And further, how do I know which of these kmod ports I am actually using? Should I consider installing something more specific than the whole drm-kmod metaport? This is a tower computer using `amdgpu` but that is the only issue, I think.
 
First determine what is the drm module installed.
pkg info | grep drm
It's typically drm-61-kmod or drm-515-kmod.

What I did was to get rid of drm-kmod metaport.
pkg set -A0 drm-61-kmod (or drm-515-kmod).
pkg set -A0 gpu-firmware-kmod
This above makes the packages installed not as automatic dependencies.
pkg delete drm-kmod

Update your ports with git pull.

Then, cd in the right drm-xxx-kmod port:
make clean
make install-missing-packages
make reinstall


make install-missing-packages installs all the dependencies needed with pkg instead of using the ports system, it really saves time.

There is no need to rebuild gpu-firmware-kmod as they are just binary firmwares.
 
And which kernel modules are "loaded" can be determined by kldstat(8).
Determining which modules are "used" would be complexed.
Looking into the output of dmesg(8) and determine each output is generated by kernel or any of modules.
 
I ended up uninstalling it, then doing a 'pkg autoremove' to remove the "dependencies" and then doing the 'make install'. Then the underlying ports actually (re)build.
That is the simplest, most straightforward way.
 
From pkg info | grep drm :

drm-510-kmod-5.10.163_10 DRM drivers modules
drm-kmod-20220907_3 Metaport of DRM modules for the linuxkpi-based KMS components
gpu-firmware-kmod-20241114,1 Firmware modules for the drm-kmod drivers
libdrm-2.4.123,1 Direct Rendering Manager library and headers

(I am on 13.4.)

So I could just rebuild drm-510-kmod next time? This gpu-firmware-kmod wasn't there at all before the latest update, as I recall....

kldstat | grep gpu :

13 1 0xffffffff82c00000 4101e0 amdgpu.ko
19 1 0xffffffff82ac0000 2218 amdgpu_picasso_gpu_info_bin.ko
20 1 0xffffffff82ac3000 64d8 amdgpu_picasso_sdma_bin.ko
21 1 0xffffffff82aca000 2c2d8 amdgpu_picasso_asd_bin.ko
22 1 0xffffffff82af7000 c4d8 amdgpu_picasso_ta_bin.ko
23 1 0xffffffff82b04000 7558 amdgpu_picasso_pfp_bin.ko
24 1 0xffffffff82b0c000 6558 amdgpu_picasso_me_bin.ko
25 1 0xffffffff82b13000 4558 amdgpu_picasso_ce_bin.ko
26 1 0xffffffff82b18000 b9c0 amdgpu_picasso_rlc_am4_bin.ko
27 1 0xffffffff82b24000 437f8 amdgpu_picasso_mec_bin.ko
28 1 0xffffffff82b68000 437f8 amdgpu_picasso_mec2_bin.ko
29 1 0xffffffff82bac000 7b68 amdgpu_raven_dmcu_bin.ko
30 1 0xffffffff83011000 5b4b8 amdgpu_picasso_vcn_bin.ko
 
So I could just rebuild drm-510-kmod next time? This gpu-firmware-kmod wasn't there at all before the latest update, as I recall....
I do make reinstall clean on drm-61-kmod (not meta drm-kmod). Other dependencies seem covered as pkg no problem.

I'm confused on how all the drm packages really work, how they hook to gpu-firmware, and I'm curious about how to track newer ones?
  1. There's drm-kmod
  2. There's drm-510-kmod, drm-515-kmod, drm-61-kmod
  3. drm-kmod installs all amd/intel/radeon gpu-firmware, and itself from what implies it's somewhat old (drm-kmod 2022 with gpu-firmware 2023)
  4. drm-61-kmod doesn't (iirc) install gpu-firmware
  5. So if I want to avoid the extra gpu-firmware deps and know what specific pkg I need, it seems ideal to choose a versioned drm-#-kmod package (UHD 630 I only have drm-61-kmod and gpu-firmware-intel-kmod-kabylake; I needed to ports compile drm-61-kmod on 14.2-R but the gpu-firmware was fine as-is as a pkg)
  6. Is there any reason why I might choose 510 or 515 instead of 61 or latest?
  7. Is there a way to know if a newer pkg than 61 becomes available? Or some way to guess-force the latest? (like pkg install drm-latest-kmod)
 
Yes, I'm generally confused too, even though I manage to make it work.

So I'm asking about how best to do this part of the upgrade procedure. Because for everything we see, this is now a standard part of the upgrade procedure & will remain so for quite some time....

But as noted, one cannot simply go to a previously installed graphics/drm-kmod and 'make reinstall' because nothing meaningful will happen.... And then there are these questions about which pkgs are actually needed, as you observe.
 
And as noted, for me, the graphics/drm-kmod metaport installs drm-510-kmod. Why not -515- or -61-? I am guessing the system I have, an older tower, needs the -510- version. But for me, it is chosen automatically.
 
Back
Top