PDA

View Full Version : DBUS signals are delayed when process is started at boot



sisco
9th January 2013, 21:04
I am having a strange problem trying to get a small program running at boottime before any user has logged in.

I have used different methods of running the program at boot and nothing has helped me yet! Anyway, I have a small Qt program that communicates with a different program via DBUS (systembus). Currently the program is started with upstart and registers the service etc. fine on the systembus. I can also call different methods of the program using "qdbus --system", these methods return immediately with correct return values. I have set the Qt program to send a DBUS signal every second. when monitoring this with dbus-monitor i only see a signal being passed every 2-5 seconds but when I kill the program and log in as a user (root) the program sends its signals just fine (every second).

i have spent a few hours trying to find the cause of this problem and it looks as if the speed of the systembus is slow when the process is not started as a user, i can see the data being sent as soon as the signal is emmited but it takes a very long time for the signal to be fully sent on the bus. I have set 100 Bytes of data to be emitted with the signal and when the process is started as a user the data is sent immediatly while if the process is started at boot the sending of the data takes about 8-10 seconds.

How is this possible? I want the program sending the signals to run when the computer boots and have another user application connected to the signals to take action when the signal is received.

I have tried to run the program as an upstart job, using the init.d way and the normal rc.local way but all with the same result.

Do I have to have a user logged in for this to work?

Thanks,

Sisco