bugtpb -- ThinkPad Buttons - Bugs: bug #9230, TPB uses too much CPU


bug #9230: TPB uses too much CPU

Submitted by:  None
Submitted on:  Sat 05 Jun 2004 06:24:16 PM UTC  
Category: NoneSeverity: 3 - Normal
Item Group: NoneStatus: Fixed
Privacy: PublicAssigned to: Markus Braun <mbr>
Open/Closed: Open

Add a New Comment(Rich Markup)

You are not logged in

Please log in, so followups can be emailed to you.


Mon 23 Aug 2004 12:53:51 PM UTC, comment #5:

Fixed in release 0.6.3

Markus Braun <mbr>
Project AdministratorIn charge of this item.
Wed 18 Aug 2004 02:46:29 PM UTC, comment #4:

I changed the default poll time to 200ms and also open the nvram device once. Now, according to my measurements tpb doesn't produce measurable CPU load.
Are you willing to test this version? If so, please contact me via mail, I can sen you the source or a Debian unstable package.

Markus Braun <mbr>
Project AdministratorIn charge of this item.
Mon 16 Aug 2004 11:51:21 PM UTC, comment #3:

I noticed the same problem. I do not have APM polling enabled, and I can verify with strace that all tpb does when it wakes up is open /dev/nvram and read 114 bytes. tpb usually does not show up on top (occasionally at a fraction of a percent), but it still has a major effect: A simple counter loop completes in 2.03 s without tpb, and 2.34 s with. Obviously, this is unacceptible, and IMO 1 ms is an insane polling rate. 100 ms brings the difference on my loop down to <1%, but still detectible. It would be nice if it were in the noise.

My computer is a Thinkpad X40. I am using 0.6.2-1 from Debian unstable. I assume this doesn't have the optimization you mentioned in this bug. Also, can you keep the file open instead of opening it every poll?

Andrew Pimlott <pimlott>
Thu 22 Jul 2004 02:59:06 PM UTC, comment #2:

Even if I got no response I worked on this issue :))
I reduced the number of bytes read from nvram each poll interval. The CPU usage droped to nearly zero.

If you are still interested, please send me a mail so you can check this version on your laptop.

Markus Braun <mbr>
Project AdministratorIn charge of this item.
Mon 07 Jun 2004 12:32:01 PM UTC, comment #1:

Have you tried to disable APM polling? In some cases APM polling generates the CPU load you described. Please specify the following option on the command line


or disable APM in the configuration file


Does this fix the problem?

Markus Braun <mbr>
Project AdministratorIn charge of this item.
Sat 05 Jun 2004 06:24:16 PM UTC, original submission:

TPB generally uses 2-5% of my 1.8Ghz CPU. I'd like this to be reduced to 0%, possibly by polling less frequently or in a less computationally expensive manner.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach File(s):

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


CC list is empty


Do you think this task is very important?
If so, you can click here to add your encouragement to it.
This task has 0 encouragements so far.

Only logged-in users can vote.


Please enter the title of George Orwell's famous dystopian book (it's a date):



Follow 2 latest changes.

Date Changed By Updated Field Previous Value => Replaced By
Mon 23 Aug 2004 12:53:51 PM UTCmbrStatusNone=>Fixed
Mon 07 Jun 2004 12:32:00 PM UTCmbrAssigned toNone=>mbr

Back to the top

Powered by Savane 3.1-cleanup1