[Debian-eeepc-devel] Disabling wifi when wired (to save power)
Trent W. Buck
twb at cybersource.com.au
Wed Apr 7 04:23:10 UTC 2010
I never need BOTH wifi and wired networking (at the same time). AFAIK,
with my current configuration[0], wpa_supplicant will CONSTANTLY poll
for APs when there are none around -- and I imagine this requires
significant power.
My idea is to say "on successfully negotiating a wired connection, turn
off wifi". A simple post-up rule for eth0 doesn't work, because it
seems to be considered "up" before dhclient gets a DHCPRESPONSE or
DHCPACK. So I guess I need to add a hook like
# cat >/etc/dhcp3/dhclient-exit-hooks.d/twb-mutex-ifaces
case $reason$interface in
(BOUNDeth*) rfkill block wifi;;
esac
# chmod +x /etc/dhcp3/dhclient-exit-hooks.d/twb-mutex-ifaces
I'd be obliged if someone would confirm that wpa_supplicant's scanning
will chew up power and critique my approach (or suggest a better one).
PS: due to an unrelated issue (#573607), I can't actually use rfkill, so
for now subsitute "ifdown --force wlan0".
[0] My current /etc/network/interfaces looks like this:
auto lo
iface lo inet loopback
allow-hotplug eth0
iface eth0 inet dhcp
allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant.conf
wpa-roam-default-iface wlan0-default
iface wlan0-default inet dhcp
More information about the Debian-eeepc-devel
mailing list