FSO5 dbus Releasing Resource Display leads to no dimming / blanking

c_c cchandel at yahoo.com
Wed Feb 11 06:31:41 CET 2009


****Edit****
The message heading was ambiguous about the kernel oops part. So I've
shifted that prob to another thread.

Hi,
  Well, I'm nearing a new release of guitar tuner and have incorporated dbus
signals/methods to prevent blanking of the screen and suspend by requesting
resource CPU and Display like so :-

    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. 

  How do I solve these problems? Am I doing something wrong? Or is this a
bug('s)?
-- 
View this message in context: http://n2.nabble.com/FSO5-dbus-Releasing-Resource-Display-leads-to-no-dimming---blanking-and-crash-on-incoming-call-tp2306515p2306989.html
Sent from the Openmoko Devel mailing list archive at Nabble.com.




More information about the devel mailing list