Powertop shows 30 wakeups/second

Bug #136724 reported by Stefano Maggiolo
2
Affects Status Importance Assigned to Milestone
Weather wallpaper
Confirmed
Low
Raúl González Duque

Bug Description

When running weather-wallpaper (as the only python application on the system) powertop shows this:
   8,8% ( 28,8) python : schedule_timeout (process_timeout)
It always shows something around 30 wakeups/seconds, when the application should be totally idle. I don't know much python and I can't (for now) provide a solution.

Revision history for this message
Stefano Maggiolo (stefano.maggiolo) wrote :

I think about this and maybe the best solution is using gobject.timeout_add (waiting for the timeout_add_seconds, when pygtk will implement it) and launching a thread that does the update a single time everytime the timeout tick. When there's no connection you can just kill the first timer and create a new one that tick every minute, doing the opposite when the connection is back.

Revision history for this message
Raúl González Duque (zootropo) wrote :

I don't know about powertop, because I don't want to recompile the kernel for it to work on my system but htop says it only goes into the CPU when the scheduled updates fire, as it should be.

It think it could be because of the gtk main thread asking for user events, I don't know.

It would be great if you could provide some more information.

Changed in weather-wallpaper:
assignee: nobody → zootropo
importance: Undecided → Low
status: New → Incomplete
Revision history for this message
Stefano Maggiolo (stefano.maggiolo) wrote :

No, it's because of python event wait, or so it seems. I don't know if there's a way to do this thing in python, but I tried to do in the gtk-ish way and here's the patch. Note that it is buggy:
1. it doesn't update more frequently if there's no connection and
2. it has some problem when quitting with ^C.

Revision history for this message
Raúl González Duque (zootropo) wrote :

Ok, I'll take a look when I finish with other things.
Thank you very much Stefano

Changed in weather-wallpaper:
status: Incomplete → Confirmed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.