[Bug 1002811] [NEW] sleep() call causing unnecessary wake ups

Harald Sitter apachelogger at ubuntu.com
Tue May 22 11:36:37 UTC 2012


Public bug reported:

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)

** Affects: xsettings-kde (Ubuntu)
     Importance: Undecided
         Status: Fix Released

** Affects: xsettings-kde (Ubuntu Precise)
     Importance: Undecided
         Status: New

** Also affects: xsettings-kde (Ubuntu Precise)
   Importance: Undecided
       Status: New

-- 
You received this bug notification because you are a member of Kubuntu
Bugs, which is subscribed to xsettings-kde in Ubuntu.
https://bugs.launchpad.net/bugs/1002811

Title:
  sleep() call causing unnecessary wake ups

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xsettings-kde/+bug/1002811/+subscriptions




More information about the kubuntu-bugs mailing list