hyprwm / xdg-desktop-portal-hyprland

xdg-desktop-portal backend for Hyprland
BSD 3-Clause "New" or "Revised" License
305 stars 48 forks source link

constant CPU usage #94

Closed primalmotion closed 1 year ago

primalmotion commented 1 year ago

xdg-desktop-portal-hyprland is now continously using ~5/6% of CPU, even with nothing running else on hyprland. Restarting it does not change anything

vaxerski commented 1 year ago

yeah, it changed methodology. I'll try to optimize the event loop.

vaxerski commented 1 year ago

should be improved with 2f48e655037411a81669ac8f84dd90bcb6c0c00f

let me know

primalmotion commented 1 year ago

works like a charm. back to 0.0% most of the time. Thanks!

HexPandaa commented 1 year ago

I just updated to the latest version and after a reboot xdg-desktop-portal-hyprland is constantly using 120% CPU and draining the battery. I'll try not to restart to help you debug the problem.

mrvruj commented 1 year ago

Same here, seeing constant 5-6% CPU usage by xdg-desktop-portal using hyprland-git package from AUR. Nothing else running, just empty workspaces.

vaxerski commented 1 year ago

@HexPandaa #103 @mrvruj probably outdated

tacosrdelicioso commented 1 year ago

same. Using hyprland-git version as well. It started doing it right after I logged out this time. all of a sudden I heard my fans kick on so I checked btop. I just killed it

vaxerski commented 1 year ago

this one was fixed in 1.2.0/1.2.1 and is a dupe of some other issue I cba to find rn

horror-proton commented 1 year ago

https://github.com/hyprwm/xdg-desktop-portal-hyprland/blob/2f48e655037411a81669ac8f84dd90bcb6c0c00f/src/core/PortalManager.cpp#L321-L326 Wait, did you mean pollfds[i].revents here? @vaxerski

vaxerski commented 1 year ago

oops

vaxerski commented 1 year ago

fixed d8daa2a84f5e9b38eb89e0631b294e7d0a83aa9b

arvind2109 commented 1 year ago

I'm new to Linux and Hyprland, can someone explain how to fix this issue.