[Sugar-devel] [PATCH] Make initial DCON unfreeze conditional on the presence of a DCON.

Michael Stone michael at laptop.org
Sun Jun 27 11:27:59 EDT 2010


Presently, Sugar tries to unfreeze the XO's secondary display controller (DCON)
regardless of whether or not a DCON is present. This generates unsightly error
messages every time Sugar starts.

To fix the problem, we test for the presence of a DCON following the advice of

   http://wiki.laptop.org/go/DCON_Linux_Driver

by testing for the existence of /sys/devices/platform/dcon.

Cc: David Farning <dfarning at gmail.com>
Signed-off-by: Michael Stone <michael at laptop.org>
---
  bin/sugar-session |    3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/bin/sugar-session b/bin/sugar-session
index cc8358c..b4a68cc 100755
--- a/bin/sugar-session
+++ b/bin/sugar-session
@@ -240,7 +240,8 @@ def main():
  
      # this must be added early, so that it executes and unfreezes the screen
      # even when we initially get blocked on the intro screen
-    gobject.idle_add(unfreeze_dcon_cb)
+    if os.path.exists("/sys/devices/platform/dcon"):
+        gobject.idle_add(unfreeze_dcon_cb)
  
      intro.check_profile()
  
-- 
1.7.1


More information about the Sugar-devel mailing list