Hello,

on a Linux system (with ACPI) it is possible to invoke a suspend through

echo -n mem > /sys/power/state

(see http://ols.fedoraproject.org/OLS/Reprints-2008/brown-reprint.pdf (chapter 
5, 6th page 42);
 http://www.linux.com/articles/54610, 
http://acpi.sourceforge.net/documentation/sleep.html,
 http://www.columbia.edu/~ariel/acpi/acpi_howto.txt (section 23.2),
 
http://www.linux-magazin.de/heft_abo/ausgaben/2004/02/einschlaf_hilfen/(offset)/2
 (german),...)

Qt Extended on the Neo Freerunner
(http://moko.mwester.net/download/uImage-gta02-g291a9d50_mwester-stable.bin +
 
http://other.lastnetwork.net/OpenMoko/qtextended-4.4.2-gta02-rootfs-release-working-with-SystemRingTones.jffs2)
seems to be APM based
(/sys/power/state is also present and `echo mem > /sys/power/state` works)
and `cat /proc/apm` shows some information.
Working on a console (if you have one, which is not default for QtExtended), 
section 12.18.8.1.1
of 
http://www.uibk.ac.at/linuxdoc/LDP/LDP/Mobile-Guide/html/mobile-guide-p2c1s8-apm.html
shows a nice way to keep an eye on the battery state through the command prompt:
export PS1="\$(cat /proc/apm | awk '{print \$7}') \h:\w\$ "
Invoking a suspend on a APM based systems can be done with

apm -s

I noticed /etc/apm/suspend.d/gsm_suspend, which executes
echo "1" >/sys/devices/platform/neo1973-pm-gsm.0/flowcontrolled
Is this also needed for a proper suspend? (It seems to work without that.)


In contrast to the information about e.g. how to turn on/off LEDs 
(http://wiki.openmoko.org/wiki/FreeRunner/Buttons_and_LEDs)
I didn't find this in the OpenMoko Wiki. Maybe because OpenMoko offers the
"Ompower" Power management daemon:

http://wiki.openmoko.org/wiki/Ompower

This service seems not to be available for QtExtended:

r...@om-gta02:~# dbus-send --system --print-reply --dest=org.openmoko.Power / 
org.openmoko.Power.Core.ListResources
Error org.freedesktop.DBus.Error.ServiceUnknown: The name org.openmoko.Power 
was not provided by any .service files

which is not astonishing since
"ompower is a suspend handling daemon talking dbus installed by default since 
Om 2008.8"
but apparently not by QtExtended (and /usr/share/dbus-1/services/ is empty).

QtExtended offers (formerly QCop and now Qtopia IPC based) services 
(http://doc.trolltech.com/qtextended4.4/services.html),
which include a pre-defined suspend service 
(http://doc.trolltech.com/qtextended4.4/suspendservice.html)
(also cmp. /opt/Trolltech/Qtopia/services)
The qcop command-line tool 
(http://doc.trolltech.com/qtextended4.4/qcop-tool.html) should also be capable 
to do the job:
export LD_LIBRARY_PATH=/opt/Trolltech/Qtopia/lib
export PATH=/opt/Trolltech/Qtopia/bin:$PATH

qcop service send Suspend 'suspend()'


There might be more ways to do a suspend...


What is the proper way to suspend the Freerunner for QtExtended?
(Probably the last one. But is there more to be done?)

The next question will be how to configure the lock icon (padlock.png for finxi)
on the home screen (the rightmost icon on the bottom) to be connected with the
suspend command/service... (instead of Screen Lock)

Thanks,
        Martin Bernreuther
-- 
Martin Bernreuther      martinb...@web.de

_______________________________________________
Openmoko community mailing list
community@lists.openmoko.org
http://lists.openmoko.org/mailman/listinfo/community

Reply via email to