[Nexus 5 Q&A, Help & Troubleshooting] ssconceptz:
**POSSIBLE SOLUTION** Please post below if it works for you.

You may be here because you are getting random reboots, maybe you installed TWRP and your cache took forever to wipe or maybe your phone is just rebooting for god knows what reason, maybe these will help you!

After contacting a developer and having them look at some logs I found, I am determined it is something with the kernel in the N5 which probably runs ONDEMAND and is causing this issue with some devices which I see as more sensitive to higher clocks.

Follow the instructions EXACTLY and configure the kernel exactly as below! This could work with any custom rom as long as you use a custom kernel or you can change the way the kernel in that rom behaves. The kernel from my experiences works best as follows:

Best Kernel Settings

Mode: INTERACTIVE

Min: 300 Mhz

Max: 1985 Mhz (or closest below 2000 Mhz)

CUSTOM ROM & KERNEL | Flash CM11 & Franco Kernel

I will provide you the steps but you need to full restore your phone to an RMA ready standpoint, that means running the google supplied files, and relocking. At that point you can then flash Clockworkmod (DO NOT flash TWRP, I love TWRP but their recovery I believe started my issue) after you unlock, flash CM11 & Franco Kernel. Leave the kernel settings stock.

***Reason - When I originally installed TWRP, it took about 5 minutes just to wipe cache, after that the reboots began, I use CWM on this device but TWRP is on my other devices. CM11 is super smooth, im running the nightlies, and the Franco Kernel I believe relieves some of the stress that is causing the kernel panics if you use the default clocks which are lower than the stock ones.

Steps: **MUST BE BOOTLOADER UNLOCKED TO DO THIS**

1) Flash ClockworkMod Recovery (latest version), no matter your current state (fastboot flash recovery filename.img)

2) Wipe & Format the entire device and all partitions that are safe to do so from the custom recovery (including the internal storage)

*Device should be unbootable at this point, there is no OS

3) Download google's method of returning to stock here https://developers.google.com/android/nexus/images#hammerhead (I used 4.4 then sideloaded 4.4.1 & 4.4.2 but get 4.4.2 if link works)

4) Unzip googles file

5) Put your device in the Bootloader (Turn off, hold power + vol down)

6) Connect to your computer securely, run flash-all.bat

*once its done, your device will reboot and be completely stock

7) Put your device back in the Bootloader

8) Relock your device (fastboot oem lock)

9) Reboot your device

10) Go into the device & go into Settings > Backup & reset and do a Factory data reset.

11) Put device back in the Bootloader

12) Unlock your device (fastboot oem unlock)

13) Device will reboot and be stock once again

14) Put your device back in the Bootloader

15) Flash ClockworkMod Recovery (make sure its the latest one)

16) Boot into Recovery (Wipe data/cache/dalvik)

17) Reboot device

18) Download CM11 & gapps as well as Franco Kernel.

CM11: http://download.cyanogenmod.org/?device=hammerhead (get the nightlies!)

GAPPS: http://wiki.cyanogenmod.org/w/Gapps (I guess the latest one for CM11)

Kernel: http://xdaforums.com/showthread.php?t=2508284 (get at least r20 if its not still the latest)

19) Place zip files on device

20) Reboot into recovery

21) Do another Data wipe/cache

22) Flash CM11 & GAPPS

23) Reboot device

24) Reboot into recovery again

25) Finally flash Franco Kernel (ONLY if your on 4.4.1, if your 4.4.2 use CM kernel but use INTERACTIVE Min: 300 | Max: 1985 (or so).

It may sound redundant and there may seem to be waaaayyyyy too many steps but these are the exact steps I took and I no longer have the issue. *Fingers Crossed* It may not work for everybody and I cannot be held responsible if something was to happen to your device from following these instructions.

Now my cache wipes super quick with CWM

**UPDATED**

So my Nexus 5 worked fine for awhile and now it is rebooting randomly at several different times without notice. I originally had it on AT&T then swapped it to Sprint, and another user below chimed in having similar issues with T-Mobile. The device seems to work just fine in your hands and will not restart, unless your using an application that will freeze, Hangouts, GPS, Google Play etc. The device almost always will reboot during GPS navigation, but the strange part is the device will be just sitting on the table next to me, no one touching it, no applications running and it will just start rebooting. If I leave it be and not touch it, the device will contain to reboot several times. Google applications hang up a lot and cause reboots when actually in use and I've been rebooted during calls several times.

Info on the reboots:

These reboots do not seem to be the normal "hard reboot" its more like a "soft reboot" whereas the phone cuts off, you see google, then the animation for a split second and its back up within seconds bypassing any lock screen you may have in place.

Things I've tried:

1) Factory reset using the zip file provided on the google site (e.g. running flash_all.bat) which restored any and all partitions, and stock recovery

2) I've tried rooted, unrooted, custom roms, stock roms, unlocked bootloader, locked bootloader, it doesn't matter, nothing changes

3) When I did the last attempt at a factory reset (yes as crazy as it sounds I did this several times thinking I was crazy lol) I left out the sim, didn't log into google and purposely left off ALL 3rd Party applications, therefore only running GOOGLE installed default apps (updated of course), and STILL reboots.

It seems sort of a lost cause, I am almost sure it is hardware related and have already put in my RMA, the phone should be here shortly. In the meantime if anyone has any ideas or is experiencing this same thing please chime in.

Video of single reboot:

http://youtu.be/Ss_zDxnD6jc

[YOUTUBE]http://youtu.be/Ss_zDxnD6jc[/YOUTUBE]