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

2010-06-27 Thread Michael Stone
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 dfarn...@gmail.com
Signed-off-by: Michael Stone mich...@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
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


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

2010-06-27 Thread Sascha Silbe
Excerpts from Michael Stone's message of Sun Jun 27 17:27:59 +0200 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.
Does anyone use (or is going to use) OHM with Sugar  0.88? If not, we should
just throw out this code - powerd doesn't provide the OHM API.
Any future support for unfreezing the DCON should try to align to the
Gnome way - IIRC they discussed sending a DBus signal once the desktop is
uprunning (to which powerd could be listening); maybe they have specified
or even implemented that by now.

Sascha

--
http://sascha.silbe.org/
http://www.infra-silbe.de/


signature.asc
Description: PGP signature
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


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

2010-06-27 Thread Daniel Drake
On 27 June 2010 11:21, Sascha Silbe sascha-ml-ui-sugar-de...@silbe.org wrote:
 Does anyone use (or is going to use) OHM with Sugar  0.88? If not, we should
 just throw out this code - powerd doesn't provide the OHM API.

powerd could implement it trivially, and should. (with a simple binary
using dbus activation)

The lack of this functionality causes the XO-1 bootup sequence to be
uncomfortably interrupted with a black screen when powerd unfreezes
too early. We should fix this and I think the above approach is the
best way.

 Any future support for unfreezing the DCON should try to align to the
 Gnome way - IIRC they discussed sending a DBus signal once the desktop is
 uprunning (to which powerd could be listening); maybe they have specified
 or even implemented that by now.

This sounds like exactly what we have already.

Daniel
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


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

2010-06-27 Thread Sascha Silbe
Excerpts from Daniel Drake's message of Sun Jun 27 18:30:02 +0200 2010:

 On 27 June 2010 11:21, Sascha Silbe sascha-ml-ui-sugar-de...@silbe.org 
 wrote:
  Does anyone use (or is going to use) OHM with Sugar  0.88? If not, we 
  should
  just throw out this code - powerd doesn't provide the OHM API.
 powerd could implement it trivially, and should. (with a simple binary
 using dbus activation)

 The lack of this functionality causes the XO-1 bootup sequence to be
 uncomfortably interrupted with a black screen when powerd unfreezes
 too early.

No disagreement here. But if we touch the code (on the Sugar side), it
should be to make it more hardware-agnostic, not less. While OHM itself
is XO-specific, any software can implement its API. Adding a check for a
sysfs file restricts the functionality to the XO hardware.

For reference:
Gnome-session (version 2.30) sends a SessionRunning signal [2] to the
D-Bus session bus [1].
Ubuntu 10.04 uses GDM scripts to emit an Upstart signal:

r...@elaine:/# tail -n 1 /etc/gdm/PreSession/Default
/sbin/initctl -q emit desktop-session-start DISPLAY_MANAGER=gdm


Sascha

[1] 
http://live.gnome.org/SessionManagement/GnomeSession#Relationship_to_D-Bus_Session_Bus
[2] 
http://people.gnome.org/~mccann/gnome-session/docs/gnome-session.html#org.gnome.SessionManager::SessionRunning
[3] http://ubuntuforums.org/archive/index.php/t-1299587.html
--
http://sascha.silbe.org/
http://www.infra-silbe.de/


signature.asc
Description: PGP signature
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


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

2010-06-27 Thread Paul Fox
daniel wrote:
  On 27 June 2010 11:21, Sascha Silbe sascha-ml-ui-sugar-de...@silbe.org 
  wrote:
   Does anyone use (or is going to use) OHM with Sugar  0.88? If not, we 
   should
   just throw out this code - powerd doesn't provide the OHM API.
  
  powerd could implement it trivially, and should. (with a simple binary
  using dbus activation)

i agree.  i'd welcome a powerd patch for this -- i think it would
take the form of a helper executable that listened for dbus
control messages, and informed powerd via its usual event mechanism.

  
  The lack of this functionality causes the XO-1 bootup sequence to be
  uncomfortably interrupted with a black screen when powerd unfreezes
  too early. We should fix this and I think the above approach is the
  best way.

in the short term the timer that powerd currently uses could be
adjusted, but clearly that's not a real solution.

  
   Any future support for unfreezing the DCON should try to align to the
   Gnome way - IIRC they discussed sending a DBus signal once the desktop is
   uprunning (to which powerd could be listening); maybe they have specified
   or even implemented that by now.
  
  This sounds like exactly what we have already.

except that the the current calls are pretty ohm-specific, aren't they?
(i haven't looked at them in a while.)

paul
=-
 paul fox, p...@laptop.org
___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel


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

2010-06-27 Thread Bernie Innocenti
El Sun, 27-06-2010 a las 18:21 +0200, Sascha Silbe escribió:
 Excerpts from Michael Stone's message of Sun Jun 27 17:27:59 +0200 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.
 Does anyone use (or is going to use) OHM with Sugar  0.88? If not, we should
 just throw out this code - powerd doesn't provide the OHM API.

This explains why I get this error also on the XO-1 :-)

We switched to powerd over one month ago and I doubt we or OLPC will
ever want to go back.

In other words, a patch to throw away the OHM support would be indeed
welcome!

-- 
   // Bernie Innocenti - http://codewiz.org/
 \X/  Sugar Labs   - http://sugarlabs.org/

___
Sugar-devel mailing list
Sugar-devel@lists.sugarlabs.org
http://lists.sugarlabs.org/listinfo/sugar-devel