BTRFS send/receive failed by XA2 sleeping

REPRODUCIBILITY (% or how often): 100%
BUILD ID = OS VERSION (Settings > About product): 4.0.1.48
HARDWARE (XA2, Xperia 10…): XA2
UI LANGUAGE: UK English
REGRESSION: (compared to previous public release: Yes, No, ?): N/A

DESCRIPTION:

When I send a BTRFS snapshot, it fails with ERROR: crc32 mismatch in command when the display goes to sleep.
Workaround: switch off locking, keep display on while charging, plug the phone in, then the send/receive operation works.

PRECONDITIONS:

Have a BTRFS fs (SD card works great for this), make a snapshot and attempt to send it.

STEPS TO REPRODUCE:

See Description.

EXPECTED RESULT:

Send/receive operation successful.

ACTUAL RESULT:

See Description

ADDITIONAL INFORMATION:

I suspect that the XA2 goes to sleep when it shouldn’t.
On a slightly different topic, I have noticed that when streaming music from a website (e.g., Soundcloud), the sound stops after the device had gone to sleep. I haven’t tried this too much, but happy to include this in this report if anybody else has a good way to reproduce.
@deloptes reports similar issues with Xperia X when trying to connect via Bluetooth when device’s display is off.

Look into the options for mcetool:

mcetool   -s, --set-suspend-policy=<enabled|disabled|early|disable_on_charger>

setting mcetool -searly could help with the streaming thing, -sdisabled probably helps with the btrfs send.

Thanks - I’ll give this a go, will help me automate the BTRFS issue. I would still think this could be improved though, at least I remember seeing this problem on some devices ages ago.

Just to add here that I have similar or same experience with BT connection on Xperia X. When display is locked, I can not connect. I have to unlock display to connect. It looks like the phone is going into a kind of sleep mode.