Skip to content

backends/drm: Fix 100% cpu usage after tty switch

Vlad Zahorodnii requested to merge work/zzag/backend-drm-high-cpu-usage into master

The drm fd can get stuck in readable state, in which case the QSocketNotifier will fire the activated signal as often as it can leading to high cpu usage.

We need to read() the drm fd in order to make the socket notifier stop firing QSocketNotifier::activated.

This change removes the m_platform->isActive() check to ensure that drmHandleEvent() gets called, in general, it should be safe as we only notify the outputs about completed pageflips.

BUG: 452726

Merge request reports