Author Topic: ACPI daemon, PowerMan, WinSendMsg  (Read 3513 times)

Remy

  • Hero Member
  • *****
  • Posts: 964
  • Karma: +16/-1
Re: ACPI daemon, PowerMan, WinSendMsg
« Reply #15 on: May 03, 2026, 10:36:10 pm »
Hi, very interesting !

I tried PM_ASYNC_FOCUS_CHANGE=
* Tried with a value of 800
> Firefox uses a lot of CPU like before nut seems to be more responsive
> Dooble QT5 uses very lower CPU process for a same page than firefox
   - e.g. going to youtube, the google policy page is very fast to be dislaied.
   - Display of an account with many videos under it is faster too
> Dooble QT6 is going well above I could have before, youtube is disploaied and opening the same account page, it end with a crash
* Tried with a value of 640
Looks similar as before but QT6 is not crashing !
A check on memory usage shows that after the account page load, below 512M shared storage decreases from nearly 215Mb to 75Mb!
The crash of dooble QT6 was probable due low storage (of course, loading the page never goes into a loop like without this setting !).
Tried 576 but not better or may be worse !has an impact on the stability ! (640 seems ok here too)   
« Last Edit: May 03, 2026, 10:46:04 pm by Remy »

Dave Yeo

  • Hero Member
  • *****
  • Posts: 6051
  • Karma: +167/-1
Re: ACPI daemon, PowerMan, WinSendMsg
« Reply #16 on: May 04, 2026, 12:59:01 am »
You might want to test FF with a new profile. A couple of times I've had SM break in a weird way where the CPU's were always active to some degree. Never did figure it out but fixed by reverting to a backup profile. One possibility is shutting the browser down while busy. I try to wait till things CPU wise calm down before closing. Typing this, one core is peaking at 15%, which I consider normal. I keep a lot of JavaScript disabled too, using NoScript.

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1566
  • Karma: +44/-0
Re: ACPI daemon, PowerMan, WinSendMsg
« Reply #17 on: May 04, 2026, 04:51:18 pm »
Hello Remy!

...I tried PM_ASYNC_FOCUS_CHANGE=
* Tried with a value of 800
> Firefox uses a lot of CPU like before nut seems to be more responsive
> Dooble QT5 uses very lower CPU process for a same page than firefox
   - e.g. going to youtube, the google policy page is very fast to be dislaied.
   - Display of an account with many videos under it is faster too
> Dooble QT6 is going well above I could have before, youtube is disploaied and opening the same account page, it end with a crash
...

Just note that this setting, on it's own, doesn't change/re-configure anything for you. Rather this should ONLY come into play when a missbehaved app is hanging onto system resources and not releasing them, or to be more specific (AFAIK) it is not probably dealing with the message queue and that typically means the other apps aren't able to process your inputs, etc.

More specifically, we've all I'm sure encountered a situation when the app we are using seems to have gone into the "la la land" - it is doing something, but system stops responding - this setting here is what controls the duration of that 'lack of response' that is supposed to make OS/2 take additional actions.

Given the nature of this discussion I thought I would just toss this out there.


Lars

  • Hero Member
  • *****
  • Posts: 1514
  • Karma: +79/-0
Re: ACPI daemon, PowerMan, WinSendMsg
« Reply #18 on: May 04, 2026, 05:05:36 pm »
I seem to remember that PM_ASYNC_FOCUS_CHANGE only works for the Warp 4 kernel but not for the SMP kernel. But I would need to search "OS2KRNL" file for string PM_ASYNC_FOCUS_CHANGE" to know for sure.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 6051
  • Karma: +167/-1
Re: ACPI daemon, PowerMan, WinSendMsg
« Reply #19 on: May 04, 2026, 05:35:20 pm »
I seem to remember that PM_ASYNC_FOCUS_CHANGE only works for the Warp 4 kernel but not for the SMP kernel. But I would need to search "OS2KRNL" file for string PM_ASYNC_FOCUS_CHANGE" to know for sure.

I can't find the string in any OS2KRNL, or for that matter, anywhere in \OS2

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1566
  • Karma: +44/-0
Re: ACPI daemon, PowerMan, WinSendMsg
« Reply #20 on: May 04, 2026, 08:02:57 pm »
I seem to remember that PM_ASYNC_FOCUS_CHANGE only works for the Warp 4 kernel but not for the SMP kernel. But I would need to search "OS2KRNL" file for string PM_ASYNC_FOCUS_CHANGE" to know for sure.

I can't find the string in any OS2KRNL, or for that matter, anywhere in \OS2

...and to confuse things even further there is the 'System' object in the 'System Setup' folder where the 'User Interface' TAB has a nice little "Focus Change Sensitivity" setting, and that's in 'tenths of a second' scale, so mine being set at 20 means that I am forcing the system to liven things up once the 2 secs mark has gone by.

Also, what I learned today as I re-visisted this setting is that there is a claim stating the 'System' object setting (which is specific to Warp4 and above) overrides the CONFIG.SYS setup.

Rich Walsh

  • Sr. Member
  • ****
  • Posts: 440
  • Karma: +33/-0
  • ONU! (OS/2 is NOT Unix!)
Re: ACPI daemon, PowerMan, WinSendMsg
« Reply #21 on: May 05, 2026, 02:36:55 am »
I can't find the string in any OS2KRNL, or for that matter, anywhere in \OS2

It's not a kernel directive like e.g. "MAXWAIT" so you wouldn't find it there. Given the name, it probably appears somewhere in PMMERGE (after you unpack it).

Speaking of SIQ issues... When Dooble (QT5) locks up but I'm able to regain control via Ctrl+Esc, I find I can get Dooble working again by closing any window belonging to _another_ process. Since I seldom have extra windows open, I open Text Editor then close it, and Dooble springs back to life. I have no idea why.

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1566
  • Karma: +44/-0
Re: ACPI daemon, PowerMan, WinSendMsg
« Reply #22 on: May 05, 2026, 05:25:18 pm »
Hi Dave!

You might want to test FF with a new profile. A couple of times I've had SM break in a weird way where the CPU's were always active to some degree. Never did figure it out but fixed by reverting to a backup profile.
...
I keep a lot of JavaScript disabled too, using NoScript.

Your response caused me to go back to some old notes and do a little digging around.

I had originally included this CPU spike in my earlier testing report b/c I felt that added extra load to FF execution and therefore if there was anything else that would tax the system more and potentially cause a greater impact on Eugene's msgtest benchmark it would have been this.

So having said that, what I did remind myself of is the fact that the layout.framerate option - which defaults to 0 (zero) in our install - is what causes this behaviour on my system.

I have tried numerous other values but for this and while they do completely do away with the CPU spike they do have the unwelcome outcome of producing choppy FF page scrolling, which I do not enjoy at all.

What I haven't figure out yet is why some sites produce this while others do not exhibit any. I suspect it's got everything to do with various page elements, but having spent some time trying to track this down (through FF's Web Developer console) I was never able to pinpoint the root cause. I likewise run the various JS blocking utils.

Consider the following: doing a 30 secs recording of FF's performance while I'm typing up this message, I note the following:

- avg fps is 401.47
- 81% of time was spent in the Graphics function
- 8% in Gecko
- all other ones amounted to the remaining 11%

...anyways, this is a much bigger conversation that I recall us spending a good amount of time on during the FF 45 build by dmik!!! lol

Dave Yeo

  • Hero Member
  • *****
  • Posts: 6051
  • Karma: +167/-1
Re: ACPI daemon, PowerMan, WinSendMsg
« Reply #23 on: May 05, 2026, 06:23:45 pm »
Don't forget the GIF bug where GIF's created by Gimp are considered to have multiple frames and create high CPU spikes. Possibly I missed some in the FF UI.
Edit: Do you get the CPU spikes when the only page is about:blank
« Last Edit: May 05, 2026, 10:46:29 pm by Dave Yeo »

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1566
  • Karma: +44/-0
Re: ACPI daemon, PowerMan, WinSendMsg
« Reply #24 on: May 05, 2026, 10:50:00 pm »
Don't forget the GIF bug where GIF's created by Gimp are considered to have multiple frames and create high CPU spikes. Possibly I missed some in the FF UI.
Edit: Do you get the CPU spikes when the only page is about:blank

Yup, certainly remember the GIF issue too.

To answer your question thoug: NO, blank page is literally zero CPU usage.

Dave Yeo

  • Hero Member
  • *****
  • Posts: 6051
  • Karma: +167/-1
Re: ACPI daemon, PowerMan, WinSendMsg
« Reply #25 on: May 05, 2026, 11:29:20 pm »
Don't forget the GIF bug where GIF's created by Gimp are considered to have multiple frames and create high CPU spikes. Possibly I missed some in the FF UI.
Edit: Do you get the CPU spikes when the only page is about:blank

Yup, certainly remember the GIF issue too.

To answer your question thoug: NO, blank page is literally zero CPU usage.

Good, no GIF's in the UI. Thought I got them all.
Funny enough, Mozilla finally fixed the GIF problem around FF 90 IIRC, just that it barely showed up on systems that didn't need the layers.framerate work around

Lars

  • Hero Member
  • *****
  • Posts: 1514
  • Karma: +79/-0
Re: ACPI daemon, PowerMan, WinSendMsg
« Reply #26 on: May 08, 2026, 12:06:25 pm »
I can't find the string in any OS2KRNL, or for that matter, anywhere in \OS2

It's not a kernel directive like e.g. "MAXWAIT" so you wouldn't find it there. Given the name, it probably appears somewhere in PMMERGE (after you unpack it).

Speaking of SIQ issues... When Dooble (QT5) locks up but I'm able to regain control via Ctrl+Esc, I find I can get Dooble working again by closing any window belonging to _another_ process. Since I seldom have extra windows open, I open Text Editor then close it, and Dooble springs back to life. I have no idea why.

In PMMERGE, I found "PM_ASYNC_FOCUS_CHANGE_DEBUG". Given that, I activated it through config.sys as "SET PM_ASYNC_FOCUS_CHANGE_DEBUG = YES" in the hope that I would see some debug output "somewhere". However, I could not yet find out where "somewhere" would be. I piped stderr to a file on starting PMSHELL.EXE from a commandline but that file did not contain anything from the WPS or anything async focus change related. Or does PMMERGE only send debug output to a serial port ?
« Last Edit: May 08, 2026, 12:10:58 pm by Lars »

Dariusz Piatkowski

  • Hero Member
  • *****
  • Posts: 1566
  • Karma: +44/-0
Re: ACPI daemon, PowerMan, WinSendMsg
« Reply #27 on: May 08, 2026, 02:17:39 pm »
Hello Lars!

In PMMERGE, I found "PM_ASYNC_FOCUS_CHANGE_DEBUG". Given that, I activated it through config.sys as "SET PM_ASYNC_FOCUS_CHANGE_DEBUG = YES" in the hope that I would see some debug output "somewhere". However, I could not yet find out where "somewhere" would be. I piped stderr to a file on starting PMSHELL.EXE from a commandline but that file did not contain anything from the WPS or anything async focus change related. Or does PMMERGE only send debug output to a serial port ?

Could this be captured through a TRACE setup?

I used TRACE a long, looong time ago to just snoop around and I vaguely recall some notion of dynamic trace points, etc...I wonder (by luck, if anything?) this DEBUG functionality might be one such thing?

Otherwise 'TRACE ON PMMERGE' would basically turn this ON for everything in PMMERGE DLL.

On the other hand, if there is no such use-specific trace point configured to support this DEBUG functionality I suppose there is always the option to brute force enable all of PMSHELL.EXE with the '/P:PID' TRACE parameter.

Of course the System Trace util (TRACEGET) has to be used to then retrieve the info from the TRACE buffer followed by TRACEFMT to convert that into some type of format you want to see.

EDIT
====

I took a quick look at the TDFs on my system and did not find anything PMMERGE* related in \os2\system\trace, nor any other locations, so maybe the TRACE route is a dead-end?...or perhaps this is captured elsewhere because I see the following list of PM*:

Code: [Select]
Directory of G:\os2\system\trace

 7-05-06  2:13p        12,338      0 a---  pmgpi.tdf
 7-05-06 10:28p         1,062      0 a---  pmgre.tdf
 7-05-06  3:40p           400      0 a---  pmpic.tdf
 7-05-06 10:28p         6,726      0 a---  pmshapi.tdf
 4-10-06  8:45a         4,491      0 a---  pmspl.tdf
 7-05-06 10:37p         2,661      0 a---  PMVDMP.TDF
 7-05-06 10:36p         3,551      0 a---  PMVIOP.TDF
 7-05-06 10:28p         9,567      0 a---  pmwin.tdf
 4-10-06  2:02p        13,825      0 a---  PMWP.TDF
        9 file(s)      54,621 bytes used

...further on the \os2\pdpsi\pmdf\pmmerge.sym doesn't show anything matching this.


« Last Edit: May 08, 2026, 02:28:16 pm by Dariusz Piatkowski »

Steven Levine

  • Full Member
  • ***
  • Posts: 149
  • Karma: +16/-0
Re: ACPI daemon, PowerMan, WinSendMsg
« Reply #28 on: May 09, 2026, 08:05:08 am »
Lars,

PM_ASYNC_FOCUS_CHANGE_DEBUG controls output via DEBUG32OUTPUT.  DEBUG32OUTPUT sends debug messages via PMDD IOCTL 3/77.   Output goes to the debug terminal.


Lars

  • Hero Member
  • *****
  • Posts: 1514
  • Karma: +79/-0
Re: ACPI daemon, PowerMan, WinSendMsg
« Reply #29 on: May 11, 2026, 05:46:59 pm »
Hi Steve,

many thanks. Maybe I can set this up under Virtualbox to end up in a terminal running in the host ...