View previous topic :: View next topic |
Author |
Message |
gmichels Guru
Joined: 20 Jun 2003 Posts: 480 Location: Brazil
|
Posted: Fri May 07, 2004 12:02 pm Post subject: Laptop runs slower on batteries |
|
|
Hi all
I am wondering why my laptop is extremely slower when running on batteries. When I plug in the ac adapter, there's a huge difference in boot time, desktop response, application load time, compile time, etc. I would say the difference is almost 50%.
My laptop is an HP ze4430us, AMD2400+, 512 DDR266, running love-sources 2.6.5-r5. I am using cpufreq to help cool down things a bit and also save battery life.
I first thought it was something related to cpudynd, but even disabling it completely makes no difference.
Anyone with similar experiences? |
|
Back to top |
|
|
Angrybob Guru
Joined: 19 Apr 2003 Posts: 575
|
Posted: Fri May 07, 2004 12:21 pm Post subject: |
|
|
maybe your laptop automatically lowers the cpu speed based on the power source |
|
Back to top |
|
|
gmichels Guru
Joined: 20 Jun 2003 Posts: 480 Location: Brazil
|
Posted: Fri May 07, 2004 12:28 pm Post subject: |
|
|
Maybe, but /proc/cpuinfo shows the cpu max speed when running on batteries. |
|
Back to top |
|
|
Safrax Guru
Joined: 23 Apr 2002 Posts: 422
|
Posted: Fri May 07, 2004 4:14 pm Post subject: |
|
|
gmichels wrote: | Maybe, but /proc/cpuinfo shows the cpu max speed when running on batteries. |
/proc/cpuinfo will never update. You will need to look in /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed or scaling_governor. Setspeed will have the actual cpu frequency at that moment. Governor will have which governor is currently controlling cpuspeed. If governor has powersave, the cpu is operating at the lowest speed. If governor has performance it is operating at the fastest speed. |
|
Back to top |
|
|
gmichels Guru
Joined: 20 Jun 2003 Posts: 480 Location: Brazil
|
Posted: Fri May 07, 2004 4:36 pm Post subject: |
|
|
I don't have any scaling_setspeed there. Here's what I have:
Code: | gmichels@gustavo cpufreq $ ls
cpuinfo_max_freq scaling_available_governors scaling_max_freq
cpuinfo_min_freq scaling_driver scaling_min_freq
scaling_available_frequencies scaling_governor
gmichels@gustavo cpufreq $ cat cpuinfo_max_freq
1795500
gmichels@gustavo cpufreq $ cat cpuinfo_min_freq
532000
gmichels@gustavo cpufreq $ cat scaling_available_frequencies
532000 665000 798000 931000 1330000 1795500
gmichels@gustavo cpufreq $ cat scaling_available_governors
powersave userspace performance
gmichels@gustavo cpufreq $ cat scaling_driver
powernow-k7
gmichels@gustavo cpufreq $ cat scaling_max_freq
1795500
gmichels@gustavo cpufreq $ cat scaling_min_freq
532000 |
The scaling_governor setting (powersave or performance) depends on what I am doing at the moment I check it.
My kernel options:
Code: | [*] CPU Frequency scaling
< > /proc/cpufreq interface (deprecated)
Default CPUFreq governor (performance) --->
--- 'performance' governor
<*> 'powersave' governor
<*> 'userspace' governor for userspace frequency scaling
[ ] /proc/sys/cpu/ interface (2.4. / OLD)
<*> CPU frequency table helpers |
|
|
Back to top |
|
|
allucid Veteran
Joined: 02 Nov 2002 Posts: 1314 Location: atlanta
|
Posted: Fri May 07, 2004 6:59 pm Post subject: |
|
|
check the BIOS to see what is setup for automatic scaling depending on the powersource. |
|
Back to top |
|
|
gmichels Guru
Joined: 20 Jun 2003 Posts: 480 Location: Brazil
|
Posted: Fri May 07, 2004 8:01 pm Post subject: |
|
|
No good, there aren't any power management options in the bios.
I should ask HP but at the moment I say I am using linux I get that "unsupported OS, we can't help you there" response. |
|
Back to top |
|
|
int2str Guru
Joined: 29 Sep 2003 Posts: 362
|
Posted: Fri May 07, 2004 9:07 pm Post subject: |
|
|
gmichels.
I have a Compaq Presario 2100Z notebook (very similar to yours) and have exactly the same problem.
I've posted about it to the Linux Kernel mailing list, here's the only response I got so far:
Quote: | Hi!
>> My notebook [1], powered by a AMD Athlon XP2400+ (k7) is slowing down when
>> running on battery. This happens regardless of whether or not cpu frequency
>> scaling is enabled or not. /proc/cpuinfo still shows maximum frequency, but
>> the computer is definitely slowed down considerably.
That may well be bios feature. Maybe battery is not even able to get
you enough juice for full speed.... |
I do think you should call HP tech support about it. If they ask about the OS, just say WinXP or whatever came with your notebook. Because I've tried it (had to re-install XP ) and it's exactly the same in XP. And there is no option to change it.
Cheers,
André _________________ Adpot an unanswered post today! |
|
Back to top |
|
|
gmichels Guru
Joined: 20 Jun 2003 Posts: 480 Location: Brazil
|
Posted: Fri May 07, 2004 9:24 pm Post subject: |
|
|
Ok, I will try hp's technical support and come back with whatever they say about it.
Thanks for the input, I thought I was the only "lucky" one to have this problem. |
|
Back to top |
|
|
Odin Tux's lil' helper
Joined: 04 Mar 2003 Posts: 92
|
Posted: Sat May 08, 2004 8:08 am Post subject: |
|
|
Safrax wrote: | gmichels wrote: | Maybe, but /proc/cpuinfo shows the cpu max speed when running on batteries. |
/proc/cpuinfo will never update. You will need to look in /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed or scaling_governor. Setspeed will have the actual cpu frequency at that moment. Governor will have which governor is currently controlling cpuspeed. If governor has powersave, the cpu is operating at the lowest speed. If governor has performance it is operating at the fastest speed. |
Not true.. mine updates, on an AthlonXP-M. |
|
Back to top |
|
|
gmichels Guru
Joined: 20 Jun 2003 Posts: 480 Location: Brazil
|
Posted: Sat May 08, 2004 2:31 pm Post subject: |
|
|
Mine updates too.
Code: | $ cat /proc/cpuinfo
processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 10
model name : mobile AMD Athlon(tm) XP2400+
stepping : 0
cpu MHz : 530.099
cache size : 512 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 pae mce cx8 sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mp mmxext 3dnowext 3dnow
bogomips : 1048.57 |
Do you know what's worse? I was transferring a 350 mb file from a nfs server here (100 mb hub - half duplex). While running on batteries, the maximum transfer rate was around 2.4 mb/sec. Plugged in the ac adapter and the transfer speed went up to 8 mb/sec.
I really must find a solution to this. |
|
Back to top |
|
|
gmichels Guru
Joined: 20 Jun 2003 Posts: 480 Location: Brazil
|
Posted: Sat May 08, 2004 8:53 pm Post subject: |
|
|
It really is something related to the bios. Take a look at this url.
Let's hope HP solves this in future bios releases. |
|
Back to top |
|
|
int2str Guru
Joined: 29 Sep 2003 Posts: 362
|
Posted: Fri May 28, 2004 1:33 pm Post subject: I got it! |
|
|
gmichels, all,
I found the (a) solution to the problem (at least for my notebook)! Tonight I finally decided to work on these issues a little bit again and try to come up with better way to suspend, etc. So I resumed my quest into ACPI land.
Here's what I did to get rid of the annoying slowdown:
1) Follow this great HOWTO to compile and fix your own ACPI DSDT:
https://forums.gentoo.org/viewtopic.php?t=122145
2) On line 3544 in my dsdt code, in the SMSL method there is a line which reads simply:
There were only two such lines in my DSDT, and only one was in SMSL, so you should find it there.
3) Change that line to read:
This simply disables a small piece of code (4 lines - 2 of which are debug), which sets the "Throttle Duty Cycle".
Recompile your DSDT, put it in your initrd or kernel (I use initrd), reboot and voilá... No more slowdown.
I posted this also to the ACPI mailing list to have the experts there look at it. If they think its ok, I'll make a nicer howto. In the meantime, post here if you need more info, or better yet, if it worked for you!
_________________ Adpot an unanswered post today! |
|
Back to top |
|
|
gmichels Guru
Joined: 20 Jun 2003 Posts: 480 Location: Brazil
|
Posted: Fri May 28, 2004 2:48 pm Post subject: |
|
|
Dude I am gonna try this right now, I don't run on batteries anymore just because of this.
Just being safe, which notebook model do you own? |
|
Back to top |
|
|
int2str Guru
Joined: 29 Sep 2003 Posts: 362
|
Posted: Fri May 28, 2004 2:56 pm Post subject: |
|
|
A Compaq Presario 2100Z
AMD Athlon XP 2400+
ALi Chipset
ATI Radeon Mobile (IGP 320)
I have another update actually:
As I said, there is two "If (0x01)" lines in there. Change them both actually. The handles the switch from AC->Battery, the other handles when you start out on battery. _________________ Adpot an unanswered post today! |
|
Back to top |
|
|
cwt137 Tux's lil' helper
Joined: 25 Jul 2003 Posts: 99 Location: Southern California
|
Posted: Fri May 28, 2004 3:26 pm Post subject: |
|
|
I still use the other OS alot. Will this patch mess up the DSDT in the other OS? |
|
Back to top |
|
|
gmichels Guru
Joined: 20 Jun 2003 Posts: 480 Location: Brazil
|
Posted: Fri May 28, 2004 4:01 pm Post subject: |
|
|
int2str
The "If (0x01)" lines weren't at the same places as yours, but there were two and I changed them both. I still get 2 errors in the DSDT compilation, though the original DSDT file had these 2 errors also.
Do you use 2.6? I am having some trouble patching the kernel (mine is 2.6.6-love4) and I don't use initrd. |
|
Back to top |
|
|
int2str Guru
Joined: 29 Sep 2003 Posts: 362
|
Posted: Fri May 28, 2004 5:08 pm Post subject: |
|
|
cwt:
No, it only works while in Gentoo since it overwrite the DSDT only temporarily after the kernel is loaded. You reboot and it's back to rom.
michels:
Yes, the lines dont have to be in the same place (should be the same functions though). What errors do you get?
I am using 2.6.7-rc1-mm1 with an older initrd patch.
Cheers,
Andre _________________ Adpot an unanswered post today! |
|
Back to top |
|
|
gmichels Guru
Joined: 20 Jun 2003 Posts: 480 Location: Brazil
|
Posted: Fri May 28, 2004 5:28 pm Post subject: |
|
|
I have asked also on the howto thread, but here's the post:
Code: | # patch -Np1 --dry-run < /root/ze4430us/acpi/dsdt_override.patch
patching file drivers/acpi/osl.c
Hunk #2 FAILED at 209.
1 out of 2 hunks FAILED -- saving rejects to file drivers/acpi/osl.c.rej |
My osl.c has the following significant part (I guess):
Code: | acpi_os_table_override (struct acpi_table_header *existing_table,
struct acpi_table_header **new_table)
{
if (!existing_table || !new_table)
return AE_BAD_PARAMETER;
#ifdef CONFIG_ACPI_INITRD
if (!memcmp(existing_table, "DSDT", 4) && (dsdt_start != NULL)) {
printk(KERN_INFO "ACPI: Using customized DSDT\n");
*new_table = (struct acpi_table_header*)dsdt_start;
} else
#endif
*new_table = NULL;
return AE_OK;
} |
Maybe there's a new version of the override patch, as I am using the one listed in the first page of that thread. Do you know what is the bug number for that attachment? |
|
Back to top |
|
|
int2str Guru
Joined: 29 Sep 2003 Posts: 362
|
|
Back to top |
|
|
cwt137 Tux's lil' helper
Joined: 25 Jul 2003 Posts: 99 Location: Southern California
|
Posted: Fri May 28, 2004 6:59 pm Post subject: |
|
|
gmichels wrote: | It really is something related to the bios. Take a look at this url.
Let's hope HP solves this in future bios releases. |
I hope they fix this stupid bug and the PST table bug i have on my compaq presario 2100 series notebook. |
|
Back to top |
|
|
Legoguy Apprentice
Joined: 22 Dec 2003 Posts: 166 Location: Edmonton, Alberta, Canada
|
|
Back to top |
|
|
cwt137 Tux's lil' helper
Joined: 25 Jul 2003 Posts: 99 Location: Southern California
|
Posted: Sat May 29, 2004 2:03 am Post subject: |
|
|
Thanks Legoguy, just upgraded my laptop to the latest bios and the slow laptop bug went away, no editing the dsdt. Just the pst problem but there is a fix in kernel 2.6.6 . |
|
Back to top |
|
|
int2str Guru
Joined: 29 Sep 2003 Posts: 362
|
|
Back to top |
|
|
brodo Guru
Joined: 15 Apr 2003 Posts: 319
|
Posted: Wed Jun 02, 2004 1:18 pm Post subject: |
|
|
gmichels wrote: | Mine updates too.
Code: | $ cat /proc/cpuinfo
cpu MHz : 530.099
|
|
It updates if you're running an UP kernel. On 2.7., it will _never_ update. |
|
Back to top |
|
|
|