View previous topic :: View next topic |
Author |
Message |
TerranAce007 Apprentice
Joined: 13 Dec 2004 Posts: 281 Location: Texas
|
Posted: Tue Mar 15, 2005 3:20 am Post subject: Manually setting fan speed apart from cpufreq governor? |
|
|
Since I have a high end laptop, it tends to get warm. The fans don't always want to spin at full speed because they are supposed to save power by only speeding up when the system needs more cooling, but when I am on A/C power, this doesn't matter. I usually run the ondemand governer on AC power to keep the system cool and the cpu running slow when its idle, but that slows the fans down too. Is there a way to set the fans to full speed when on A/C, or to modify the ondemand governer that comes with the kernel to do this? _________________ It's all funny until someone gets hurt.
Then it's hilarious. |
|
Back to top |
|
|
alkan Guru
Joined: 06 Aug 2004 Posts: 385 Location: kasimlar yaylasi
|
Posted: Tue Mar 15, 2005 3:43 am Post subject: |
|
|
If your laptop has an I2C hardware sensors interface, You can modprobe i2c modules depending on your hardware sensors chip. Then an interface will appear under /sys/bus/i2c/.... You can manually set the fan speed form there. In my case for a full fan speed, I do
Code: |
echo 255 > /sys/bus/i2c/devices/1-0290/pwm1
|
|
|
Back to top |
|
|
TerranAce007 Apprentice
Joined: 13 Dec 2004 Posts: 281 Location: Texas
|
Posted: Tue Mar 15, 2005 4:24 am Post subject: |
|
|
Well I have run sensors-detect with lm_sensors, however it doesn't detect anything. I have an SiS 755 mainboard, and so far it looks like SiS sensor support is almost noexistant in lm_sensors, probably due to SiS not supporting linux. I am hoping I can set the fan speed some other way, if the chipset allows the OS to do that. It is probably going to be hard-wired though. I have emailed the manufacturer and am still waiting for a response... _________________ It's all funny until someone gets hurt.
Then it's hilarious. |
|
Back to top |
|
|
bollucks l33t
Joined: 27 Oct 2004 Posts: 606
|
Posted: Tue Mar 15, 2005 10:28 am Post subject: |
|
|
alkan wrote: | If your laptop has an I2C hardware sensors interface, You can modprobe i2c modules depending on your hardware sensors chip. Then an interface will appear under /sys/bus/i2c/.... You can manually set the fan speed form there. In my case for a full fan speed, I do
Code: |
echo 255 > /sys/bus/i2c/devices/1-0290/pwm1
|
|
Now that is damn good info! |
|
Back to top |
|
|
Benson Apprentice
Joined: 23 Feb 2004 Posts: 156 Location: Switzerland
|
Posted: Tue Mar 15, 2005 12:38 pm Post subject: |
|
|
If you have lm_sensors installed and configured, and you can read with it the rpm of the fan and the cpu-temp, try fancontrol, it's part of lm_sensors. You first have to run pwmconfigto configure it. It may work or not, depending on which chip your mainboard uses to read the temperature / fan-spedd infos...
rdgs
Benson |
|
Back to top |
|
|
alkan Guru
Joined: 06 Aug 2004 Posts: 385 Location: kasimlar yaylasi
|
Posted: Tue Mar 15, 2005 4:56 pm Post subject: |
|
|
If nothing works for you, there is another way. You first need to find the IO chip model-number/manufacturer that controls the fan (Look at SIS MB specs). Then go to their web page and download the manual for that chip. In the manual, find the IO port numbers and how to use the IO ports to set the fan speed. Then, have a look at 'ioport --help'. For example, my computers has a Winbond 83627hf IO chip, I can set the fan speeds by using 0x295-6 IO ports. |
|
Back to top |
|
|
Benson Apprentice
Joined: 23 Feb 2004 Posts: 156 Location: Switzerland
|
Posted: Sat Mar 19, 2005 12:29 pm Post subject: |
|
|
alkan wrote: | If nothing works for you, there is another way. You first need to find the IO chip model-number/manufacturer that controls the fan (Look at SIS MB specs). Then go to their web page and download the manual for that chip. In the manual, find the IO port numbers and how to use the IO ports to set the fan speed. Then, have a look at 'ioport --help'. For example, my computers has a Winbond 83627hf IO chip, I can set the fan speeds by using 0x295-6 IO ports. |
Alkan, is this possible for all chips, because if you do pwmconfig and it fials to locate supported hardware, it points to this page with a list of motherboards, which should be bossible to change the fan speed. I have an unsupported one, a Soltek Mainboard with nforce2 ultra, pwmconfig says:
Code: | Found the following PWM controls:
2-0290/pwm1
2-0290/pwm2 |
But it doesn't work with any fan, so would it be possible that it would work with your suggested method???
rgds
Benson |
|
Back to top |
|
|
ikaro Advocate
Joined: 14 Jul 2003 Posts: 2527 Location: Denmark
|
Posted: Sat Mar 19, 2005 4:09 pm Post subject: |
|
|
Thanks for the tip.
I got a zalman cpu cooler with a button/switch that allows me to control the speed of the fans, however
I have to reach to the computer case everytime I wanted to do so.
this makes things more simple.
Ive added a little menu to my fvwm config to adjust the speeds from the menu:
Code: |
+ "menu-name" PopUp FanSpeed
DestroyMenu FanSpeed
AddTomenu FanSpeed
+ "Low" Exec sudo sh -c "echo "50" > /sys/bus/i2c/devices/0-0290/pwm2"
+ "Medium" Exec sudo sh -c "echo "128" > /sys/bus/i2c/devices/0-0290/pwm2"
+ "Full" Exec sudo sh -c "echo "255" > /sys/bus/i2c/devices/0-0290/pwm2"
|
I already had other menus to control the cpu speed, governors and so on, now its complete _________________ linux: #232767 |
|
Back to top |
|
|
alkan Guru
Joined: 06 Aug 2004 Posts: 385 Location: kasimlar yaylasi
|
Posted: Sat Mar 19, 2005 6:11 pm Post subject: |
|
|
It may not be possible for some MBs and for some fans if the fan control is hard coded into hardware (or there is no fan control capability at all). I bet most of the new MBs have some way controlling the fan speeds by software.
The best you can do (if nothing else is working for you) is to get more info about your MB and the name/model-number of the chipset. The fans are usually connected to the IO chips with power managment capabilities. And those chips usually have i2c or smbus interface to communicate with. In their manual, it is explained how to control the hardware that is connected to the IO chip using IO port ranges. Using the direct IO writing and reading, I was able to adjust the fan speeds for all the computers I owned both in windows and linux eventhought other softwares and ACPI system failed to do so. Good luck. |
|
Back to top |
|
|
rmh3093 Advocate
Joined: 06 Aug 2003 Posts: 2138 Location: Albany, NY
|
Posted: Sat Mar 19, 2005 8:00 pm Post subject: |
|
|
if you cant change your fan speed you could at least change the critcal temp of the cpu to a low value which would turn the fan on high instead of low _________________ Do not meddle in the affairs of wizards, for they are subtle and quick to anger. |
|
Back to top |
|
|
TerranAce007 Apprentice
Joined: 13 Dec 2004 Posts: 281 Location: Texas
|
Posted: Sun Mar 20, 2005 1:25 am Post subject: |
|
|
Well I tried that already, and theres no kind of cpu temp alarm setting in the BIOS. I have found an updated BIOS, but the changelog just adds support for the high end amd processors like 3700+. I have talked to some other people with similar laptops and they said the new BIOS does't add anything worthwhile. _________________ It's all funny until someone gets hurt.
Then it's hilarious. |
|
Back to top |
|
|
rmh3093 Advocate
Joined: 06 Aug 2003 Posts: 2138 Location: Albany, NY
|
Posted: Sun Mar 20, 2005 2:16 am Post subject: |
|
|
im not talking about the bios, with the i2c bus even if you cant get a fan speed you should be able to get a mobo and cpu temp reading and should be able to set the critical temp _________________ Do not meddle in the affairs of wizards, for they are subtle and quick to anger. |
|
Back to top |
|
|
Benson Apprentice
Joined: 23 Feb 2004 Posts: 156 Location: Switzerland
|
Posted: Sun Mar 20, 2005 9:44 am Post subject: |
|
|
Alkan, now i see what you mean. But to see which path you have to use to set the fan speed, you don't really have to check the mainboard manual. Symply have a look at /sys/bus/i2c/devices/ - there should be some other directories with the different chipsets, if any of these subdirs contains something like pwm1 or pwm2, you can echo them some values, just as ikaro has in his menu-script.
So in my case (Soltek SL-75FRNL-L Mainboard) it seems like i have a pwm1 and pwm2, but i can't controll the fans, i tried it with different fans so i think i'll get a front panel for my pc witch enables to control the fans too...
rgds
Benson |
|
Back to top |
|
|
alkan Guru
Joined: 06 Aug 2004 Posts: 385 Location: kasimlar yaylasi
|
Posted: Sun Mar 20, 2005 6:57 pm Post subject: |
|
|
Benson, yes that was my very first suggestion, look at my first post. But he doesn't get any interface under /sys/. If he did, /dev/i2c should have appeared.
TerranAce007, I assume you compiled all the available i2c sensor chipsets as a module in the kernel.
Edit: Benso, Sorry I didn't see your second part of the post. either your hardware sensor chip module is buggy or your fans are not connected to it. If your fans are connected to your chip, it is still possible to control your fans with direct IO eventhought lm_sensors can't. That's my point, lm_sensors modules doesn't work always because of the different hardware implementations. I've seen chips that doesn't work with lm_sensors but still can control the fan speeds. |
|
Back to top |
|
|
|