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

[BUG/ISSUE] Elevated CPU usage with WMI Provider Host (wmiprvse.exe) in version 3.8.1 #925

Closed
pjldrum opened this issue Sep 15, 2022 · 40 comments
Assignees
Labels
bug Something isn't working hard-one Idk if it is going to be possible to do that ready-to-go Ready to be fixed without further conversation

Comments

@pjldrum
Copy link

pjldrum commented Sep 15, 2022

Upon automatic update to version 3.8.1, I noticed that the above-mentioned process is now consistently running at ~ 10% of CPU usage. When quitting ElevenClock from the tray window, the above mentioned process usage goes down to 0. This was not previously encountered in earlier versions of ElevenClock, to the best of my knowledge.

Running Win 11 x64 on Intel Core I7-8750h with 32GB of RAM

@pjldrum pjldrum added bug Something isn't working triage This hasn't been chcked yet by any maintainer labels Sep 15, 2022
@4t0m1c
Copy link

4t0m1c commented Sep 15, 2022

Can confirm. WMI Host provider using 20%+ CPU usage. Immediately goes down after killing Eleven Clock

@marticliment
Copy link
Owner

Hi guys, how many monitors do you have in your pcs?

Can you please try enabling the low-cpu mode as a test and seeif it helps?

@marticliment marticliment added needs-author-answer Waiting for the author to answer. If author does not answer in 2 days, Issue gets closed and removed triage This hasn't been chcked yet by any maintainer labels Sep 15, 2022
@pjldrum
Copy link
Author

pjldrum commented Sep 15, 2022

Thanks for the reply. I have 5 monitors; however, this problem was not encountered previously (even with the clock running on all monitors). The low CPU mode did not help; it did, in fact make the issue worse....50% CPU usage from ElevenClock and 20% usage from the WMI host provider.

@marticliment
Copy link
Owner

The low CPU mode did not help; it did, in fact make the issue worse...

Oh, i didn't know it worked that bad😅

Now, seriously:
Can you please guys send your logs?
Ram usage is not growing, right? I mean, there's no 1,5GB used by ElevenClock?

@4t0m1c
Copy link

4t0m1c commented Sep 15, 2022 via email

@marticliment
Copy link
Owner

Right-click ElevenClock -> ElevenClock settings -> Debugging info -> open log.

Meanwhile this issue is not fixed, could ypu please disable updates and install version 3.8.0? (downbload here: https://github.com/martinet101/ElevenClock/releases/tag/3.8.0)

@pjldrum
Copy link
Author

pjldrum commented Sep 15, 2022

Log file attached. ElevenClock is using approx. 87mb of RAM and 8% of CPU (with low CPU mode enabled); I think my previous comment was due to my machine running very slow trying to enable low CPU mode.
11oclock log.txt

@marticliment
Copy link
Owner

This issue has been fixed. Please stay tuned for the next release

@4t0m1c
Copy link

4t0m1c commented Sep 19, 2022

Not fixed in 3.8.2. Still 20+% CPU usage on WMI Provider Host

🔵 Using taskbar background color
🟢 Regular sized taskbar
🟢 Clock on the bottom
🟢 Clock on the right
🟢 Using qt's default positioning system
🔵 Clock geometry: PySide6.QtCore.QRect(2360, 1394, 200, 46)
🔵 Font families   : ['Segoe UI Variable Display', 'sans-serif']
🔵 Custom font     : 
🔵 Font size: -1.0
🟢 Using white text (dark mode)
🔵 tDateMode: dd/MM/yyyy
🔵 tTimeMode: HH:mm
🔵 Loaded date time format: %H:%M
%d/%m/%Y
🔵 Full screen rect:  (0, 0, 2560, 1440)
en
can't parse ""
🔵 Show/hide loop started with parameters: HideonFS:True, NotHideOnTB:False, HideOnRDP:False, ClockOn1Mon:True, NefWSMethod:True, DisableNotifications:True, legacyFullScreenMethod:False
🟢 Updating outdated language file...
🟢 Using cached lang file
🔵 Initializing clock 1...
🔵 Using taskbar background color
🟢 Regular sized taskbar
🟢 Clock on the bottom
🟢 Clock on the right
🟢 Using qt's default positioning system
🔵 Clock geometry: PySide6.QtCore.QRect(4280, 1421, 200, 46)
🔵 Font families   : ['Segoe UI Variable Display', 'sans-serif']
🔵 Custom font     : 
🔵 Font size: -1.0
🟢 Using white text (dark mode)
🔵 tDateMode: dd/MM/yyyy
🔵 tTimeMode: HH:mm
🔵 Loaded date time format: %H:%M
%d/%m/%Y
🔵 Full screen rect:  (2560, 387, 4480, 1467)
🔵 Show/hide loop started with parameters: HideonFS:True, NotHideOnTB:False, HideOnRDP:False, ClockOn1Mon:True, NefWSMethod:True, DisableNotifications:True, legacyFullScreenMethod:False
en
can't parse ""
🔵 Initializing clock 2...
🔵 Using taskbar background color
🟢 Regular sized taskbar
🟢 Clock on the bottom
🟢 Clock on the right
🟢 Using qt's default positioning system
🔵 Clock geometry: PySide6.QtCore.QRect(-2120, 1385, 200, 46)
🔵 Font families   : ['Segoe UI Variable Display', 'sans-serif']
🔵 Custom font     : 
🔵 Font size: -1.0
🟢 Using white text (dark mode)
🔵 tDateMode: dd/MM/yyyy
🔵 tTimeMode: HH:mm
🔵 Loaded date time format: %H:%M
%d/%m/%Y
🔵 Restart loop: 1
🔵 Full screen rect:  (-3840, 351, -1920, 1431)
🔵 Show/hide loop started with parameters: HideonFS:True, NotHideOnTB:False, HideOnRDP:False, ClockOn1Mon:True, NefWSMethod:True, DisableNotifications:True, legacyFullScreenMethod:False
en
can't parse ""
🔵 Initializing clock 3...
🔵 Using taskbar background color
🟢 Regular sized taskbar
🟢 Clock on the bottom
🟢 Clock on the right
🟢 Using qt's default positioning system
🔵 Clock geometry: PySide6.QtCore.QRect(-200, 1391, 200, 46)
🔵 Font families   : ['Segoe UI Variable Display', 'sans-serif']
🔵 Custom font     : 
🔵 Font size: -1.0
🟢 Using white text (dark mode)
🔵 tDateMode: dd/MM/yyyy
🔵 tTimeMode: HH:mm
🔵 Loaded date time format: %H:%M
%d/%m/%Y
🔵 Full screen rect:  (-1920, 357, 0, 1437)
🔵 Show/hide loop started with parameters: HideonFS:True, NotHideOnTB:False, HideOnRDP:False, ClockOn1Mon:True, NefWSMethod:True, DisableNotifications:True, legacyFullScreenMethod:False
en
can't parse ""
🔵 Initializing clock 4...
🔵 Using taskbar background color
🟢 Regular sized taskbar
🟢 Clock on the bottom
🟢 Clock on the right
🟢 Using qt's default positioning system
🔵 Clock geometry: PySide6.QtCore.QRect(5432, -91, 200, 46)
🔵 Font families   : ['Segoe UI Variable Display', 'sans-serif']
🔵 Custom font     : 
🔵 Font size: -1.0
🟢 Using white text (dark mode)
🔵 tDateMode: dd/MM/yyyy
🔵 tTimeMode: HH:mm
🔵 Loaded date time format: %H:%M
%d/%m/%Y
🔵 Full screen rect:  (2560, -1773, 5632, -45)
🔵 Show/hide loop started with parameters: HideonFS:True, NotHideOnTB:False, HideOnRDP:False, ClockOn1Mon:True, NefWSMethod:True, DisableNotifications:True, legacyFullScreenMethod:False
en
can't parse ""
🟢 Loaded clocks in 1.2082431316375732
🟠 Waiting for sw to not be null
🟠 Waiting for sw to not be null
🟢 Cached text input host hwnd: 66832
{'System language': 'default', 'Arabic - عربي\u200e (66%)': 'ar', 'Bulgarian - български (19%)': 'bg', 'Catalan - Català': 'ca', 'Czech - Čeština': 'cs', 'Danish - Dansk (66%)': 'da', 'German - Deutsch': 'de', 'Greek - Ελληνικά (20%)': 'el', 'English - English': 'en', 'Spanish - Español (98%)': 'es', 'Estonian - eesti (98%)': 'et', 'Persian - فارسی\u200e (5%)': 'fa', 'Finnish - Suomi (67%)': 'fi', 'French - Français': 'fr', 'Hebrew - עִבְרִית\u200e (98%)': 'he', 'Hungarian - Magyar (98%)': 'hu', 'Indonesian - Bahasa Indonesia (98%)': 'id', 'Italian - Italiano (51%)': 'it', 'Japanese - 日本語': 'ja', 'Korean - 한국어': 'ko', 'Lithuanian - Lietuvių (24%)': 'lt', 'Latvian - Latviski (65%)': 'lv', 'Norwegian (bokmål) (98%)': 'nb', 'Dutch - Nederlands (86%)': 'nl', 'Norwegian (nynorsk) (72%)': 'nn', 'Polish - Polski (98%)': 'pl', 'Portuguese (Brazil) (90%)': 'pt_BR', 'Portuguese (Portugal)': 'pt_PT', 'Romanian - Română (98%)': 'ro', 'Russian - Русский (98%)': 'ru', 'Sinhala - සිංහල': 'si', 'Slovak - Slovenčina (32%)': 'sk', 'Serbian - Srpski (24%)': 'sr', 'Swedish - Svenska (79%)': 'sv', 'Thai - ภาษาไทย (85%)': 'th', 'Turkish - Türkçe (21%)': 'tr', 'Ukranian - Yкраї́нська': 'ua', 'Vietnamese - Tiếng Việt (41%)': 'vi', 'Simplified Chinese (China)': 'zh_CN', 'Traditional Chinese (Taiwan)': 'zh_TW'}
🟠 Waiting for sw to not be null
🟠 Waiting for sw to not be null
🟠 Waiting for sw to not be null
🟠 Waiting for sw to not be null
🟠 Waiting for sw to not be null
🟠 Waiting for sw to not be null
🔵 System tray icon enabled
🔵 Starting update check
🔵 Low cpu mode is set to False. DisableNotifications is set to False
🔵 tDateMode: dd/MM/yyyy
🔵 tTimeMode: HH:mm
🔵 Loaded date time format: %H:%M
%d/%m/%Y
🟠 Waiting for sw to not be null
🟢 Loaded everything in 2.3658716678619385
🔵 Version URL: https://versions.somepythonthings.tk/versions/elevenclock.ver
🟢 Updates not found
🔵 Announcement URL: https://www.somepythonthings.tk/resources/elevenclock.announcement
🔵 Image URL: https://upload.wikimedia.org/wikipedia/commons/d/db/Google_Translate_Icon.png
🔵 Starting update check
🔵 Version URL: https://versions.somepythonthings.tk/versions/elevenclock.ver
🟢 Updates not found
🔵 Saving log...```

@marticliment
Copy link
Owner

@4t0m1c, @pjldrum, if yiu quit ElevenClock and then relaunch it, wmi cpu usage does automatically ramp up to 20% or not?

Does low cpu mode help now?

If you start clicking lots of times on the tray icon, does cpu usage permanently increase?

@pjldrum
Copy link
Author

pjldrum commented Sep 20, 2022

Upon exiting elevenclock and starting again, the WMI provider host CPU usage goes up to 10% for me with ElevenClock itself using about 5%. This is with low CPU mode on. With low CPU mode off, WMI cpu usage goes to 23% and Elevenclock goes to 13%. I did not notice any issue with CPU usage permanently increasing, but I did get a "not responding" message on Elevenclock

@marticliment
Copy link
Owner

Hi guys, are you running beta versions of windows?

Because I have also noticed this issue, but when using ProcessExplorer or Task manager details tab WMi Provider does only take 0~1% cpu, meaning that task manager is misreporting.

@marticliment
Copy link
Owner

image

@Jaaaaanobert
Copy link

Jaaaaanobert commented Sep 25, 2022

Hi,

same problem here. I can confirm that I am not running any Windows Beta versions.
CPU load in Task-Manager is at 10%. In my case, the usage is (according to the task manager detail page) actually that high.

//edit: Low CPU mode reduces my usage from about 10% to about 5%

@Jaaaaanobert
Copy link

image

@marticliment
Copy link
Owner

Hi @Jaaaaanobert,

could you please check the usage with Sysinternals process explorer?

https://learn.microsoft.com/en-us/sysinternals/downloads/process-explorer

@Jaaaaanobert
Copy link

Hi @martinet101,

of course. There you go :)
image

@marticliment
Copy link
Owner

Hi @Jaaaaanobert , could you please share your cpu model and your display arrangement?

@Jaaaaanobert
Copy link

Jaaaaanobert commented Sep 26, 2022

Hi @Jaaaaanobert , could you please share your cpu model and your display arrangement?

Sure, I am using an I7 7700k and 3 Monitors, all on Full-HD (1920x1080). My main monitor is in the middle and the other twos are right and left of it.

@Jaaaaanobert
Copy link

Hi @Jaaaaanobert , could you please share your cpu model and your display arrangement?

Sure, I am using an I7 7700k and 3 Monitors, all on Full-HD (1920x1080). My main monitor is in the middle and the other twos are right and left of it.

image

@nezbrun
Copy link

nezbrun commented Sep 26, 2022

Same problem here on 3.8.2.

The problem with it hitting WMI Provider host is that it is somewhat single threaded, and both serialises and blocks requests, so although it might only be taking 3% or so of CPU, it markedly slows down other processes too: I had a similar WMI problem with false positive ECC memory error reporting on a dual XEON server a while back, machine ran horrendously slow despite WMI only being at 2% CPU (an entire core thread on a 24c/48t machine).

The problem is worse when ElevenClock is enabled on secondary monitors, scaling roughly linearly, with cpu usage about 2.5:1 WMI/ElevenClock in all cases.

Main machine is LG Gram 2022, i7-1260P 12c/16t, 32GB RAM, 4TB PCIE 4 SSD, 3% WMI, 1.2% ElevenClock.

I just checked on an i7-1195G7 4c/8t 16GB RAM, 1TB PCIE 3 SSD and similar problem but rather worse, about 5% WMI, 1.5% ElevenClock with three monitors, but interestingly unlike the LG Gram above, the CPU utilisation in this case is negligible on a single monitor.

Monitor arrangement is 32" UHD above, and 2 x 16" 2560x1600 panels below.
image

@nezbrun
Copy link

nezbrun commented Sep 26, 2022

Anecdotally, and coincidentally at the same time since this heavy WMI CPU started, it also intermittently breaks S3 Sleep IME: at least 50% of the time one of my laptops running ElevenClock won't properly sleep, it goes into a no-man's land, one eye open, the other closed.

When I disable ElevenClock (quit & stop it starting at startup), all is fine.

@marticliment
Copy link
Owner

Hi guys, if any of you have Python knowledge, the latest head has some optimzation on how win32api functions work. Could you please test it and see if it helps?

@Jaaaaanobert
Copy link

Hi guys, if any of you have Python knowledge, the latest head has some optimzation on how win32api functions work. Could you please test it and see if it helps?

Sorry, I neither have any experience in python, nor with WinAPI implementations.

@akerckhofs
Copy link

Can confirm this is still an issue on 3.8.2

@Ataye
Copy link

Ataye commented Oct 8, 2022

I typically leave my pc on but sleep at nights. After having a second user log in (sharing the pc) ram and cpu usage has jumped up. I tried the low cpu usage setting and average cpu jumped up to mid 30's% from the 20's%, but it did remove the 2nd instance of the clock. I have 2 monitors, windows 11. Quitting EC allows wmi to drop to 0 from ~6%, but the EC process is still running and using 8GB of ram but ~15% cpu. It is not running for the 2nd account (still logged in but switched to mine).

EC v3.8.2 auto updated. The only real options i've changed are adding Day name, and to disable hiding the default windows clock on the primary screen as it was doing weird things (like not actually hiding it). PC has 32gb and is a i7-9700K.

image

@marticliment
Copy link
Owner

When not sleeping the clock works fine, right?

@Ataye
Copy link

Ataye commented Oct 8, 2022

I can go through a number of sleep / wake cycles after a reboot and it is ok. I noticed the above usage today after letting my better half log into her account. Come to think of it, I think last time I had to kill EC was somewhere around after a second user logged in..

@marticliment
Copy link
Owner

I have found an issue that could be the cause of your problem, @Ataye, and it shoukd be fixed now

marticliment added a commit that referenced this issue Oct 9, 2022
@Jaaaaanobert
Copy link

image
Looks bad (installed 3.9.1)

@marticliment
Copy link
Owner

marticliment commented Oct 9, 2022

Process explorer still reports high, right?

Because lats update decreases by ~50% usage for me on all tested machines (from 0.5% to 0.25)

@Jaaaaanobert
Copy link

image
Unfortunately, yes

@marticliment
Copy link
Owner

May I ask your system specifications?

@Jaaaaanobert
Copy link

Of course:
CPU: I7 7700k (not overclocked)
Motherboard: Strix z270F
RAM: 4x 8GB G-Skill Triden-Z (3200 MHz)
GPU: Strix GTX 1070

Running 3 Monitors @1080P/60Hz

@marticliment
Copy link
Owner

So, since the system is not the issue. let's check some scenarios on version 3.9.1:

What happens if...

  • you reset ElevenClock, restart the clock and skip the welcome wizard?
  • you enable low-cpu mode (with ElevenClock default settings)?
  • Disable secondary monitor clocks?*
  • Do you have any other systems running W10 or W11? Could you please try ElevenClock there?

*image

@Ataye
Copy link

Ataye commented Oct 9, 2022

I have found an issue that could be the cause of your problem, @Ataye, and it shoukd be fixed now

Excellent, i'll try some normal sleep/wake and account switch cycles and see how it performs. I just installed v3.9.1 from the store.

WMI on my system before suggested settings change above. However, 'Enable low-cpu mode' reduces wmi usage a bit, but 'Do not show the clock on secondary monitors' reduces wmi usage to 0 cpu.

image

i7-9700K, 32GB, ASUS Z390M-PRO Onboard graphics only :'(

@marticliment marticliment added ready-to-go Ready to be fixed without further conversation hard-one Idk if it is going to be possible to do that and removed needs-author-answer Waiting for the author to answer. If author does not answer in 2 days, Issue gets closed labels Oct 10, 2022
@marticliment
Copy link
Owner

Do not show the clock on secondary monitors

What would happen then, if instead of disabling this option from the settings window you were to manually blacklist all cloccks that are present on the secondary display (right-click clock -> monitor tools -> blacklist this monitor)?

@Jaaaaanobert
Copy link

So, since the system is not the issue. let's check some scenarios on version 3.9.1:

What happens if...

  • you reset ElevenClock, restart the clock and skip the welcome wizard?
  • you enable low-cpu mode (with ElevenClock default settings)?
  • Disable secondary monitor clocks?*
  • Do you have any other systems running W10 or W11? Could you please try ElevenClock there?

*image

Hi,

the reset does not make any changes.
The Low CPU-Mode reduces the load to about 5%
Disabling the clock on secondary monitors reduces the load to about 4% / 2% in low CPU mode
I can test it on other Systems later.

Do not show the clock on secondary monitors

What would happen then, if instead of disabling this option from the settings window you were to manually blacklist all cloccks that are present on the secondary display (right-click clock -> monitor tools -> blacklist this monitor)?

The reset has the same effect as the option to disable eleven clocks on sec. monitors.

marticliment added a commit to xsm1997/ElevenClock that referenced this issue Oct 13, 2022
@marticliment
Copy link
Owner

This issue has now been fixed.

On clock launch, WMI will still consume a fair amout of cpu during the first 36 seconds, and then it will drop down to 10% usage

@marticliment
Copy link
Owner

No, it has been fixed on the dev branch, and I'll (hopelly soon, but I'm very busy these days) publish an update including the fix and the fixes for the other issues that are open

@sigpark sigpark mentioned this issue Nov 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working hard-one Idk if it is going to be possible to do that ready-to-go Ready to be fixed without further conversation
Projects
None yet
Development

No branches or pull requests

7 participants