powersaved initscript errors on Via Nehemiah [patch-supplied]

Bug #117446 reported by Sitsofe Wheeler
6
Affects Status Importance Assigned to Milestone
powernowd (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

Binary package hint: powernowd

Description of the problem:
On boot an two initscript errors appear when booting the system without a splash screen.

Steps to reproduce:
1. Do a fresh install of Ubuntu 7.04 on a Via Nehemiah.
2. Do to run level 1.
3. Run
/etc/init.d/powernowd.early
/etc/init.d/powernowd

Expected results:
A message indicating whether frequency scaling could be started or not.

Actual results:
[: 94: ==: unexpected operator
 * Starting powernowd...
/etc/init.d/powernowd: 156: cannot create /sys/devices/system/cpu/cpu0//cpufreq/scaling_governor: Directory nonexistent
 * CPU frequency scaling not supported [ OK ]

How reproducible is the problem:
The problem is reproducible every time.

Version information:
Ubuntu Feisty
powernowd 0.97-1ubuntu7

Tags: patch

Related branches

Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

Shell trace for /etc/init.d/powernowd.early

Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

Shell trace for /etc/init.d/powernowd

Revision history for this message
Sitsofe Wheeler (sitsofe) wrote :

This has taken an interesting turn of events on Gutsy. The script still initially fails as it can't find a cpufreq interface to talk to however it is now possible to
modprobe longhaul
return the powernowd script and have it scale the CPU appropriately.

Here's the output of lspci:
00:00.0 Host bridge: VIA Technologies, Inc. VT8623 [Apollo CLE266]
00:01.0 PCI bridge: VIA Technologies, Inc. VT8633 [Apollo Pro266 AGP]
00:0f.0 Ethernet controller: VIA Technologies, Inc. VT6105 [Rhine-III] (rev 8b)
00:10.0 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)
00:10.1 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)
00:10.2 USB Controller: VIA Technologies, Inc. VT82xxxxx UHCI USB 1.1 Controller (rev 80)
00:10.3 USB Controller: VIA Technologies, Inc. USB 2.0 (rev 82)
00:11.0 ISA bridge: VIA Technologies, Inc. VT8235 ISA Bridge
00:11.1 IDE interface: VIA Technologies, Inc. VT82C586A/B/VT82C686/A/B/VT823x/A/C PIPC Bus Master IDE (rev 06)
00:11.5 Multimedia audio controller: VIA Technologies, Inc. VT8233/A/8235/8237 AC97 Audio Controller (rev 50)
00:12.0 Ethernet controller: VIA Technologies, Inc. VT6102 [Rhine-II] (rev 74)
01:00.0 VGA compatible controller: VIA Technologies, Inc. VT8623 [Apollo CLE266] integrated CastleRock graphics (rev 03)

Version information:
Gutsy Tribe 5 liveCD

Revision history for this message
Jacob Nielsen (j.nielsen) wrote :

I don't know if this is helpful but I made the changes below to /usr/share/powernowd/cpufreq-detect.sh to get powernowd to load the right module for the newish VIA C7 processor. It should also fix the 'unexpected operator' bug (at $CPU_FAMILY == 6), which has kept the script from loading the longhaul module.

--- cpufreq-detect-orig.sh 2006-12-19 01:35:34.000000000 +0100
+++ cpufreq-detect.sh 2007-09-11 16:47:18.000000000 +0200
@@ -81,7 +81,11 @@
     ;;
     CentaurHauls*)
     # VIA
- if [ $CPU_FAMILY == 6 ]; then
+ # If the CPU has the est flag, it supports enhanced powersaver and should
+ # use the e_powersaver driver
+ if [ "`grep est $CPUINFO`" ]; then
+ MODULE=e_powersaver;
+ elif [ $CPU_FAMILY = 6 ]; then
  MODULE=longhaul;
     fi
     ;;

Daniel Hahler (blueyed)
Changed in powernowd:
assignee: nobody → blueyed
importance: Undecided → Medium
status: New → In Progress
Revision history for this message
Daniel Hahler (blueyed) wrote :

The bug should be fixed by the upload to my PPA: https://launchpad.net/~blueyed/+archive/+index?field.name_filter=powernow

Please test it and provide feedback if it works. Thanks.

(The actual patch is attached to bug 67341)

Changed in powernowd:
assignee: blueyed → nobody
status: In Progress → Triaged
Revision history for this message
Jacob Nielsen (j.nielsen) wrote :

It works. Below is some output from a VIA EPIA SP13000 (C3 processor) after purging and reinstalling from your PPA. It works also on an EX15000 (C7 processor), where the e_powersaver module is loaded if available.
Both tested with Gutsy (live CD and up-to-date installation respectively).

# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
longhaul
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
ondemand
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governors
userspace powersave ondemand conservative performance
# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
1330000 532000 1197000 1263000 598000 731000 798000 931000 1064000 665000 864000 997000 1130000 1330000 1197000
# cat /proc/cpuinfo
processor : 0
vendor_id : CentaurHauls
cpu family : 6
model : 9
model name : VIA Nehemiah
stepping : 8
cpu MHz : 532.000
cache size : 64 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 1
wp : yes
flags : fpu vme de pse tsc msr cx8 sep mtrr pge cmov pat mmx fxsr sse up rng rng_en ace ace_en
bogomips : 1068.02
clflush size : 32

Revision history for this message
Steve Kowalik (stevenk) wrote :

powernowd (0.97-2ubuntu2) hardy; urgency=low

  [ dAniel hAhler ]
  * debian/init.d:
    - skip use_ondemand if $OPTIONS != "-q" are given (LP: #67341)
    - activate [...]/cpufreq/ondemand/ignore_nice_load in
      use_ondemand, when using ondemand governor instead of powernowd
      (LP: #60042)
    - Use /sys/devices/system/cpu/cpu[0-9]*/ to match CPUs and
      test if it is a directory (LP: #173711, LP: #107820)
    - Do not use "double slashes" in paths to avoid confusion
  * debian/cpufreq-detect.sh:
    - load e_powersaver if CPU has est flag (LP: #117446)
    - fix comparison for CPU_FAMILY=6 (LP: #162524)
    - use /bin/sh instead of /bin/bash for clarification
      (LP: #162524)
    (Patch from Jacob Nielsen, Ralph Janke)

  [ Steve Kowalik ]
  * Correct spelling of Original in Original-Maintainer.

 -- Steve Kowalik <email address hidden> Tue, 18 Dec 2007 19:49:36 +1100

Changed in powernowd:
status: Triaged → Fix Released
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.