guidance-power-manager crashes at startup

Bug #112120 reported by Federico on 2007-05-03
18
Affects Status Importance Assigned to Milestone
kde-guidance (Ubuntu)
High
Luka Renko
Feisty
High
Luka Renko

Bug Description

Binary package hint: kde-guidance-powermanager

Since some days, probably after some updates (but I'm not completely sure), guidance-power-manager crashes everytime I try to launch it.
Before it was working perfectly.
I tried also to remove my ~/.kde/share/config/power-managerrc, but nothing has changed.
This is the backtrace:

Traceback (most recent call last):
  File "/usr/share/python-support/kde-guidance/guidance-power-manager.py", line 1077, in <module>
    mainWindow = PowermanagerApp(None, "main window")
  File "/usr/share/python-support/kde-guidance/guidance-power-manager.py", line 1021, in __init__
    self.pmwidget.prepare()
  File "/usr/share/python-support/kde-guidance/guidance-power-manager.py", line 107, in prepare
    self._initUI(self.parent())
  File "/usr/share/python-support/kde-guidance/guidance-power-manager.py", line 276, in _initUI
    self.systray.actionCollection().action(actualFreq).setChecked(True);
TypeError: argument 1 of KActionCollection.action() has an invalid type
Error in sys.excepthook:
Traceback (most recent call last):
  File "/var/lib/python-support/python2.5/apport_python_hook.py", line 44, in apport_excepthook
    binary = os.path.realpath(os.path.join(os.getcwdu(), sys.argv[0]))
IndexError: list index out of range

Original exception was:
Traceback (most recent call last):
  File "/usr/share/python-support/kde-guidance/guidance-power-manager.py", line 1077, in <module>
    mainWindow = PowermanagerApp(None, "main window")
  File "/usr/share/python-support/kde-guidance/guidance-power-manager.py", line 1021, in __init__
    self.pmwidget.prepare()
  File "/usr/share/python-support/kde-guidance/guidance-power-manager.py", line 107, in prepare
    self._initUI(self.parent())
  File "/usr/share/python-support/kde-guidance/guidance-power-manager.py", line 276, in _initUI
    self.systray.actionCollection().action(actualFreq).setChecked(True);
TypeError: argument 1 of KActionCollection.action() has an invalid type

Luka Renko (lure) wrote :

Did you change CPU frequency scaling policy (with power-manager or some other SW)?

Can you attach output of "lshal" command?
Can you provide output of the following commands:

  cat /sys/devices/system/cpu/*/cpufreq/scaling_*

Changed in kde-guidance:
status: Unconfirmed → Needs Info
Luka Renko (lure) wrote :

I have attached patch that should prevent crash of powermanager if cpufreq governor is not one of three supported (Dynamic/Powersave/Performance).
You can apply this patch on your system by doing:

  sudo patch -p0 < gpm-freq-crash.patch

I will implement better fix for next version of kde-guidance which should be available for Gutsy release.

Changed in kde-guidance:
assignee: nobody → lure
importance: Undecided → High
Federico (81joe81) wrote :

Yes, I changed my cpufreq governor: that was the problem.
With ondemand it worked fine, while with conservative it crashes.

With your patch, it does not crash, it just prints a warning:
Warning: policy from config file not supported

Thank you for your work

Luka Renko (lure) wrote :

Confirmed, assigned to Jonathan and lower priority as this is Gutsy.

Changed in kde-guidance:
assignee: lure → jr
importance: High → Medium
status: Needs Info → Confirmed
Luka Renko (lure) wrote :

Sorry, ignore previous comment (wrong bug). ;-)

Thanks for testing. I will try to prepare proper package for potential SRU.

Changed in kde-guidance:
assignee: jr → lure
importance: Medium → High
Luka Renko (lure) wrote :

Fix committed to KDE SVN.

------------------------------------------------------------------------
r660822 | lure | 2007-05-03 23:09:40 +0200 (Thu, 03 May 2007) | 12 lines

Improve Dynamic CPU policy:
- add support for 'conservative' CPU governor
- when running on AC, try the following CPU governors (in this order):
  ondemand, conservative, userspace
- when on battery, try the following CPU governors (in this order):
  conservative, ondemand, userspace
http://launchpad.net/bugs/105259

Fix crash in case that unsupported CPU frequency governor is used. CPU
policies listed in menu are now dynamically added depending on support in HW.
http://launchpad.net/bugs/112120

Changed in kde-guidance:
status: Confirmed → Fix Committed
Patrick Salami (pat-entitycom) wrote :

I'm experiencing the same problem, as well as bug 91545. I tried your patch above, but it hasn't worked, guidance-power-manager is still crashing, as well as the display configurator.
Should I mess with the settings in the BIOS regarding ACPI? I tried setting the CPU scaling to performance, but according to powernowd, CPU scaling is "not supported"; I don't know if that's a harware issue or a software issue, since this is a Pentium D 3.0Ghz with the following kernel:

$ uname -a
Linux freerick-desktop 2.6.20-15-generic #2 SMP Sun Apr 15 06:17:24 UTC 2007 x86_64 GNU/Linux

The output of the lshal command is also attached to this post, so you can review it. Since I'm using an x64 platform, I can't use the updated packages that you have released. Do you maybe have a tarball I can compile? Any help with this would be much appreciated.

In addition, my ethernet adapter dies every once in a while, usually after a period of inactivity. From what other users have posted, this appears to be a power management issue; the kernel logs the following:

May 15 06:51:14 freerick-desktop kernel: [ 4409.351884] NETDEV WATCHDOG: eth0: transmit timed out

--Patrick

Patrick Salami (pat-entitycom) wrote :

Any updates on this yet? Even after upgrading to all the latest packages, the problem still persists. I tried disabling most ACPI functions in the BIOS and I installed KPowersave, and now my ethernet card no longer shuts down randomly, but a few odd things continue to happen here and there, such as the hard drive spinning out of control and locking up the system.

It seems that frequency scaling is completely disabled for my CPU, so I can't change the settings for that in KPowersave. The patch doesn't work for me so I was wondering if there is a fixed package available for amd64 yet?

Any help would be appreciated!

--Patrick

Milan Knizek (knizek) wrote :

Luka Renko: thanks for the package, the error disappeared both for power manager and monitor settings (on Pentium D 2.6 GHz with i686 kernel).

Luka Renko (lure) wrote :

Patrick (freerick), your problem seems to be different, probably related to Linux kernel. You should open new bug for your problem.

I will nominate this bug fix for SRU for Feisty.

Changed in kde-guidance:
status: Fix Committed → Fix Released
assignee: nobody → lure
importance: Undecided → High
status: New → Confirmed
Wolfram Arnold (wolframarnold) wrote :

See this bug report:
https://launchpad.net/ubuntu/+source/linux-source-2.6.15/+bug/30557

This is not a problem with the KDE module, but the with 2.6.20 SMP kernel in Feisty (and a number of prior ones, going back to mid-2006) reporting the CPU load incorrectly. This does not happen for single CPU kernels. I solved it by recompiling my kernel for single CPU. It's been reported that installing the -i386 (as opposed to the -generic) kernel solves this issue as well. If you have a hyperthreaded or dual-core CPU this may not be the best option for you, though.

I also noticed that the system with the stock generic kernel did throttle when using the "conservative" governor, but that make the KDE powermanager crash; the .deb package above solved this only partially in that it won't crash anymore, but will switch back to the "ondemand" governor which does not throttle appropriately.

Matthew Carpenter (matt-eisgr) wrote :

I found that a fresh install fixed the problem for me... And after a while the crashing returned.

Investigation has shown me that guidance-power-manager crashes when I have Xinerama enabled in xorg.conf. I figured this out because setting up Dual-headed mode is when the crashing started again after the clean installation. Diffing the two configs (pre-dualhead and dualheaded) and changing each part of the differences has shown Xinerama to be the problem. I do not understand it, but hopefully the developers will be able to identify why guidance-power-manager crashes with Xinerama...

Let me know if you would like the back-trace for this

Thanks,
Matt

Np (npro-home) wrote :

I experience the same as Matthew. Xinerama causes guidance-power-manager to crash.

Np

Halgeir (halgeirr) wrote :

I experience the same problem. Running Kubuntu for amd64.

:)-|algeir

Mustang- (juho-valonen) wrote :

Same problem: Enabling Xinerama leads to crash.

Matthew Carpenter (matt-eisgr) wrote :

Still a problem with Xinerama enabled. This causes a great deal of headaches on laptops needing to do presentations...

Marking this bug as "Wont Fix" - Feisty has reached the end of it's supported life.

Changed in kde-guidance:
status: Confirmed → Won't Fix
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers

Bug attachments