Jump to content


eee module version 0.2 released, includes manual fan control!


227 replies to this topic

#1 kiwidrew

    Member

  • Members
  • 26 posts

Posted 15 January 2008 - 05:56 AM

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!

#2 d3th

    Advanced Member

  • Members
  • PipPipPip
  • 76 posts
  • LocationMelbourne, Australia

Posted 15 January 2008 - 06:25 AM

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.

#3 theSuperman

    Senior Member

  • Members
  • 304 posts
  • LocationAllentown, PA

Posted 15 January 2008 - 07:01 AM

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?

#4 .:Cyb3rGlitch:.

    Senior Member

  • Members
  • 783 posts
  • LocationSydney, Australia

Posted 15 January 2008 - 07:04 AM

Ohhh! I so want this on Windows! :P
701 4G 7B | 0910 BIOS | 1GHz OCCT Stable | 1GB 667MHz RAM | nLited XP Pro

Visit my tutorial website! Cyb3rGlitch Tutorials

#5 creepingmee

    Senior Member

  • Members
  • 714 posts

Posted 15 January 2008 - 07:37 AM

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??

Edited by creepingmee, 15 January 2008 - 08:39 AM.

HP DM1Z, K625, 3GB RAM, 320GB 7200 Hitachi, Ubuntu 10.10 Maverick Gnome 64bit, Great Machine.

#6 Fluffywings

    Senior Member

  • Members
  • 460 posts
  • LocationSaskatchwan, Canada

Posted 15 January 2008 - 07:48 AM

mmm fan control.

Is there a way to port to XP?

#7 eFfeM

    Senior Member

  • Members
  • 861 posts

Posted 15 January 2008 - 10:52 AM

Quote

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
All opinions, information etc in this forum post is copyrighted by me (eFfeM) unless indicated otherwise.
You are free to reuse whatever you want to, provided that:
1) you give credit to me and eeeuser.com whenever you reuse anything for all things you reused.
2) you do not pretend or create the illusion that your modifications are mine. I'll be responsible for my junk, you for yours :)

#8 kiwidrew

    Member

  • Members
  • 26 posts

Posted 15 January 2008 - 03:09 PM

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

#9 bulltza

    Advanced Member

  • Members
  • PipPipPip
  • 97 posts

Posted 15 January 2008 - 05:55 PM

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"
eeepc701[4GSurf green + 2G ram]+mod[ bluetooth + usb16G + headphoneLight + webcam] + OS[eeeUbuntu]
eeepc701[4G+ 500Mb ram]+mod[server layout + pasive cooling system]
My blog:http://vueltaabruselas.blogspot.com

#10 creepingmee

    Senior Member

  • Members
  • 714 posts

Posted 15 January 2008 - 05:59 PM

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!!!
HP DM1Z, K625, 3GB RAM, 320GB 7200 Hitachi, Ubuntu 10.10 Maverick Gnome 64bit, Great Machine.

#11 lonerebel

    Member

  • Members
  • 20 posts

Posted 15 January 2008 - 07:41 PM

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

#12 gazab

    Advanced Member

  • Members
  • PipPipPip
  • 49 posts
  • LocationSweden

Posted 15 January 2008 - 07:58 PM

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 :)

#13 eFfeM

    Senior Member

  • Members
  • 861 posts

Posted 15 January 2008 - 07:59 PM

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?
All opinions, information etc in this forum post is copyrighted by me (eFfeM) unless indicated otherwise.
You are free to reuse whatever you want to, provided that:
1) you give credit to me and eeeuser.com whenever you reuse anything for all things you reused.
2) you do not pretend or create the illusion that your modifications are mine. I'll be responsible for my junk, you for yours :)

#14 Grimmy

    Senior Member

  • Members
  • 168 posts
  • LocationLondon

Posted 15 January 2008 - 09:08 PM

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?
EeePC 701 4G - 2GB RAM - Ubuntu 10.10 Maverick Meerkat (Desktop Edition) - Eee Control 0.9.6

#15 golem

    Advanced Member

  • Members
  • PipPipPip
  • 91 posts
  • LocationUK

Posted 15 January 2008 - 11:13 PM

Quote

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?
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.
quis custodiet ipsos custodes? -- Juvenal VI 347-8

#16 theSuperman

    Senior Member

  • Members
  • 304 posts
  • LocationAllentown, PA

Posted 16 January 2008 - 01:03 PM

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

#17 Mjolinor

    Senior Member

  • Members
  • 430 posts
  • LocationUK

Posted 16 January 2008 - 01:24 PM

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.

Edited by Mjolinor, 16 January 2008 - 01:25 PM.


#18 theSuperman

    Senior Member

  • Members
  • 304 posts
  • LocationAllentown, PA

Posted 16 January 2008 - 01:28 PM

Quote

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.

#19 Grimmy

    Senior Member

  • Members
  • 168 posts
  • LocationLondon

Posted 16 January 2008 - 02:42 PM

Quote

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.)
EeePC 701 4G - 2GB RAM - Ubuntu 10.10 Maverick Meerkat (Desktop Edition) - Eee Control 0.9.6

#20 OuTTaRiCe

    New member

  • Members
  • 8 posts

Posted 16 January 2008 - 07:50 PM

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.





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users