Re: pbbuttonsd: call pbbcmd in power scripts
Hi Matthias, Matthias Grimm [EMAIL PROTECTED] wrote: On Sun, 15 Jan 2006 13:56:00 + (UTC) Joerg Sommer [EMAIL PROTECTED] wrote: I want to increase or decrease the backlight level upon plug in and unplug the power supply unit. I achieve this with a script in /etc/power/event.d/. But it seams the script hangs in the call of pbbcmd. Is this possible? If I enable the call I get a message INFO: Script '/etc/power/pmcs-pbbuttonsd resume ac ram' lauched but killed after 6 seconds. I tracked it down to the call of pbbcmd. So what might happen there? It's a classic deadlock situation. Pbbuttonsd started the script which started pbbcmd. pbbcmd sent a message to pbbuttonsd and waited for the result, which won't come because pbbuttonsd waits for the script to terminate. But there is a solution :-) Call pbbcmd with option '-i' and it will immedately return without waiting for a receipt or an error code. This does not help: + ltrace -t -e msgget,msgsnd,msgrcv,msgctl pbbcmd -i query TAG_LCDBRIGHTNESS 16:46:21 msgget(0x50424253, 0, 6567, 4, 0xff13dd0) = 0x21 16:46:21 msgget(6567, 1938, 0x42000422, 4, 0xff4fecc) = 0x2a8002 16:46:21 msgsnd(0x21, 0x7fc64588, 24, 0, 0xff4fecc) = 0 16:46:21 msgrcv(0x2a8002, 0x7fc665b8, 200, 0, 2048) = -1 16:46:21 msgrcv(0x2a8002, 0x7fc665b8, 200, 0, 2048) = -1 16:46:21 msgrcv(0x2a8002, 0x7fc665b8, 200, 0, 2048) = -1 16:46:21 msgrcv(0x2a8002, 0x7fc665b8, 200, 0, 2048) = -1 ... [35 times] 16:46:25 msgrcv(0x2a8002, 0x7fc665b8, 200, 0, 2048) = -1 16:46:25 msgsnd(0x21, 0x7fc64578, 8, 0, 0x7fc66500) = 0 16:46:25 msgctl(0x2a8002, 0, 0, 0x10002364, 0xff4fce0) = 0 Der Server antwortete nicht, Timeout. 16:46:25 +++ exited (status 1) +++ Regards, Jörg. -- Die meisten Menschen wollen lieber durch Lob ruiniert als durch Kritik gerettet werden. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: pbbuttonsd: call pbbcmd in power scripts
On 16/01/2006 at 15:51 +, Joerg Sommer wrote: This does not help: + ltrace -t -e msgget,msgsnd,msgrcv,msgctl pbbcmd -i query TAG_LCDBRIGHTNESS According to pbbcmd man page, -i applies only to config commands. If you need to query LCD brightness, you can use /sbin/fblevel (that's what my own script uses). If you need to query any other tag, then I can't help you. -- Kiko Private mail is preferred encrypted: http://www.pirispons.net/pgpkey.html -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: pbbuttonsd: call pbbcmd in power scripts
On Mon, 16 Jan 2006 18:50:43 +0100 Kiko Piris [EMAIL PROTECTED] wrote: On 16/01/2006 at 15:51 +, Joerg Sommer wrote: This does not help: + ltrace -t -e msgget,msgsnd,msgrcv,msgctl pbbcmd -i query TAG_LCDBRIGHTNESS According to pbbcmd man page, -i applies only to config commands. If you need to query LCD brightness, you can use /sbin/fblevel (that's what my own script uses). If you need to query any other tag, then I can't help you. Joerg, I'm sorry but Kiko is completely right. You can only send commands to pbbuttonsd inside the scripts yet but you can't query any values. Sorry. Best Regards Matthias -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
pbbuttonsd: call pbbcmd in power scripts
Hi, I want to increase or decrease the backlight level upon plug in and unplug the power supply unit. I achieve this with a script in /etc/power/event.d/. But it seams the script hangs in the call of pbbcmd. Is this possible? If I enable the call I get a message INFO: Script '/etc/power/pmcs-pbbuttonsd resume ac ram' lauched but killed after 6 seconds. I tracked it down to the call of pbbcmd. So what might happen there? Bye, Jörg. -- Der Pessimist ist jemand, der vorzeitig die Wahrheit erzählt. (Cyrano de Bergerac) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]
Re: pbbuttonsd: call pbbcmd in power scripts
On Sun, 15 Jan 2006 13:56:00 + (UTC) Joerg Sommer [EMAIL PROTECTED] wrote: I want to increase or decrease the backlight level upon plug in and unplug the power supply unit. I achieve this with a script in /etc/power/event.d/. But it seams the script hangs in the call of pbbcmd. Is this possible? If I enable the call I get a message INFO: Script '/etc/power/pmcs-pbbuttonsd resume ac ram' lauched but killed after 6 seconds. I tracked it down to the call of pbbcmd. So what might happen there? It's a classic deadlock situation. Pbbuttonsd started the script which started pbbcmd. pbbcmd sent a message to pbbuttonsd and waited for the result, which won't come because pbbuttonsd waits for the script to terminate. But there is a solution :-) Call pbbcmd with option '-i' and it will immedately return without waiting for a receipt or an error code. The script will terminate in time and pbbuttonsd process the formerly sent message. Best Regards Matthias -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]