It seems the culprit is actually some unpolishedinteraction between powerd, earlysuspend and mir.
When turning the screen off, the earlysuspend state is set through powerd. See libsuspend/ in powerd for the details, but effectively on nexus 4 this ends up writing "mem" to /sys/power/state. This seems to turn off the display itself!
You can observe:
echo "mem" > /sys/power/state
mir/integration-tests # Fails to post to FB device
cat /sys/power/wait_for_fb_wake # Will Block Indefinitely
On the other hand
echo "on" > /sys/power/state
mir/integration-tests: Suceeeds
cat /sys/power/wait_for_fb_wake # Returns immediately
Trying to work out how to best coordinate a fix. As a work around, we could of course just run "powerd-cli active" during the mir tests, to ensure we keep have this "on" state.
Did some more digging.
It seems the culprit is actually some unpolishedinter action between powerd, earlysuspend and mir.
When turning the screen off, the earlysuspend state is set through powerd. See libsuspend/ in powerd for the details, but effectively on nexus 4 this ends up writing "mem" to /sys/power/state. This seems to turn off the display itself!
You can observe: -tests # Fails to post to FB device wait_for_ fb_wake # Will Block Indefinitely
echo "mem" > /sys/power/state
mir/integration
cat /sys/power/
On the other hand -tests: Suceeeds wait_for_ fb_wake # Returns immediately
echo "on" > /sys/power/state
mir/integration
cat /sys/power/
Trying to work out how to best coordinate a fix. As a work around, we could of course just run "powerd-cli active" during the mir tests, to ensure we keep have this "on" state.