Stopping services and the client shell before restarting the compositor,
would avoid some large delays until the new compositor instance
is brought up.
With this approach, were we stop explicitly the client shell and the
launcher, we're basically have a hard stop, and should avoid those huge
delays for qemu-arm. Until we can confirm this is the case, we still
maintain that delay.
Signed-off-by: Marius Vlad <marius.vlad@collabora.com>
Change-Id: Ifa067ac40de162291d7d6cfb70035e87add07220
# create initial journal cursor file
journalctl /usr/bin/agl-compositor --cursor-file=/tmp/agl-screenshot-cursor > /tmp/first-log 2>&1
# create initial journal cursor file
journalctl /usr/bin/agl-compositor --cursor-file=/tmp/agl-screenshot-cursor > /tmp/first-log 2>&1
-# restart weston@display
-#systemctl restart weston.service
-systemctl restart agl-session@agl-driver.service
+# stop homescreen (shell) and launcher
+su $AGLDRIVER -c 'XDG_RUNTIME_DIR=/run/user/1001/ DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus systemctl --user stop homescreen'
+su $AGLDRIVER -c 'XDG_RUNTIME_DIR=/run/user/1001/ DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus systemctl --user stop launcher'
+# restart agl-compositor
+su $AGLDRIVER -c 'XDG_RUNTIME_DIR=/run/user/1001/ DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus systemctl --user restart agl-compositor'
+su $AGLDRIVER -c 'XDG_RUNTIME_DIR=/run/user/1001/ DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus systemctl --user start homescreen'
+su $AGLDRIVER -c 'XDG_RUNTIME_DIR=/run/user/1001/ DBUS_SESSION_BUS_ADDRESS=unix:path=/run/user/1001/bus systemctl --user start launcher'
# e.g. qemu-system-arm takes loooong
sleep 10
# e.g. qemu-system-arm takes loooong
sleep 10