Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Presentmon Initialization Error #223

Closed
RuddroKRM1 opened this issue Apr 5, 2024 · 21 comments
Closed

Presentmon Initialization Error #223

RuddroKRM1 opened this issue Apr 5, 2024 · 21 comments
Assignees
Labels

Comments

@RuddroKRM1
Copy link

Intel PresentMon 4_6_2024 12_59_21 AM
Facing this problem.
My config
i7 7700k
Z270
GTX1070
16 GB DDR4 3200MHZ

@markgalvan-intel markgalvan-intel self-assigned this Apr 5, 2024
@markgalvan-intel
Copy link
Collaborator

It appears the PresentMonService might not be started. Can you please try restarting the service? Steps to do so are:

  1. Open the Services applet.
  2. Look for "PresentMonService" and start it. If it is already running you can try restarting it or restarting your computer.

Please let us know if this addresses the issue.

@RuddroKRM1
Copy link
Author

I have tried the your steps but still the issue remains the same.

@markgalvan-intel
Copy link
Collaborator

When checking on PresentMonService what is the "Status" displayed in the Services applet? When you start it does it stay in the "Running" state?

@RuddroKRM1
Copy link
Author

Yes.
Task Manager 4_13_2024 11_00_03 PM

@AntareSkorpion
Copy link

I'm running into this issue in one of my PC's as well.
Presentmon service also confirmed as running.

@markgalvan-intel
Copy link
Collaborator

Thanks for the information. We have been unable to reproduce the issue locally. Would it be possible to gather some logs from the system to help in the debug effort? We can provide the necessary steps to generate logs for both Intel PresentMon and the PresentMonService. Please let us know if this is something you are willing to try.

Thanks!

@AntareSkorpion
Copy link

Sure, what are the steps?

@siberx
Copy link

siberx commented Apr 17, 2024

I am seeing the same issue as well. I went digging and found the following gets added to cef-debug.log every time I try to start the GUI:

[0416/203056.457:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization
[0416/203056.534:ERROR:viz_main_impl.cc(196)] Exiting GPU process due to errors during initialization
[0416/203056.667:ERROR:gpu_channel_manager.cc(955)] Failed to create GLES3 context, fallback to GLES2.
[0416/203056.667:ERROR:gpu_channel_manager.cc(966)] ContextResult::kFatalFailure: Failed to create shared context for virtualization.

My service is also in normal "Running" state and a reboot had no effect. The default.log file in the same folder remains empty. I haven't been able to find any other related logs with anything in them, and don't know where the service logs to (if anywhere) by default.

AMD 5900x
X570
GTX 1080
32GB DDR4-3600

@markgalvan-intel
Copy link
Collaborator

This is great. The high level steps for gathering logs from PresentMonService and Intel PresentMon are as follows:

  1. Stop PresentMonService from the services applet.
  2. Enable logging in PresentMonService by adding a logging parameter to the Start Parameters.
  3. Restart PresentMonService.
  4. Enable logging in Intel PresentMon by updating the Intel PresentMon shortcut to include a logging parameter.
  5. Launch Intel PresentMon from the altered shortcut.
  6. When issue is seen, close Intel PresentMon and stop PresentMonService once again.
  7. Gather the logs.

Detailed steps for setting up logging for PresentMonService and Intel PresentMon are below. If you have any questions please don't hesitate to ask!

Enabling PresentMonService Logs
Enabling log generation in the service requires creating a temporary directory where the log file will be saved and adding the start parameter "--log-dir " for PresentMonService.

First, create the temporary directory in any convenient location where you have write access. I created mine in "c:\temp\pm2":
pmservice-logdir

Second, in the services applet update the properties of PresentMonService:
Service-Props

Third, update the Start parameters by adding in the "--log-dir" start parameter along with the directory name where the log will be saved and then hit the "Start" button.
pmservice-loggen

Once the error occurs hit the "Stop" button and the full log will be written to the specified directory:
pmservice-logdir

The log file from PresentMonService saves the name of the computer of where it was generated so if you want to remove it from the log feel free to do so. The computer name is located on the second line as shown here:
pmservice-log-example

Enabling Intel PresentMon Logs
Enabling log generation for the Intel PresentMon application is done by altering the Intel PresentMon shortcut to include "--p2c-verbose". This will dump logs out to "AppData\Local\Intel\PresentMon\logs" in the file "default.log".

First, open the properties of the Intel PresentMon shortcut:
pm2-shortcut-props

Second, add in "--p2c-verbose":
pm2-verbose

Once the shortcut is updated, relaunch Intel PresentMon and then close it after the error screen is shown. Upon closing the application the "default.log" file should be generated.
pm2-default-log

@siberx
Copy link

siberx commented Apr 18, 2024

Thanks for the clear guides, didn't actually know you could temporarily pass launch parameters to a windows service like that; cool trick.

I have attached the logs generated from both the service and the GUI app, hopefully this helps track down the problem. Let me know if you need any more info.
pm-srv-err-20240417-204800.328.log
pm-srv-info-20240417-204759.328.log
pm-srv-warn-20240417-204800.328.log
default.log

@markgalvan-intel
Copy link
Collaborator

This is great! We'll dive into the logs and see if we can determine the root cause of the issue. Very much appreciate your time and help!

@AntareSkorpion
Copy link

AntareSkorpion commented Apr 19, 2024

Hi again, Here are my logs as well.
pm-srv-err-20240419-123442.11708.log
pm-srv-info-20240419-123442.11708.log
pm-srv-warn-20240419-123442.11708.log
cef-debug.log
default.log

this machine is running the following specs.
CPU - i9-9900K
GPU - RTX 2080
RAM - 32 GB

I'm deploying Presentmon on a lab with 4 machines. Two of them work just fine, two of them, not so much.
Of the two not working, only this one displays this error. The other one just crashes when starting a capture. But we'll cross that bridge when we get there, after figuring out this one.

Additionally, other tools that also run on the presentmon service (i.e. capframeX) seem to work just fine.

Thanks in advance for the help!

@markgalvan-intel
Copy link
Collaborator

Hello! Thank you so much for the logs @siberx and @AntareSkorpion. With them we were able to piece together what is happening and reproduce on our side. We are working on a fix and will give details as we make progress. Really appreciate the help in this effort!

@AntareSkorpion
Copy link

Hello! Thank you so much for the logs @siberx and @AntareSkorpion. With them we were able to piece together what is happening and reproduce on our side. We are working on a fix and will give details as we make progress. Really appreciate the help in this effort!

Legend!

@markgalvan-intel
Copy link
Collaborator

Just a quick update and a request. :)

First, the update. We have a fix in place and it appears to be working well. It will be in our next validation cycle and it should be available soon.

Next the request. In looking at the service logs we noticed one of the PdhAddEnglishCounter calls is failing with a result of PDH_CSTATUS_NO_OBJECT when we our querying for the processor idle time. We use this counter when calculating CPU Utilization. When you have a free moment could you check to see if the counter is available in the Performance Monitor? Specifically we want to know if the Processor %Idle Time counter is available for selection and reports back data. Let me know if you need detailed instructions on how to check on the counter in Performance Monitor and we can provide the steps we use.

Thanks!

@AntareSkorpion
Copy link

It seems the error prevents any other action in the GUI other than closing it. The steps would be appreciated.

@markgalvan-intel
Copy link
Collaborator

Here is one method to check on counter availability using the Performance Monitor. If you have any questions let us know.

  1. In the search bar type in "Performance Monitor" and then launch the application.
    PerfmonApp

  2. Once loaded, click on "Performance Monitor" under the "Monitoring Tools" folder and then add a counter by clicking on the "+".
    AddCounter

  3. When the "Add Counters" dialog comes up expand the "Processor" object, select "% Idle Time" and in the "Instances of selected object" selection box select "_Total". Next click on the "Add >>" button and ensure the counter is added in the "Added counters" list box. Once verified the counter is in the list box click "OK".
    CounterSelection

  4. Once the counter is added it will show up on in the list box below the graph. You might need to hit the up or down error on side of the list box as sometimes the list box only shows a single counter entry.
    CounterAdded

@siberx
Copy link

siberx commented Apr 23, 2024

So I tried this out, and on launching Performance Monitor (which I haven't run in a while) I got the following popup twice:
image

After acknowledging it I was able to add processor idle information without issue:
image

But looking up the error, came across this thread:
https://answers.microsoft.com/en-us/windows/forum/all/perfmon-problems-unable-to-add-counters/e90f231d-0014-457d-8b1f-5f342971597a

And after running lodctr /r from an elevated command prompt as directed, Performance Monitor no longer throws that warning on startup and a whole bunch of additional sensors/metrics are available in my "Add" list.

I was curious, so after this I went and restarted the PresentMon service and re-launched the GUI and there were no errors on startup this time; I was able to run the app without issue. I don't have time to exercise the overlays and verify full functionality right now, but it appears the original issue might have something to do with the underlying performance counters going wonky for some reason.

It's suspicious to me that the linked thread shows exactly the same counters as being problematic. They blame "corruption", but I'm guessing there's some kind of particular configuration or OS upgrade history that can get an installation into this state rather than just random corruption for the entries for no obvious reason.

@markgalvan-intel
Copy link
Collaborator

This is fantastic! Great investigation on finding the linked thread.

Indeed, the fix that we have implemented handles the case where the counters go wonky and the service is unable to initialize. With the fix in place Intel PresentMon will now be able to launch correctly with bad counters but the metrics we get from the bad counters would not be available.

Thanks again for reporting your findings and providing such great feedback!

@AntareSkorpion
Copy link

Good news on my end as well.

Siberx was right on the money. Starting perfmon i encountered the same errors. After ignoring the messages i ran the "lodctr /r" command, restarted everything, including the presentmon service and it seems everything is functional. including the overlay and capture.

@markgalvan-intel
Copy link
Collaborator

Fantastic! Great to hear.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants