You are not logged in.
Hi everyone,
I've just released a new version of my eee module for Linux, which I'm sure you will all enjoy! Over the past two months I've been working on figuring out how the embedded controller works. The controller is based on an 8051 CPU, and I've been slowly disassembling the firmware which runs on it. This version of my module incorporates two breakthroughs which have resulted from my efforts: quicker CPU voltage control and manual fan speed control.
Features in version 0.2:
- Faster FSB and voltage changes: previously speed changes took 1000-2500ms to complete; now they only take 100-150ms!
- Uses the kernel's built-in I2C support, so it works with lmsensors and i2c_i801.
- Added monitoring of CPU temperature and fan speed.
- Added a setting to override the embedded controller's fan speed algorithm and allow the fan's speed to be set manually.
My plans for 0.3 are to add an automatic fan control mode with configurable temperature setpoints and speeds. I've discovered that when running at a speed of 20%, the fan is virtually silent (as compared to the default 40%, which I find rather noisy)...
The source code and a precompiled Ubuntu kernel module can be found at the project's website:
http://code.google.com/p/eeepc-linux/
I'm looking forward to your feedback and suggestions on how to make this module even better! And if anyone is interested in figuring out even more of the embedded controller (and knows 8051 assembly language), get in touch. There's a very good chance that we can still improve many aspects of the eee, including:
- better battery monitoring
- software control of the front LEDs
- optimizing the power consumption of the eee
- fixing suspend-to-RAM
- unlocking the full brightness of the screen (just like in the 0501 BIOS)
And finally, a warning: THIS CODE IS STILL EXPERIMENTAL, AND COMES WITHOUT ANY WARRANTY! If you disable the automatic fan control and then neglect to turn the fan on, YOUR EEE COULD QUITE POSSIBLY MELT AND/OR CATCH FIRE. You'e been warned.
Now go have some fun controlling the fan!
Offline
You are the man.
I've been using the first version for a while now. Can't wait to start trying this. Your efforts and skill are greatly appreciated (at least by me) and are what make open source great.
Offline
So this might be a stupid question (it probably is), but when I try to run 'make' in the directory, it says that the build directory is not present. I never compiled the orig one (got a precompiled binary from the forum), so I guess I never had the files required to compile. Is it quite simple to acquire the dependencies to compile the module, or am I better off just waiting for someone to compile the module and share it?
Offline
Ohhh! I so want this on Windows! ![]()
Offline
kiwidrew,
i am trying to insert my new eee.ko module... what am i missing?
sudo insmod eee.ko
insmod: error inserting 'eee.ko': -1 Unknown symbol in module
I tried downloading your pre-compiled for ubuntu eee.ko and putting it in the acpi dir. where the old one was here with my ubuntu install. it messes up my sytem and causes my function keys to stop working as well as never creating the /proc/eee directories... I don't know what could be happening??
Last edited by creepingmee (2008-01-15 3:39:36 am)
Offline
mmm fan control.
Is there a way to port to XP?
Offline
creepingmee wrote:
kiwidrew,
i am trying to insert my new eee.ko module... what am i missing?
sudo insmod eee.ko
insmod: error inserting 'eee.ko': -1 Unknown symbol in module
I tried downloading your pre-compiled for ubuntu eee.ko and putting it in the acpi dir. where the old one was here with my ubuntu install. it messes up my sytem and causes my function keys to stop working as well as never creating the /proc/eee directories... I don't know what could be happening??
the command
dmesg
will tell you (at the end) what is missing after the insmod.
Probably you are missing a symbol that is exposed by i2c.
FM
Offline
Yeah, you need to insert the i2c_i801 module first. On Ubuntu, the easiest way to get everything loaded automatically is (as root):
1. Copy eee.ko to /lib/modules/2.6.22-14-generic/kernel
2. Run depmod -a
3. Edit /etc/modprobe.d/blacklist and comment out the i2c_i801 line.
4. Edit /etc/modules and add lines for i2c_i801 and eee.
Now, on the next boot, the eee module will be automatically loaded. To load it immediately:
1. modprobe i2c_i801
2. modprobe eee
Offline
thx again kiwidrew! it worked like charm! I have put my fan in 100% or 0% with 60º, now fanless could be done by software hehe, the eeeubuntu scripts dont work very weel with the update but that is something different, thnx again"
Offline
kiwidrew,
yeah, that was it, after i2c_i801 was loaded it worked perfectly, got my fan all the way up and now i understand what people were talking about... never heard it at 100% before, i can feel the breeze from it a foot away!!! Thanks so much for this new mod. and Good luck with newer versions for better battery monitoring and control.... thanks again!!!
Offline
Thanks so much, I hate the high pitched whiny fan on the eee. Putting the fan speed at 25 totally takes care of this problem for me
Awesome job.
Just an FYI for anybody trying to use the new module, you need to do a
echo 1 > fan_manual
before manipulating fan_speed
Offline
Great job! Worked like a charm!
I just ran glxgears at 900MHz with no fan for 15 minutes. Still stable, but I chickened out when it reached 70 degrees ![]()
Offline
Thanks kiwidrew!
Guess I can also use this to scale down if I have cranked up the speed to 900 by default (by going the bios 0401->0511->0703 route).
Any reports of crashes when throttling down?
Offline
Finally managed to build version 0.1 for eee Xandros on my Ubuntu Desktop and it works like a charm, so I decided to have a go at building version 0.2....
I get the following warnings:
/usr/src/eeepc-linux/module/eee.c: In function 'eee_pll_read': /usr/src/eeepc-linux/module/eee.c:76: warning: implicit declaration of function 'i2c_smbus_read_block_data' Building modules, stage 2. MODPOST 1 modules WARNING: "i2c_smbus_read_block_data" [/usr/src/eeepc-linux/module/eee.ko] undefined!
But the module builds. Should I be concerned about these warnings?
Offline
Grimmy wrote:
Finally managed to build version 0.1 for eee Xandros on my Ubuntu Desktop and it works like a charm, so I decided to have a go at building version 0.2....
I get the following warnings:Code:
/usr/src/eeepc-linux/module/eee.c: In function 'eee_pll_read': /usr/src/eeepc-linux/module/eee.c:76: warning: implicit declaration of function 'i2c_smbus_read_block_data' Building modules, stage 2. MODPOST 1 modules WARNING: "i2c_smbus_read_block_data" [/usr/src/eeepc-linux/module/eee.ko] undefined!But the module builds. Should I be concerned about these warnings?
I just built against the stock Xandros kernel and get the same error:
eeepc-tonysween:/usr/src/eeepc-linux/module> make
make -C /lib/modules/2.6.21.4-eeepc/build M=/usr/src/eeepc-linux/module modules
make[1]: Entering directory `/usr/src/linux-source-2.6.21.4-eeepc'
CC [M] /usr/src/eeepc-linux/module/eee.o
/usr/src/eeepc-linux/module/eee.c: In function ‘eee_pll_read’:
/usr/src/eeepc-linux/module/eee.c:76: warning: implicit declaration of function ‘i2c_smbus_read_block_data’
Building modules, stage 2.
MODPOST 1 modules
WARNING: "i2c_smbus_read_block_data" [/usr/src/eeepc-linux/module/eee.ko] undefined!
CC /usr/src/eeepc-linux/module/eee.mod.o
LD [M] /usr/src/eeepc-linux/module/eee.ko
make[1]: Leaving directory `/usr/src/linux-source-2.6.21.4-eeepc'
eeepc-tonysween:/usr/src/eeepc-linux/module>
Looking at the kernel build directory:
eeepc-tonysween:/usr/src/linux-source-2.6.21.4-eeepc> grep i2c_smbus Module.symvers
0xa002add7 i2c_smbus_write_i2c_block_data vmlinux EXPORT_SYMBOL
0x64994747 i2c_smbus_write_block_data vmlinux EXPORT_SYMBOL
0xd9a975fd i2c_smbus_write_quick vmlinux EXPORT_SYMBOL
0x6d645661 i2c_smbus_write_word_data vmlinux EXPORT_SYMBOL
0x8b85c9f0 i2c_smbus_read_i2c_block_data vmlinux EXPORT_SYMBOL
0x84f94ac9 i2c_smbus_read_byte_data vmlinux EXPORT_SYMBOL
0x2cbab505 i2c_smbus_write_byte_data vmlinux EXPORT_SYMBOL
0xfcf791be i2c_smbus_read_word_data vmlinux EXPORT_SYMBOL
0xdeeb5121 i2c_smbus_read_byte vmlinux EXPORT_SYMBOL
0x1e73c106 i2c_smbus_xfer vmlinux EXPORT_SYMBOL
0x1966435e i2c_smbus_write_byte vmlinux EXPORT_SYMBOL
eeepc-tonysween:/usr/src/linux-source-2.6.21.4-eeepc>
it would seem that there is a symbol name mismatch (note the extra _i2c) -- did things get renamed in the Ubuntu kernel? I think there's a genuine oversight here...
Tony.
Offline
If any of you get the module built for Xandros, would any of you be kind enough to post it for others? I dont have the proper build items and really dont want to put them on my computer.
Thanks
Offline
What values can you put in /proc/eee/fsb. Is it possible to slow it right down?
I tried 50 and it stuck it's toes in the air, nice pretty patterns on the LCD, instant panic and removed battery, it recovered ![]()
Thought I would ask before doing anything again, heart can't stand it.
If it can be slowed down, for example, when the lid is closed it should improve battery life.
Last edited by Mjolinor (2008-01-16 8:25:21 am)
Offline
Mjolinor wrote:
What values can you put in /proc/eee/fsb. Is it possible to slow it right down?
I tried 50 and it stuck it's toes in the air, nice pretty patterns on the LCD, instant panic and removed battery, it recovered
Thought I would ask before doing anything again, heart can't stand it.
If it can be slowed down, for example, when the lid is closed it should improve battery life.
I always step down in increments of 5 when I overclock or underclock. The lowest I could go was 45mhz before the screen got all messed up. But I think someone else in another thread said that underclocking the fsb wont make it use less power, since it will still get the same voltage. I think you would have to lower the voltage amount, something which I dont think can be done right now. I could be totally wrong, and if so, somebody please correct me.
Offline
theSuperman wrote:
If any of you get the module built for Xandros, would any of you be kind enough to post it for others? I dont have the proper build items and really dont want to put them on my computer.
Thanks
I'll post it once I can confirm that the warnings I am getting aren't a problem. (see the posts by golem and myself above.)
Offline
Was anyone successful compiling the module on the customized 2.6.24-2 kernel which added support of USB persistent mode?
This kernel was to fix the suspend/sleep on USB and SD card installs.
When trying to compile the module, I get the following errors.
make -C /lib/modules/2.6.24-2-generic/build M=/download/eeepc-linux/module modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.24-2-generic'
CC [M] /download/eeepc-linux/module/eee.o
scripts/basic/fixdep: 4: Syntax error: ")" unexpected
make[2]: *** [/download/eeepc-linux/module/eee.o] Error 2
make[1]: *** [_module_/download/eeepc-linux/module] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.24-2-generic'
make: *** [all] Error 2
I had no problems compiling on the default eeexubuntu kernel but I needed the USB persistent support.
Offline
eee.ko modules can coexists with p4_clockmod?
without p4_clockmod, how can control cpufreq scaling?
No success testing new version on stock xandros kernel.
I rename missing kernek symbol
i2c_smbus_read_block_data
to
i2c_smbus_read_i2c_block_data
and compile, and load eee.ko module, and get this om dmesg:
i801_smbus 0000:00:1f.3 I2C_SMBUS_I2C_BLOCK_READ not DB!
cat /proc/eee/fsb show
0 0 0
and
echo "70 24 0" >/proc/eee/fsb
hangs the system, and need to poll out battery to power off.![]()
.
Last edited by pksato (2008-01-16 4:42:43 pm)
Offline
Thanks for the new 0.2 version!
To report:
(a) the source code compiled for me just fine on the stock ubuntu kernel, ver. 2.6.22-14-generic
(b) installation without a problem, with the i2c_i801 module inserted first.
(b) curiously, the fan settings all reported 0 at the start, and nothing would change them. It seems to be working now, though.
(c) just recently, I found myself in the peculiar "-1 24 0" state for /proc/eee/fsb. I don't know how I got there, but I had just changed the frequency and had just started glxgears. After stopping glxgears, attempting to run my overclocking script to reset the value caused an instant system crash. The system would not then boot until I unplugged the power cable, I think, maybe.
(d) the new voltage state reading in /proc/eee/fsb required adjusting my scripts in reading the third variable. But nice to have a reading of the voltage.
(e) the /proc/eee/temperature reading seems redundant with /proc/acpi/thermal_zone/TZ00/temperature (but so what...)
How shall we handle the wiki page for this? Shall we write the page for the 0.2 module, start a separate page for 0.2, or perhaps wait a while longer until things settle? People trying to use 0.2, while following the 0.1 directions, are likely to be confused.
sensors doesn't seem to work for me; is there a module that needs to be loaded, etc? I ran the sensors-detect script which didn't find anything.
I notice that some people seem to be resetting the machine after a crash by unplugging the battery. You don't have to do that! Just hold the power key down for a few seconds.
Offline
pksato wrote:
eee.ko modules can coexists with p4_clockmod?
without p4_clockmod, how can control cpufreq scaling?
.
My understanding is p4-clockmod is rather irrelevant, and likely to cause instability with the eee.ko module loaded. You save negligible power using frequency scaling. There have been extensive discussions about that. (but perhaps you have your own need for p4-clockmod)
Offline
SmallFootprint wrote:
Thanks for the new 0.2 version!
(c) just recently, I found myself in the peculiar "-1 24 0" state for /proc/eee/fsb.
My fsb read that on installation but hasn't since hte first reboot.
I notice that some people seem to be resetting the machine after a crash by unplugging the battery. You don't have to do that! Just hold the power key down for a few seconds.
This one is weird. Holding power, pressing reset, removing and re-inserting the battery, do not do the same things. I have a machine here that will not boot unless I remove and replace the battery and the power, neither reset or the power button will make it work again once it has been crashed or shut down.
Last edited by Mjolinor (2008-01-17 2:47:35 am)
Offline
Anyone tried this in eeeXubuntu yet? ![]()
Offline