[Nexus 5X Original Android Development] kridster:
I just upgraded directly from CM13.1 to the current nightly (12th). As described in the OP I flashed the vendor, radio and bootloader via fastboot first, followed by the nightly and gapps.

Reboot worked and everything seems to run smoothly, except that the phone reboots after starting the stock gallery app. For a few seconds I can use the app and then it reboots. I also tried different gallery apps like Piktures or AOSP Gallery to no avail.

Here is a logcat, it was not possible to get a last kernel message:

[ 12-13 20:41:20.967 852: 896 I/ActivityManager ]
START u0 {flg=0x10000000 cmp=com.android.systemui/.usb.UsbDebuggingActivity (has extras)} from uid 1000 on display 0

[ 12-13 20:41:21.278 852: 898 I/ActivityManager ]
Displayed com.android.systemui/.usb.UsbDebuggingActivity: +287ms

[ 12-13 20:41:24.103 852:10215 W/InputMethodManagerService ]
Window already focused, ignoring focus gain of: com.android.internal.view.IInputMethodClient$Stub$Proxy@371797d attribute=null, token = android.os.BinderProxy@716d286

[ 12-13 20:41:24.187 12035:12035 W/Settings ]
Setting bugreport_in_power_menu has moved from android.provider.Settings.Secure to android.provider.Settings.Global.

[ 12-13 20:41:24.197 3118: 3272 D/OpenGLRenderer ]
endAllActiveAnimators on 0x75986c2c00 (RippleDrawable) with handle 0x7597222d80

[ 12-13 20:41:24.202 12035:12351 W/TileUtils ]
Found com.android.systemui.tuner.TunerActivity for intent Intent { act=com.android.settings.action.EXTRA_SETTINGS } missing metadata

[ 12-13 20:41:24.207 3491: 3491 E/PhoneInterfaceManager ]
[PhoneIntfMgr] getAllowedCarriers: Empty response

[ 12-13 20:41:24.946 4359: 4723 W/ctxmgr ]
[ContextSpecificAclFactory]LocationConsent failed, ULR opt-in status is: false, account#1152159309#

[ 12-13 20:41:24.950 4359: 4723 W/ctxmgr ]
[AclManager]No 2 for (accnt=account#1152159309#, com.google.android.gms(10013):UserLocationProducer, vrsn=10084000, 0, 3pPkg = null , 3pMdlId = null). Was: 2 for 1, account#1152159309#

[ 12-13 20:41:25.907 8119:12352 D/GlassWidgets ]
NewsPanelService.onAutoScroll - appWidgetId=11

[ 12-13 20:41:25.946 8119:12352 D/GlassWidgets ]
NewsPanelService.onAutoScroll - appWidgetId=12

[ 12-13 20:41:35.121 389: 389 I/rmt_storage ]
rmt_storage_connect_cb: clnt_h=0x14 conn_h=0x7d25e2a000

[ 12-13 20:41:35.121 389: 389 I/rmt_storage ]
rmt_storage_rw_iovec_cb: /boot/modem_fs1: req_h=0x14 msg_id=3: R/W request received

[ 12-13 20:41:35.122 389: 389 I/rmt_storage ]
wakelock acquired: 1, error no: 42

[ 12-13 20:41:35.123 389: 836 I/rmt_storage ]
rmt_storage_client_thread: /boot/modem_fs1: Unblock worker thread (th_id: 537506083920)

[ 12-13 20:41:35.168 389: 836 I/rmt_storage ]
rmt_storage_client_thread: /boot/modem_fs1: req_h=0x14 msg_id=3: Bytes written = 1572864

[ 12-13 20:41:35.168 389: 836 I/rmt_storage ]
rmt_storage_client_thread: /boot/modem_fs1: req_h=0x14 msg_id=3: Send response: res=0 err=0

[ 12-13 20:41:35.169 389: 836 I/rmt_storage ]
rmt_storage_client_thread: /boot/modem_fs1: About to block rmt_storage client thread (th_id: 537506083920) wakelock released: 1, error no: 0

[ 12-13 20:41:35.172 389: 389 I/rmt_storage ]
rmt_storage_disconnect_cb: clnt_h=0x14 conn_h=0x7d25e2a000

[ 12-13 20:41:53.425 852: 2719 I/nanohub ]
osLog: [BMI160] accSetRate: rate=51200, latency=250000000, state=5

[ 12-13 20:41:53.427 852: 2719 I/nanohub ]
osLog: [BMI160] accSetRate: rate=51200, latency=250000000, state=5

[ 12-13 20:41:53.431 852: 2719 I/nanohub ]
osLog: [BMI160] accSetRate: rate=51200, latency=250000000, state=3

[ 12-13 20:41:56.673 852: 2762 I/ActivityManager ]
START u0 {act=android.intent.action.MAIN cat=[android.intent.category.HOME] flg=0x10200000 cmp=com.cyanogenmod.trebuchet/com.android.launcher3.Launcher (has extras)} from uid 1000 on display 0

[ 12-13 20:41:56.802 852: 863 I/art ]
Background partial concurrent mark sweep GC freed 55763(4MB) AllocSpace objects, 12(268KB) LOS objects, 33% free, 21MB/31MB, paused 7.766ms total 105.374ms

[ 12-13 20:41:57.314 4536: 4628 W/OpenGLRenderer ]
Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...

[ 12-13 20:41:57.315 4536: 4628 W/OpenGLRenderer ]
Incorrectly called buildLayer on View: ShortcutAndWidgetContainer, destroying layer...

[ 12-13 20:42:02.410 852:10216 I/ActivityManager ]
START u0 {act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=com.android.gallery3d/.app.GalleryActivity bnds=[276,946][540,1235] (has extras)} from uid 10035 on display 0

[ 12-13 20:42:02.433 852: 891 W/BroadcastQueue ]
Permission Denial: receiving Intent { act=com.android.launcher3.action.LAUNCH flg=0x10 (has extras) } to com.google.android.gms/.chimera.GmsIntentOperationService$GmsExternalReceiver requires com.android.launcher3.permission.RECEIVE_LAUNCH_BROADCASTS due to sender com.cyanogenmod.trebuchet (uid 10035)

[ 12-13 20:42:02.433 852: 891 W/BroadcastQueue ]
Permission Denial: broadcasting Intent { act=com.android.launcher3.action.LAUNCH flg=0x10 (has extras) } from com.cyanogenmod.trebuchet (pid=4536, uid=10035) requires com.google.android.launcher.permission.RECEIVE_LAUNCH_BROADCASTS due to receiver com.google.android.gms/.icing.proxy.ApplicationLauncherReceiver

[ 12-13 20:42:02.460 852: 3781 I/ActivityManager ]
Start proc 12401:com.android.gallery3d/u0a58 for activity com.android.gallery3d/.app.GalleryActivity

[ 12-13 20:42:02.819 12401:12401 V/StateManager ]
startState class com.android.gallery3d.app.AlbumSetPage

[ 12-13 20:42:02.945 12401:12419 I/Adreno ]
QUALCOMM build : a5b4970, If5818605d9
Build Date : 10/12/16
OpenGL ES Shader Compiler Version: XE031.09.00.04
Local Branch : N24D
Remote Branch :
Remote Branch :
Reconstruct Branch :

[ 12-13 20:42:02.951 12401:12419 I/OpenGLRenderer ]
Initialized EGL, version 1.4

[ 12-13 20:42:02.951 12401:12419 D/OpenGLRenderer ]
Swap behavior 1

[ 12-13 20:42:03.146 12401:12417 I/GLRootView ]
onSurfaceChanged: 1080x1731, gl10: com.google.android.gles_jni.GLImpl@ee96a64

[ 12-13 20:42:03.146 12401:12417 I/GLRootView ]
layout content pane 1080x1731 (compensation 0)

[ 12-13 20:42:03.334 12401:12401 D/Gallery.MultiSetSync ]
onSyncDone: ************ #pending=1

[ 12-13 20:42:03.334 12401:12401 D/Gallery.MultiSetSync ]
request sync: ************

[ 12-13 20:42:03.335 12401:12401 D/Gallery.MultiSetSync ]
onSyncDone: ****** #pending=0

[ 12-13 20:42:03.335 12401:12401 D/Gallery.MultiSetSync ]
request sync: ******

[ 12-13 20:42:03.352 852:10213 I/ActivityManager ]
Start proc 12425:android.process.media/u0a12 for content provider com.android.providers.media/.MediaProvider

[ 12-13 20:42:03.354 852: 898 I/ActivityManager ]
Displayed com.android.gallery3d/.app.GalleryActivity: +912ms

[ 12-13 20:42:03.399 12425:12425 W/System ]
ClassLoader referenced unknown path: /system/priv-app/MediaProvider/lib/arm64

[ 12-13 20:42:03.431 12425:12425 W/System ]
ClassLoader referenced unknown path: /system/priv-app/DownloadProvider/lib/arm64

[ 12-13 20:42:03.432 12425:12425 D/ApplicationLoaders ]
ignored Vulkan layer search path /system/priv-app/DownloadProvider/lib/arm64:/system/priv-app/DownloadProvider/DownloadProvider.apk!/lib/arm64-v8a:/system/lib64:/vendor/lib64 for namespace 0x75b5cf80f0

[ 12-13 20:42:03.557 12401:12417 I/GLRootView ]
layout content pane 1080x1731 (compensation 0)

[ 12-13 20:42:03.566 852: 4519 I/sensors ]
batch

[ 12-13 20:42:03.568 852: 4519 I/nanohub ]
queueBatch: sensor=1, handle=1, period=160000000, latency=0

[ 12-13 20:42:03.568 852: 4519 I/sensors ]
activate

[ 12-13 20:42:03.570 852: 4519 I/nanohub ]
queueActivate: sensor=1, handle=1, enable=1

[ 12-13 20:42:03.572 852: 2719 I/nanohub ]
osLog: [BMI160] accSetRate: rate=51200, latency=160000000, state=3

[ 12-13 20:42:03.688 12401:12443 W/BlobCache ]
cannot read header magic

[ 12-13 20:42:03.821 461: 461 I/FFmpegExtractor ]
android-source:0xf31b0400

[ 12-13 20:42:03.905 461: 3147 I/FFmpegExtractor ]
android-source:0xf31eb000

[ 12-13 20:42:03.920 461: 3147 D/FFmpegExtractor ]
suppoted codec(h264) by official Stagefright

[ 12-13 20:42:03.920 461: 3147 D/FFmpegExtractor ]
suppoted codec(aac) by official Stagefright

[ 12-13 20:42:03.920 461: 3147 D/FFmpegExtractor ]
ffmpeg detected media content as 'video/mp4' with confidence 0.08

[ 12-13 20:42:03.944 462: 462 E/MetadataRetrieverClient ]
failed to extract an album art

[ 12-13 20:42:03.944 12401:12443 E/MediaMetadataRetrieverJNI ]
getEmbeddedPicture: Call to getEmbeddedPicture failed.

[ 12-13 20:42:03.956 462:12450 I/MediaPlayerService ]
MediaPlayerService::getOMX

[ 12-13 20:42:03.957 462:12450 I/OMXClient ]
MuxOMX ctor

[ 12-13 20:42:03.959 455: 3336 I/OMXMaster ]
makeComponentInstance(OMX.qcom.video.decoder.avc) in mediacodec process

[ 12-13 20:42:04.084 455: 3336 I/OMX-VDEC-1080P ]
component_init: OMX.qcom.video.decoder.avc : fd=8

[ 12-13 20:42:04.084 455: 3336 I/OMX-VDEC-1080P ]
Capabilities: driver_name = msm_vidc_driver, card = msm_vdec_8974, bus_info = , version = 1, capabilities = 4003000

[ 12-13 20:42:04.090 455: 3336 I/OMX-VDEC-1080P ]
Enabling default extradata for OMX.qcom.video.decoder.avc

[ 12-13 20:42:04.091 461: 461 D/FFmpegExtractor ]
suppoted codec(h264) by official Stagefright

[ 12-13 20:42:04.091 461: 461 D/FFmpegExtractor ]
suppoted codec(aac) by official Stagefright

[ 12-13 20:42:04.091 461: 461 D/FFmpegExtractor ]
ffmpeg detected media content as 'video/mp4' with confidence 0.08

[ 12-13 20:42:04.095 461:12448 I/SampleTable ]
There are reordered frames present.

[ 12-13 20:42:04.099 455: 3336 I/OMX-VDEC-1080P ]
omx_vdec::component_init() success : fd=8

[ 12-13 20:42:04.102 455: 563 E/OMX-VDEC-1080P ]
Extension: OMX.google.android.index.storeANWBufferInMetadata not implemented

[ 12-13 20:42:04.102 455: 563 E/OMX-VDEC-1080P ]
Extension: OMX.google.android.index.configureVideoTunnelMode not implemented

[ 12-13 20:42:04.102 455: 563 E/OMX-VDEC-1080P ]
Extension: OMX.google.android.index.useAndroidNativeBuffer is supported

[ 12-13 20:42:04.102 455: 455 E/OMXNodeInstance ]
getParameter(1c7003e:qcom.decoder.avc, ??(0x7f000044)) ERROR: UnsupportedSetting(0x80001019)

[ 12-13 20:42:04.103 455: 563 E/OMXNodeInstance ]
getParameter(1c7003e:qcom.decoder.avc, ??(0x7f000044)) ERROR: UnsupportedSetting(0x80001019)

[ 12-13 20:42:04.105 462:12450 D/ACodec ]
Setting [OMX.qcom.video.decoder.avc] input port buffer number: 1

[ 12-13 20:42:04.107 455: 3337 E/OMX-VDEC-1080P ]
ERROR: IP Requirements(#4: 6643712) Requested(#1: 6643712)

[ 12-13 20:42:04.107 455: 3337 E/OMX-VDEC-1080P ]
set_parameter: Error: 0x80001005, setting param 0x2000001

[ 12-13 20:42:04.107 455: 3337 E/OMXNodeInstance ]
setParameter(1c7003e:qcom.decoder.avc, ParamPortDefinition(0x2000001)) ERROR: BadParameter(0x80001005)

[ 12-13 20:42:04.107 462:12450 W/ACodec ]
Fail to set [OMX.qcom.video.decoder.avc] input port buffer number: 1

[ 12-13 20:42:04.107 462:12450 D/ACodec ]
Setting [OMX.qcom.video.decoder.avc] output port buffer number: 1

[ 12-13 20:42:04.116 455: 3338 E/OMX-VDEC-1080P ]
ERROR: OP Requirements(#18: 159744) Requested(#1: 159744)

[ 12-13 20:42:04.116 455: 3338 E/OMX-VDEC-1080P ]
set_parameter: Error: 0x80001005, setting param 0x2000001

[ 12-13 20:42:04.116 455: 3338 E/OMXNodeInstance ]
setParameter(1c7003e:qcom.decoder.avc, ParamPortDefinition(0x2000001)) ERROR: BadParameter(0x80001005)

[ 12-13 20:42:04.117 462:12450 W/ACodec ]
Fail to set [OMX.qcom.video.decoder.avc] output port buffer number: 1

[ 12-13 20:42:04.178 455: 3188 E/OMX-VDEC-1080P ]
Extension: OMX.google.android.index.describeColorAspects not implemented

[ 12-13 20:42:04.178 455: 455 E/OMX-VDEC-1080P ]
Extension: OMX.google.android.index.describeHDRStaticInfo not implemented

[ 12-13 20:42:04.186 462: 574 E/MetadataRetrieverClient ]
failed to extract an album art

[ 12-13 20:42:04.187 12401:12445 E/MediaMetadataRetrieverJNI ]
getEmbeddedPicture: Call to getEmbeddedPicture failed.

[ 12-13 20:42:04.195 455: 455 E/OMXNodeInstance ]
getParameter(1c7003e:qcom.decoder.avc, ??(0x7f000044)) ERROR: UnsupportedSetting(0x80001019)

[ 12-13 20:42:04.251 461:12447 D/MediaBufferGroup ]
creating MemoryDealer

[ 12-13 20:42:04.276 12425:12430 I/art ]
Compiler allocated 5MB to compile android.database.Cursor com.android.providers.media.MediaProvider.query(android.net.Uri, java.lang.String[], java.lang.String, java.lang.String[], java.lang.String)

[ 12-13 20:42:04.284 455:12466 E/OMXNodeInstance ]
getParameter(1c7003e:qcom.decoder.avc, ??(0x7f000044)) ERROR: UnsupportedSetting(0x80001019)

[ 12-13 20:42:04.343 455:12466 E/OMXNodeInstance ]
getParameter(1c7003e:qcom.decoder.avc, ??(0x7f000044)) ERROR: UnsupportedSetting(0x80001019)

[ 12-13 20:42:04.357 455: 455 I/OMX-VDEC-1080P ]
omx_vdec::component_deinit() complete

[ 12-13 20:42:04.361 455: 455 I/OMX-VDEC-1080P ]
Exit OMX vdec Destructor: fd=8

[ 12-13 20:42:04.369 462:12473 I/MediaPlayerService ]
MediaPlayerService::getOMX

[ 12-13 20:42:04.370 462:12473 I/OMXClient ]
MuxOMX ctor

[ 12-13 20:42:04.371 455: 3336 I/OMXMaster ]
makeComponentInstance(OMX.qcom.video.decoder.avc) in mediacodec process

[ 12-13 20:42:04.371 455: 3336 I/OMX-VDEC-1080P ]
component_init: OMX.qcom.video.decoder.avc : fd=8

[ 12-13 20:42:04.372 455: 3336 I/OMX-VDEC-1080P ]
Capabilities: driver_name = msm_vidc_driver, card = msm_vdec_8974, bus_info = , version = 1, capabilities = 4003000

[ 12-13 20:42:04.378 455: 3336 I/OMX-VDEC-1080P ]
Enabling default extradata for OMX.qcom.video.decoder.avc

[ 12-13 20:42:04.389 455: 3336 I/OMX-VDEC-1080P ]
omx_vdec::component_init() success : fd=8

[ 12-13 20:42:04.391 455:12466 E/OMX-VDEC-1080P ]
Extension: OMX.google.android.index.storeANWBufferInMetadata not implemented

[ 12-13 20:42:04.391 455:12466 E/OMX-VDEC-1080P ]
Extension: OMX.google.android.index.configureVideoTunnelMode not implemented

[ 12-13 20:42:04.391 455:12466 E/OMX-VDEC-1080P ]
Extension: OMX.google.android.index.useAndroidNativeBuffer is supported

[ 12-13 20:42:04.392 455: 455 E/OMXNodeInstance ]
getParameter(1c7003f:qcom.decoder.avc, ??(0x7f000044)) ERROR: UnsupportedSetting(0x80001019)

[ 12-13 20:42:04.392 455: 3188 E/OMXNodeInstance ]
getParameter(1c7003f:qcom.decoder.avc, ??(0x7f000044)) ERROR: UnsupportedSetting(0x80001019)

[ 12-13 20:42:04.396 462:12473 D/ACodec ]
Setting [OMX.qcom.video.decoder.avc] input port buffer number: 1

[ 12-13 20:42:04.396 455: 3337 E/OMX-VDEC-1080P ]
ERROR: IP Requirements(#4: 6643712) Requested(#1: 6643712)

[ 12-13 20:42:04.397 455: 3337 E/OMX-VDEC-1080P ]
set_parameter: Error: 0x80001005, setting param 0x2000001

[ 12-13 20:42:04.397 455: 3337 E/OMXNodeInstance ]
setParameter(1c7003f:qcom.decoder.avc, ParamPortDefinition(0x2000001)) ERROR: BadParameter(0x80001005)

[ 12-13 20:42:04.397 462:12473 W/ACodec ]
Fail to set [OMX.qcom.video.decoder.avc] input port buffer number: 1

[ 12-13 20:42:04.397 462:12473 D/ACodec ]
Setting [OMX.qcom.video.decoder.avc] output port buffer number: 1

[ 12-13 20:42:04.400 455: 3336 E/OMX-VDEC-1080P ]
ERROR: OP Requirements(#18: 159744) Requested(#1: 159744)

[ 12-13 20:42:04.400 455: 3336 E/OMX-VDEC-1080P ]
set_parameter: Error: 0x80001005, setting param 0x2000001

[ 12-13 20:42:04.400 455: 3336 E/OMXNodeInstance ]
setParameter(1c7003f:qcom.decoder.avc, ParamPortDefinition(0x2000001)) ERROR: BadParameter(0x80001005)

[ 12-13 20:42:04.401 462:12473 W/ACodec ]
Fail to set [OMX.qcom.video.decoder.avc] output port buffer number: 1

[ 12-13 20:42:04.450 455: 3337 E/OMX-VDEC-1080P ]
Extension: OMX.google.android.index.describeColorAspects not implemented

[ 12-13 20:42:04.450 455: 3188 E/OMX-VDEC-1080P ]
Extension: OMX.google.android.index.describeHDRStaticInfo not implemented

[ 12-13 20:42:04.460 455: 3336 E/OMXNodeInstance ]
getParameter(1c7003f:qcom.decoder.avc, ??(0x7f000044)) ERROR: UnsupportedSetting(0x80001019)

[ 12-13 20:42:04.523 461: 3147 D/MediaBufferGroup ]
creating MemoryDealer

[ 12-13 20:42:04.572 455: 3188 E/OMXNodeInstance ]
getParameter(1c7003f:qcom.decoder.avc, ??(0x7f000044)) ERROR: UnsupportedSetting(0x80001019)

[ 12-13 20:42:04.638 455: 3338 E/OMXNodeInstance ]
getParameter(1c7003f:qcom.decoder.avc, ??(0x7f000044)) ERROR: UnsupportedSetting(0x80001019)

[ 12-13 20:42:04.656 455: 3188 I/OMX-VDEC-1080P ]
omx_vdec::component_deinit() complete

[ 12-13 20:42:04.659 455: 3188 I/OMX-VDEC-1080P ]
Exit OMX vdec Destructor: fd=8

Interestingly the app Simple Gallery causes no reboots at all.