[Sony Xperia M] nidhoegg:
Hey everyone,

I'm experiencing some trouble with the Sony Xperia M (C1905, Single SIM)

I flashed TWRP on it, then flashed Lineage OS. After experiencing some problems with the sleep-of-death bug I also tried RR.

Problem with the sleep-of-death is that when my phone goes into standby it can't be woken up again. I have to take out the battery to reboot it. This only happens while running on battery, as long as USB or power cable is connected everything works fine. I tried to switch off WiFi and remove the microSD because I read it can be connected to those things. I also tried to switch off all energy saving options I could find.

This is what I get when using logcat before it crashes:

08-23 17:24:17.684 475 507 I DisplayManagerService: Display device changed state: "Integrierter Bildschirm", OFF
08-23 17:24:17.685 207 207 D SurfaceFlinger: Set power mode=0, type=0 flinger=0xb68b2000
08-23 17:24:17.697 207 207 D qdhwcomposer: hwc_setPowerMode: Setting mode 0 on display: 0
08-23 17:24:17.934 207 207 D qdhwcomposer: hwc_setPowerMode: Done setting mode 0 on display 0
08-23 17:24:17.935 475 710 D SurfaceControl: Excessive delay in setPowerMode(): 251ms
08-23 17:24:17.936 475 710 I QCOM PowerHAL: Got set_interactive hint
08-23 17:24:17.981 720 720 D PhoneStatusBar: disable: < expand ICONS alerts SYSTEM_INFO back HOME RECENT clock SEARCH quick_settings >
08-23 17:24:17.985 720 720 W FingerprintManager: isFingerprintHardwareDetected(): Service not connected!
08-23 17:24:17.991 720 720 W FingerprintManager: isFingerprintHardwareDetected(): Service not connected!
08-23 17:24:17.993 720 720 W FingerprintManager: isFingerprintHardwareDetected(): Service not connected!
08-23 17:24:18.021 228 2561 D audio_hw_primary: adev_set_parameters: enter: screen_state=off
08-23 17:24:18.098 1266 2322 I NearbyDirect: MagicPairScanner: BluetoothLeScanner is null, Bluetooth might be off. Enabled=false
08-23 17:24:18.172 475 497 I WindowManager: OverscanTimeout run
08-23 17:24:25.484 475 678 E WifiHAL : wifi_error acquire_supported_features(wifi_interface_handle, feature_set *): requestResponse Error:-95
08-23 17:24:25.487 475 499 E BatteryStatsService: no controller energy info supplied
08-23 17:24:33.722 475 678 E WifiHAL : wifi_error acquire_supported_features(wifi_interface_handle, feature_set *): requestResponse Error:-95
08-23 17:24:33.724 475 499 E BatteryStatsService: no controller energy info supplied
08-23 17:24:54.019 475 678 E WifiHAL : wifi_error acquire_supported_features(wifi_interface_handle, feature_set *): requestResponse Error:-95
08-23 17:24:54.022 475 499 E BatteryStatsService: no controller energy info supplied
08-23 17:24:54.073 475 678 E WifiHAL : wifi_error acquire_supported_features(wifi_interface_handle, feature_set *): requestResponse Error:-95
08-23 17:24:54.075 475 499 E BatteryStatsService: no controller energy info supplied
08-23 17:25:07.716 475 1004 E QMI_FW : QMUXD: WARNING qmi_qmux_if_pwr_up_init failed! rc=-1

Not sure if it's related to the sleep-of-death or not.

So I tried to flash stock ROM back to the device.

I used the "C1905_15.4.A.1.9_CE.ftf. When i flashed that after unlocking the boot loader it worked fine, now it won't flash it to the device. Flashtool gives me the following output:

24/048/2017 09:48:24 - INFO - Selected Bundle for Sony Xperia M(C1905). FW release : 15.4.A.1.9. Customization : CE
24/048/2017 09:48:24 - INFO - Preparing files for flashing
24/048/2017 09:48:29 - INFO - Please connect your device into flashmode.
24/048/2017 09:48:33 - INFO - Device disconnected
24/048/2017 09:48:43 - INFO - Device connected in flash mode
24/048/2017 09:48:43 - INFO - Opening device for R/W
24/048/2017 09:48:44 - INFO - Device ready for R/W.
24/048/2017 09:48:44 - INFO - Reading device information
24/048/2017 09:48:44 - INFO - Phone ready for flashmode operations.
24/048/2017 09:48:44 - INFO - Opening TA partition 2
24/048/2017 09:48:44 - INFO - Current device : Unknown: May 9 2014/12:58:25 - YT910WLWJM - Unknown: May 9 2014/12:58:25 - Unknown: May 9 2014/12:58:25 - Unknown: May 9 2014/12:58:25
24/048/2017 09:48:44 - INFO - Closing TA partition
24/048/2017 09:48:44 - INFO - Start Flashing
24/048/2017 09:48:44 - INFO - Processing loader.sin
24/048/2017 09:48:44 - INFO - Checking header
24/048/2017 09:48:44 - INFO - Flashing data
24/048/2017 09:48:44 - INFO - Loader : S1_Root_dbe9 - Version : loader_MSM8X30_10 / Boot version : S1_Boot_MSM_8227_5 / Bootloader status : ROOTED
24/048/2017 09:48:44 - INFO - Max packet size set to 512K
24/048/2017 09:48:44 - INFO - USB buffer size set to 512K
24/048/2017 09:48:44 - INFO - Parsing boot delivery
24/048/2017 09:48:44 - INFO - Ending flash session
24/048/2017 09:48:44 - ERROR - null
24/048/2017 09:48:44 - ERROR - Error flashing. Aborted
24/048/2017 09:48:45 - INFO - Device connected in flash mode
24/048/2017 09:48:45 - INFO - Device disconnected
24/048/2017 09:48:49 - INFO - Device connected in flash mode

So any advice on how to fix that is highly appreciated.

Thanks in advance.