[Galaxy S 4 i9505 Original Android Development] kovjanos:
Another piece of logs:

Scenario: device configured to keep screen on while on charger. Fully charged, USB still attached, turning screen off with power button.

Result: no response on keys, adb disconnects. Only long press power button to restart is the option.

23:44:14.816 Info PowerManagerService 618 Going to sleep due to power button (uid 1000)...
23:44:14.816 Error Sensors 618 Acc old sensor_state 2049, new sensor_state : 2048 en : 0
23:44:14.816 Info PowerManagerService 618 Sleeping (uid 1000)...
23:44:14.923 Debug PhoneStatusBar 741 disable: < expand ICONS* alerts SYSTEM_INFO* back home recent clock search >
23:44:14.923 Info Adreno-EGL 618 <qeglDrvAPI_eglInitialize:410>: EGL 1.4 QUALCOMM build: AU_LINUX_ANDROID_LA.AF.1.1.04.04.03.164.081_msm8960_LA.AF.1.1__release_AU ()
23:44:14.923 Info Adreno-EGL 618 OpenGL ES Shader Compiler Version: E031.25.01.03
23:44:14.923 Info Adreno-EGL 618 Build Date: 11/02/14 Sun
23:44:14.923 Info Adreno-EGL 618 Local Branch: mybranch5454281
23:44:14.923 Info Adreno-EGL 618 Remote Branch: quic/l_LNX.LA.3.6
23:44:14.923 Info Adreno-EGL 618 Local Patches: NONE
23:44:14.923 Info Adreno-EGL 618 Reconstruct Branch: AU_LINUX_ANDROID_LA.AF.1.1.04.04.03.164.081 + db92d1e + cb8de02 + NOTHING
23:44:14.924 Debug BluetoothAdapter 741 629357818: getState() : mService = null. Returning STATE_OFF
23:44:14.924 Debug BluetoothAdapter 741 629357818: getState() : mService = null. Returning STATE_OFF
23:44:14.924 Debug BluetoothAdapter 741 629357818: getState() : mService = null. Returning STATE_OFF
23:44:14.924 Debug BluetoothAdapter 741 629357818: getState() : mService = null. Returning STATE_OFF
23:44:14.924 Warning Settings 741 Setting airplane_mode_on has moved from android.provider.Settings.System to android.provider.Settings.Global, returning read-only value.
23:44:14.924 Error native 618 do suspend false
23:44:15.034 Debug StatusBar.NetworkController 741 refreshViews: Data not connected!! Set no data type icon / Roaming
23:44:15.034 Debug BrcmNfcJni 981 RoutingManager::nfaEeCallback: NFA_EE_SET_PROTO_CFG_EVT; status=0x0
23:44:15.034 Debug BrcmNfcJni 981 RoutingManager::commitRouting
23:44:15.034 Debug PhoneStatusBar 741 disable: < expand ICONS alerts SYSTEM_INFO back HOME* RECENT* clock SEARCH* >
23:44:15.034 Debug BrcmNfcJni 981 RoutingManager::nfaEeCallback: NFA_EE_UPDATED_EVT
23:44:15.146 Debug WifiService 618 acquireWifiLockLocked: WifiLock{NlpWifiLock type=2 binder=android.os.BinderProxy@106443b6}
23:44:15.146 Error WifiStateMachine 618 WifiStateMachine CMD_START_SCAN source 10018 txSuccessRate=0.64 rxSuccessRate=0.78 targetRoamBSSID=d4:ca:6d:1c:58:6b RSSI=-72
23:44:15.146 Debug PhoneApp 999 getPhone phoneId:0
23:44:15.146 Debug PhoneApp 999 getPhone phoneId:0
23:44:15.146 Info wpa_supplicant 729 wlan0: CTRL-EVENT-SCAN-STARTED
23:44:15.146 Debug PhoneApp 999 getPhone phoneId:0
23:44:15.146 Debug PhoneApp 999 getPhone phoneId:0
23:44:15.146 Error native 618 do suspend true
23:44:15.253 Info Cleaner 3322 Cleaner check spent 12ms (5ms)
23:44:15.253 Info Cleaner 3322 Schedule hibernation in 180s : [com.joelapenna.foursquared, net.zedge.android]
23:44:15.469 Info DisplayManagerService 618 Display device changed: DisplayDeviceInfo{"Built-in Screen": 1080 x 1920, 60.0 fps, supportedRefreshRates [60.0], density 400, 442.451 x 439.351 dpi, appVsyncOff 0, presDeadline 17666667, touch INTERNAL, rotation 0, type BUILT_IN, state OFF, FLAG_DEFAULT_DISPLAY, FLAG_ROTATES_WITH_CONTENT, FLAG_SECURE, FLAG_SUPPORTS_PROTECTED_BUFFERS}
23:44:15.469 Verbose ActivityManager 618 Display changed displayId=0
23:44:15.469 Debug SurfaceFlinger 210 Set power mode=0, type=0 flinger=0xb6a62000
23:44:15.469 Debug qdhwcomposer 210 hwc_blank: Blanking display: 0
23:44:15.469 Info wpa_supplicant 729 wlan0: WPA: Group rekeying completed with d4:ca:6d:1c:58:6b [GTK=CCMP]
23:44:15.580 Debug qdhwcomposer 210 hwc_blank: Done blanking display: 0
23:44:15.580 Info QCOM PowerHAL 618 Got set_interactive hint
23:44:15.580 Debug StatusBar.NetworkController 741 refreshViews: Data not connected!! Set no data type icon / Roaming
23:44:18.526 Warning GAV4 1421 Thread[Thread-104,5,main]: Exception sending hit: HttpHostConnectException
23:44:18.526 Warning GAV4 1421 Thread[Thread-104,5,main]: Connection to https://ssl.google-analytics.com refused
23:44:18.526 Warning GAV4 1421 Thread[Thread-104,5,main]: Empty hitIds passed to deleteHits.

Let me know if other logs/tests required...

R, JK.