Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Undervolting with kernel 2.6 [Done!]
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next  
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64
View previous topic :: View next topic  
Author Message
freke
Tux's lil' helper
Tux's lil' helper


Joined: 23 Jan 2003
Posts: 149

PostPosted: Sat Apr 22, 2006 10:01 am    Post subject: Reply with quote

Devport wrote:
Devport wrote:
morfic wrote:
please try the following patch if you would like the ability to change the voltage at boot time or whenever inserting powernow-k8 module

patch kernel 2.6.16-rc2 (only tested on vanilla) with this patch: http://dev.gentoo.org/~morfic/powernow-k8-vcore_list-2.6.16-rc2.diff

Patch does not work with gentoo-sources-2.6.16, but I have a feeling that it does not apply to vanilla 2.6.16 final as well.

Sorry, I just realized that the old version works. I only tried v2 which does not apply.


For me the v2 patches patched fine on my gentoo-sources-2.6.15-r7 only reporting a few minor offsets but all hunks applied fine.
Not that I'm planning on changing my freqs though, but decided I might aswell get the latest patch :)
Back to top
View user's profile Send private message
superwutze
Tux's lil' helper
Tux's lil' helper


Joined: 09 Dec 2004
Posts: 136
Location: Europe/Vienna

PostPosted: Sat May 20, 2006 12:54 pm    Post subject: Reply with quote

somehow the download links for the patches are down, could someone please post the recent v2 patch here (or post a link to it)?
_________________
bill who? micro what?
Back to top
View user's profile Send private message
Devport
Guru
Guru


Joined: 15 Dec 2004
Posts: 361

PostPosted: Sat May 20, 2006 8:13 pm    Post subject: Reply with quote

Get it from

[edit 02/2008]
Removed outdated patch - get an updated version here

http://forums.gentoo.org/viewtopic-p-4662770.html#4662770
[/edit]


Last edited by Devport on Wed Feb 27, 2008 4:30 pm; edited 2 times in total
Back to top
View user's profile Send private message
superwutze
Tux's lil' helper
Tux's lil' helper


Joined: 09 Dec 2004
Posts: 136
Location: Europe/Vienna

PostPosted: Sun May 21, 2006 7:20 am    Post subject: Reply with quote

thanks for the fast reply!
i hope that will finally give me more different steps with less heat :D
_________________
bill who? micro what?
Back to top
View user's profile Send private message
jorges
Tux's lil' helper
Tux's lil' helper


Joined: 31 Oct 2005
Posts: 114
Location: Barcelona, Spain

PostPosted: Wed May 24, 2006 9:21 pm    Post subject: Reply with quote

Hi,
I patched kernel 2.6.16-gentoo-r7 with the powernow-k8-vcore_list-2.6.16-rc2-v2.diff patch (I verified that the powernow-k8.c were the same in both kernel versions). The problem is that it doesn't work! When I load powernow-k8 with modprobe I get in dmesg:
Code:
powernow-k8: Found 1 AMD Athlon 64 / Opteron processors (version 1.60.0)
powernow-k8: fill_powernow_table() entry<6>powernow-k8: Wrong fucking side of things vcore:3, freq:0.
powernow-k8: cfid 0xa, cvid 0xa
powernow-k8:    0 : fid 0x0 (800 MHz), vid 0x16 (1000 mV)
powernow-k8:    1 : fid 0x8 (1600 MHz), vid 0xc (1250 mV)
powernow-k8:    2 : fid 0xa (1800 MHz), vid 0xa (1300 mV)
cpu_init done, current fid 0xa, vid 0xa

Note: When modprobing, I used both possibilities for the vcore_list, i.e. 1100,1050,875 and 875,1050,1100
What's going on? Anybody knows? I'd love to lower these core voltages, that would give me a break with the fan and a bit more battery life.
The other tool around, cpupw, also does weird things. That is, it actually lower the voltages but then it controls the cpu frequency exactly in the opposite way as it should: when idleing, it chooses max frequency and under heavy load it goes down to 800 MHz. These two could be related, don't you think?

jorges
Back to top
View user's profile Send private message
stephen_in_nz
n00b
n00b


Joined: 06 May 2005
Posts: 26

PostPosted: Thu May 25, 2006 1:21 am    Post subject: Reply with quote

Just patched a 2.6.16-gentoo-r7 with powernow-k8.diff works fine

ACPI: CPU0 (power states: C1[C1] C2[C2] C3[C3])
powernow-k8: Found 1 AMD Athlon 64 / Opteron processors (version 1.60.0)
powernow-k8: Requested Voltage for id0 is 1000 mV default voltage is 1000
powernow-k8: Performing required adjustment of 0 mV or 0 25mV steps
powernow-k8: Requested Voltage for id1 is 1100 mV default voltage is 1250
powernow-k8: Performing required adjustment of 150 mV or 6 25mV steps
powernow-k8: Requested Voltage for id2 is 1200 mV default voltage is 1300
powernow-k8: Performing required adjustment of 100 mV or 4 25mV steps
powernow-k8: 0 : fid 0x0 (800 MHz), vid 0x16 (1000 mV)
powernow-k8: 1 : fid 0x8 (1600 MHz), vid 0x12 (1100 mV)
powernow-k8: 2 : fid 0xa (1800 MHz), vid 0xe (1200 mV)
powernow-k8: ph2 null fid transition 0xa

stephenp@amd64 ~ $ uname -a
Linux amd64 2.6.16-gentoo-r7 #2 Thu May 25 10:58:31 NZST 2006 x86_64 AMD Turion(tm) 64 Mobile Technology MT-34 GNU/Linux
#
# CPU Frequency scaling
#
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_TABLE=y
# CONFIG_CPU_FREQ_DEBUG is not set
CONFIG_CPU_FREQ_STAT=y
# CONFIG_CPU_FREQ_STAT_DETAILS is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y

#
# CPUFreq processor drivers
#
CONFIG_X86_POWERNOW_K8=y
CONFIG_X86_POWERNOW_K8_ACPI=y


This is an MT34 inside an MSI 1029.
Back to top
View user's profile Send private message
NewBlackDak
Guru
Guru


Joined: 02 Nov 2003
Posts: 512
Location: Utah County, UT

PostPosted: Thu May 25, 2006 5:16 am    Post subject: Reply with quote

I can't make this work with my Turion. It doesn't matter what I put in as voltage they all try to initialize as zero. Then I get an invalid VID/FID table, no power management works, and I'm stuck at 1800@1.45.
I also tried cpupw. It will not change the voltages either.
Anybody know what gives?

It does work wonderfully with the Opteron in my desktop.
I'm able to run happily at the overclocked 2850@1450, Stock 2200@1350, and underclocked 1550@1050(these are the same setting I use with RMclock in Win) for my 3 settings.
_________________
Gentoo systems.
X2 4200+@2.6 - Athy
X2 3600+ - Myth
UltraSparc5 440 - sparcy
Back to top
View user's profile Send private message
stephen_in_nz
n00b
n00b


Joined: 06 May 2005
Posts: 26

PostPosted: Fri May 26, 2006 5:48 am    Post subject: Reply with quote

Check your voltages with a64-vid - search forum for source. You can also use it to drop the voltage on the fly.

Perhaps the BIOS is borked ?

Any of the scaling governors work ? You're not fighting with a governor running at performance as well ?

Stephen
Back to top
View user's profile Send private message
jorges
Tux's lil' helper
Tux's lil' helper


Joined: 31 Oct 2005
Posts: 114
Location: Barcelona, Spain

PostPosted: Sat May 27, 2006 9:32 am    Post subject: Reply with quote

stephen_in_nz wrote:
Check your voltages with a64-vid - search forum for source. You can also use it to drop the voltage on the fly.

Perhaps the BIOS is borked ?

Any of the scaling governors work ? You're not fighting with a governor running at performance as well ?

Stephen

Your guess about the bios might be right. I am not certain about the model I have (ASUS A6KT), but I've found info from people using a simmilar model (ASUS A6K, A6KM) that report bugs in the DSDT (I assmue you referred to this).
The ondemand governor works quite well, I am going to check for this A64-vid tool. Thanks for the hint.

jorges
Back to top
View user's profile Send private message
NewBlackDak
Guru
Guru


Joined: 02 Nov 2003
Posts: 512
Location: Utah County, UT

PostPosted: Mon May 29, 2006 1:47 am    Post subject: Reply with quote

stephen_in_nz wrote:
Check your voltages with a64-vid - search forum for source. You can also use it to drop the voltage on the fly.

Perhaps the BIOS is borked ?

Any of the scaling governors work ? You're not fighting with a governor running at performance as well ?

Stephen

Ondemand, conservative, and the userspace governors work fine with the default speeds, and voltages. That is fine, but I would really like to undervolt, and not have the fan kick on. Along with setting the powerstate to 1 for the video card, and turning off the wireless card wins me some more of that precious battery time.
_________________
Gentoo systems.
X2 4200+@2.6 - Athy
X2 3600+ - Myth
UltraSparc5 440 - sparcy
Back to top
View user's profile Send private message
stephen_in_nz
n00b
n00b


Joined: 06 May 2005
Posts: 26

PostPosted: Mon May 29, 2006 5:55 am    Post subject: Reply with quote

The pre v2 release of the kernel patch may be your best bet - if the v2 version does not work for you.

I use this on my Turion to drop the voltage at higher speeds my MT34 doesn't like going below 1.0v - which is the BIOS set point.

I never really got cpupw running as swetly as suggested in that thread and decided the patch was a good option - and it has been.

Stephen
Back to top
View user's profile Send private message
jorges
Tux's lil' helper
Tux's lil' helper


Joined: 31 Oct 2005
Posts: 114
Location: Barcelona, Spain

PostPosted: Tue May 30, 2006 9:35 am    Post subject: Reply with quote

stephen_in_nz wrote:
The pre v2 release of the kernel patch may be your best bet - if the v2 version does not work for you.

I use this on my Turion to drop the voltage at higher speeds my MT34 doesn't like going below 1.0v - which is the BIOS set point.

I never really got cpupw running as swetly as suggested in that thread and decided the patch was a good option - and it has been.

Stephen

Can you post it somewhere, or tell where I can get it from? The links in the thread don't work anymore
Back to top
View user's profile Send private message
NewBlackDak
Guru
Guru


Joined: 02 Nov 2003
Posts: 512
Location: Utah County, UT

PostPosted: Thu Jun 01, 2006 1:21 pm    Post subject: Reply with quote

jorges wrote:
stephen_in_nz wrote:
The pre v2 release of the kernel patch may be your best bet - if the v2 version does not work for you.

I use this on my Turion to drop the voltage at higher speeds my MT34 doesn't like going below 1.0v - which is the BIOS set point.

I never really got cpupw running as swetly as suggested in that thread and decided the patch was a good option - and it has been.

Stephen

Can you post it somewhere, or tell where I can get it from? The links in the thread don't work anymore


What he said. I'll host it if someone will send it to me.
_________________
Gentoo systems.
X2 4200+@2.6 - Athy
X2 3600+ - Myth
UltraSparc5 440 - sparcy
Back to top
View user's profile Send private message
stephen_in_nz
n00b
n00b


Joined: 06 May 2005
Posts: 26

PostPosted: Thu Jun 01, 2006 8:16 pm    Post subject: Patch - : powernow-k8.diff Reply with quote

--- arch/i386/kernel/cpu/cpufreq/powernow-k8.c.old 2006-02-05 14:07:17.000000000 -0600
+++ arch/i386/kernel/cpu/cpufreq/powernow-k8.c 2006-02-05 14:11:01.000000000 -0600
@@ -27,6 +27,7 @@
#include <linux/kernel.h>
#include <linux/smp.h>
#include <linux/module.h>
+#include <linux/moduleparam.h>
#include <linux/init.h>
#include <linux/cpufreq.h>
#include <linux/slab.h>
@@ -48,6 +49,11 @@
#define VERSION "version 1.60.0"
#include "powernow-k8.h"

+static int vcore_list[16] = { 0 };
+static int vcore_list_count = 0;
+module_param_array(vcore_list, int, &vcore_list_count, 0444);
+MODULE_PARM_DESC(vcore_list, "List of new voltages to use in order of index 0 ... n");
+
/* serialize freq changes */
static DECLARE_MUTEX(fidvid_sem);

@@ -543,7 +549,34 @@

static void print_basics(struct powernow_k8_data *data)
{
- int j;
+ int j,x;
+ if (data->numps >= 0) {
+ if ( vcore_list_count > data->numps )
+ printk(KERN_INFO PFX "List is too long, ignoring overrides");
+ else {
+
+ int defaultvcore[16] = { 0 } ;
+ int adjustment[16] = { 0 } ;
+ for (x = 0; x < vcore_list_count ; x++) {
+ defaultvcore[x] = find_millivolts_from_vid(data, data->powernow_table[x].index >> 8);
+ if ( vcore_list[x] == 0 ) {
+ adjustment[x] = 0;
+ vcore_list[x] = defaultvcore[x];
+ }
+ else
+ adjustment[x] = (defaultvcore[x]-vcore_list[x])/25;
+
+ printk(KERN_INFO PFX "Requested Voltage for id%d is %d mV default voltage is %d\n",
+ x,
+ vcore_list[x],
+ defaultvcore[x]);
+ printk(KERN_INFO PFX "Performing required adjustment of %d mV or %d 25mV steps\n",
+ defaultvcore[x]-vcore_list[x],
+ adjustment[x]);
+ data->powernow_table[x].index = data->powernow_table[x].index + (adjustment[x] << 8);
+ }
+ }
+ }
for (j = 0; j < data->numps; j++) {
if (data->powernow_table[j].frequency != CPUFREQ_ENTRY_INVALID)
printk(KERN_INFO PFX " %d : fid 0x%x (%d MHz), vid 0x%x (%d mV)\n", j,
Back to top
View user's profile Send private message
Strowi
l33t
l33t


Joined: 19 Aug 2003
Posts: 655
Location: Bonn

PostPosted: Fri Jun 30, 2006 8:16 am    Post subject: Reply with quote

hi,

did anyone already try this on the 2.6.17 kernel?
_________________
--
Linux & such ...
http://blog.hasnoname.de
Back to top
View user's profile Send private message
Devport
Guru
Guru


Joined: 15 Dec 2004
Posts: 361

PostPosted: Fri Jun 30, 2006 9:43 am    Post subject: Reply with quote

V2 works fine with kernel 2.6.17 for me.
Back to top
View user's profile Send private message
DocterD
Tux's lil' helper
Tux's lil' helper


Joined: 15 May 2004
Posts: 129

PostPosted: Sun Jul 02, 2006 5:49 pm    Post subject: Reply with quote

Quote:

powernow-k8: Found 1 AMD Athlon 64 / Opteron processors (version 1.60.2)
powernow-k8: Requested 0MHz with 900mV
powernow-k8: Requested 0MHz with 1100mV
powernow-k8: Requested 0MHz with 1250mV
powernow-k8: invalid powernow_table


Without the Patch, Cool n Quit works problemless. I'm having a Asus A8N VM Board with the latest Bios. For some reason "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq" isn't created.
Back to top
View user's profile Send private message
tux2
Apprentice
Apprentice


Joined: 09 Jun 2004
Posts: 172
Location: Germany

PostPosted: Mon Jul 03, 2006 12:30 pm    Post subject: Reply with quote

I have the same problem with V2.
The first patch works perfectly for me.

You can download the first patch here:
powernow-k8 for 2.6.16
powernow-k8 for 2.6.17

Good luck :)


Last edited by tux2 on Fri Sep 22, 2006 9:51 pm; edited 1 time in total
Back to top
View user's profile Send private message
DocterD
Tux's lil' helper
Tux's lil' helper


Joined: 15 May 2004
Posts: 129

PostPosted: Mon Jul 03, 2006 4:10 pm    Post subject: Reply with quote

Hm, ok i got it working but still there is a problem with the lowest Mhz

Quote:

powernow-k8: Found 1 AMD Athlon 64 / Opteron processors (version 1.60.2)
powernow-k8: Requested Voltage for id0 is 1200 mV default voltage is 1400
powernow-k8: Performing required adjustment of 200 mV or 8 25mV steps
powernow-k8: Requested Voltage for id1 is 1100 mV default voltage is 1350
powernow-k8: Performing required adjustment of 250 mV or 10 25mV steps
powernow-k8: Requested Voltage for id2 is 800 mV default voltage is 1100
powernow-k8: Performing required adjustment of 300 mV or 12 25mV steps
powernow-k8: 0 : fid 0xc (2000 MHz), vid 0xe (1200 mV)
powernow-k8: 1 : fid 0xa (1800 MHz), vid 0x12 (1100 mV)
powernow-k8: 2 : fid 0x2 (1000 MHz), vid 0x1e (800 mV)
cpu_init done, current fid 0xc, vid 0x6
powernow-k8: ph2 null fid transition 0xc
powernow-k8: vid trans failed, vid 0x1e, curr 0x12
powernow-k8: transition frequency failed


As you can see it fails to set thr vcore to 0,8 volts and falls back to 1,1 vcore.

Edit: ok it seems to be Hardware or Bios related. Is it possible to undervolt a Venice E6 more than 1,1 volt?

Edit2: Is it possible to use powernow-k8 without Cool'n'Quit? Because someone told me that it is limiting the Vcore.
Back to top
View user's profile Send private message
stephen_in_nz
n00b
n00b


Joined: 06 May 2005
Posts: 26

PostPosted: Mon Jul 03, 2006 11:09 pm    Post subject: Reply with quote

The powernow patch is only useful for cool N quiet. Otherwise you could manually set the frequncy and the vid using something like a64-vid (earlier in the thread).

Its probably useful to have a play with a64-vid which will give you some details on your cpu family - although you may not be able to get the displayed results. My laptop locks if I drop the 800 Mhz voltage below 1025. Others can go lower with the same cpu - MT-34 .

amd64 ~ # a64-vid
Maximum freq. : 0x0a (1800 MHz)
Startup freq. : 0x00 (800 MHz)
Current freq. : 0x00 (800 MHz)

Voltage range : 0x1e (800 mV) -> 0x08 (1350 mV)
Startup voltage : 0x16 (1000 mV)
Current voltage : 0x15 (1025 mV)

Not sure about the Venice core, there is information that includes details about low voltage steps and how you may only have 1 below a certain voltage. Can't remember the exact details but its around here somewhere and may be in this thread.
Back to top
View user's profile Send private message
widan
Veteran
Veteran


Joined: 07 Jun 2005
Posts: 1512
Location: Paris, France

PostPosted: Tue Jul 04, 2006 9:12 am    Post subject: Reply with quote

DocterD wrote:
Edit: ok it seems to be Hardware or Bios related. Is it possible to undervolt a Venice E6 more than 1,1 volt?

It seems you can't. I could not with a Manchester core X2 (that is basically a dual-core Venice). The CPU reports the voltage range as 1100-1550 mV IIRC.
stephen_in_nz wrote:
Its probably useful to have a play with a64-vid which will give you some details on your cpu family - although you may not be able to get the displayed results. My laptop locks if I drop the 800 Mhz voltage below 1025.

The "voltage range" is the range of allowed voltages, ie the voltages the CPU will accept to set. Whether the CPU can actually work at those voltages is another issue. When trying low voltages, also check dmesg output for recoverable machine checks events.
Back to top
View user's profile Send private message
brihall
Tux's lil' helper
Tux's lil' helper


Joined: 29 Apr 2003
Posts: 86
Location: Colorado, USA

PostPosted: Fri Sep 22, 2006 4:15 pm    Post subject: Reply with quote

powernow-k8-vcore_list-2.6.17.diff applies against 2.6.18 with some fuzz but does not compile:

arch/x86_64/kernel/built-in.o: In function `print_basics':
powernow-k8.c:(.text.print_basics+0x73): undefined reference to `find_millivolts_from_vid'
make: *** [.tmp_vmlinux1] Error 1

Apparently the find_millivolts_from_vid function was removed in 2.6.18.

Adding the function back to powernow-k8.c allowed it to compile:

/* Return a voltage in miliVolts, given an input vid */
static u32 find_millivolts_from_vid(struct powernow_k8_data *data, u32 vid)
{
return 1550-vid*25;
}

Haven't tested the kernel yet, though...

Since the vcore_list patch is the only user of the function, the 2.6.18 version could just inline this.
Back to top
View user's profile Send private message
tux2
Apprentice
Apprentice


Joined: 09 Jun 2004
Posts: 172
Location: Germany

PostPosted: Fri Sep 22, 2006 9:58 pm    Post subject: Reply with quote

You can download the patch here: (thx to brihall)
powernow-k8 for 2.6.18
Back to top
View user's profile Send private message
Zentoo
Apprentice
Apprentice


Joined: 18 Nov 2002
Posts: 171
Location: /dev/console

PostPosted: Mon Sep 25, 2006 1:44 pm    Post subject: Reply with quote

I use since several weeks the patch on a 2.6.17 kernel, and that works fine.

But now, i would like to know if it is possible to use the cool'n'quiet feature to have different step with undervolting enabled WITHOUT change the FSB. I explain: my AMD X2 3800+ could work easily at 2.5Ghz instead of 2Ghz stock one and i cannot use the Cool'n'quiet feature since the first step transition put back the FSB at 200Mhz instead of 250Mhz.

So is it possible to use the powernowd to make transition of multiplier and VID whithout affect the FSB ?
_________________
Kernel 3.14.6| Gcc 4.8.3 | Glibc 2.19
Core i7 990x @ 4.0GHz | X58 | 12Gb
ACCEPT_KEYWORDS="~amd64"
CFLAGS="-march=native -O2 -pipe"
Back to top
View user's profile Send private message
widan
Veteran
Veteran


Joined: 07 Jun 2005
Posts: 1512
Location: Paris, France

PostPosted: Thu Sep 28, 2006 7:55 am    Post subject: Reply with quote

Zentoo wrote:
But now, i would like to know if it is possible to use the cool'n'quiet feature to have different step with undervolting enabled WITHOUT change the FSB.

Cool-n-quiet does not affect the FSB (or at least it should not). It just changes the multiplier and core voltage. FSB is set by a clock generator independant from the CPU, that will not be affected by C-n-Q.
Zentoo wrote:
... since the first step transition put back the FSB at 200Mhz instead of 250Mhz.

Are you sure it really affects the FSB ? It can easily be a display problem. Many tools related to C-n-Q assume the FSB is at 200, and will display a wrong (lower in your case) frequency, but this does not affect the CPU.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on AMD64 All times are GMT
Goto page Previous  1, 2, 3, 4, 5, 6, 7, 8  Next
Page 4 of 8

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum