Not all scaling governors are supported

Bug #105259 reported by Maarten Lankhorst on 2007-04-10
Affects Status Importance Assigned to Milestone
kde-guidance (Ubuntu)
Luka Renko

Bug Description

Binary package hint: kde-guidance

Ondemand and conservative powerscaling governors are missing, causing a crash at starting if they're used. I wrote a patch that it, adds them, attaching it.

On Tuesday 10 April 2007 20:46:29 Maarten Lankhorst wrote:
> Ondemand and conservative powerscaling governors are missing, causing a
> crash at starting if they're used. I wrote a patch that it, adds them,
> attaching it.

I don't know how that corresponds with the HAL implementation of CPUFREQ,
maybe Luka can comment on this?

In any case, can you show me the backtrace of the crash?
sebas | | GPG Key ID: 9119 0EF9
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
Kimmie is liev. - Kim

Maarten Lankhorst (mlankhorst) wrote :

Apparantly I can select the conservative and ondemand governors without problems, so I don't think there is a problem with HAL for that.

Originally it 'crashed' around line 300 at:

This was because my own policy 'conservative' was set but not supported in guidance-power-manager, so it tried to find control 'conservative' and failed, throwing an exception. Adding it with the patch solved the problem. I also added ondemand.

Sebastian Kügler (sebasje) wrote :

Uhm, yes. Can you give me the exception that's thrown without the patch? I'd first like to fix this crash, and then add more code, the patch is adding a bit too much feature at this point, so I'd rather have it reviewed by Luka first. I'd like to fix the crash anyway, quickly.

Maarten Lankhorst (mlankhorst) wrote :

Traceback (most recent call last):
  File "/usr/share/python-support/kde-guidance/", line 1077, in <module>
    mainWindow = PowermanagerApp(None, "main window")
  File "/usr/share/python-support/kde-guidance/", line 1021, in __init__
  File "/usr/share/python-support/kde-guidance/", line 107, in prepare
  File "/usr/share/python-support/kde-guidance/", line 276, in _initUI
TypeError: argument 1 of KActionCollection.action() has an invalid type

Maarten Lankhorst (mlankhorst) wrote :

To reproduce (assuming you have a system that supports cpufreq):

echo conservative > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
start power manager

Luka Renko (lure) wrote :

Yep, crash with unsupported policy is also reported by other users. See bug 112120.
There you can also find a quick fix for this crash. The rest of this report is enhancement and therefore I will mark this as Wishlist.

I will improve this further for next version of kde-guidance (should be released in Gutsy release). We want to keep guidance power-manager simple, this is why we do not want to expose all governors supported in HW, but rather make better defaults based on what HW supports. We already have "Dynamic" policy, which first tries "ondemand" governor and if that one does not work, switches to "userspace". I will change Dynamic behavior for AC and battery mode, so that the following governors will be used in different policy modes:

Dynamic/AC: ondemand, conservative, userspace
Dynamic/Battery: conservative, ondemand, userspace
Powersave: powersave
Performance: performance

Changed in kde-guidance:
assignee: nobody → lure
importance: Undecided → Wishlist
status: Unconfirmed → Confirmed
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

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.

Changed in kde-guidance:
status: Confirmed → Fix Committed
Luka Renko (lure) wrote :

This is now released in gutsy.

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

Other bug subscribers