Friday, 13 November 2009

rmmod or modprobe?

Usually when we use our laptop, we needn't all resources working (for example we connect to Internet or local net via WIFI card or Ethernet card or modem but not all of them together), nevertheless operating system sets them ready to work. That means there are spend power necessary to run device even it isn't used, obviously nowadays most of hardware supports power save modes reducing power consumption, but there is no reason to turn on something which won't be used. Important requirements to manipulate hardware are:
  • drivers should be compiled as kernel modules
  • enabled option of loading and unloading modules 
If you use default kernel everything is done, but if you compile kernel with your own configuration, remember about above requirements.

OK, let's profit extra minutes working on battery.

To turn off the device we use following command (as root user):
rmmod < name of module >

Of course if we want running device back, command loading module is:
modprobe < name of module >

What we may turn off:
  • Wireless card
  • Ethernet card
  • Modem
  • USB device
  • Sound card and speakers
  • Web camera
  • Optical disc drive (like DVD-R/RW, CD-R/RW etc.)
  • many other
Hardware:       Wireless card Realtek RTL8187B
Mean Value:    WIFI on = 16.0396      WIFI off = 14.1703

As you see I profit almost 2 Watts when I am unload WIFI driver. I want to mention that wireless card wasn't connected.

How unloading kernel's modules affect power consumption


Post a Comment