The last generation of Nexuses (Nexus? Nexsi?) were unfortunately plagued with hardware problems. The Nexus 6P suffered from early shutdowns due to a faulty battery sensors, and the 5X had the famous bootloop bug (which my own 5X eventually fell victim to). The 6P suffered from bootloops as well, to an extent, but now there's a possible fix for the problem on both phones.

XDA member XCnathan32 posted a potential fix for the bug, which involves flashing a modified boot.img file and a custom build of TWRP. But how does it work, you may ask? Like many modern mobile CPUs, the Snapdragon processors on the 5X and 6P use a "big.LITTLE" architecture. This means that the phone uses low-power CPU cores during less-intense workloads to reduce battery usage, and switches to high-performance cores if more power is required.

This hack disables the "big" cores on the 5X and 6P, leaving only the less-powerful "LITTLE" cores active. For some reason, this fixes the bootloop bug. Unfortunately, this leaves your device with only 4 active cores, so you'll probably notice some lag. But if you're out of warranty, a slow phone is probably better than a bootlooping one.

The fix was initially developed for the Nexus 6P, but was ported to the 5X by the same user. I'm unfortunately out of town at the time of writing, so I'm unable to test the fix on my own Nexus 5X (I don't own a 6P), but there are a few users claiming success. If you want to try your luck, you can find both hacks below.

Source: XDA Forums - 6P bootloop fix, 5X bootloop fix