Productivity Sync Just another WordPress weblog

September 15, 2013

Debug tricks for linux distrobutions

Filed under: Uncategorized — admin @ 9:51 am

This is a quick post to capture some earnings on tips for tracing and debugging behaviors in Ubuntu linux on (ChrUbuntu specifically) and how the issues got root caused and the work arounds.

 

The URL’s of were I picked these are are:

The problem I was having was that my C7 Chromebook running ChrUbuntu was eating its battery after the first resume.  Using TOP it was clear that the process sucking the battery was polkitd.  However; the root case of polkitd going ape shit turns out to be some ACPI interrupts that don’t get shut off after the resume.  These are notes on how to figure things out next time on my own.

  1. First use top to find out what process is burning the CPU.
  2. use sudo strace -p <pid> to see what that process is doing. (NOTE: this doesn’t help in this case but is still interesting.)
  3. use dbus-monitor –system to see what sorts of things are going on from DBus. (NOTE: this doesn’t help much either but still interesting)
  4. disable polkitd and look for the next largest CPU user (chmod 0 <path-to-polkitd>; sudo killall polkitd) .  Ah!  looks like ACPID is using a modest amount of CPU.  Hmm. lets STACE it!.  Hmmm, looks like its getting lid/button events non-stop.
  5. re-enabled polkitd (you need it for a lot of ubuntu desktop to work)
  6. Check the /proc/interrupts for higher than wanted interrupt rates.
  7. Check /sys/firmware/acpi/interrupts/ for high interrupt rates. (grep -r . /sys/firmware/acpi/interrupts/* )  Ah! looks ike gpe1F is going nuts!  lets shut it up.
  8. echo “disable”>/sys/firmware/acpi/interrupts/gpe1F

ok  That helped.  Lets make it stick. http://askubuntu.com/questions/176565/why-does-kworker-cpu-usage-get-so-high has the magic beans.  I used.  Just swap gpe13 for gpe1F and things are happy.

The only down side is that now to suspend the device I need to manually execute: “sudo pm-suspend”  Which is ok IMO as this is a cheep hacking computer for me so it doesn’t need to be perfect.

My next thing to figure out is how to update the chrubuntu kernel to the latest and what interesting tidbits of fun I’ll discover in that.

 

Powered by WordPress