Linux - Laptop and Netbook Having a problem installing or configuring Linux on your laptop? Need help running Linux on your netbook? This forum is for you. This forum is for any topics relating to Linux and either traditional laptops or netbooks (such as the Asus EEE PC, Everex CloudBook or MSI Wind). |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
10-31-2003, 01:42 AM
|
#1
|
Member
Registered: Oct 2003
Posts: 81
Rep:
|
What's the deal with ACPI, cpufreq, and powernow-k7 on Emachines m5310
I have been trying to get my E-machines m5310 laptop (Mandrake 9.2 RC2) to run cooler for the past three weeks without any luck. So far I've recompiled the 2.4 kernel and ensured that ACPI and cpufreq where enabled.
Now when ever I go to find some info from the ACPI
cat /proc/acpi/processor/CPU0/info
I get the following:
processor id: 0
acpi id: 0
bus mastering control: yes
power management: yes
throttling control: no
performance management: no
The CPU info is:
processor : 0
vendor_id : AuthenticAMD
cpu family : 6
model : 10
model name : Mobile AMD Athlon(tm) XP 2400+
stepping : 0
cpu MHz : 1788.924
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 apic sep mtrr pge mca cmov pat pse36 mmx fxsr sse syscall mp mmxext 3dnowext 3dnow
bogomips : 3565.15
limit interface: no
Cpufreq shows :
minimum CPU frequency - maximum CPU frequency - policy
There is nothing else from cpufreq so I'm guessing it doesn't see my processor. So why does ACPI not detect performance managment? CPUfreq doesn't seem to even see my processor. If I do a lsmod I can see the powernow-k7 but it says (unused) next to it. So I can't tell what it's status is.
One weird thing is I unplug the laptop from the AC it actually does run nice and cool. The weird thing is the cpuinfo still shows the same 1788mhz. Perhaps the kernel just doesn't detect my system right, any ideas?
I really can't wait for the 2.6 kernel because this is just way to hard to get this stuff to work.
|
|
|
01-31-2004, 08:51 PM
|
#2
|
LQ Newbie
Registered: Jan 2004
Posts: 9
Rep:
|
I also have an eMachines model M5312. I tried to install Linux and I have the same problem that you do, the fan doesn't stop spinning and the computer gets really hot. Were you able to find a solution to the problem??
Thank you.
|
|
|
02-02-2004, 02:35 PM
|
#3
|
Member
Registered: Oct 2003
Posts: 81
Original Poster
Rep:
|
Yup, I have the solution for this problem. It's a little trickey but not to bad once you get it figured out. The problem is the cpufreq driver doesn't reckognize the processor. To get around this you have to patch the cpufreq driver with a couple of lines of code. Below is the patch, what you really need to do is add the following lines to the powernow-k7.c file in the kernel source code directory.
If you open up a search for the powernow-k7.c file in your kernel source (assuming you have the kernel source installed) then you can do a search for these lines in the file:
etuple |= (c->x86_model<<4)|(c->x86_mask);
The lines of code that need to be added below this line (look at the whole patch below, you should see what I'm talking about):
if (etuple == 0x7a0) { etuple = 0x781; }
Once you have the file patched you can save it and then compile the kernel. You might want to type "make oldconfig" if you just downloaded the source so that everything is setup like your old system. Then type "make xconfig" and look in under powermanagement and finally cpu frequency scaling options. Check to make sure that cpufreq is selected as well as the userspace cpufreq (you'll know it when you see it) and finally the Athlon cpufreq driver (agaqin, you'll know it when you see it).
Now compile the kernel and you are half way there. Now you need a userspace program that will throttle the frequency for you. I found "cpuspeed" by carl thompson to be a great program that has worked great for me with little problems. The installation is pretty simple as well.
This isn't that complicated if you have done it a few times but on your first go around (especially if you haven't compiled a kernel before) this can be a daunting task. Never the less it is possible so stick with it.
This is the whole patch that will be added to the powernow-k7.c file, you can look at it to figure out where the above sources of code should be inserted into your powernow-k7.c file. Good luck.
diff -Naur linux-clean/arch/i386/kernel/powernow-k7.c linux/arch/i386/kernel/powernow-k7.c
--- linux-clean/arch/i386/kernel/powernow-k7.c 2003-09-28 00:47:23.000000000 +0100
+++ linux/arch/i386/kernel/powernow-k7.c 2003-09-26 00:48:54.000000000 +0100
@@ -294,6 +294,8 @@
etuple &= 0xf00;
etuple |= (c->x86_model<<4)|(c->x86_mask);
+ if (etuple == 0x7a0) { etuple = 0x781; }
+
for (i=0xC0000; i < 0xffff0 ; i+=16) {
p = phys_to_virt(i);
|
|
|
02-03-2004, 06:10 PM
|
#4
|
LQ Newbie
Registered: Jan 2004
Posts: 9
Rep:
|
Thanks for your reply Adamis, I'll try to do what you told me and hope it works. I have a few more questions.
1) I have Debian installed, is the process going to be the same for this?
2) What version of the kernel do you have? and,
3) Where do you get the userspace program?("cpuspeed")
This is the first time I'm going to compile a Kernel, and I know things might go wrong, but I will keep on trying.
Thanks again.
|
|
|
02-04-2004, 01:35 AM
|
#5
|
Member
Registered: Oct 2003
Posts: 81
Original Poster
Rep:
|
I use kernel 2.6.1 with mandrake. I started off with the 2.4 kernel that came with mandrake 9.2 and slowly got the 2.6.1 to work.
The userpsace program cpuspeed is written by carl thompson. Google it and you'll find it.
When you compile the kernel leave your old one and just add the new one as a bootup option so you can always go back if you have to.
Good luck.
|
|
|
02-04-2004, 02:03 AM
|
#6
|
LQ Newbie
Registered: Jan 2004
Posts: 9
Rep:
|
Hello Adamis,
I just want to say thank you for your help. I've been trying to migrate to the linux system and now I believe I have the basics to do it.
Cheers.
|
|
|
02-05-2004, 09:55 PM
|
#7
|
LQ Newbie
Registered: Jan 2004
Posts: 9
Rep:
|
Hello Adamis, I need some more help configuring my eMachines. I hope you can give me some more hints.
I tried to do what you told me about editing the powernow-k7.c file. On your help you mentioned that you assume I have the kernel source installed. By this, do you mean the 2.6.2 kernel installed?? I ask this because I still have the original kernel and I can't find the file you told me. By the way, how can I see what kernel I have installed? Where is it stored?
I believe I also need to use ACPI to fix my processor from burning up, but I don't know how to activate this. Do I need to compile the new kernel (6.2)to have ACPI?? It seems that right now my computer is set up with APM.
I downloaded CPUspeed, but I haven't installed it because I'm waiting to set up ACPI, although it might not be a requirement.
I know this is another topic but I just need to ask you, did you get the wirless card to work?
This is my first time with Linux and there are so many things to learn that it is overwhelming. If I could only stop the processor from spinning I'd be happy.
Thanks!
|
|
|
02-06-2004, 02:08 AM
|
#8
|
Member
Registered: Oct 2003
Posts: 81
Original Poster
Rep:
|
Okay, the kernel source 2.6.2 which if you downloaded is in some compressed file format. Extract this file into a folder and then move it to /usr/src/linux-2.6.2 (note the linux-2.6.2 would be the name of the folder that you move). Now, the file you want to edit will be at:
/usr/src/linux-2.6.2/arch/i386/kernel/powernow-k7.c
again, note that "linux-2.6.2" should be replaced with whatever folder name you extracted the kernel to. So this should give you an idea of where that file is.
Now, ACPI for some reason does not work 100% on this laptop. If it did then you wouldn't have to enable cpufreq in the kernel. ACPI in the kernel will report battery status as well as perform some other options but it will not slow down your processor (unless they fixed this in the latest kernel) and this is what will keep your laptop running to hot to handle. So note, that the cpufreq is what is keeping your processor from burning up, ACPI for some reason doesn't work on these processors.
When you compile the kernel enable ACPI and make sure that APM is disabled, this will allow you to get battery status and such. Also, make sure that cpufreq is enabled along with userspace and finally the powernow driver for the athlon. (note, you want to patch the driver before you start configuring the kernel. ) You can enable these as modules or have them built directly into the kernel. I would probably just have them built into the kernel so you don't have to worry about the modules being loaded on bootup. As you get things figured out you can then build them as modules if you want.
There are also a lot of other things that need to be configured to get things working. If you are using Mandrake 9.2 I could probably send you my kernel config file to give you a head start on the other stuff. IM me sometime and I'll help you out more. (Check my profile for this information...)
This should at least get you started in getting your getting your laptop to run cooler.
|
|
|
02-13-2004, 02:31 AM
|
#9
|
LQ Newbie
Registered: Jan 2004
Posts: 9
Rep:
|
Hello Adamis,
I tried to IM before but maybe the messages didn't reach you.
I installed Mandrake 9.2 on my laptop and I was able to fix the fan problem by compiling the new kernel with the patched AMD drive. But as you mentioned there are still things that I haven't been able to configure......
Do you think you could send me the kernel .config file? I would very much appreciate it.
Thank you.
|
|
|
02-13-2004, 01:55 PM
|
#10
|
Member
Registered: Oct 2003
Posts: 81
Original Poster
Rep:
|
If you IM me you should use aim as Gaim is having a problem with Yahoo right now. I will send you my config file over AIM. I am using the 2.6.2 kernel with the mm patch installed so you should update to that kernel source if you wan't to use my config file.
Also, does your CPU fan run all the time in Linux? My laptop fan doesn't run when first turned on but if I leave it on the laptop on the cpu fan will eventually turn on and stay on. My fan is really noisey right now, so much that I called e-machines and am having it RMA'd. I'm returning the laptop to e-machines this weekend to have it worked on because the cpufan is really noisey now and the laptop turns off if a program like glxgears causes the cpu to run at full speed for a period of time. Hopefully they will replace the noisey fan and the processor that doesn't like to run at it's rated speed.
Anyway, if you don't see me online in the next couple of day's it's because my laptop is in the shop. Try catching me online late tonight through AIM as I won't be sending the laptop in probably till Monday.
|
|
|
02-14-2004, 02:55 AM
|
#11
|
LQ Newbie
Registered: Jan 2004
Posts: 9
Rep:
|
Sorry to hear your fan is getting noisy and you have to send it for repair. I know this takes time and can be frustrating at times.
Right now I'm using windows to connect to the internet and I only have yahoo messenger and msn messenger. I haven't been able to set up my wireless card on linux and this is the only way I can connect to the internet. (I live on campus residences). I did download the new 2.6.2 kernel and installed it on my computer.
Answering to your question, my fan seems to work fine under Linux, but I haven't reallly worked that long on linux to test the computer on the long run, so I don't know if I would have the same problem as you do............but I will keep in touch to let you know.........
Well, I hope you get your computer back soon.
|
|
|
All times are GMT -5. The time now is 08:24 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|