WayfireWM / wayfire

A modular and extensible wayland compositor
https://wayfire.org/
MIT License
2.42k stars 179 forks source link

render-manager: Don't paint when session is not active #2484

Closed soreau closed 1 month ago

soreau commented 1 month ago

This can happen when switching to another tty. A test is to run glxgears in a drm session with xwayland, then switch to another tty and run top. The wayfire cpu usage is 100+%. However with this patch, when the session is inactive, the cpu usage is negligible.

One note is that patches were pushed to seatd recently which make the session->active state reliable. At the time of this writing, seatd does not have a release containing these patches, so for this to work reliably, seatd git master is recommended.