Appium leaves android device in an unresponseive state after a test completes

The same problem here, but this problem is not depending of locking screen.

Nexus 6 (Motorola)
Android 5.1
Appium 1.3.7, 1.4.0
Windows 7 x64
Ruby
appium_console (1.0.4, 1.0.3)
appium_lib (7.0.0, 6.0.0)

After some time of doing nothing (30 min or more), sometimes device start working! There may be error from application, like “App isn’t respondind, do you want to close it?”, or application is closed or is in initial screen.

This “black screen” sometimes is when tests failed because of exception in application, but sometimes without any reason, in the middle of testing.

When I run the same tests on the same application, but on different device (Samsung Galaxy S5 Android 5.0, HTC Sense 6.0 Android 5.0.1 etc.) - it works without “black screen”.

Something is wrong with Nexus???