In case that helps people who want to try mainline kernel:
KVER=6.13.4
sudo mkdir -p /boot/efi
sudo mount /dev/nvme0n1p1 /boot/efi
sudo apt -y install dracut build-essential bison flex libssl-dev firmware-linux firmware-linux-nonfree
wget "https://cdn.kernel.org/pub/linux/kernel/v6.x/linux-${KVER}.tar.xz"
tar -xf linux-${KVER}.tar.xz
pushd linux-${KVER}
wget "https://gist.githubusercontent.com/Civil/8bf3259974136b05df9642139b7a60ae/raw/01a17d45a85494483a1f41dfb1243aceaf9937a6/.config"
make -j12
sudo make modules_install
sudo cp arch/arm64/boot/Image.gz /boot/vmlinuz-${KVER}
sudo dracut --force --kver ${KVER}
sudo cp arch/arm64/boot/Image.gz /boot/efi/vmlinuz-${KVER}
sudo cp /boot/initrd.img-${KVER} /boot/efi/
NUM=$(grep '^set default' /boot/efi/GRUB/GRUB.CFG | cut -d '"' -f 2)
NUM=$((NUM+1))
echo -e "\n\nmenuentry '${NUM} Mainline ${KVER}' {\n linux /vmlinuz-${KVER} root=/dev/nvme0n1p2 rootwait rw\n initrd /initrd.img-${KVER}\n}\n" | sudo tee -a /boot/efi/GRUB/GRUB.CFG
sudo sed -i 's/default=.*/default="'"${NUM}"'"/;s/timeout=.*/timeout=10/' /boot/efi/GRUB/GRUB.CFG
The kernel config is not perfect; I’ve used defconfig and changed a bunch of drivers to be compiled in because initramfs-tools were slightly broken and did not include the NVMe module, for example. But I haven’t paid too much attention to removing unneeded drivers.
Vanilla kernel OOPS on boot if I plug USB-C ethernet adapter (I had it for debugging purposes) and hangs at boot if I have Radeon RX6400 installed, but boots just fine with rx550.
Also, for newer GPUs, more recent firmware might be required, so something like that would help:
git clone --depth 1 https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git
cd linux-firmware
sudo apt -y install rdfind
sudo make install
sudo make dedup
It would be better though to