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

Intensive GPU usage with background blur #78

Open
Bellavene opened this issue Mar 17, 2024 · 16 comments
Open

Intensive GPU usage with background blur #78

Bellavene opened this issue Mar 17, 2024 · 16 comments
Labels
available on master bug Something isn't working

Comments

@Bellavene
Copy link

Bellavene commented Mar 17, 2024

For some reason, I have non-stop GPU usage if I turn blur background on and a window is open. If the window is a fullscreen browser window, GPU usage goes crazy at full throttle.
M1, macos 14.0

@FelixKratz
Copy link
Owner

FelixKratz commented Mar 18, 2024

I will have a look at this but ultimately, borders is not using the GPU itself. The WindowServer uses it for compositing the windows, should there really be excessive GPU usage for the blur feature, it probably needs to be removed.

What is your methodology for measuring the GPU usage?

@Bellavene
Copy link
Author

Bellavene commented Mar 18, 2024

Clearly something is wrong with the implementation. It shouldn't spam GPU like that.

I watch the usage through iStat Menus, it shows GPU load under the CPU usage menu. I've noticed the slow down only after a while, when I started an application depended on GPU, the frame rate was unusually low, unusable.

@FelixKratz
Copy link
Owner

The „implementation" is literally only one line:

SLSSetWindowBackgroundBlurRadius(cid, border->wid, settings->blur_radius);

So if anything goes wrong it is likely not in the borders code.

Apart from that I dont think your testing methodology is robust enough to draw conclusions. I will try to come up with something more sophisticated when I investigate this.

What I would advise is to disable the blur feature for now.

@FelixKratz
Copy link
Owner

FelixKratz commented Mar 18, 2024

So I removed the blur feature, as I was easily able to reproduce your findings (It is indeed GPU usage of WindowServer that gets out of hand, not the borders process). A more robust blur feature would likely need to be implemented using a CALayer backed solution.

@FelixKratz FelixKratz added bug Something isn't working available on master labels Mar 18, 2024
@Bellavene Bellavene mentioned this issue May 22, 2024
@OfficialCRUGG
Copy link

Why fully remove it when it causes issues only for some people? I have barely any GPU usage change with this feature. It should receive a warning or be deprecated in any other way, but not removed until there's a better solution.
Blur is, at least to me, an extremely important feature.

@Bellavene
Copy link
Author

"Some people" I doubt it, it was eating GPU resources like crazy for no acceptable reason.

@OfficialCRUGG
Copy link

Well, it isn't for everyone. So even if it's only a few that can use it without issues, why take this very essential feature away from them, when you can just make it very clear that it can cause issues and no support is given for any issues or something like this.

@Bellavene
Copy link
Author

Bellavene commented May 22, 2024

It was for everyone, if you personally don't see an issue, doesn't mean it does not exist.

@OfficialCRUGG
Copy link

I can literally see my GPU usage... With blur on, it was at like 15% maximum. That's totally fine.

@Bellavene
Copy link
Author

Bellavene commented May 22, 2024

Even 15% non-stop for a static blur effect — is a huge issue. Needless to say, it was much more.

@OfficialCRUGG
Copy link

I think you are misunderstanding what I am saying.
I'm not saying the difference was only 15% on your device, I am talking about mine. That's a literal fact.
And I'm not saying this shouldn't be improved in the future, but fully taking it away even though many people have no issues with it. 15% GPU usage in no way limits my ability to use my device. If you have issues, why not just not use the feature until this is improved? I still don't see a reason for fully removing this, when adding a warning notice would have done the trick.

@Bellavene

This comment was marked as off-topic.

@OfficialCRUGG

This comment was marked as off-topic.

@Bellavene

This comment was marked as off-topic.

@OfficialCRUGG

This comment was marked as off-topic.

@Bellavene

This comment was marked as off-topic.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
available on master bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants