Good evening,
I have been attempting to compile and use an upstream kernel, namely 7.0.0-rc1. I do not have any issues with the new kernel up until an unclean shutdown occurs, either artificial or my battery runs dry.
After this happens, any subsequent boots will fail to correctly load the kernel and the initramfs. What I am greeted with is a black screen with either complete lines or partial lines, straight and horizontal, that are filled with garbage data. I can input my luks passphrase and the screen will go black for a moment before returning to a broken state.
I have since replicated this on the most recent sys-kernel/vanilla-sources with 6.19.3. For both builds I copied the dist kernel's .config and performed make olddefconfig on them, following the instructions on the wiki.
Full power cycles do not fix this issue, and the only solution I have found so far is to re-run sudo make install in /usr/src/linux after remounting my efi partition in either a chrooted live environment or while using the gentoo-kernel-bin vmlinuz and initramfs.
For further context, gentoo-kernel-bin works without issue and recovers from unclean shutdowns just fine. My use flags for installkernel are: systemd, ugrd, and efistub. My config.toml for ugrd is unmodified. The only additions to /etc/kernel/cmdline are splash and rd.udev. At the present moment I am compiling gentoo-kernel to see if I can replicate it there as well.
If it matters at all, I am running this on a corebooted T480.
I suspect something to do with my efi partition being damaged by the unclean shutdowns, but I do not understand why it doesn't affect the gentoo-kernel-bin. Do the Gentoo sources apply a patch to deal with this exact issue?
I am very lost on what is going wrong here. If there is anything I can do to help you help me, please let me know.



