Hi, Seems like my last post got badly mangled. Here's the corrected post.
I've used Request Resource (Display and CPU) to prevent display dimming and suspend during usage in guitartuner. I am using the following C code :- char *resource = "CPU"; proxy = dbus_g_proxy_new_for_name (connection, "org.freesmartphone.ousaged", "/org/freesmartphone/Usage", "org.freesmartphone.Usage"); call = dbus_g_proxy_begin_call (proxy, "RequestResource", NULL, NULL, NULL, G_TYPE_STRING, resource, G_TYPE_INVALID); dbus_g_proxy_end_call (proxy, call, &error, G_TYPE_INVALID); Then, I change the value of resource to "Display" and repeat the call. In the log I get :- Feb 11 07:44:20 om-gta02 user.info frameworkd.resource INFO setting resource status for CPU from disabled to enabling Feb 11 07:44:20 om-gta02 user.info frameworkd.resource INFO setting resource status for CPU from enabling to enabled Feb 11 07:44:20 om-gta02 user.info ousaged INFO Enabled CPU in 0.1 seconds Feb 11 07:44:20 om-gta02 user.info oeventsd.action INFO signal RequestResource responded : () and Feb 11 07:44:45 om-gta02 user.info frameworkd.resource INFO setting resource status for Display from disabled to enabling Feb 11 07:44:45 om-gta02 user.info frameworkd.resource INFO setting resource status for Display from enabling to enabled Feb 11 07:44:45 om-gta02 user.info ousaged INFO Enabled Display in 0.1 seconds Feb 11 07:44:47 om-gta02 user.info oeventsd.action INFO signal SetBrightness responded : () On quitting the program I release the resources using similar code except for changing the method to ReleaseResource. The log shows :- Feb 11 07:46:39 om-gta02 user.info frameworkd.resource INFO setting resource status for Display from enabled to disabling Feb 11 07:46:39 om-gta02 user.info odeviced.idlenotifier INFO odeviced.idlenotifier state change to busy Feb 11 07:46:39 om-gta02 user.info frameworkd.resource INFO setting resource status for Display from disabling to disabled I'm assuming that the resource CPU was not released since the freerunner was connected to my laptop and charging (and I'm using the following additional rule in rules.yaml) :- while: PowerStatus() filters: Not(HasAttr(status, "discharging")) actions: OccupyResource(CPU) However, after this cycle, my freerunner does not blank any more or suspend automatically. Any Idea's whether I am doing something wrong? Or is this a bug('s)? Check out the all-new Messenger 9.0! Go to http://in.messenger.yahoo.com/ _______________________________________________ Smartphones-userland mailing list Smartphones-userland@linuxtogo.org http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/smartphones-userland