Comment 0 for bug 1002811

Revision history for this message
Harald Sitter (apachelogger) wrote :

In the xevent processing thread there is a conditional sleep() call when the event queue is empty. This is unnecessary as the used XNextEvent function blocks on an empty queue. The sleep call thus causes an unnecessary wake up every 2 seconds preventing CPU sleep and consuming CPU time for no good reason.

This is easily resolved by removing the bogus loop.

Reproduce:
* make sure xsettings-kde is running
* use sudo powertop
* observe that xsettings-kde is having 0.5 events/second (one event every 2 seconds) and causes CPU usage of (on my system) 14us

Fixed:
* in powertop xsettings-kde does not have any events most of the time, using no CPU (or it is not showing up at all)