That feature was broken and regularly caused more harm than good so was removed. What we really need is post update hooks added to pacman to provide what you are looking for, but unfortunately that has never progressed beyond planning. (Not a solution for now I know...)

since I am the maintainer of the mentioned mkinitcpio-dkms package and in the same situation, I was thinking about a solution for this problem. There are various threads in the forums discussing it, which recommence to use something like `pacman -Sy linux headers && pacman -Su` for system update. But this approach doesn't feel right to me.So I came up with the idea of installing the headers within my dkms hook, maybe with check of header and kernel version to match, and put the header package as IgnorePkg in the pacman.conf. But that doesn't look very solid either.I am curious what others think about this approach. Maybe only as workaround until we get the mentioned post update hooks for pacman.

Or just rebuild the initramfs after the update: `pacman -Syu && mkinitcpio -p linux`

The point is, you need more than one command to update your system including kernel and modules. If you have two pacman calls or one pacman and one mkinitcpio in your UDF doesn't matter here. There should be one command to manage all (except wrapper calls ). It may sound stupid but that's what it should be imho. No fancy stuff for non-fancy things.

And like Allan said, post update hooks are planned for quite some time. They will simplify many things. If they come.