-if ! grep -q 'Usable area:' /run/platform/display/compositor.log ; then
-# e.g. qemu-system-arm takes loooong
- echo "Waiting for compositor to initialize (+60sec)."
+LOOP=20
+while test $LOOP -ge 1 ; do
+
+ ( mv /tmp/next-log /tmp/prev-log > /dev/null 2>&1 ) || true
+ journalctl /usr/bin/agl-compositor --cursor-file=/tmp/agl-screenshot-cursor > /tmp/next-log 2>&1
+ if ! grep -q 'Usable area:' /tmp/next-log ; then
+ # e.g. qemu-system-arm takes loooong
+ echo "Waiting for compositor to initialize (+60sec). Loop: $LOOP"