-
Notifications
You must be signed in to change notification settings - Fork 27
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
Extremely High CPU Usage #36
Comments
Hmm. My system (Ryzen 7 3800X, GTX 1070) has about 10% CPU usage and 20% GPU usage when running Aerial on my dual monitor setup. (Both monitors are larger than 1080p). My best guess is that in both your desktop and laptop, Windows isn't choosing to run Aerial on your GPU. I would make sure you have the latest drivers installed and check Window's power and performance settings. As for the lines appearing when you disable video processing, my best response is that "there is a reason we have video processing enabled by default." The lines are a known issue, but there isn't much we can do about it. When you disable video processing Aerial falls back to the default HTML video player. Video processing is simply redrawing the video onto an HTML5 canvas. This helps with resizing, transitions, coloring, and a few other things. |
The lines are visible whether video processing is disable or not. Although I have noticed that if it's enabled, it tends to happen to a fraction of the videos. It's like splitting the screen horizontally to three panels and have different focus and blur to them, with the best resolution being the center. So as a solution you propose checking which GPU is set by the system defaults to run the Electron process? |
Hmm. You should send a screen shot, I would be interested to see how bad it is. And yes, checking which GPU is running Aerial should help. |
I tried IrfanView to try and capture the screen based on a timer(20 seconds after screensaver is set to start)but it returns a black screen.... Any tools that might have worked for you? |
Try running Aerial from the command line like this: |
Can't seem to find the right video at the moment, I will send a screenshot whenever the lines reappear. |
Hmm. My fans do seem to be a bit louder when actually running the screensaver, as apposed to previewing it. I wonder if it has something to do with how windows actually runs the screensaver. I'll take a look into it. |
I might have found the cause of the problem. I run one desktop and two laptop setups. The desktop has two monitors connected to its discrete GPU. The laptops have their onboard screen and a monitor through their hdmi output. I set them all to run aerial with the discrete gpu, except desktop which is default. What I have found from task manager, is that the laptops now use both integrated and discrete gpu when running aerial. So I disconnected the external monitors. The result is that the laptops where much quiter and only the discrete gpu had a load. I did a little resarch and saw a lot of people saying that the laptop's hdmi port can only run an external display through the integrated graphics only. Can't figure out why but this seems to fix the high cpu and gpu usage, so not a bug from aerial. As for the desktop, sometimes has a high load on both cpu and gpu sometimes not, so I have to investigate a litlle bit more for that. |
I frequently encounter a similar issue, but I haven't been able to measure CPU usage. The screensaver seems to start fine, but it grinds to stuttering halt in a matter of minutes, and my CPU and GPU fans both start screaming. This is bizarre because I can play the videos (4K and 1080p) just fine in VLC without issue. This issue occurs with either 4K or 1080p issues. I'm logging cpu usage data, i'll share if i find anything useful My setup: |
There is definitely something funny going on - aerial.scr uses ~50% CPU when it's triggered by Windows' idle timer. If I run the screensaver by hitting the Preview button in Screen Saver Settings, it barely hits 2% CPU usage. This is consistent and repeatable across system restarts. I know it's not throttling or SpeedStep - those are disabled so I have constant CPU clock and power. It hints at malware, but I run a pretty tight ship, and have a good antivirus and firewall. Strange |
I've notice that Aerial uses a lot more power when activated by the system than in preview mode or when I run it from the command line. I wonder if it is something with how Windows runs screensavers? |
I just tested with cDima's Aerial. It is the same case with that: uses a lot more CPU when activated by the system, and runs like a breeze in preview mode. From the surface of it, it doesn't look like there's been much change in the way Windows handles screensavers since win95. There's barely any technical/system level documentation to be found. In the absence of empirical data, a question about arbitrary experience: does your screensaver appear to stutter while using unreasonable amounts of power? |
When I was doing some testing whenever usage got close to 100% lots of stuttering happened. So yes. But on some computers where the usage wasn't close to 100% (smaller screen space, better GPU, etc.) it looked fine. |
https://docs.microsoft.com/en-us/windows/win32/lwef/screen-saver-library Have you seen this page? The only thing that I think might be the culprit is security context. === In other news: If I start screensaver from DisplayFusion's context menu, it runs fine. But having to manually start a screensaver each time defeats the purpose |
@OrangeJedi that link is broken. |
The dark chapter in my life that has been Windows System Programming. I wrote a simple c# 'screensaver' that just counts out fibonacci and displays it on screen with a timer. This is not a bug with aerial, and should be closed. On the other hand, I've been able to use Display Fusion to launch aerial.exe /s (renamed from the .scr) based on it's own idle timer. It works beautifully - It renders fast and uses ~3% CPU. I did try Windows' own task scheduler, but it would not launch the screensaver with focus, and just figuring out the security context is a nightmare. |
Surely it's not a bug concerning only aerial. But I don't think it should be closed. In fact your article about the screen saver library made me check through again all the parameters when running the screensaver. Running it through displayfusion dramatically reduced the cpu & gpu load. To tell you the truth, I think this issue should remain open just until the cause of the problem is found, not necessarily the solution. Reading through some electron based documentation it might have to deal with signing the app with a certificate, but I will take a deeper look through it. |
If you put it that way, it makes good sense. The major reason I switched over from cDima's aerial to this one is the performance issue. I do like getting to the bottom of things. One thing to investigate: While I'm consistently recording high CPU usage for aerial.scr when windows activates it, I don't know what the CPU is doing in all those extra cycles that are being attributed to the screensaver. I keep referring back to the context: maybe kernel or other system worker threads get activated along with a screensaver, in that shared context (indexing, for example). Why this would indicate high CPU usage for aerial boggles me. I know that the CPU does not go into a low power (C2/3/etc) state, nor is it due to throttling or a change in the clock speed - I've controlled for that. It might just be malware - a screensaver seems like a good place to hide something like a cryptominer. |
I agree that we should leave this open, at least until we can pin down the cause of the problem. It does seem to be a problem with Windows itself rather that Aerial, the fact the when ran from the commandline there is no issue shows that. I would like to fix the issue as it would seem that Aerial is stuttering on lots of computers, but I have no idea how feasible it is. As for @arsalan86's question about the link, the link was broken because we were moving around some documentation. The same place can be found here |
An initial search I did came back with 2 possible scenarios:
|
Quick Update
Any of that action seemed to give any hint about the problem. During testing I noticed somthing though. I let the screensaver automatically start for a number of times, in which some of them I heard the fan spinning loud but in other I didn't. This might give a clue that it might be some task running every now and then. |
I took some inspiration from @christian-korneck's workaround in #52 and wrote this page detailing how to set up Aerial to run in Window's Task Scheduler instead of the normal screen saver app. It seems to work pretty well and doesn't have the frame rate issues that it did before. |
I am using an Office-PC with internal GPU (Intel HD4600 -Uuuh!). |
The day has finally come where this issue can be closed in peace 🤞 If by chance issues related to this come up for versions past v1.0.0, open a new issue as the cause will hopefully be different. |
Describe the bug
High CPU usage and very low GPU usage during playback.
To Reproduce
In normal mode the CPU hits very high utilization and GPU usage is alomost 0%.
If I disable all video processing the CPU seems to lower a bit and GPU takes a little bit of workload ~15%. This was testes both in a laptop with intergrated and discrete graphics and in a desktop with discrete graphics. Both environements came up with the same result. Also when video processing is disabled, little horizontal blurred lines seem to appear in the video playback.
Expected behavior
Shouldn't the CPU have less of a workload than the GPU in this situation, or split the workload between them?
Aerial Version
Beta 0.5.3
Additional context
I have proposed an enhancement #34, don't know if this can be achieved but this could be a good idea.
The text was updated successfully, but these errors were encountered: