Re: yaml rule to stop suspending when using gps
Klaus Kurzmann wrote: in addition to the ophonekitd bugs there was also a bug in frameworkd regarding the release of the display resource. All that should be fixed now and hit you with opkg update upgrade I'll install the new testing image when it shows up at the website then. I also have a problem with turning the backlight timeout on/off in SHR settings. Sometimes, it times out even if I have the timeout turned with the slider. I'll check if that is fixed too. Helge Hafting ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: yaml rule to stop suspending when using gps
Hi, Helge Hafting wrote: in addition to the ophonekitd bugs there was also a bug in frameworkd regarding the release of the display resource. Has the fix been sent to FSO? I'm having similar problems on FSO. After I request resource CPU / Display - yhe release does not seem to restart suspending / display dimming. Seems like your fix might sort that out too. -- View this message in context: http://n2.nabble.com/yaml-rule-to-stop-suspending-when-using-gps-tp2357555p2410291.html Sent from the Openmoko Community mailing list archive at Nabble.com. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: yaml rule to stop suspending when using gps
On Mon, Mar 2, 2009 at 17:53, c_c cchan...@yahoo.com wrote: Has the fix been sent to FSO? http://git.freesmartphone.org/?p=framework.git;a=commit;h=65ebcc86e85980827925588753f47bebf6d4a96e ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: yaml rule to stop suspending when using gps
* Helge Hafting helge.haft...@hist.no [090227 11:16]: Klaus Kurzmann wrote: org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.RequestResource Display which requests the resource until you release it. That way you can wrap for example tangogps between a call to request display and a call to release display... This is currently very fragile. yep... at least it was :-) should be fixed now. Because it didn't work at all, I upgraded SHR last night. Today, the backlight stayed on, I could see my map all the way to work. I then quit tangogps and expected the backlight to time out. It did not! So no I have a phone with the backlight stuck on, a very power hungry condition. Hm - on closer inspection I see that ophonekitd has crashed. Its resources are not released unconditionally when the process ends? I didn't notice the crash at first, because the phone works so well without. I can send and receive SMS and call out. (the new message doesn't show, but the sound is there and I can read it in the messages app.) The only thing missing is that there is no way to answer the phone when it rings. I restarted ophonekitd and tried to release the resource again. ophonekitd ended without error message, and mdbus complained: /org/shr/ophonekitd/Usage: ReleaseResource failed: org.freedesktop.DBus.Error.NoReply I hope this isn't too hard to fix. I plan on using scripts requesting the CPU for all data-gathering apps (tangogps, cellhunter) so the phone don't suspend while they are in use. And I also plan on requesting the display for mokomaze and tangogps. Because these should be on for a long time without touch input. Actually, I have two tangogps icons - one that keeps the backlight on for car navigation, and one that merely reqeust the cpu for data gathering without external power. I assume ophonekitd uses reference counting, so multiple apps can request the display/cpu at the same time? And release one after another, with suspend happening only after the last user has quit? it did not... but does now. Is there a way to check what resources are held and by who? Sort of like a ls command for resources? Is it possible to forcibly release the display so the phone can work normally again - except for the obvious reboot way? in addition to the ophonekitd bugs there was also a bug in frameworkd regarding the release of the display resource. All that should be fixed now and hit you with opkg update upgrade Helge Hafting Klaus 'mrmoku' Kurzmann ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: yaml rule to stop suspending when using gps
Klaus Kurzmann wrote: org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.RequestResource Display which requests the resource until you release it. That way you can wrap for example tangogps between a call to request display and a call to release display... This is currently very fragile. Because it didn't work at all, I upgraded SHR last night. Today, the backlight stayed on, I could see my map all the way to work. I then quit tangogps and expected the backlight to time out. It did not! So no I have a phone with the backlight stuck on, a very power hungry condition. Hm - on closer inspection I see that ophonekitd has crashed. Its resources are not released unconditionally when the process ends? I didn't notice the crash at first, because the phone works so well without. I can send and receive SMS and call out. (the new message doesn't show, but the sound is there and I can read it in the messages app.) The only thing missing is that there is no way to answer the phone when it rings. I restarted ophonekitd and tried to release the resource again. ophonekitd ended without error message, and mdbus complained: /org/shr/ophonekitd/Usage: ReleaseResource failed: org.freedesktop.DBus.Error.NoReply I hope this isn't too hard to fix. I plan on using scripts requesting the CPU for all data-gathering apps (tangogps, cellhunter) so the phone don't suspend while they are in use. And I also plan on requesting the display for mokomaze and tangogps. Because these should be on for a long time without touch input. Actually, I have two tangogps icons - one that keeps the backlight on for car navigation, and one that merely reqeust the cpu for data gathering without external power. I assume ophonekitd uses reference counting, so multiple apps can request the display/cpu at the same time? And release one after another, with suspend happening only after the last user has quit? Is there a way to check what resources are held and by who? Sort of like a ls command for resources? Is it possible to forcibly release the display so the phone can work normally again - except for the obvious reboot way? Helge Hafting ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: yaml rule to stop suspending when using gps
On Fri, Feb 27, 2009 at 11:15, Helge Hafting helge.haft...@hist.no wrote: Looks like the problem is that ophonekitd crashes from the 'unexpected' activity. We are close to release new testing image from current unstable. IMHO actually that bug is a blocker ;) So I think it will be fixed in nearly future. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: yaml rule to stop suspending when using gps
Johny Tenfinger wrote: So simply use script wrapper to tangoGPS: #!/bin/sh mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.RequestResource 'CPU' mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.RequestResource 'Display' /usr/bin/tangogps mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.ReleaseResource 'CPU' mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.ReleaseResource 'Display' I believe using dbus-send would be faster, if you think mdbus is too slow, please look at it. You also can try to run all of mdbus calls in background by adding on end of each line. I tried this, and I put the mdbus calls in the background. (tangogps was not in the background, of course.) This did not work. Tangogps appeared, but the display turned off anyway. I have already turned off power management in illume, so it shouldn't be doubly managed. At first, I guessed that when such a request is put in the background, the 'Display' resource might get claimed by the short-lived background process. And then released as this process quits. So I removed the signs, and tried again. And again the backlight was turned off. So no lasting map display. Of course, even a script without will use short-lived processes, it will merely wait on them before executing the next line. Then I tried running the commands by hand, and got this: $ mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.ReleaseResource 'Display' Service name not found Is there a typo in the example, or does shr unstable move things around a bit? Helge Hafting ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: yaml rule to stop suspending when using gps
Then I tried running the commands by hand, and got this: $ mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.ReleaseResource 'Display' Service name not found Is there a typo in the example, or does shr unstable move things around a bit?\ http://wiki.openmoko.org/wiki/User:Vanous#Navit Petr ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: yaml rule to stop suspending when using gps
On Wed, 2009-02-25 at 11:19 +0100, Helge Hafting wrote: Johny Tenfinger wrote: So simply use script wrapper to tangoGPS: #!/bin/sh mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.RequestResource 'CPU' mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.RequestResource 'Display' /usr/bin/tangogps mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.ReleaseResource 'CPU' mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.ReleaseResource 'Display' I believe using dbus-send would be faster, if you think mdbus is too slow, please look at it. You also can try to run all of mdbus calls in background by adding on end of each line. I tried this, and I put the mdbus calls in the background. (tangogps was not in the background, of course.) This did not work. Tangogps appeared, but the display turned off anyway. I have already turned off power management in illume, so it shouldn't be doubly managed. At first, I guessed that when such a request is put in the background, the 'Display' resource might get claimed by the short-lived background process. And then released as this process quits. So I removed the signs, and tried again. And again the backlight was turned off. So no lasting map display. Of course, even a script without will use short-lived processes, it will merely wait on them before executing the next line. Then I tried running the commands by hand, and got this: $ mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.ReleaseResource 'Display' Service name not found Is there a typo in the example, or does shr unstable move things around a bit? Helge Hafting Works for me on shr-unstable - however the interactions between illume, the shr settings app and external dbus calls seems to make suspend and dim actions ambiguous at times. Just got to hit on the right combination ... BillK ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: yaml rule to stop suspending when using gps
On Wed, Feb 25, 2009 at 11:19, Helge Hafting helge.haft...@hist.no wrote: Is there a typo in the example, or does shr unstable move things around a bit? No - it will not work when ophonekitd is not running :P Maybe it crashed... ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: yaml rule to stop suspending when using gps
On Sat, 21 Feb 2009 13:36:33 +0100 Johny Tenfinger seba.d...@gmail.com (JT) wrote: So simply use script wrapper to tangoGPS: #!/bin/sh mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage what is the advantage of using org.shr.ophonekitd.Usage rather then org.freesmartphone.ousaged ? We loose fso - shr compability plus this week ophonekitd seems to crash a lot more often then usual... mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage org.freesmartphone.Usage.SetResourcePolicy Display auto mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.RequestResource Display thank you -- Petr Vaněk ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: yaml rule to stop suspending when using gps
On Wed, Feb 25, 2009 at 12:58, Petr Vanek van...@penguin.cz wrote: what is the advantage of using org.shr.ophonekitd.Usage rather then org.freesmartphone.ousaged ? We loose fso - shr compability plus this week ophonekitd seems to crash a lot more often then usual... You shouldn't set resource policy to enabled or disabled manually - what will happen, when another app will request that resource too? ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: yaml rule to stop suspending when using gps
On Wed, 25 Feb 2009 13:03:56 +0100 Johny Tenfinger seba.d...@gmail.com (JT) wrote: On Wed, Feb 25, 2009 at 12:58, Petr Vanek van...@penguin.cz wrote: what is the advantage of using org.shr.ophonekitd.Usage rather then org.freesmartphone.ousaged ? We loose fso - shr compability plus this week ophonekitd seems to crash a lot more often then usual... You shouldn't set resource policy to enabled or disabled manually - what will happen, when another app will request that resource too? I don't know what would happen, but i think that any app can request a resource before another... especially in the case of display or cpu, or? (run navigation and then music player) mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage org.freesmartphone.Usage.SetResourcePolicy Display enabled org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.RequestResource Display For example the above gives no problems to get the resource. but by simply running the bellow twice i get the ophonekitd to crash: mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.RequestResource Display -- Petr Vaněk ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: yaml rule to stop suspending when using gps
* Petr Vanek van...@penguin.cz [090225 13:33]: On Wed, 25 Feb 2009 13:03:56 +0100 Johny Tenfinger seba.d...@gmail.com (JT) wrote: On Wed, Feb 25, 2009 at 12:58, Petr Vanek van...@penguin.cz wrote: what is the advantage of using org.shr.ophonekitd.Usage rather then org.freesmartphone.ousaged ? We loose fso - shr compability plus this week ophonekitd seems to crash a lot more often then usual... You shouldn't set resource policy to enabled or disabled manually - what will happen, when another app will request that resource too? I don't know what would happen, but i think that any app can request a resource before another... especially in the case of display or cpu, or? (run navigation and then music player) mdbus -s org.freesmartphone.ousaged /org/freesmartphone/Usage org.freesmartphone.Usage.SetResourcePolicy Display enabled this sets the resource policy and is not what you should do. org.freesmartphone.Usage.RequestResource is what you should use. And because that requires to keep the program running that requested a resource there is org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.RequestResource Display which requests the resource until you release it. That way you can wrap for example tangogps between a call to request display and a call to release display... For example the above gives no problems to get the resource. but by simply running the bellow twice i get the ophonekitd to crash: mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.RequestResource Display That is an error in ophonekitd then... will try to fix it. mrmoku ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: yaml rule to stop suspending when using gps
org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.RequestResource Display which requests the resource until you release it. That way you can wrap for example tangogps between a call to request display and a call to release display... i perfectly understand, thank you. so the ophonekitd works as a semafor holder and executor... wouldn't it make sense to have such a daemon common for shr and fso? As soon as om starts releasing their distro based on fso all our scripting will be useless and shr related only... which is pitty imho ([shr]-settings could then be used anywhere on fso based system otherwise...) -- Petr Vaněk ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: yaml rule to stop suspending when using gps
Now you can enable and disable auto-suspending and auto-dimming in shr-settings (under Power settings there are two toggles). ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: yaml rule to stop suspending when using gps
On Saturday 21 February 2009, Johny Tenfinger wrote: Now you can enable and disable auto-suspending and auto-dimming in shr-settings (under Power settings there are two toggles). That's the answer to a different question though. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: yaml rule to stop suspending when using gps
Tkx, but what I was hoping for was a way to say If tangogps is running, dont turn screen off or suspend, even if on battery If I am using gps, there are two scenarios - I am using it to navigate hence I am looking at the screen, or I am waiting for a lock. Having it continually dimming or suspending might be desirable to save battery life, but its REALLY annoying when on the bike :) It would be much nicer if the FR could put itself into the correct configuration automaticly, not for me to open the settings, then open power, then change the settings, only to go through the whole rigmorole again when Ive finished with gps If yaml wont do it, might have to resort to perl and dbus BillK On Sat, 2009-02-21 at 13:16 +0100, Johny Tenfinger wrote: Now you can enable and disable auto-suspending and auto-dimming in shr-settings (under Power settings there are two toggles). ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community -- William Kenworthy bi...@iinet.net.au Home in Perth! ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: yaml rule to stop suspending when using gps
So simply use script wrapper to tangoGPS: #!/bin/sh mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.RequestResource 'CPU' mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.RequestResource 'Display' /usr/bin/tangogps mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.ReleaseResource 'CPU' mdbus -s org.shr.ophonekitd.Usage /org/shr/ophonekitd/Usage org.shr.ophonekitd.Usage.ReleaseResource 'Display' I believe using dbus-send would be faster, if you think mdbus is too slow, please look at it. You also can try to run all of mdbus calls in background by adding on end of each line. dos ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: yaml rule to stop suspending when using gps
On Sat, Feb 21, 2009 at 13:36, Johny Tenfinger seba.d...@gmail.com wrote: So simply use script wrapper to tangoGPS: Eh, line wrapping... Without #!/bin/sh there are only five lines. I hope you will read it correctly ;) ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: yaml rule to stop suspending when using gps
Thanks for the dbus lines - saved me some research to find them! does the mdbus calls work for you with a recent frameworkd (ie ms5)? every attempt to do something like this dies on my debian/fso with an auth error -- be i root or not. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community
Re: yaml rule to stop suspending when using gps
To my knowledge, there is no specific action available to the oevents subsystem of frameworkd that would allow one to set up a rule in rules.yaml (maybe I am wrong). However, newer frameworkd's have resource requesting that will allow one to request CPU resource which will stop frameworkd from suspending. It is not hard to implement, especially in python. Take a look at code in my updates to pythm (opkg.org) for an example. You will want backend/backend.py. You could either implement this in the application directly, or perhaps make a wrapper for it. On Sat, Feb 21, 2009 at 7:55 AM, Johny Tenfinger seba.d...@gmail.com wrote: On Sat, Feb 21, 2009 at 13:48, arne anka openm...@ginguppin.de wrote: Thanks for the dbus lines - saved me some research to find them! does the mdbus calls work for you with a recent frameworkd (ie ms5)? every attempt to do something like this dies on my debian/fso with an auth error -- be i root or not. To me on shr-unstable it works. ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community -- Dylan Maxwell Reilly ___ Openmoko community mailing list community@lists.openmoko.org http://lists.openmoko.org/mailman/listinfo/community