Photon session tuning

Hi,
I would like to change io-graphics priority during Photon start-up. Is there any way to make this?
I look through ph script, but it seems to launch phgrafx-startup application. Is there any
configurations files? (Something like very useful files under /etc/system/enum/include).
BTW, there is not the # symbol in a blank line of __USAGE section (L:1+14) of ph script. So
“Sequence of events” is not shown by use ph. Is it normal?

Thanks in advance,
Best regards,
Eduard.

Hi Eduard,

You can do a

slay -P priority

You can check the helpviewer, check for slay, to see the exact commands.

This will allow you to change the priority of the io-graphics driver.
You should be able to add this to the bottom of the ph script.
If you are planning to increase the priority it may have the display work better,
if you decrease the priority the display may not update the way you want it to.

Hope this helps
Regards
Brenda

ed1k <ed1k@yahoo.com> wrote:

Hi,
I would like to change io-graphics priority during Photon start-up. Is there any way to make this?
I look through ph script, but it seems to launch phgrafx-startup application. Is there any
configurations files? (Something like very useful files under /etc/system/enum/include).
BTW, there is not the # symbol in a blank line of __USAGE section (L:1+14) of ph script. So
“Sequence of events” is not shown by use ph. Is it normal?

Thanks in advance,
Best regards,
Eduard.

Hi Eduard,

You could do it in the phapps startup script. In there just do a nice
or a renice to the io-graphics service should do it. I don’t think doing this
to the driver would do the trick though since the driver is linked into the
service.

For the phapps script look in your .ph dir. If its not there, you can create it.
It is just a shell script.

Erick.

ed1k <ed1k@yahoo.com> wrote:

Hi,
I would like to change io-graphics priority during Photon start-up. Is there any way to make this?
I look through ph script, but it seems to launch phgrafx-startup application. Is there any
configurations files? (Something like very useful files under /etc/system/enum/include).
BTW, there is not the # symbol in a blank line of __USAGE section (L:1+14) of ph script. So
“Sequence of events” is not shown by use ph. Is it normal?

Thanks in advance,
Best regards,
Eduard.

Hi Erick, Hi Brenda,

Thank you very much!

Erick, I wish do it for any user, so I think phapps script is not a good place. Additional I’m
novice in unix world, so I can be wrong, but slay seems to be better because renice require pid. (I
guess it is not a problem to get pid in script but I don’t know how :wink:)
Brenda, my display works equally for priority 10 and 12 (default) of io-graphics. My system is
p166mmx, Iwill p55v2 motherboard (i430vx chipset), ATI rage II w/tv-out videocard, serial mouse &
AT keyboard. I’ve reported about my problem: chaotic mouse events. Particularly when I drag’n’drop
vertical scrollbar, move window on the screen, adjust the headers in pfm’s window and so on. I have
found those unwanted events are more active when exist photon’s application with hi priority. For
test purpose only, I’ve tried to increase priority of mp3 player (phMAD) (to 25 :wink:). My system got
mad (exactly, windows were created, removed, closed, shelf was reconfigured without any
intervention), I was able only press shift-ctrl-alt-backspace to leave photon. I’ve tried my system
about two weeks with renice io-graphics priority to 10. My system worked good and I decide to
auto-renice my system. Only one aside effect: window content is scrolled when I drag’n’drop the
scrollbar, but mouse cursor is behind and finally it jumps to right position. On my mind it is
better then chaotic events. I did not try to increase priority of devi-hirun yet. Maybe it will do
the trick. BTW, no differences to use hardware or software cursor.

Thank you Erick, thank you Brenda,

Best wishes,
Eduard.

Hi Eduard,

I have spoken with one of the developers and he passes on the following info:
If the reason you want to decrease the priority of the graphics driver
is because the driver and/or audio/video stuff interfers with mouse
input, then the correct fix is indeed to increase the priority of
dev-hirun instead. If you’ve got a serial mouse, you might need to
increase the priority of the serial driver as well.

Hope this helps.
Regards
Brenda


ed1k <ed1k@yahoo.com> wrote:

Hi Erick, Hi Brenda,

Thank you very much!

Erick, I wish do it for any user, so I think phapps script is not a good place. Additional I’m
novice in unix world, so I can be wrong, but slay seems to be better because renice require pid. (I
guess it is not a problem to get pid in script but I don’t know how > :wink:> )
Brenda, my display works equally for priority 10 and 12 (default) of io-graphics. My system is
p166mmx, Iwill p55v2 motherboard (i430vx chipset), ATI rage II w/tv-out videocard, serial mouse &
AT keyboard. I’ve reported about my problem: chaotic mouse events. Particularly when I drag’n’drop
vertical scrollbar, move window on the screen, adjust the headers in pfm’s window and so on. I have
found those unwanted events are more active when exist photon’s application with hi priority. For
test purpose only, I’ve tried to increase priority of mp3 player (phMAD) (to 25 > :wink:> ). My system got
mad (exactly, windows were created, removed, closed, shelf was reconfigured without any
intervention), I was able only press shift-ctrl-alt-backspace to leave photon. I’ve tried my system
about two weeks with renice io-graphics priority to 10. My system worked good and I decide to
auto-renice my system. Only one aside effect: window content is scrolled when I drag’n’drop the
scrollbar, but mouse cursor is behind and finally it jumps to right position. On my mind it is
better then chaotic events. I did not try to increase priority of devi-hirun yet. Maybe it will do
the trick. BTW, no differences to use hardware or software cursor.

Thank you Erick, thank you Brenda,

Best wishes,
Eduard.

Hi Brenda,

Thank you very much! Ok, I’ll try to play around the priority of devi-hirun and ser8250. But I
confirm I have no any unwanted mouse events if I’ve decreased the priority of io-graphics process.
I’d like to
inform you: the renice command (or slay -P 10 io-graphics) cause priority changing of Photon and
phfontFA processes. In other words, the priority of processes Photon, phfontFA and io-graphics is
12. After the commands
$su
password:
#slay -P 10 io-graphics
#exit
$pidin
The priority of those processes is 10. At this point I’m not sure which of them affects on my
system.

Just now the next trouble confused me. I’ve added the next lines in the ph script:

renice my slowly system

slay -P 10 io-graphics
#------------------------------------
It works till I don’t use phlogin (there is ‘nophoton’ file). Any user is able to login and then
launch Photon by saying ph. If I remove ‘nophoton’ file in order to use phlogin, only root has
stuff as I expected. The slay command does not successful execute for ordinary user. There is an
error message:
setprio(, 10) : Operation not permitted.
Why does script work if it’s launched from shell? Why it does not work if it’s launched by phlogin?
I did not change the owner and mode of the ph file (I hope). I really need help. Please explain me
where is my mistake.

Best regards,
Eduard.



Gui Group <gui@qnx.com> wrote in article <9o83ug$mfc$1@nntp.qnx.com>…

Hi Eduard,

I have spoken with one of the developers and he passes on the following info:
If the reason you want to decrease the priority of the graphics driver
is because the driver and/or audio/video stuff interfers with mouse
input, then the correct fix is indeed to increase the priority of
dev-hirun instead. If you’ve got a serial mouse, you might need to
increase the priority of the serial driver as well.

Hope this helps.
Regards
Brenda

Hi Eduard,

I have spoken with one of the developers and he passes on the following info:
When using phlogin io-graphics is run by root, when using normal login +
ph script io-graphics is run by the user. So if the user logs in with
phlogin then the user doesn’t have permission to mess with io-graphics
while it’s running.

He’ll have to figure something out to give the user root permission while
doing the renice or slay. (hopefully something that’s secure, like a
program that spawns slay, is setuid root (and only root can write to it,
but u and g can read).

Hope this helps
Regards
Brenda


ed1k <ed1k@yahoo.com> wrote:

Hi Brenda,

Thank you very much! Ok, I’ll try to play around the priority of devi-hirun and ser8250. But I
confirm I have no any unwanted mouse events if I’ve decreased the priority of io-graphics process.
I’d like to
inform you: the renice command (or slay -P 10 io-graphics) cause priority changing of Photon and
phfontFA processes. In other words, the priority of processes Photon, phfontFA and io-graphics is
12. After the commands
$su
password:
#slay -P 10 io-graphics
#exit
$pidin
The priority of those processes is 10. At this point I’m not sure which of them affects on my
system.

Just now the next trouble confused me. I’ve added the next lines in the ph script:

renice my slowly system

slay -P 10 io-graphics
#------------------------------------
It works till I don’t use phlogin (there is ‘nophoton’ file). Any user is able to login and then
launch Photon by saying ph. If I remove ‘nophoton’ file in order to use phlogin, only root has
stuff as I expected. The slay command does not successful execute for ordinary user. There is an
error message:
setprio(, 10) : Operation not permitted.
Why does script work if it’s launched from shell? Why it does not work if it’s launched by phlogin?
I did not change the owner and mode of the ph file (I hope). I really need help. Please explain me
where is my mistake.

Best regards,
Eduard.



Gui Group <> gui@qnx.com> > wrote in article <9o83ug$mfc$> 1@nntp.qnx.com> >…
Hi Eduard,

I have spoken with one of the developers and he passes on the following info:
If the reason you want to decrease the priority of the graphics driver
is because the driver and/or audio/video stuff interfers with mouse
input, then the correct fix is indeed to increase the priority of
dev-hirun instead. If you’ve got a serial mouse, you might need to
increase the priority of the serial driver as well.

Hope this helps.
Regards
Brenda

Hi Brenda,

Thank you for explanation. Well, I’m using normal login now. But I’m still not sure about
audio/video stuff interfers with mouse input. I believe it’s a bug somewhere. The term ‘interfere’
is well known for me (I have a degree in radio electronics), but in computing system I believe it
can be a cause for delayed handle of mouse, not more. Unfortunately, ‘slay -P 10 io-graphics’
prevents my system from unwanted mouse events for many apps (helpviewer, pkg-installer, pfm etc.),
but some photon’s apps cause the problem (for ex., phMad). My experiment with
devi-hirun&devc-ser8250 was a failure. Slay for devi-hirun in ph script causes an error
setprio(, 13) : No such process
(I don’t remember the text exactly, only sense). But devi-hirun exists at this point and pid in
message is right. :sunglasses: (BTW, the Zombie has pid of devi-hirun after photon is terminated).
Devc-ser8250 has priority 24 in text, and it has priority 10 in photon. I cannot change the
priority of devc-ser8250 for some reason.

Thank you very much,
Best regards,
Eduard.


Gui Group <gui@qnx.com> wrote in article <9ond06$921$2@nntp.qnx.com>…

Hi Eduard,

I have spoken with one of the developers and he passes on the following info:
When using phlogin io-graphics is run by root, when using normal login +
ph script io-graphics is run by the user. So if the user logs in with
phlogin then the user doesn’t have permission to mess with io-graphics
while it’s running.

He’ll have to figure something out to give the user root permission while
doing the renice or slay. (hopefully something that’s secure, like a
program that spawns slay, is setuid root (and only root can write to it,
but u and g can read).

Hope this helps
Regards
Brenda

Hi,
It’s me again. I would like to give some more precision details. Here is a log of my work (as a
root) in photon’s pterm (I’ve reniced devi-hirun to the priority 60):
#pidin

86031 1 sbin/devc-ser8250 60o …

335900 2 /bin/devi-hirun 60o …
335900 3 /bin/devi-hirun 60o …
335900 4 /bin/devi-hirun 62o …

#slay -f -P 25 devi-hirun
setprio(335900, 25) : No such process
#renice -2 -p 335900
#pidin

86031 1 sbin/devc-ser8250 60o …

335900 2 /bin/devi-hirun 62o …
335900 3 /bin/devi-hirun 62o …
335900 4 /bin/devi-hirun 63o …

mouse movement
#pidin

86031 1 sbin/devc-ser8250 62o …

335900 2 /bin/devi-hirun 62o …
335900 3 /bin/devi-hirun 62o …
335900 4 /bin/devi-hirun 63o …

So, the mouse movement causes the change of the devc-ser8250’s priority. And I have a ton of
questions, please, help me.
1/ Does devi-hirun do restart of devc-ser8250? Why? How often? It happens too often in my system. I
think that realtime priority and p166mmx should guarantee the normal work of mouse. Only photon
(shelf, drivers, etc.) and pterm are running in example above. I have no unwanted mouse events, but
why is devc-ser8250 restarting? (sorry, I have no other explanation at this time)
2/ Why does devc-ser8250 have a fixed pid?
3/ Where is the first thread of devi-hirun? Why does not ‘slay -P’ work with devi-hirun?

I would be VERY grateful for explanation.

Thank you in advance,
Best wishes,
Eduard.

ed1k <ed1k@yahoo.com> wrote:

So, the mouse movement causes the change of the devc-ser8250’s priority. And I have a ton of
questions, please, help me.
1/ Does devi-hirun do restart of devc-ser8250? Why? How often? It happens too often in my system. I
think that realtime priority and p166mmx should guarantee the normal work of mouse. Only photon
(shelf, drivers, etc.) and pterm are running in example above. I have no unwanted mouse events, but
why is devc-ser8250 restarting? (sorry, I have no other explanation at this time)
2/ Why does devc-ser8250 have a fixed pid?

I don’t believe devi-hirun will restart devc-ser8250. (the fact the pid
didn’t change suggested that).

You want to take a look of system architecture. Topics like:
“priority inheritance”, “priority inversion”.

The quick answer is devc-ser8250 keeps on adjuest its priority according
the request it received.

-xtang


3/ Where is the first thread of devi-hirun? Why does not ‘slay -P’ work with devi-hirun?

I would be VERY grateful for explanation.

Thank you in advance,
Best wishes,
Eduard.

Hi Xiaodan,

Xiaodan Tang <xtang@qnx.com> wrote in article <9opvp9$sba$1@nntp.qnx.com>…

I don’t believe devi-hirun will restart devc-ser8250. (the fact the pid
didn’t change suggested that).

You want to take a look of system architecture. Topics like:
“priority inheritance”, “priority inversion”.

The quick answer is devc-ser8250 keeps on adjuest its priority according
the request it received.

Excuse my ignorance. You are right. devi-hirun does not restart of devc-ser8250. Ok.devi-hirun do
“renice” of devc-ser8250 somehow. (How is not interesting for me at this time. I hope I’ll have a
time to read docs). But I don’t understand why does devi-hirun do it? devc-ser8250 manages two
ports (both com1 and com2), mouse takes one of them, what if other application uses another com?
Will do they do renice of serial driver? Ok, I’ll read docs about architecture, but I think it’s a
bit strange. BTW, I’ve found other processes which adjust their priority somehow (for example,
helpviewer), but again, it seems to be strange as applied to the driver.
I still have the problem with mouse. I’d like to explain my last experiment:
1/ I launch phmad (player by Chris McKillop), open and play the mp3 (it’s important, phmad should
creat the second thread with priority 15)
2/ I don’t touch mouse buttons, simply I move mouse. It causes the context menu to appears (if
cursor is moved on free part of desktop, it’s more safe :wink:) as if button was pressed
3/ I do “renice -6” of devi-hirun (devi-hirun’s priority is increased to 16). I have no strange
effects as in point 2
4/ I do “renice -1” of phmad and I have the unwanted mouse events again.
So, I cannot to renice of devi-hirun as a workaround in my system (I feel nobody else have these
strange mouse events), because I don’t know the maximum priority of other procces which can be
launched in system.
What do you think about “slay -P 25 devi-hirun”? Of course, I can get pid by “slay -p devi-hirun”
(it works) and then do “renice” of devi-hirun. Just curious.

Thank you very much,
Best regards,
Eduard.


-xtang


3/ Where is the first thread of devi-hirun? Why does not ‘slay -P’ work with devi-hirun?

I would be VERY grateful for explanation.

Thank you in advance,
Best wishes,
Eduard.

ed1k <ed1k@yahoo.com> wrote:

Hi Xiaodan,

Xiaodan Tang <> xtang@qnx.com> > wrote in article <9opvp9$sba$> 1@nntp.qnx.com> >…

I don’t believe devi-hirun will restart devc-ser8250. (the fact the pid
didn’t change suggested that).

You want to take a look of system architecture. Topics like:
“priority inheritance”, “priority inversion”.

The quick answer is devc-ser8250 keeps on adjuest its priority according
the request it received.

Excuse my ignorance. You are right. devi-hirun does not restart of devc-ser8250. Ok.devi-hirun do
“renice” of devc-ser8250 somehow. (How is not interesting for me at this time. I hope I’ll have a
time to read docs). But I don’t understand why does devi-hirun do it? devc-ser8250 manages two

The document I point out explained “why”. “Priority inversion” is a
classic problem in Realtime processing.

In a short word, all the managers in QNX will “adujest” their priority
while service a client, the new “priority” is the same as the client’s
priority, otherwise, you could have a “low priority” client starve a
“high priroity” client, which brokes “high priority go first” golden
rule in Realtime System.

I am sorry that I don’t have detail information about your perticular
problem (unwanted mouse event…)

-xtang


ports (both com1 and com2), mouse takes one of them, what if other application uses another com?
Will do they do renice of serial driver? Ok, I’ll read docs about architecture, but I think it’s a
bit strange. BTW, I’ve found other processes which adjust their priority somehow (for example,
helpviewer), but again, it seems to be strange as applied to the driver.
I still have the problem with mouse. I’d like to explain my last experiment:
1/ I launch phmad (player by Chris McKillop), open and play the mp3 (it’s important, phmad should
creat the second thread with priority 15)
2/ I don’t touch mouse buttons, simply I move mouse. It causes the context menu to appears (if
cursor is moved on free part of desktop, it’s more safe > :wink:> ) as if button was pressed
3/ I do “renice -6” of devi-hirun (devi-hirun’s priority is increased to 16). I have no strange
effects as in point 2
4/ I do “renice -1” of phmad and I have the unwanted mouse events again.
So, I cannot to renice of devi-hirun as a workaround in my system (I feel nobody else have these
strange mouse events), because I don’t know the maximum priority of other procces which can be
launched in system.
What do you think about “slay -P 25 devi-hirun”? Of course, I can get pid by “slay -p devi-hirun”
(it works) and then do “renice” of devi-hirun. Just curious.

Thank you very much,
Best regards,
Eduard.



-xtang


3/ Where is the first thread of devi-hirun? Why does not ‘slay -P’ work with devi-hirun?

I would be VERY grateful for explanation.

Thank you in advance,
Best wishes,
Eduard.