Bootloop on OnePlus 7 Pro (guacamole)

Expected Behavior

A fresh install of LineageOS is consistently able to get through the setup process without restarting itself. The phone doesn't immediately restart itself after powering on.

Current Behavior

Most of the time, within a few seconds of powering on, the phone shows a "restarting..." message as if I'd requested it to do so and restarts itself. This happens the first time after the OS is installed and on subsequent boots, but the two cases behave differently.

On later boots, it happens immediately; the message becomes visible at the same time as the lock screen. On the first boot, it takes a few seconds, and I think it happens less consistently, but still a great majority of the time.

On later boots, the phone usually restarts itself before the logo animation is even finished. When this happens, it next boots into recovery and asks if I want to factory reset the device. There are no obvious symptoms of data loss or corruption. I haven't observed this during the first boot. If I power off the phone from within recovery, it stays powered off, but the bootloop is still there when I turn it back on.

Twice, after managing to boot and set up the phone without entering the bootloop, then using it for a day or two, it has suddenly rebooted itself with no input and entered the bootloop again. Both times, it happened while the screen was on and I was using the device.

Once, while trying to figure this problem out, I held the power button while Android was starting. This caused the "restarting..." message to be replaced by a "powering off..." message, but the phone still started itself again after turning off. From this point until I next factory reset the device, a "powering off..." message continued to appear in place of the "restarting..." message on every boot. This continued to be the case after I used recovery to power the device all the way off and turned it on again.

Possible Solution

My layperson's view on this is that a request to power off or restart is stored in nonvolatile memory, and is then honored without being cleared. That would explain why the change in the message persisted between restarts. I don't have a guess as to why it thinks it should restart in the first place.

Steps to Reproduce

The bug happens every time on a fresh install on my device. I don't have to do anything but install LineageOS and turn on the phone to trigger it.

/device guacamole /version lineage-19.1 /date 2022-12-18 /kernel 4.14.180-perf+ #1 Sun Dec 18 05:56:28 UTC 2022 /baseband Q_V1_P14 /mods MindTheGapps-12.1.0-arm64-20220605_112439.zip (md5 edcc4a10bfa00c5d18d34aecbacffe9a)

I have read the directions

Edited by Autumn