Tips & Tricks
WiFi / WirelessRadios consume power for both transmitting and receiving. A typical laptop WiFi radio may consume a few watts while in use. There are several tricks and tweaks you can perform to reduce the power consumption, even when you are using WiFi all the time.WiFi power saving mode (Power Save Poll, PS-Poll)Because of the power requirements for WiFi, the Power Save Poll protocol (PS-Poll) was developed to help reduce the amount of time a radio needs to be powered.
The mechanism you use to turn on and configure PS-Poll varies depending on the laptop card. To turn on WiFi power saving on a wireless adapter, that uses the ipw2100 or ipw2200 driver, you can use the following command: iwpriv eth1 set_power 5 Where 'eth1' is the interface name for your network adapter (typically eth1; sometimes it may be eth0, wlan0, etc.). The number 5 in the above iwpriv command is the degree to which the power saving should be enabled:
iwpriv eth1 set_power 6Newer adapters, the ones that use the iwl3945 or the iwl4965 drivers, rely more on the kernel for configuring the wireless subsystem. A mechanism still exists for manually configuring the PS-Poll via a sysfs file attribute 'power_level': echo 5 > /sys/bus/pci/drivers/iwl4965/*/power_levelNOTE: Substitute iwl3945 for iwl4965, depending on which adapter you have. Auto associationMost WiFi network drivers available in Linux that were written before the mac80211 subsystem was merged into the 2.6.23 kernel, will, when not associated with an access point, go into an aggressive scanning mode, even if the network interface is down. This behavior allows certain older userspace applications to function. These applications assumed that the WiFi adapter could find access points in that situation.
rmmod ipw2200 modprobe ipw2200 associate=0(The above example assumes you are using the ipw2200 driver. If you're using one of the other Intel wireless drives, you need to replace the ipw2200 with the module name of your driver.)
options ipw2200 associate=0 The RFKILL optionThere are situations where you know you're not going to use the WiFi radio at all, and you want to just turn the radio off altogether. Being inside an airplane is one such situation, but, of course, there are many other possible situations.
for i in `find /sys -name "rf_kill" ; do echo 1 > $i ; doneTo turn the radios back on, you can use this command: for i in `find /sys -name "rf_kill" ; do echo 0 > $i ; done beacon intervalsAccess points announce their presence at regular intervals by sending a so-called 'beacon packet'. With most access points, the default interval is set to 100 milliseconds. The impact of the beacon interval is most noticeable when it's trying to find a network to associate with. The process of association requires a radio to tune to each channel and listen for the access point to transmit a beacon. The longer between that interval, the longer the radio must wait on each channel, or risk missing the beacon.
Unused Bluetooth*Many laptops now come with Bluetooth*.
Unlike WiFi, Bluetooth is rarely used, so it's very possible that your Bluetooth device isn't actually used for anything, and is just consuming battery life.
# hciconfig
hci0: Type: USB
BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0
DOWN
RX bytes:0 acl:0 sco:0 events:0 errors:0
TX bytes:0 acl:0 sco:0 commands:0 errors:0
In the example above, a USB bluetooth dongle is present and active. Note that many internal bluetooth adapters in laptops now use USB.
hciconfig hci0 down rmmod hci_usb Deferred Firmware loadingWireless drivers, for example ipw2100 and ipw2200, load their firmware The solution for this problem is to defer the firmware loading for the ifconfig wlan0 up Currently, you have to apply a separate patch for the ipw2100 [1] and [1] http://marc.info/?l=linux-netdev&m=117079847405905&w=2 |