[One (M7) Q&A, Help & Troubleshooting] robtherobot101:
I've had many troubles with my m7 (As you can see from my post history) but everything's been running smoothly lately. I'm trying to flash a marshmallow rom, but they all have the same problem. They boot with the screen working fine, but if the display ever turns off, it never comes back on again. The phone wakes up when the power button is pressed, and you can hear it unlock when you swipe up, but the display never turns on.

Also, when flashing 6.0 roms, I've had to edit the partitions in the updater-script file. The partitions are listed there as being in a directory: /dev/block/platform/msm_sdcc.1/by-name/ which doesn't exist on my phone (There is a by-num directory, but no by-name) so I've had to point them to the mmcblk0p* devices directly. I'm wondering if there could be a similar fix for my screen.

Below is the output of logcat when the screen powers off and on (the full log from boot to screen off is attached):

02-08 13:08:06.244 617 709 I PowerManagerService: Going to sleep due to power button (uid 1000)...
02-08 13:08:06.252 617 672 I PowerManagerService: Sleeping (uid 1000)...
02-08 13:08:06.267 617 672 I Adreno-EGL: <qeglDrvAPI_eglInitialize:379>: QUALCOMM Build: 09/02/15, 76f806e, Ibddc658e36
02-08 13:08:06.274 222 1263 W AudioPolicyIntefaceImpl: getOutputForAttr uid 10020 tried to pass itself off as 1000
02-08 13:08:06.274 854 918 W AudioTrack: AUDIO_OUTPUT_FLAG_FAST denied by client; transfer 4, track 44100 Hz, output 48000 Hz
02-08 13:08:06.275 222 783 W AudioFlinger: uid 10020 tried to pass itself off as 1000
02-08 13:08:06.276 222 780 D ALSAStreamOps: setParameters(): keyRouting with device 0x2
02-08 13:08:06.276 222 780 D ALSAStreamOps: setParameters(): keyRouting with device 0x2
02-08 13:08:06.276 222 780 D ALSADevice: route: devices 0x2 in mode 0
02-08 13:08:06.276 222 780 D ALSADevice: No valid input device: 0
02-08 13:08:06.277 222 780 I tfa9887 : tfa9887_power: Set amplifier power to 1
02-08 13:08:06.277 222 780 D alsa_ucm: snd_use_case_set(): uc_mgr 0xb604b600 identifier _enadev value Speaker
02-08 13:08:06.277 222 780 D ALSADevice: switchDevice: mCurTxUCMDevivce None mCurRxDevDevice Speaker
02-08 13:08:06.289 222 779 D ALSADevice: route: devices 0x2 in mode 0
02-08 13:08:06.289 222 779 D ALSADevice: No valid input device: 0
02-08 13:08:06.289 222 779 I tfa9887 : tfa9887_power: Set amplifier power to 1
02-08 13:08:06.289 222 779 D alsa_ucm: snd_use_case_set(): uc_mgr 0xb604b600 identifier _enadev value Speaker
02-08 13:08:06.289 222 779 D ALSADevice: switchDevice: mCurTxUCMDevivce None mCurRxDevDevice Speaker
02-08 13:08:06.289 222 779 D alsa_ucm: snd_use_case_set(): uc_mgr 0xb604b600 identifier _verb value HiFi
02-08 13:08:06.289 222 779 D alsa_ucm: Set mixer controls for Speaker enable 1
02-08 13:08:06.289 222 779 D alsa_ucm: acdb_id 15 cap 1 enable 1
02-08 13:08:06.290 222 779 D alsa_ucm: Set mixer controls for HiFiSpeaker enable 1
02-08 13:08:06.290 222 779 D alsa_ucm: Setting mixer control: MI2S_RX Audio Mixer MultiMedia1, value: 1
02-08 13:08:06.290 222 779 D ALSADevice: close: handle 0xb604fa80 h 0x0
02-08 13:08:06.290 222 779 D ALSADevice: open: handle 0xb604fa80, format 0x2
02-08 13:08:06.290 222 779 D ALSADevice: Device value returned is hw:0,0
02-08 13:08:06.294 211 295 D PermissionCache: checking android.permission.READ_FRAME_BUFFER for uid=1000 => granted (152 us)
02-08 13:08:06.297 222 779 D ALSADevice: handle->format: 0x2
02-08 13:08:06.297 222 779 D ALSADevice: setHardwareParams: reqBuffSize 2048 channels 2 sampleRate 48000
02-08 13:08:06.301 222 779 D ALSADevice: setHardwareParams: buffer_size 16384, period_size 2048, period_cnt 8
02-08 13:08:06.826 617 672 V KeyguardServiceDelegate: onScreenTurnedOff()
02-08 13:08:06.834 617 672 E libEGL : call to OpenGL ES API with no current context (logged once per thread)
02-08 13:08:06.854 617 670 I DisplayManagerService: Display device changed state: "Built-in Screen", OFF
02-08 13:08:06.856 211 211 D SurfaceFlinger: Set power mode=0, type=0 flinger=0xb69a4000
02-08 13:08:06.856 211 211 D qdhwcomposer: hwc_setPowerMode: Setting mode 0 on display: 0
02-08 13:08:07.012 211 211 D qdhwcomposer: hwc_setPowerMode: Done setting mode 0 on display 0
02-08 13:08:07.012 617 828 D SurfaceControl: Excessive delay in setPowerMode(): 158ms
02-08 13:08:07.012 617 828 I QCOM PowerHAL: Got set_interactive hint
02-08 13:08:07.023 222 1263 E bt_a2dp_hw: adev_set_parameters: ERROR: set param called even when stream out is null
02-08 13:08:07.075 617 733 E native : do suspend false
02-08 13:08:07.087 617 733 D WifiConfigStore: No blacklist allowed without epno enabled
02-08 13:08:07.097 854 854 D PhoneStatusBar: disable: < expand ICONS* alerts SYSTEM_INFO* back home recent clock search quick_settings >
02-08 13:08:07.202 854 854 D PhoneStatusBar: disable: < expand ICONS alerts SYSTEM_INFO back HOME* RECENT* clock SEARCH* quick_settings >
02-08 13:08:07.220 222 222 E bt_a2dp_hw: adev_set_parameters: ERROR: set param called even when stream out is null
02-08 13:08:07.223 865 3236 D NfcService: Discovery configuration equal, not updating.
02-08 13:08:07.226 617 733 E native : do suspend true
02-08 13:08:07.535 617 733 D WifiStateMachine: L2Connected CMD_START_SCAN source -2 9, 10 -> obsolete
02-08 13:08:09.517 222 780 D ALSADevice: standby: handle 0xb604fa80 h 0x0
02-08 13:08:09.681 222 780 D alsa_ucm: snd_use_case_set(): uc_mgr 0xb604b600 identifier _verb value Inactive
02-08 13:08:09.682 222 780 D alsa_ucm: Set mixer controls for HiFiSpeaker enable 0
02-08 13:08:09.682 222 780 D alsa_ucm: Setting mixer control: MI2S_RX Audio Mixer MultiMedia1, value: 0
02-08 13:08:09.682 222 780 D alsa_ucm: snd_use_case_set(): uc_mgr 0xb604b600 identifier _disdev value Speaker
02-08 13:08:09.682 222 780 D alsa_ucm: Set mixer controls for Speaker enable 0
02-08 13:08:09.688 222 780 I tfa9887 : tfa9887_power: Set amplifier power to 0
02-08 13:08:12.851 617 733 D WifiStateMachine: L2Connected CMD_START_SCAN source -2 7, 10 -> obsolete
02-08 13:08:16.255 217 659 E NetlinkEvent: NetlinkEvent::FindParam(): Parameter 'UID' not found
02-08 13:08:19.289 617 709 I PowerManagerService: Waking up from sleep (uid 1000)...
02-08 13:08:19.290 617 617 V KeyguardServiceDelegate: onStartedWakingUp()
02-08 13:08:19.292 617 672 I DisplayPowerController: Blocking screen on until initial contents have been drawn.
02-08 13:08:19.292 617 672 V KeyguardServiceDelegate: onScreenTurnedOn(showListener = com.android.server.policy.PhoneWindowManager$2@479d91e)
02-08 13:08:19.294 617 828 I QCOM PowerHAL: Got set_interactive hint
02-08 13:08:19.294 617 670 I DisplayManagerService: Display device changed state: "Built-in Screen", ON
02-08 13:08:19.299 211 211 D SurfaceFlinger: Set power mode=2, type=0 flinger=0xb69a4000
02-08 13:08:19.299 211 211 D qdhwcomposer: hwc_setPowerMode: Setting mode 2 on display: 0
02-08 13:08:19.316 617 1522 V KeyguardServiceDelegate: **** SHOWN CALLED ****
02-08 13:08:19.342 222 783 E bt_a2dp_hw: adev_set_parameters: ERROR: set param called even when stream out is null
02-08 13:08:19.381 865 3252 D NfcService: Discovery configuration equal, not updating.
02-08 13:08:19.410 617 733 E native : do suspend false
02-08 13:08:19.419 617 733 D WifiConfigStore: No blacklist allowed without epno enabled
02-08 13:08:19.436 211 211 D qdhwcomposer: hwc_setPowerMode: Done setting mode 2 on display 0
02-08 13:08:19.440 617 828 D SurfaceControl: Excessive delay in setPowerMode(): 146ms
02-08 13:08:19.463 617 672 I DisplayPowerController: Unblocked screen on after 171 ms
02-08 13:08:19.464 617 672 V KeyguardServiceDelegate: onScreenTurnedOn()
02-08 13:08:23.614 212 1936 E QC-NETMGR-LIB: Received nl msg, recvmsg returned 56
02-08 13:08:23.615 212 594 E QC-NETMGR-LIB: Processing RTM_NEWLINK
02-08 13:08:23.615 212 594 E QC-NETMGR-LIB: Metainfo: Index=22 Family=0 Type=0x1 Change=[0x0] Flags=[0x11043]UP BROADCAST RUNNING MULTICAST LOWER_UP

Any help is very much appreciated :)