# gpu-firmware-kmod split into individual packages



## zirias@ (May 15, 2022)

Just noticed this happened on the latest update of graphics/gpu-firmware-kmod. No need to change anything, the "main" package just depends on *all* firmware packages – but it's nice there's the possibility now to only install the firmware you actually need : save a bit of disk space and have a clear /boot/modules again.

For a hint which firmware package(s) to install, be sure to actually load a DRM driver and then just look at `dmesg | grep firmware`.


----------



## fernandel (May 21, 2022)

I am using package and it was installed everything. I tried to `pkg autoremove` and it wand to remove everything.

```
dmesg | grep firmware
drmn0: successfully loaded firmware image 'amdgpu/picasso_gpu_info.bin'
drmn0: successfully loaded firmware image 'amdgpu/picasso_sdma.bin'
drmn0: successfully loaded firmware image 'amdgpu/picasso_asd.bin'
drmn0: successfully loaded firmware image 'amdgpu/picasso_pfp.bin'
drmn0: successfully loaded firmware image 'amdgpu/picasso_me.bin'
drmn0: successfully loaded firmware image 'amdgpu/picasso_ce.bin'
drmn0: successfully loaded firmware image 'amdgpu/picasso_rlc.bin'
drmn0: successfully loaded firmware image 'amdgpu/picasso_mec.bin'
drmn0: successfully loaded firmware image 'amdgpu/picasso_mec2.bin'
drmn0: successfully loaded firmware image 'amdgpu/raven_dmcu.bin'
drmn0: successfully loaded firmware image 'amdgpu/picasso_vcn.bin'
[drm] Found VCN firmware Version ENC: 1.12 DEC: 2 VEP: 0 Revision: 1
[drm] PSP loading VCN firmware
```


```
pkg autoremove
Checking integrity... done (0 conflicting)
Deinstallation has been requested for the following 84 packages:

Installed packages to be REMOVED:
    gpu-firmware-amd-kmod-banks: 20220511
    gpu-firmware-amd-kmod-bonaire: 20220511
    gpu-firmware-amd-kmod-carrizo: 20220511
    gpu-firmware-amd-kmod-fiji: 20220511
    gpu-firmware-amd-kmod-hainan: 20220511
    gpu-firmware-amd-kmod-hawaii: 20220511
    gpu-firmware-amd-kmod-kabini: 20220511
    gpu-firmware-amd-kmod-kaveri: 20220511
    gpu-firmware-amd-kmod-mullins: 20220511
    gpu-firmware-amd-kmod-navi10: 20220511
    gpu-firmware-amd-kmod-navi12: 20220511
    gpu-firmware-amd-kmod-navi14: 20220511
    gpu-firmware-amd-kmod-oland: 20220511
    gpu-firmware-amd-kmod-picasso: 20220511
    gpu-firmware-amd-kmod-pitcairn: 20220511
    gpu-firmware-amd-kmod-polaris10: 20220511
    gpu-firmware-amd-kmod-polaris11: 20220511
    gpu-firmware-amd-kmod-polaris12: 20220511
    gpu-firmware-amd-kmod-raven: 20220511
    gpu-firmware-amd-kmod-raven2: 20220511
    gpu-firmware-amd-kmod-renoir: 20220511
    gpu-firmware-amd-kmod-si58: 20220511
    gpu-firmware-amd-kmod-stoney: 20220511
    gpu-firmware-amd-kmod-tahiti: 20220511
    gpu-firmware-amd-kmod-tonga: 20220511
    gpu-firmware-amd-kmod-topaz: 20220511
    gpu-firmware-amd-kmod-vega10: 20220511
    gpu-firmware-amd-kmod-vega12: 20220511
    gpu-firmware-amd-kmod-vega20: 20220511
    gpu-firmware-amd-kmod-vegam: 20220511
    gpu-firmware-amd-kmod-verde: 20220511
    gpu-firmware-intel-kmod-broxton: 20220511
    gpu-firmware-intel-kmod-coffeelake: 20220511
    gpu-firmware-intel-kmod-elkhartlake: 20220511
    gpu-firmware-intel-kmod-geminilake: 20220511
    gpu-firmware-intel-kmod-icelake: 20220511
    gpu-firmware-intel-kmod-kabylake: 20220511
    gpu-firmware-intel-kmod-rocketlake: 20220511
    gpu-firmware-intel-kmod-skylake: 20220511
    gpu-firmware-intel-kmod-tigerlake: 20220511
    gpu-firmware-kmod: 20220511,1
    gpu-firmware-radeon-kmod-aruba: 20220511
    gpu-firmware-radeon-kmod-barts: 20220511
    gpu-firmware-radeon-kmod-bonaire: 20220511
    gpu-firmware-radeon-kmod-btc: 20220511
    gpu-firmware-radeon-kmod-caicos: 20220511
    gpu-firmware-radeon-kmod-cayman: 20220511
    gpu-firmware-radeon-kmod-cedar: 20220511
    gpu-firmware-radeon-kmod-cypress: 20220511
    gpu-firmware-radeon-kmod-hainan: 20220511
    gpu-firmware-radeon-kmod-hawaii: 20220511
    gpu-firmware-radeon-kmod-juniper: 20220511
    gpu-firmware-radeon-kmod-kabini: 20220511
    gpu-firmware-radeon-kmod-kaveri: 20220511
    gpu-firmware-radeon-kmod-mullins: 20220511
    gpu-firmware-radeon-kmod-oland: 20220511
    gpu-firmware-radeon-kmod-palm: 20220511
    gpu-firmware-radeon-kmod-pitcairn: 20220511
    gpu-firmware-radeon-kmod-r100: 20220511
    gpu-firmware-radeon-kmod-r200: 20220511
    gpu-firmware-radeon-kmod-r300: 20220511
    gpu-firmware-radeon-kmod-r420: 20220511
    gpu-firmware-radeon-kmod-r520: 20220511
    gpu-firmware-radeon-kmod-r600: 20220511
    gpu-firmware-radeon-kmod-r700: 20220511
    gpu-firmware-radeon-kmod-redwood: 20220511
    gpu-firmware-radeon-kmod-rs600: 20220511
    gpu-firmware-radeon-kmod-rs690: 20220511
    gpu-firmware-radeon-kmod-rs780: 20220511
    gpu-firmware-radeon-kmod-rv610: 20220511
    gpu-firmware-radeon-kmod-rv620: 20220511
    gpu-firmware-radeon-kmod-rv630: 20220511
    gpu-firmware-radeon-kmod-rv635: 20220511
    gpu-firmware-radeon-kmod-rv670: 20220511
    gpu-firmware-radeon-kmod-rv710: 20220511
    gpu-firmware-radeon-kmod-rv730: 20220511
    gpu-firmware-radeon-kmod-rv740: 20220511
    gpu-firmware-radeon-kmod-rv770: 20220511
    gpu-firmware-radeon-kmod-sumo: 20220511
    gpu-firmware-radeon-kmod-sumo2: 20220511
    gpu-firmware-radeon-kmod-tahiti: 20220511
    gpu-firmware-radeon-kmod-turks: 20220511
    gpu-firmware-radeon-kmod-verde: 20220511
    muparser: 2.3.2

Number of packages to be removed: 84

The operation will free 57 MiB.

Proceed with deinstalling packages? [y/N]: N
```

Should I use port in this case, please? Thank you.


----------



## bakul (May 21, 2022)

This is how I would go about this if I cared enough:

Check n check which gpu firmware .mo modules are loaded by doing "kldstat |grep gpu". In my case these are is "amdgpu_picasso*.ko" and "amdgpu_raven_dmcu_bin.ko".
Check which package contains them by doing "pkg which /boot/modules/_gpu-driver-you-found_". In my case these are "gpu-firmware-amd-kmod-picasso-20220511" and "gpu-firmware-amd-kmod-raven-20220511".
"pkg query %ro  gpu-firmware-amd-kmod-picasso" reveals this is a dependency of "gpu-firmware-kmod", which has many other dependencies but "pkg query %do gpu-firmware-kmod" doesn't seem to show them correctly. No idea why.
I had added "PORTS_MODULES+=graphics/gpu-firmware-kmod" to "/etc/src.conf" which is brings in the kitchen sink. I can probably just remove this, which will trigger "pkg autoremove" to remove all other gpu firmware packages as well.
Then I'd manually add back the two packages I need.
And I'd do all this from a regular console terminal.
And I'd use bectl to protect myself from foot-shooting.


----------



## zirias@ (May 21, 2022)

fernandel said:


> I tried to `pkg autoremove` and it wand to remove everything.


This is because the drm-*-kmod package doesn't have any firmware dependency any more. It just isn't possible, because which firmare you need depends on your GPU, the package just can't know. If it would still depend on `gpu-firmware-kmod`, which is a meta-package now, you'd still be forced to install _every_ firmware.

You can still install `gpu-firmware-kmod`, which now pulls in every individual firmware package, and as a result, you'll have everything installed, just as before. Or you find out which firmware you really need (see my original post) and just install that manually.


----------



## fernandel (May 21, 2022)

I did `pkg autoremove` and tha `pkg install gpu-firmware-amd-kmod-picasso` and looks like that is everything okay.


----------

