Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
user undervolting
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... 6, 7, 8 ... 12, 13, 14  Next  
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
bdz
Apprentice
Apprentice


Joined: 15 Jul 2005
Posts: 237
Location: Montpellier (France)

PostPosted: Mon Nov 07, 2005 12:21 pm    Post subject: Reply with quote

There should be nothing else to do.
Obviously you need to have the "Intel Enhanced SpeedStep" option in the kernel.
And I think that "Use ACPI tables to decode valid frequency/voltage pairs" or "Built-in tables for Banias CPUs" need to be enabled (at least one of these 2 options or both enabled) But I guess you already have this correctly configured.

Are you sure that your kenel is compiled with the patched file? Can you try to run the command below and check that you have the same output to be sure?
Code:
$ grep "freq_attr" /usr/src/linux/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
static struct freq_attr centrino_freq_attr_voltage_table =
static struct freq_attr* centrino_attr[] = {
        &cpufreq_freq_attr_scaling_available_freqs,
        &centrino_freq_attr_voltage_table,
Back to top
View user's profile Send private message
rschwarze
n00b
n00b


Joined: 01 Jul 2005
Posts: 63
Location: Germany

PostPosted: Mon Nov 07, 2005 9:08 pm    Post subject: Reply with quote

now i have use_acpi_tables activated, but it still don't work. :(

i'm using "linux-2.6.13-reiser4-r5" kernel source and with my own speedstep-centrino.c everything works fine.

any other suggestions or things i can try?

Code:

# ls /sys/devices/system/cpu/cpu0/cpufreq
affected_cpus     scaling_available_frequencies  scaling_governor
cpuinfo_max_freq  scaling_available_governors    scaling_max_freq
cpuinfo_min_freq  scaling_cur_freq               scaling_min_freq
ondemand          scaling_driver                 stats

Code:

# grep "freq_attr" /usr/src/linux/arch/i386/kernel/cpu/cpufreq/speedstep-centrino.c
static struct freq_attr centrino_freq_attr_voltage_table =
static struct freq_attr* centrino_attr[] = {
        &cpufreq_freq_attr_scaling_available_freqs,
        &centrino_freq_attr_voltage_table,
Back to top
View user's profile Send private message
bdz
Apprentice
Apprentice


Joined: 15 Jul 2005
Posts: 237
Location: Montpellier (France)

PostPosted: Mon Nov 07, 2005 11:21 pm    Post subject: Reply with quote

rschwarze wrote:

i'm using "linux-2.6.13-reiser4-r5" kernel source and with my own speedstep-centrino.c everything works fine.

Is the speedstep-centrino.c file of this kernel the same a in the gentoo-sources-2.6.13 kernel? If they are not exactly the same you should patch your kernel with the diff file instead of using my speedstep-centrino.c.
rschwarze wrote:

any other suggestions or things i can try?
You can try to
Code:

# cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver

To check that the centrino driver is used.
And maybe activate the cpufreq debug log and look in dmesg for error messages.

Edit:

To activate cpufreq debug log you need to enable the kernel config:
Code:
-> Power management options (ACPI, APM)
  -> CPU Frequency scaling
    -> CPU Frequency scaling (CPU_FREQ [=y])
      -> Enable CPUfreq debugging

And add the boot parameter "cpufreq.debug=7" to your grub.conf

Then right after booting run this:
Code:
dmesg | grep -i centrino
Back to top
View user's profile Send private message
rschwarze
n00b
n00b


Joined: 01 Jul 2005
Posts: 63
Location: Germany

PostPosted: Tue Nov 08, 2005 12:16 am    Post subject: Reply with quote

i have never used the original speedstep-centrino.c. since 5 month i'm using the speedstp-centrino.c with tuned voltages as described earlier in this thread.

Code:
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_driver
centrino


i will try the debugging now

thx for the fast answers!

edit: now with the debugging, the scaling driver has changed to cpufreq??

the errormessage:

Code:
dmesg | grep -i centrino
cpufreq-core: trying to register driver centrino
speedstep-centrino: Invalid control/status registers (1 - 1)
speedstep-centrino: <6>speedstep-centrino: invalid ACPI data
speedstep-centrino: <6>speedstep-centrino: no table support for CPU model "Intel(R) Pentium(R) M processor 1.40GHz":
cpufreq-core: no CPU initialized for driver centrino


can i somehow combine my speedstep-centrino with the frequencies for my cpu with your patch?
Back to top
View user's profile Send private message
bdz
Apprentice
Apprentice


Joined: 15 Jul 2005
Posts: 237
Location: Montpellier (France)

PostPosted: Tue Nov 08, 2005 2:20 am    Post subject: Reply with quote

rschwarze wrote:
can i somehow combine my speedstep-centrino with the frequencies for my cpu with your patch?

Yes I think this is possible.
Adding your frequency table to my speedstep-centrino.c file or adding my modifications to your file should work. If you want to manually add my patch to your file just follow the instructions in chapter 3.3 of the wiki page. It's only a matter of 2 copy and paste.
Back to top
View user's profile Send private message
rschwarze
n00b
n00b


Joined: 01 Jul 2005
Posts: 63
Location: Germany

PostPosted: Tue Nov 08, 2005 2:53 pm    Post subject: Reply with quote

Finally it works! thx very much for your help!

With my old speedstep-centrino.c

with the changes you explain in the howto

without "use_acpi_tables" (because my fucking acpi doesnt know my cpu ;))


One more question: Do you have the "echo ..." stuff in your local.start or how did you do this? I think that would be a useful hint in the howto.

edit: my actual table of stable voltages (Pentium M 710):
0600: .700
0800: .700
1000: .780
1100: .812
1200: .860
1400: .940
Back to top
View user's profile Send private message
bdz
Apprentice
Apprentice


Joined: 15 Jul 2005
Posts: 237
Location: Montpellier (France)

PostPosted: Tue Nov 08, 2005 4:56 pm    Post subject: Reply with quote

@rschwarze:
Glad to know it's finally working for you. thank you for the feedback.

And yes, to set the voltages at boot time I have added the "echo ..." to my "/etc/conf.d/local.start". I agree with you that this would be a usefull information to add in the howto. But I do not have a lot of time to update it right now.

@dgaffuri:
Thank you very much for your feedback and for the voltages you have added to the wiki page.
How did you found these voltages? Did you tried to quickly decrease the voltage until the CPU freeze. And then slowly increasing the voltage while checking with mprime.
Or did you used a safer method like slowly decreasing the voltages while checking with mprime? If it is the 2nd case I would be interested to know how long it took you and if it allowed you to find your safe voltages without crashing your system.
Back to top
View user's profile Send private message
dgaffuri
Advocate
Advocate


Joined: 05 Jun 2005
Posts: 2078
Location: Italy

PostPosted: Tue Nov 08, 2005 6:27 pm    Post subject: Reply with quote

I found these voltages some month ago on windows, using Centrino Hardware Control. Of course with your patch and mprime this may be done in linux too. I used the second method, running at decreasing voltages for each frequency until I got an error from prime95 torture test.

The starting voltages were a mix from the VID#D specifications from Intel (my ACPI reports the VID#A values to kernel) and the results published by other people with similar CPUs in various forums. This is the table I used, first four columns are from Intel specs, the last is the final tested frequency (the one I put in the Wiki). I don't remember the exact voltages that I started from, but I knew for example that 700 mV at 600 MHz was an achievable target, so I probably started to test from 0.800 instead of 0.988.

Code:

Freq   VID#A   VID#B   VID#C   VID#D   Tested

2000   1.340   1.324   1.308   1.276   1.196
1800   1.292   1.276   1.276   1.244   1.084
1600   1.244   1.228   1.228   1.196   1.004
1400   1.196   1.180   1.180   1.164   0.924
1200   1.148   1.132   1.132   1.116   0.844
1000   1.100   1.084   1.084   1.084   0.764
 800   1.052   1.036   1.036   1.036   0.700
 600   0.988   0.988   0.988   0.988   0.700


I first run prime95 for 15 minutes at each frequency/voltage pair, decreasing voltage by 0.48 until I got an error, and then increasing by 0.16 until no error appeared. So for 2.0 GHz I could have run at 1.276, 1.228, 1.180, getting an error here, and at 1.196 with no errors. These took about one day.

Then I run a second test for a couple of hours at each frequency. I got about 3 or 4 errors in total, so I had to test for about 24 hours. This took me other two days.

Finally I ran a longer test with 2.00 GHz and 800 MHz (note that voltage at 800 is the same that at 600), about 8 hours each, and tested the other ones (except 600) for 3 or 4 hour again. This took other 2 days.

It was a lot ot time, but except for the first day you only have to check and change frequency every some hour. I've never had a crash during these tests.

Some day ago I applied your patch, set voltages to my values and ran a 36 hours mprime torture test. During this I used a modified version of your script (posted below) to print temp and battery consumption while switching frequency every 5 minutes. I then run the same test with standard voltages and compared the results, that were good in my opinion:

Code:

Time       Freq   Volt   Battery Temp                 Discharge (mW)
                         (mWh)   Min    Max    Avg    Min     Max     Avg
                           
19:12:18   2000   1340   44571   64.1   75.5   74.3   35326   36190   35739.6
19:18:17   1800   1292   41029   57.8   70.5   68.3   31924   34117   32527.9
19:24:16   1600   1244   37648   56.6   66.0   62.9   28814   31093   29236.7
19:30:16   1400   1196   34711   55.5   65.5   57.6   26384   27723   26839.3
19:36:16   1200   1148   31849   55.4   65.1   60.0   24397   26114   24800.4
19:42:20   1000   1100   29322   54.0   65.1   61.0   22647   23533   22818.4
19:48:28    800   1052   26870   54.0   65.0   61.4   20833   21826   21101
19:54:40    600    988   24570   59.6   62.4   61.3   19364   20293   19654.1
20:00:58         22334                  
                           
16:22:36   2000   1196   44571   58.1   67.4   66.5   25218   30099   29544.2
16:28:34   1800   1084   41601   50.8   65.1   59.1   25660   28436   26022.7
16:34:34   1600   1004   39106   55.0   65.2   60.4   23047   24386   23455
16:40:34   1400    924   36698   55.0   65.1   60.8   21049   22550   21441
16:46:36   1200    844   34581   56.4   62.1   60.2   19450   20466   19848.5
16:52:39   1000    764   32508   55.8   60.1   57.8   18489   18835   18662.3
16:58:45    800    700   30553   52.0   55.6   53.7   17571   17982   17604.3
17:04:57    600    700   28674   50.9   52.4   51.7   16869   17571   17121.4
17:11:15         26838


If someone is interested here's the script (I've adapted for my laptop, fan under ACPI doesn't work and I used lm_sensors to get temps, but everything is in the functions at the beginning).

Code:
#!/bin/bash

# Configuration
declare -ai frequencies=(2000 1800 1600 1400 1200 1000  800  600)
declare -ai minVoltages=(1196 1084 1004  924  844  764  700  700)
declare -ai stdVoltages=(1340 1292 1244 1196 1148 1100 1052  988)

SamplingPeriod=1   # interval between samples
DisplayPeriod=300   # interval between display
ChangePeriod=300   # interval between frequency changes
ChangeDelay=30      # allow battery drain stabilization at freq change

fanString=("off" "on")   # decode numeric (0/1) fan state
TempUnit="°C"
CurrUnit="mW"

# Functions
getVoltages() {
    echo $(cat /sys/devices/system/cpu/cpu0/cpufreq/voltage_table \
            | cut --delimiter="," \
             --output-delimiter=" " \
        --fields=1-${#frequencies[*]} \
          )
}

setVoltages() {
    echo $(echo $* \
            | cut --delimiter=" " --output-delimiter="," --fields=1- \
          ) >/sys/devices/system/cpu/cpu0/cpufreq/voltage_table
    echo "Voltages set to $(getVoltages)"
}

getTemperature() {
    echo $(sensors | grep 'CPU Temp') | cut -f3 -d" " | cut -c2-
}

getCurrent() {
    echo $(grep 'present rate:' /proc/acpi/battery/BAT1/state) \
        | cut -f3 -d" "
}

getFrequency() {
    echo "$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_cur_freq) / 1000" \
        | bc
}

setFrequency() {
    local -ai voltages=($(getVoltages))
    cpufreq-set -f $((${frequencies[$1]}*1000))
    echo
    echo -n "$(getDate) Frequency: $(getFrequency) MHz (${voltages[$1]} mV)  "
}

getFan() {
    echo $(grep 'running' /proc/acpi/toshiba/fan) | cut -f2 -d" "
}

getBattery() {
    echo $(grep 'remaining capacity:' /proc/acpi/battery/BAT1/state) \
        | cut -f3 -d" "
}

getDate() {
    echo $(date "+%H:%M:%S")
}

display() {
    echo
    echo -n "$(getDate)" \
       "$TMin/$TMax/$TAvg $TempUnit $IMin/$IMax/$IAvg $CurrUnit  "
}

displayFan() {
    echo -n "$(getDate) Fan ${fanString[$Fan]} at $(getTemperature) $TempUnit  "
}

displayBattery() {
    echo -n "Battery: $(getBattery) ${CurrUnit}h  "
}

# Display configuration
echo "Sampling period:         $SamplingPeriod s"
echo "Display period:          $DisplayPeriod s"
echo "Change Frequency period: $ChangePeriod s"

# Reset voltages on exit
trap "setVoltages $(getVoltages) >&2" EXIT

# Set and display voltages
setVoltages ${stdVoltages[*]}

# Get and display fan status
Fan=$(getFan); displayFan

# Main loop
#while $(ps -C mprime >/dev/null)
#do
    for freqIndex in ${!frequencies[*]}
    do
        # Variables initialization
        TMin=100
        TMax=0
        IMin=100000
        IMax=0
        TSum=0
        ISum=0
        PCount=0
        SCount=0

        # Set frequency
   setFrequency $freqIndex
   displayBattery

        # Display loop
        LastChange=0
        LastDisplay=0
        while $(ps -C mprime >/dev/null) && [ $LastChange -lt $ChangePeriod ]
        do

            # Check for fan
            NFan=$(getFan)
            if [ $NFan -ne $Fan ]; then
         Fan=$NFan
         displayFan
            fi

            # Wait until next sampling period
            sleep $SamplingPeriod
            PCount=$(($PCount+1))
            if [ $PCount -le $ChangeDelay ]; then
           if [ $(($PCount%10)) -eq 1 ]; then
             echo -n '*' >&2
           fi
                continue;
            fi
            SCount=$(($SCount+1))
            if [ $(($SCount%10)) -eq 1 ]; then
              echo -n '.' >&2
            fi
            LastDisplay=$(($LastDisplay+$SamplingPeriod))
            LastChange=$(($LastChange+$SamplingPeriod))

            # Get temperature
            T=$(getTemperature)
            TSum=`echo "$TSum + $T" | bc`
            TAvg=`echo "scale=1; $TSum / $SCount" | bc`

            # Get current
            I=$(getCurrent)
            ISum=`echo "$ISum + $I" | bc`
            IAvg=`echo "scale=1; $ISum / $SCount" | bc`

            # Compute min/max values
            TMax=`echo "a=$T; b=$TMax; if (a > b) a else b" | bc`
            TMin=`echo "a=$T; b=$TMin; if (a < b) a else b" | bc`
            IMax=`echo "a=$I; b=$IMax; if (a > b) a else b" | bc`
            IMin=`echo "a=$I; b=$IMin; if (a < b) a else b" | bc`

            # Display if required
            if [ $LastDisplay -ge $DisplayPeriod \
               -o $LastChange -ge $ChangePeriod ]; then
                LastDisplay=0
                display
                #TMax=$T
                #TMin=$T
                #IMin=$I
                #IMax=$I
            fi
        done
    done
#done
echo; echo -n "$(getDate) done  "; displayBattery; echo


bdz, thanks for your patch and the Wiki :)
_________________
Adopt an unanswered post
If you feel that your problem has been solved please edit the top post and add [solved] to the subject
Back to top
View user's profile Send private message
bdz
Apprentice
Apprentice


Joined: 15 Jul 2005
Posts: 237
Location: Montpellier (France)

PostPosted: Tue Nov 08, 2005 7:25 pm    Post subject: Reply with quote

Your're welcome.
Thank you for the information on your procedure to find voltages.
Back to top
View user's profile Send private message
pumpkin0
n00b
n00b


Joined: 23 Jul 2005
Posts: 8

PostPosted: Tue Nov 08, 2005 10:38 pm    Post subject: Reply with quote

I'm trying to find the optimal settings for my laptop (IBM R51, PM 725). But something is fishy:

After changing running a load test (like bziping a file from ramdisk or prime95) the discharge rate never retourns to the previous rate. Example:

i set the CPU to 600MHz @ 700mV => 9.7W. I bzip a file on a ramdisk (=>11.4 W due to high load). Afterwards the rate goes down to 9.2 W without any changes to voltage, network, screen,...

Anybody observing a similar effect ?

It cannot be the HD, as it is turned off at startup (seeking 100% slience => running of ramdisk). Network / wireless are down too. The fan is not running. I have nothing on USB. It does not depend on the remaining charge.

Thanks
Back to top
View user's profile Send private message
bdz
Apprentice
Apprentice


Joined: 15 Jul 2005
Posts: 237
Location: Montpellier (France)

PostPosted: Wed Nov 09, 2005 11:42 am    Post subject: Reply with quote

pumpkin0 wrote:
i set the CPU to 600MHz @ 700mV => 9.7W. I bzip a file on a ramdisk (=>11.4 W due to high load). Afterwards the rate goes down to 9.2 W without any changes to voltage, network, screen,...

How do you measure these "W" values?
Back to top
View user's profile Send private message
pumpkin0
n00b
n00b


Joined: 23 Jul 2005
Posts: 8

PostPosted: Wed Nov 09, 2005 11:56 am    Post subject: Reply with quote

Like everybody else:

wathc -n 2 "cat /proc/acpi/battery/BAT0/state | grep rate"

I have to wait for 20-30 secondes for the value to become stable.

OK, it's marked in mW (for milli Watt), but W (for watt) is a more familiar term for me.
Back to top
View user's profile Send private message
rschwarze
n00b
n00b


Joined: 01 Jul 2005
Posts: 63
Location: Germany

PostPosted: Wed Nov 09, 2005 1:44 pm    Post subject: Reply with quote

Hi pumpkin0,

it would be great, if you could explain how you do that thing with the ramdisk and the harddrive shutdown. or is there a nice howto out there?

thx!
Back to top
View user's profile Send private message
pumpkin0
n00b
n00b


Joined: 23 Jul 2005
Posts: 8

PostPosted: Wed Nov 09, 2005 7:31 pm    Post subject: Reply with quote

Hi rschwarze,

This is kind of offtopic, so if any mods want to move me ... :wink:

I didn't find any Howto on this and i don't think there will ever be THE Howto on this. As base i used debian (now that's offtopic). I removed everything i didn't need for day-to-day work (KDE, /usr/share/locale/japanese & Co, /usr/src, /var/cache/...). The rest still didn't fit into the RAM, so i had to trick a bit. I used:

- squashfs
- unionfs
- ramfs
- 1 GB RAM
- and a hand-crafted initrd-init and umount-scripts

Usually noone writes to /usr, /lib /sbin, /opt & co (except installers). So these can be readonly. Squashfs is a compressed, readonly fs, that came in handy (Dont use cramfs, it will fail. cloop is also complex...). I created squashfs images for /usr, /opt, /bin, /sbin, /opt and /var. (total: +-460 MB).

At startup the kernel loads a initrd-image and launches a script called /sbin/init (or so...). That script has to be modified a bit. It creates a ramfs, mounts the HD-based root-partition into it. The ramfs will later be the /, the real HD-based root will be called /HD. The script creates directories for /usr /sbin..., then copies the squashfs-images to the ramfs-dir. It mounts all the images (except var) on the ramfs.

/var is special. It has to be r/w. i mount the image under /var.squashfs and create a dir called /var.rw. These 2 are combined with a unionfs to a r/w /var.

I copy my home-dir, /root, /dev and /etc to the ramfs (devfs didn't work for me). After that it's save to switch to the newly created / and continue booting as usual (including running hdparm -S 5 to cause a spindown after 25 sec of inactivity)

The shutdown-scripts (inside the unmount-script) copy the home and /etc back to the disc. If the batt ever fails or i crash the system: bad luck, everything since last shutdown is lost. I don't save /var (i would have to recreate the squashfs.image everytime.... ). If i want to install something i just reboot w/o initrd, install, then recreate all images (the script takes 20 min, the HD is so slloowwww). I have +- 400 MB RAM left after startup. Enough for websurfing / light work. Not enough for kernel-recompiles or any other serious work.

The runtime is +1 hour compared to the first test (now just under 4 hours). I also tuned
- the centrino-settings using cpufreqd,
- the frequency for my gfx-card (radeon 7500 => use rovclock, it rocks)
- the powersavemode for the WLAN-card (iwconfig eth1 power something...)

And now i'm about to change the voltages for the CPU. Used on the desk the fan does not run. Even high loads for 20-30 sec does not trigger it. Out of the box it ran all the time at a low speed. Now i want more. I want it to stay off while i use the laptop on it's normal surface: the lap.

If anybody wants the scripts or needs more info: send a pm with your email.



600MHz @ 700mV is stable so far, the CPU is at 38°C (laptop on desk) after reading my mail, slashdot, some comics and writing this. I think using it on lap w/o fan for 1-2 hours may be possible.

And now to the topic: any ideas why my discharges rates are so "unpredictable" ? I need exact numbers if i want to fine-tune this system any more. Waiting for the batt to run flat is not an option, i lose /home each time...

Thanks
Back to top
View user's profile Send private message
bdz
Apprentice
Apprentice


Joined: 15 Jul 2005
Posts: 237
Location: Montpellier (France)

PostPosted: Wed Nov 09, 2005 11:26 pm    Post subject: Reply with quote

pumpkin0 wrote:
Like everybody else:

wathc -n 2 "cat /proc/acpi/battery/BAT0/state | grep rate"

I have to wait for 20-30 secondes for the value to become stable.

OK, it's marked in mW (for milli Watt), but W (for watt) is a more familiar term for me.

This is also what I do, but I do not have a value in mW but in mV:
Code:
$ cat /proc/acpi/battery/BAT1/state
present:                 yes
capacity state:          ok
charging state:          discharging
present rate:            794 mA
remaining capacity:      1854 mAh
present voltage:         16052 mV


My guess is that your rate is current * voltage. And the problem is that the battery voltage decreases as the battery discharges.
Back to top
View user's profile Send private message
dgaffuri
Advocate
Advocate


Joined: 05 Jun 2005
Posts: 2078
Location: Italy

PostPosted: Thu Nov 10, 2005 9:13 am    Post subject: Reply with quote

Some battery report capacity in mAh and some in mW, like mine does.
_________________
Adopt an unanswered post
If you feel that your problem has been solved please edit the top post and add [solved] to the subject
Back to top
View user's profile Send private message
bdz
Apprentice
Apprentice


Joined: 15 Jul 2005
Posts: 237
Location: Montpellier (France)

PostPosted: Thu Nov 10, 2005 7:29 pm    Post subject: Reply with quote

@dgaffuri : Do you really mean capacity or discharge rate?. pumpkin0 is talking about discharge rate. This I can understand that it can be in mW instead of mA. But for the capacity it is a weird unit to express it. There is no time in mW.
Just for my personal information I would like to see your complete /proc/acpi/battery/BAT1/state and /proc/acpi/battery/BAT1/info content. Can you post it here?

@pumpkin0: Can you also post your /proc/acpi/battery/BAT1/state and /proc/acpi/battery/BAT1/info content?
Back to top
View user's profile Send private message
dgaffuri
Advocate
Advocate


Joined: 05 Jun 2005
Posts: 2078
Location: Italy

PostPosted: Thu Nov 10, 2005 9:53 pm    Post subject: Reply with quote

Sorry, of course you're right. I meant mWh for capacity and mW for (dis)charge rate.
Code:
~ # cat /proc/acpi/battery/BAT1/state
present:                 yes
capacity state:          ok
charging state:          charging
present rate:            19126 mW
remaining capacity:      42692 mWh
present voltage:         11370 mV
~ # cat /proc/acpi/battery/BAT1/info
present:                 yes
design capacity:         47520 mWh
last full capacity:      44571 mWh
battery technology:      rechargeable
design voltage:          10800 mV
design capacity warning: 896 mWh
design capacity low:     0 mWh
capacity granularity 1:  10 mWh
capacity granularity 2:  10 mWh
model number:            G71C0003V610
serial number:           0000000506
battery type:            Li-ION
OEM info:

_________________
Adopt an unanswered post
If you feel that your problem has been solved please edit the top post and add [solved] to the subject
Back to top
View user's profile Send private message
pumpkin0
n00b
n00b


Joined: 23 Jul 2005
Posts: 8

PostPosted: Thu Nov 10, 2005 10:24 pm    Post subject: Reply with quote

Code:
ram@soak:~$ cat  /proc/acpi/battery/BAT0/state
present:                 yes
capacity state:          ok
charging state:          discharging
present rate:            8315 mW
remaining capacity:      42520 mWh
present voltage:         12301 mV
ram@soak:~$ cat  /proc/acpi/battery/BAT0/info 
present:                 yes
design capacity:         47520 mWh
last full capacity:      42560 mWh
battery technology:      rechargeable
design voltage:          10800 mV
design capacity warning: 2128 mWh
design capacity low:     200 mWh
capacity granularity 1:  1 mWh
capacity granularity 2:  1 mWh
model number:            IBM-08K8193
serial number:             246
battery type:            LION
OEM info:                SANYO
ram@soak:~$ uname -a
Linux soak 2.6.11 #2 Tue Nov 8 20:47:52 CET 2005 i686 GNU/Linux


the "present rate" is not really stable, it woobles all the time.

@ bdz: shouldn't watt = volt * amp stay more or less stable for any given load ? If the voltage goes down, the amp should go up...
Back to top
View user's profile Send private message
rschwarze
n00b
n00b


Joined: 01 Jul 2005
Posts: 63
Location: Germany

PostPosted: Thu Nov 10, 2005 11:24 pm    Post subject: Reply with quote

Code:

 ~ $ cat  /proc/acpi/battery/BAT0/state
present:                 yes
capacity state:          ok
charging state:          discharging
present rate:            923 mA
remaining capacity:      4009 mAh
present voltage:         16555 mV

 ~ $ cat  /proc/acpi/battery/BAT0/info
present:                 yes
design capacity:         4400 mAh
last full capacity:      4032 mAh
battery technology:      rechargeable
design voltage:          14800 mV
design capacity warning: 440 mAh
design capacity low:     220 mAh
capacity granularity 1:  1 mAh
capacity granularity 2:  1 mAh
model number:            0
serial number:           4455
battery type:            LION
OEM info:                SANYO
Back to top
View user's profile Send private message
bdz
Apprentice
Apprentice


Joined: 15 Jul 2005
Posts: 237
Location: Montpellier (France)

PostPosted: Fri Nov 11, 2005 12:36 am    Post subject: Reply with quote

pumpkin0 wrote:
@ bdz: shouldn't watt = volt * amp stay more or less stable for any given load ? If the voltage goes down, the amp should go up...

Well, yes and no.
I'm sorry my English is not good enough to quickly write a good explanation :oops:

A first rough explanation is the following:
Lets write "watt = volt * amp " like this: P = U * I
This is where I say "yes". I agree with that.

For "If the voltage goes down, the amp should go up" it is better to say it the other way round: "If the amp goes up then the volt goes down".
It is not that it is really wrong. It is only a mater of point of view.

The formula for the relation between voltage and current is the following:
U = E - R * I
where E is the battery voltage when it is disconnected and R is the internal resistance of the battery. This is a very simplistic model. because R is not constant. There are several parameters that produce variation on this value. The more important being battery capacity (charge) and battery temperature.

I could try to give a better explanation in the next days if I find some time but it will all boil down to say that what is constant for a given load is more the current than the power.

So if you want better data for your tests you should try to measure the current. I'v seen that there is the "present voltage" in your /proc/acpi/battery/BAT0/state. Maybe you can try to compute "present rate" / "present voltage".
It will give you a measurement that should not be influenced by the "present capacity" of the battery. It will still "woobles" but you will have less variations than with the power.

By te way, here are my batery state and info files:
Code:
b12@quasar ~ $ cat /proc/acpi/battery/BAT1/state
present:                 yes
capacity state:          ok
charging state:          discharging
present rate:            1314 mA
remaining capacity:      1085 mAh
present voltage:         14849 mV
b12@quasar ~ $ cat /proc/acpi/battery/BAT1/info
present:                 yes
design capacity:         2200 mAh
last full capacity:      1962 mAh
battery technology:      rechargeable
design voltage:          14400 mV
design capacity warning: 0 mAh
design capacity low:     0 mAh
capacity granularity 1:  1 mAh
capacity granularity 2:  1 mAh
model number:            MS-1012
serial number:

battery type:            LION
OEM info:


And here is a log of some values at 2 points in time with an almost identical computer load.
If you compute the power (I*V) difference between the first line and the last one and that you compare it to the current (I) difference you wil have an illustration of the poor explanation I have given above about the battery present capacity influence.
(remember that battery capacity is only one of the parameter hat add "noise" to the measure)
Code:

2005/11/11 00:04:04  T = 39.0 °C  I = 921 mA  V = 16460 mV  C = 1962 mAh  F = 798000 MHz
2005/11/11 00:04:06  T = 39.0 °C  I = 921 mA  V = 16460 mV  C = 1962 mAh  F = 798000 MHz
2005/11/11 00:04:07  T = 39.0 °C  I = 921 mA  V = 16460 mV  C = 1962 mAh  F = 798000 MHz
2005/11/11 00:04:09  T = 39.0 °C  I = 921 mA  V = 16407 mV  C = 1962 mAh  F = 798000 MHz
2005/11/11 00:04:10  T = 39.0 °C  I = 921 mA  V = 16407 mV  C = 1962 mAh  F = 798000 MHz
...
2005/11/11 01:28:51  T = 38.0 °C  I = 930 mA  V = 14216 mV  C = 148 mAh  F = 798000 MHz
2005/11/11 01:28:53  T = 38.0 °C  I = 930 mA  V = 14216 mV  C = 148 mAh  F = 798000 MHz
2005/11/11 01:28:54  T = 38.0 °C  I = 926 mA  V = 14216 mV  C = 148 mAh  F = 798000 MHz
2005/11/11 01:28:55  T = 38.0 °C  I = 926 mA  V = 14216 mV  C = 148 mAh  F = 798000 MHz
2005/11/11 01:28:57  T = 38.0 °C  I = 926 mA  V = 14216 mV  C = 147 mAh  F = 798000 MHz


Last edited by bdz on Sat Nov 12, 2005 1:22 am; edited 1 time in total
Back to top
View user's profile Send private message
pumpkin0
n00b
n00b


Joined: 23 Jul 2005
Posts: 8

PostPosted: Fri Nov 11, 2005 6:35 pm    Post subject: Reply with quote

Thx a lot for these infos, i think i understand the problem now. I will use mA and test a bit this weekend.
Back to top
View user's profile Send private message
bdz
Apprentice
Apprentice


Joined: 15 Jul 2005
Posts: 237
Location: Montpellier (France)

PostPosted: Fri Jan 13, 2006 12:43 am    Post subject: Reply with quote

Hello dear undervolting fellows!

I have made several uptades to the Pentium M Undervolting HowTo on gentoo wiki site:
Code:
- The sysfs patch is compatible with kernel 2.6.15-gentoo
- Updated the procedure to patch the kernel using the diff file and
  updated the link to the patch on my web site.
- Removed the procedure to patch the kernel by overwriting
  the speedstep-centrino.c fle
- Removed the procedures to patch the kernels by manually editing
  the peedstep-centrino.c file
- Modified the sample voltages tables to make them more readable
  and more easy to edit.
- Modified the sample voltages tables to have one table
  per Pentium M family
- Restored the contribution of pumpkin0 to the safe voltage table
  that was erroneously removed while reverting "spam robot"
  vandalism of the gentoo wiki  :?
- Restored the init script contribution made by Hothead. It was
  reverted because he accidentally deleted all the rest of the howto while
  adding his init script. I guess that it was also though that is was robot
  vandalism :P .
  I have also made some minor modifications to Hothead's original script.
- Improvements of the page layout (mainly wikified notes and
  warnings using wiki templates)


And I would also like to thank the people who have added their contribution to this howto.
Namely ailas, AnMaster, BP, dgaffuri, DogMatica, elm, Éric, Hothead, pumpkin0, and rschwarze for the ones that I have identified.
Thank you very much to all of you!

Can you please have a look at the new HowTo version to check that I have not made any mistakes on your voltages while reorganizing the tables?

Note to dgaffuri:
You have labeled your CPU "Pentium M 750". But from the frequencies where you have put your voltages I guess that it is actually a Pentium M 755 (2.0 GHz core frequency and 400 MHz FSB frequency). Am I correct?

Note to Éric:
I'm not sure about your CPU model and its max frequency. :oops: Please see the note in the HowTo.

One last thing:
If someone wants to volunteer to write a procedure to find min safe voltages using a tool like mprime it would be very great. I would realy like to see this kind of stuff in the howto but I do not have the time to do it myself. Actually I think that I may not be able to add anything else to the howto in the future except for updates to the patch if it happens that it is incompatible with a new kernel release. I'm far too much busy with my work and my personal life at this time :oops:
Back to top
View user's profile Send private message
rschwarze
n00b
n00b


Joined: 01 Jul 2005
Posts: 63
Location: Germany

PostPosted: Fri Jan 13, 2006 1:54 am    Post subject: Reply with quote

Very nice work! Thank you!


I'm not sure if that is a problem for anybody but me, but I can't use your kernel patch. My acpi or anything else does not correct report the frequencies of my processor. He always try to use frequencies up to 1.6. So I have to use the old version of the speedstep-centrino.c (with your patch manually added to the end of the file), where I can put the informations about my processor into the file.
I have not tested it, but probably in the original file with your patch applied, there is no place to define a dothan processor, am I right?

But, as I have said, its probably only a problem for me. in the howto DogMatica posted infos about the same processor than mine. maybe he read this and can tell me if he has the same problems or not.
Back to top
View user's profile Send private message
bdz
Apprentice
Apprentice


Joined: 15 Jul 2005
Posts: 237
Location: Montpellier (France)

PostPosted: Fri Jan 13, 2006 2:56 am    Post subject: Reply with quote

You're welcome!

I'm using ACPI tables for my CPU but I don't think there is any incompatibility between my patch and custom tables like you use. There is nothing ACPI specific in my patch.

My first idea is that if you make a diff beween the original speedstep-centrino.c and your custom file (without my patch) you will have 2 patches that could be applied successively to the kernel tree.
Well maybe it will require some adjustments somewhere in one or both patch.

My second idea is to enhance my patch to also have a sysfs interface to change the frequencies, not only the voltages. I've been thinking to this for some time. I never went through this because ACPI is working for me. But it is an intersting thing to study. It may require a little more work than the 2 patches solution but I think that other people will be interested by this. You're not the only one that can't use ACPI tables or default builtin tables of the kernel.

If you want you can send me your speedstep-centrino.c file and we can work together on one of these 2 ideas.

BDz

Edit:
By the way, what kind of Pentium M is the 710? I did not found it in the the list of processors numbers on Intel web site :?

Edit 2:
OK, google gave me the answer: Intel Quietly Adds Another 'Dothan' Chip into Lineup.


Last edited by bdz on Fri Jan 13, 2006 7:13 pm; edited 1 time in total
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Goto page Previous  1, 2, 3 ... 6, 7, 8 ... 12, 13, 14  Next
Page 7 of 14

 
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