xTrayambak / lucem

Bridging the gap between Vinegar and Sober
17 stars 5 forks source link

Spams 'flatpak ps --columns=application', causing polkitd excessive ram usage #11

Closed Furthir closed 2 months ago

Furthir commented 2 months ago

Using Lucem will spam the flatpak ps --columns=application command dozens of times per second per journalctl -b. This causes polkitd's memory usage to increase ~0.1MiB per second, or ~360MiB per hour. This becomes an issue for long sessions. Sober does not have this behavior.

The journal will eventually look like this.

gnome-shell-screenshot-5x2812

The whole line is Registered Authentication Agent for unix-process:2545802:28338875 (system bus name :1.373087 [flatpak ps --columns=application], object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8) Unregistered Authentication Agent for unix-process:2617339:28604274 (system bus name :1.376838, object path /org/freedesktop/PolicyKit1/AuthenticationAgent, locale en_US.UTF-8)

Currently my workaround is to repeatedly run sudo systemctl restart polkit to reset its ram.

Unsure if this is related, but running lucem run -v also spams DEBUG shell: refresh: acquiring lock on ptr LoadingState DEBUG shell: loading screen is done, hiding surface

xTrayambak commented 2 months ago

The lucem run -v spam is intended. I've been having this issue myself for a while too, but it's a bit difficult to solve since that's basically how we verify that Sober's still running. As a bandaid fix until I patch this out entirely, open up the settings manager and set the polling delay to something like 8000. image

xTrayambak commented 2 months ago

This should be fixed by that commit since we now directly use pidof instead of relying on flatpak ps, but this is a temporary solution (I'm on a metro :P). I'll add a proper /proc scanner once I'm back home.