Merge lp:~robert-ancell/lightdm/sys-comp-timeout into lp:~mir-team/lightdm/unity

Proposed by Robert Ancell
Status: Merged
Approved by: Robert Ancell
Approved revision: 1615
Merged at revision: 1615
Proposed branch: lp:~robert-ancell/lightdm/sys-comp-timeout
Merge into: lp:~mir-team/lightdm/unity
Diff against target: 101 lines (+34/-17)
3 files modified
src/seat-unity.c (+10/-7)
tests/scripts/unity-compositor-fail-ready.conf (+23/-9)
tests/scripts/unity-compositor-fail-start.conf (+1/-1)
To merge this branch: bzr merge lp:~robert-ancell/lightdm/sys-comp-timeout
Reviewer Review Type Date Requested Status
Robert Ancell Approve
PS Jenkins bot (community) continuous-integration Approve
Review via email: mp+169978@code.launchpad.net

Commit message

Use VT switching if system compositor times out

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)
Revision history for this message
Robert Ancell (robert-ancell) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/seat-unity.c'
2--- src/seat-unity.c 2013-05-31 04:31:49 +0000
3+++ src/seat-unity.c 2013-06-18 03:22:25 +0000
4@@ -282,11 +282,10 @@
5 static gboolean
6 compositor_timeout_cb (gpointer data)
7 {
8- Seat *seat = data;
9-
10- g_debug ("Compositor failed to start");
11-
12- seat_stop (seat);
13+ SeatUnity *seat = data;
14+
15+ /* Stop the compositor - it is not working */
16+ process_stop (seat->priv->compositor_process);
17
18 return TRUE;
19 }
20@@ -296,6 +295,7 @@
21 {
22 gchar *command, *absolute_command, *dir;
23 gboolean result;
24+ int timeout;
25
26 /* Replace Plymouth if it is running */
27 if (plymouth_get_is_active () && plymouth_has_active_vt ())
28@@ -363,8 +363,11 @@
29 return FALSE;
30
31 /* Connect to the compositor */
32- g_debug ("Waiting for system compositor");
33- SEAT_UNITY (seat)->priv->compositor_timeout = g_timeout_add (5000, compositor_timeout_cb, seat);
34+ timeout = seat_get_integer_property (seat, "unity-compositor-timeout");
35+ if (timeout <= 0)
36+ timeout = 5;
37+ g_debug ("Waiting for system compositor for %ds", timeout);
38+ SEAT_UNITY (seat)->priv->compositor_timeout = g_timeout_add (timeout * 1000, compositor_timeout_cb, seat);
39
40 return TRUE;
41 }
42
43=== modified file 'tests/scripts/unity-compositor-fail-ready.conf'
44--- tests/scripts/unity-compositor-fail-ready.conf 2013-05-20 05:20:45 +0000
45+++ tests/scripts/unity-compositor-fail-ready.conf 2013-06-18 03:22:25 +0000
46@@ -1,21 +1,35 @@
47 #
48-# Check quits when the compositor fails to indicate it is ready
49+# Check falls back to VT switching when the compositor fails to indicate it is ready
50 #
51
52-# Increase timeout as LightDM waits a long time for the system compositor to start
53-[test-runner-config]
54-timeout=10
55-
56 [SeatDefaults]
57 type=unity
58+unity-compositor-timeout=1
59
60 #?RUNNER DAEMON-START
61
62 # System compositor starts but doesn't indicate it is ready
63 #?UNITY-SYSTEM-COMPOSITOR START
64
65+# Timeout and compositor is stopped
66+#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
67+
68+# X server starts in VT mode
69+#?XSERVER-0 START
70+#?XSERVER-0 INDICATE-READY
71+
72+# LightDM connects to X server
73+#?XSERVER-0 ACCEPT-CONNECT
74+
75+# Greeter starts
76+#?GREETER-X-0 START
77+#?XSERVER-0 ACCEPT-CONNECT
78+#?GREETER-X-0 CONNECT-XSERVER
79+#?GREETER-X-0 CONNECT-TO-DAEMON
80+#?GREETER-X-0 CONNECTED-TO-DAEMON
81+
82 # Cleanup
83-#?UNITY-SYSTEM-COMPOSITOR TERMINATE SIGNAL=15
84-
85-# Daemon stops with error
86-#?RUNNER DAEMON-EXIT STATUS=1
87+#?*STOP-DAEMON
88+#?GREETER-X-0 TERMINATE SIGNAL=15
89+#?XSERVER-0 TERMINATE SIGNAL=15
90+#?RUNNER DAEMON-EXIT STATUS=0
91
92=== modified file 'tests/scripts/unity-compositor-fail-start.conf'
93--- tests/scripts/unity-compositor-fail-start.conf 2013-05-31 02:36:50 +0000
94+++ tests/scripts/unity-compositor-fail-start.conf 2013-06-18 03:22:25 +0000
95@@ -1,5 +1,5 @@
96 #
97-# Check falls back to VT swithcing when the compositor fails to start
98+# Check falls back to VT switching when the compositor fails to start
99 #
100
101 [unity-system-compositor-config]

Subscribers

People subscribed via source and target branches