You are not logged in.

#1 2013-06-29 06:15:18

temp2013
Member
Registered: 2013-06-29
Posts: 2

How early in the install procedure can one set max cpu frequency?

Good day!

I might install Arch on a laptop. The Reason is that the laptop has an infected BIOS which makes it overheat and shut down, even in Linux, unless overridden by a frequency scaling program.

I can't figure out how to get the Windows-based updater to override the crucial BIOS-code, so I'm looking for a low-spec Linux install that I can use instead of Windows.

Arch seems perfect for this purpose, as the desktop environment/'heavy stuff' is not installed instantly, so I could set a low max-frequency before installing or doing anything else with the install.

The big question is if I can change the cpu frequency (via 'cpupower'?) early enough to have a safe installation-environment that won't crash.

Also, will it be complicated/risky to count on this procedure?
It seems that the relevant module (that 'cpupower' needs to identify correct cpu values) has been deprecated, so I hope it'll work through another module.

If the process breaks down, can I simply restart the laptop and further the install of the desktop environment etc, or will the install have been corrupted beyond amateur levels? 

I'm under stress from all sides and wish it to likely be doable, step-by-step.

This is a long post

Best regards possible from
Someone who wants to do alright

Offline

#2 2013-06-29 06:27:31

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: How early in the install procedure can one set max cpu frequency?

Does the machine boot the Arch live media?  By default, the Arch kernel sets the use of acpi_cpufreq and the ondemand governor.  This ensures that the frequency is always the lowest (or idle) unless there is stress on the machine.  But, I don't think that the archiso includes the cpupower package by default.  Also, this bug probably means that you will need to use either the conservative governor, or powersave, or maybe userspace.  But those three come as modules instaed of being built into the kernel itself with the Arch kernel.

It sounds like you are not all that farmiliar with Linux.  Though Arch might be a very lightweight distribution if you want it to be, it also takes quite a bit of knowledge, or a serious passion to learn.  So though it may fit the needs of your machine, I am not so sure that it will fit the needs of the user.

Also, your expectation of step-by-step instructions are not what these forums are about.  We do no hold people's hands through problems, and users are expected to make a serious effort in solving the problem themselves.  I'm not saying that you won't find help here.  But you won't find someone who is going to write you out a manual to follow.

If you are familiar with Linux, your best bet here is to probably use a self built kernel which includes the governors mentioned above.  Then build your own archiso that includes the cpupower package with the cpupower service enabled and configured to a lower frequency.  But you have to be aware that we use systemd around here.  This means that unlike other distributions, the boot is highly parallelized, so there is going to possibly be more strain in the first few seconds on your processor than it might be able to handle.

Good luck!

Offline

#3 2013-06-29 06:45:06

temp2013
Member
Registered: 2013-06-29
Posts: 2

Re: How early in the install procedure can one set max cpu frequency?

Thanks a lot! The kind of response I was hoping for! smile

Building a kernel sure sounds beyond my capabilities, but I'll look into it. The step-by-step thing was mainly about following the Wiki install guide with only few creative challenges underway. wink I am a noob, yes, but I'll take your advice and examine a bit, then post back here if I choose to progress and there's something to add here. But thanks again.

Offline

#4 2013-06-29 06:48:57

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: How early in the install procedure can one set max cpu frequency?

Yeah sure.  You should also be aware that there are likely a great number of distributions that would fit what you are looking for, but are a bit more user friendly.  If it is the graphical interface that you think will push your machine over the edge, something like debian might be good.  You can use the non-graphical, ncurses installer, and then it should actually give you the option of whether or noy you want to make it a "server" and install the minimum, or a full desktop with an environment as well.  A number of other distributions also offer these "server" releases that are gui-less.

Offline

#5 2013-06-29 15:07:23

ANOKNUSA
Member
Registered: 2010-10-22
Posts: 2,141

Re: How early in the install procedure can one set max cpu frequency?

What do you mean, exactly, by "infected BIOS?"  Using a particular operating system isn't going to solve any problem residing in the BIOS itself, as the OS doesn't really have direct access to the BIOS under normal operation.  In other words, if the problem is a broken laptop, installing Arch won't fix it; at the very best, you could work around the problem by following WonderWoofy's suggestion (thereby limiting the performance of the machine, and trading one undesireable situation for another).

I used to have a similar problem with an older (2009) Toshiba laptop, but the problem in that case was that Toshiba deliberately wrote the laptop's DSDT to only function with Windows Vista.  If the machine functions the way it's supposed to under Windows, but not so under Linux, you may be in a similar situation.  Sadly, there is no simple solution to the issue.  The problem here is that compiling the Linux kernel from source is a very CPU-intensive process; hence, if overheating is the machine's problem, the machine will likely overheat while compiling the kernel intended to solve the overheating problem.  It's a bitch, I know, but if you can somehow get a cusom DSDT you might be able to load it without building a kernel yourself per the instructions in the wiki page I linked to.

Offline

#6 2013-06-29 15:55:51

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 13,158

Re: How early in the install procedure can one set max cpu frequency?

temp2013 wrote:

Thanks a lot! The kind of response I was hoping for! smile

Building a kernel sure sounds beyond my capabilities, but I'll look into it.

Building a kernel is really not that difficult; it is just scary the first time.  If you are concerned about overheating, or if you have to cripple performance to keep it from overheating, you probably want to consider doing the kernel build on a different machine.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
You assume people are rational and influenced by evidence.  You must not work with the public much. -- Trilby
----
How to Ask Questions the Smart Way

Offline

#7 2013-06-29 22:55:48

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,662

Re: How early in the install procedure can one set max cpu frequency?

I'm also wondering about the "infected bios". What is the issue exactly?

As for installation, couldn't you pull the hard drive from the laptop, install to that drive from another machine and then put it back in the laptop with the relevant stuff then pre-installed?


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#8 2013-06-30 00:45:12

fledermann
Member
From: Bielefeld, Germany
Registered: 2013-06-24
Posts: 34

Re: How early in the install procedure can one set max cpu frequency?

...why not put the laptop in the fridge during the installation process?

Last edited by fledermann (2013-06-30 00:45:25)

Offline

#9 2013-06-30 00:50:15

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: How early in the install procedure can one set max cpu frequency?

fledermann wrote:

...why not put the laptop in the fridge during the installation process?

This is probably the most sane repsonse of any of us so far if you have access to a walk-in fridge and/or freezer.  It would be a hell of a lot easier than trying to learn 100 new tools before even getting to fully use the system.

Offline

#10 2013-06-30 00:55:03

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 13,158

Re: How early in the install procedure can one set max cpu frequency?

fledermann wrote:

...why not put the laptop in the fridge during the installation process?

That only gives an additional  15C margin (or so).   Now, a freezer at -5 to -10C  ..... smile


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
You assume people are rational and influenced by evidence.  You must not work with the public much. -- Trilby
----
How to Ask Questions the Smart Way

Offline

#11 2013-06-30 01:26:08

cfr
Member
From: Cymru
Registered: 2011-11-27
Posts: 5,662

Re: How early in the install procedure can one set max cpu frequency?

Although it depends on the laptop, in some cases, taking the back off the case and opening it up as much as possible so that air can fully circulate might also help a bit.

Another option would be to find a live distro which includes the necessary tools and to install from that rather than needing to boot Arch's live media itself.


How To Ask Questions The Smart Way | Help Vampires

Arch Linux | x86_64 | GPT | EFI boot | grub2 | systemd | LVM2 on LUKS
Lenovo x121e | Intel(R) Core(TM) i3-2367M CPU @ 1.40GHz GenuineIntel | Intel Centrino Wireless-N 1000 | US keyboard with Euro | 320G 7200 RPM Seagate HDD

Offline

#12 2013-06-30 01:42:48

WonderWoofy
Member
From: Los Gatos, CA
Registered: 2012-05-19
Posts: 8,412

Re: How early in the install procedure can one set max cpu frequency?

Speaking of another distro to install the necessary tools, apparently this kind of minimal toolset is going to be packaged with the next "release".  It has been on the mailing list being discussed as "Bootstrap images for installing Arch from another system" on [arch-dev-public].

Offline

#13 2013-06-30 04:28:30

Max-P
Member
Registered: 2011-06-11
Posts: 164

Re: How early in the install procedure can one set max cpu frequency?

Are you very sure the BIOS is actually, really infected? This is something that shouldn't happen, and if it exists, very rare and specially targetted at your system. Having someone to hack that particular BIOS file, make a virus/exploit for this particular computer, and having you download and run it with enough privileges to do this seems really odd to me. Anyway, if you believe your BIOS is damaged, go to your computer manufacturer site and download the latest BIOS update CD and run that. If the problem survives, it's definitely not an infected BIOS. If someone wanted to really break your computer, they would just have put the voltage way too high or way too low so the machine would either burn the CPU or crash during boot because the processor doesn't have enough power. I can't see why someone would really just increase the voltage a tiny bit so it just overheats...

Anyway, are you sure it's not just plain old regular overheating because of fans full of dust? I one had a laptop, running Windows XP, that always went fine but overheated in less than 15 minutes when running a Linux-based OS. Windows seems to lower the frequency itself when it's about to overheat so it survives even on poorly maintained computers. How can you know the BIOS is infected or modified? Can you explain a bit more why the BIOS of that computer would be "infected" by anything?

If you can boot the Arch live CD, you could always install lm_sensors and run it to monitor the temperatures and start from there. I have magically repaired a few laptops (up to 40 degrees loss in max temperature) by just opening the case and using a vacuum cleaner and compressed air to clean up the fans.


And finally to answer the question, as soon as the live CD is booted you can set it using "cpupower frequency-set -g powersave", which will put it to the lowest available setting. If you need it before that, you will have to rebuild a kernel with "powersave" as the default CPU governor, and make a new customized CD with that kernel. Not too hard, but if you can boot the regular live CD it would be pretty good to begin with.

Last edited by Max-P (2013-06-30 04:33:32)

Offline

Board footer

Powered by FluxBB