Opened 5 years ago

Closed 5 years ago

Last modified 21 months ago

#11437 closed defect (fixed)

power icon missing from Sugar My Settings

Reported by: Quozl Owned by: erikos
Priority: high Milestone:
Component: sugar Version: Development build as of this date
Keywords: Cc: tabitha
Blocked By: Blocking:
Deployments affected: Action Needed: test in build
Verified: no


Reported by Kevin Gordon, the power icon is not present in My Settings on os10 on XO-1.75.

Change History (14)

comment:1 Changed 5 years ago by greenfeld

It looks like there is a check for '/ofw' to be present in jarabe/controlpanel/ on line 132 in os883 (sugar-0.94.1-1).

If this path is not found, the power control panel appears to be removed from the list of available options.

comment:2 Changed 5 years ago by Quozl

  • Action Needed changed from diagnose to code

Thanks. Related to incomplete task ticket #11116.

comment:3 Changed 5 years ago by tabitha

  • Cc tabitha added

comment:4 Changed 5 years ago by martin.langhoff

Can we get a good old grep across sugar + sugar toolkit to ensure we got all references to /ofw under control?

comment:5 Changed 5 years ago by Quozl

Yes, I did an [ apparently wasted ;-) ] recursive grep three months ago and listed the results in a comment on #11116. There's even activities that use /ofw.

comment:6 Changed 5 years ago by erikos

So in the control panel we displayed the power icon if the machine is an XO (we asumed that if '/ofw' is present that would be the case), with the 1.75 this fails. We have several options:

  • make another check based on '/ofw' and '/proc/device-tree' (maybe if 'mfg-data/SN' is present we can say it is an XO)
  • do get the xo version ('/proc/device-tree/banner-name','/sys/class/dmi/id/product_version', '/ofw/banner-name' ) and determine that way it is an XO

probably more long term:

  • maybe the power extension should be an olpc package and the upstream code should be removed
  • make the section more generic (whatever that exactly looks like)

comment:7 Changed 5 years ago by pgf

all of the version info is encapsulated in /usr/bin/olpc-hwinfo. please use that if possible.

comment:8 Changed 5 years ago by erikos

  • Action Needed changed from code to review

Sent a patch to sugar-devel that checks if powerd is available to determine if the power section is displayed or
not (we have the same check in the control panel section). As far as I have seen all of our hardware (1-1.75) is using powerd today.

diff --git a/src/jarabe/controlpanel/ b/src/jarabe/controlpanel/
index 2f55951..46810aa 100644
--- a/src/jarabe/controlpanel/
+++ b/src/jarabe/controlpanel/
@@ -30,6 +30,7 @@ from jarabe.controlpanel.toolbar import MainToolbar
 from jarabe.controlpanel.toolbar import SectionToolbar
 from jarabe import config
+POWERD_FLAG_DIR = '/etc/powerd/flags'
 _logger = logging.getLogger('ControlPanel')
@@ -129,7 +130,7 @@ class ControlPanel(gtk.Window):
     def _setup_options(self):
-        if not os.path.exists('/ofw'):
+        if not os.access(POWERD_FLAG_DIR, os.W_OK):
             del self._options['power']

comment:9 Changed 5 years ago by erikos

Finally, the mail appeared as well. I had something wrong in my git config :/

patch under review:

comment:10 Changed 5 years ago by erikos

  • Action Needed changed from review to package

comment:11 Changed 5 years ago by erikos

  • Action Needed changed from package to add to build

I have uploaded a patched rpm, only containing the fix layed out in this ticket.


Has been tested on the xo-1 and xo-1.75.

comment:12 Changed 5 years ago by martin.langhoff

  • Action Needed changed from add to build to test in build

Test in build OS16 and onwards.

comment:13 Changed 5 years ago by tabitha

  • Resolution set to fixed
  • Status changed from new to closed

Tested on OS16 and the power icon is back.

comment:14 Changed 21 months ago by Quozl

  • Milestone 1.75-software deleted

Milestone 1.75-software deleted

Note: See TracTickets for help on using tickets.