Discovered cpufreq kernel modules are not loaded any more

Bug #1084262 reported by Paul F
36
This bug affects 7 people
Affects Status Importance Assigned to Milestone
cpufrequtils (Ubuntu)
Confirmed
High
Unassigned

Bug Description

loadcpufreq: Discovered cpufreq kernel modules are not loaded any more

--Expected--
cpufreq driver to be loaded at boot when cpufrequtils is installed

--What happened instead---
The driver was not loaded. (Can be manually loaded).

--Description--
The shell script file `loadcpufreq' fails to load cpufreq driver kernel modules since the modules were renamed.

Script: /etc/init.d/loadcpufreq
Kernel modules: /lib/modules/$(uname -r)/kernel/drivers/cpufreq/

The loadcpufreq script is hard-wired to know the cpu-specific module names that it loads at boot. Additionally, it attempts to discover and load other, unknown cpufreq drivers.

The unknown modules are assumed by the script to have a name beginning `cpufreq_', eg, `cpufreq_nforce2'.

At some point, the cpufreq module names in the distro have been rationalised resulting in the `cpufreq_' modules being renamed to `cpufreq-'. Consequently, they are no longer discovered and loaded by loadcpufreq.

--Solution--
Attached is a patch to loadcpufreq which resolves the problem. A changelog entry is included. The diff is made against the latest (version 8) cpufrequtils package source which has been verified against the Quantal version of /etc/init.d/loadcpufreq.

I have tested the patch under a number of scenarios and am confident that it does not introduce new problems or regressions. Perhaps it can be floated upstream to the package maintainer.

--Impact--
Limited.
This bug will only affect systems with the cpufrequtils package installed, a specific kernel configuration and particular cpu scaling hardware.

--Test case--
1. Install cpufrequtils under a kernel with a modularised rather than built-in hardware-specific cpufreq driver named cpufreq-*.ko. Eg, an nforce2-based machine running Quantal with kernel 3.5.0-18.29 with module cpufreq-nforce2.ko.

2. Reboot

3. Verify that the module has not been loaded at boot
% lsmod | grep cpufreq

4. Manually insert the module and verify.
% sudo modprobe cpufreq-<name>
% lsmod | grep cpufreq

5. Apply patch

6. Reboot

7. Repeat 3 above to verify that this time the module *has* been loaded.

My installation info

% lsb_release -rd
Description: Ubuntu 12.10
Release: 12.10

% apt-cache policy cpufrequtils
cpufrequtils:
  Installed: 008-1
  Candidate: 008-1
  Version table:
 *** 008-1 0
        500 http://gb.archive.ubuntu.com/ubuntu/ quantal/universe i386 Packages
        100 /var/lib/dpkg/status

Revision history for this message
Paul F (boxjunk) wrote :
Revision history for this message
Ubuntu Foundations Team Bug Bot (crichton) wrote :

The attachment "Patch for loadcpufreq shell script" of this bug report has been identified as being a patch. The ubuntu-reviewers team has been subscribed to the bug report so that they can review the patch. In the event that this is in fact not a patch you can resolve this situation by removing the tag 'patch' from the bug report and editing the attachment so that it is not flagged as a patch. Additionally, if you are member of the ubuntu-reviewers team please also unsubscribe the team from this bug report.

[This is an automated message performed by a Launchpad user owned by Brian Murray. Please contact him regarding any issues with the action taken in this bug report.]

tags: added: patch
Revision history for this message
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in cpufrequtils (Ubuntu):
status: New → Confirmed
Revision history for this message
Paul F (boxjunk) wrote :

See also LP: 1079900 #10 (not duplicate, but related and dependant).

dino99 (9d9)
tags: added: i386 precise quantal raring saucy
Revision history for this message
dino99 (9d9) wrote :

Hopes to get that issue fixed asap, either with cpufrequtils or cpupower replacement (ppa:kamalmostafa/cpupower)

Revision history for this message
Paul F (boxjunk) wrote :

What's the difference between cpufreq and cpupower? Can you point me at cpupower tech spec and/or sources please?

Revision history for this message
dino99 (9d9) wrote :

hi Paul,
i've discovered that package while googling around that module issue. But i cant say much about it: only that it has not been updated since a while.

Myself have not found how to make the 3.9 kernel (and the others too) to identify the right driver: it's an intel q9550, and should accept speedstep_centrino, but does not (even acpi_cpufreq is refused)

https://launchpad.net/~kamalmostafa/+archive/cpupower

tags: added: kernel-bug regression-proposed
Revision history for this message
Kaizoku (neoark) wrote :

I am having the same problem. After Every reboot i restart cpufrequtils services since there is no kernel module loaded.

Revision history for this message
dino99 (9d9) wrote :

Saucy xsession-errors output:

Traceback (most recent call last):
  File "/usr/bin/indicator-cpufreq", line 79, in <module>
    ind = MyIndicator(options.show_frequency)
  File "/usr/lib/python3/dist-packages/indicator_cpufreq/indicator.py", line 99, in __init__
    self.update_ui()
  File "/usr/lib/python3/dist-packages/indicator_cpufreq/indicator.py", line 110, in update_ui
    fmin, fmax, governor = cpufreq.get_policy(self.cpus[0])
  File "/usr/lib/python3/dist-packages/indicator_cpufreq/cpufreq.py", line 143, in get_policy
    policy = (p.contents.min, p.contents.max, p.contents.governor.decode())
ValueError: NULL pointer access

/var/log/upstart/kmod.log:
ERROR: could not insert 'w83627ehf': Device or resource busy

Changed in cpufrequtils (Ubuntu):
status: Confirmed → Triaged
importance: Undecided → High
dino99 (9d9)
tags: removed: quantal raring saucy
tags: added: vivid
Revision history for this message
Shahar Or (mightyiam) wrote :

Someone please check whether this is still a thing?

Changed in cpufrequtils (Ubuntu):
status: Triaged → Incomplete
Revision history for this message
Alberto Salvia Novella (es20490446e) wrote :

If you are still experiencing this bug, please:

1. Set its status to "confirmed".
2. In the tag list under the bug description, add the first name of the release where you are experiencing the bug.

Kaizoku (neoark)
Changed in cpufrequtils (Ubuntu):
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.