#!/bin/sh

# Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

trap '' USR1 TTOU TTIN
exec /usr/bin/X11/X -nolisten tcp vt01 -auth $1 2> /dev/null

#!/bin/sh

# Copyright (c) 2009 The Chromium OS Authors. All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.

trap '' USR1 TTOU TTIN
# The '-noreset' works around an apparent bug in the X server that
# makes us fail to boot sometimes; see http://crosbug.com/7578.
exec /usr/bin/X11/X -noreset -nolisten tcp vt01 -auth $1 2> /dev/null

Add -noreset to the X command line.
login_manager: Add -noreset to the X command line.

When we fail to bring up X correctly at boot, the logs
indicate that a client connects and disconnects shortly
after the X server comes up, which causes the X server to
reset its state.  I haven't seen this state reset happen
during a successful boot.

The -noreset flag tells X to avoid resetting its state when
the last client disconnects.  My best theory is that some
recent change (possibly to the Synaptics driver) made it
more likely that a client will connect and disconnect before
Chrome and the window manager open their connections to the
server, and that there's some bug in X (possibly in the
Intel video driver?  It seems strange that it's getting
reinitialized) that makes it break when the state is reset.

This is complicated by the way that the state reset that
apparently breaks things only appears to happen until the
first time that X and Chrome come up successfully.  After
this, I don't see it anymore.  As a result, the problem
often stopped appearing after I would try to apply a
potential fix for it.

Change-Id: I7e7c34567a941872fc454a55c4bf33491427e472

BUG=chromium-os:7578
TEST=built a ToT image without this change and saw that X failed to come up 5 out of 5 boots.  built a second one with the change and saw that X worked 5 out of 5 times
TBR=davemoore

Review URL: http://codereview.chromium.org/3753004
