ACPI resume network doesn't look at /etc/network/interfaces

Bug #73381 reported by tuatha
8
Affects Status Importance Assigned to Milestone
pm-utils (Ubuntu)
Confirmed
Undecided
Unassigned

Bug Description

Binary package hint: acpi-support

After a resume the scripts from /etc/acpi/resume.d are run. In my case however my wireless network is not restarted. I have noticed that it doesn't ifup my interface and it doesn't start wpa_supplicant.

How to reproduce:
1. Suspend system
2. Resume system

Symptoms:
ifconfig wlan0 shows that the interface is down.
ps -ef | grep wpa shows no wpa_supplicant processes running.

How to fix manually:
Restart wpa_supplicant as per the /etc/network/interfaces file, pre-up directive (attached down below):
wpa_supplicant -i wlan0 -Dwext -c/etc/wpa_supplicant.conf -Bw

Implemented workaround:
I have edited /etc/acpi/resume.d/62-ifup.sh and changed it into:
#!/bin/sh

# Find the currently running network interfaces...
INTERFACES=`/sbin/ifconfig | awk '/^[^ ]+/ {print $1}'`

# Bring up the interfaces (this should probably be left up to some policy
# manager, but at the moment we just bring back whatever we ifdowned)
for x in $INTERFACES; do
    ifup $x &
    ifup wlan0
    wpa_supplicant -i wlan0 -Dwext -c/etc/wpa_supplicant.conf -Bw &
done

This has fixed the problem for me, but obviously this only works for me.

Hardware and software setup:
HP nc6000 laptop with Broadcom 121g USB WIFI device running Edgy.
vendor: 'SpeedTouch 121g Wireless USB Adapter'
ethernet device <MAC> using NDIS driver bt4501g, 06B9:0121.F.conf
encryption modes supported: WEP; TKIP with WPA, WPA2, WPA2PSK; AES/CCMP with WPA, WPA2, WPA2PSK

I use ndiswrapper with the Windows drivers and the wpa_supplicant to connect to a WPA AP.

cat /etc/network/interfaces
auto wlan0
iface wlan0 inet dhcp
wpa-driver wext
wpa-conf /etc/wpa_supplicant.conf
pre-up wpa_supplicant -i wlan0 -Dwext -c/etc/wpa_supplicant.conf -Bw
post-down killall -q wpa_supplicant

Suggested fix:
The acpi scripts for activating the network should look at the /etc/network/interfaces file to determine what commands should be run to reactivate the interface.

Revision history for this message
Nicolas DERIVE (kalon33) wrote :

Are you using network manager ? Because if yes, your bug may be a duplicate of the bug #40125.

Revision history for this message
chantra (chantra) wrote :

I can confirm this.
Not using network-manager, I would expect acpi-support to reload my network cards configurations from /etc/network/interfaces.

But actually, it seems that avahi is taking over :s
This is the output of ifconfig after resume (eth1 being the wireless interface):
 ifconfig
eth1 Link encap:Ethernet HWaddr <MAC>
          UP BROADCAST MULTICAST MTU:1500 Metric:1
          RX packets:0 errors:0 dropped:4 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
          Interrupt:18 Base address:0xe000 Memory:cc000000-cc000fff

eth1:avah Link encap:Ethernet HWaddr <MAC>
          inet addr:169.254.8.172 Bcast:169.254.255.255 Mask:255.255.0.0
          UP BROADCAST MULTICAST MTU:1500 Metric:1
          Interrupt:18 Base address:0xe000 Memory:cc000000-cc000fff

lo Link encap:Local Loopback
          inet addr:127.0.0.1 Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING MTU:16436 Metric:1
          RX packets:11346 errors:0 dropped:0 overruns:0 frame:0
          TX packets:11346 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:8237520 (7.8 MiB) TX bytes:8237520 (7.8 MiB)

In order to get my wireless I need to run
$sudo /etc/init.d/networking restart

Changed in acpi-support:
status: Unconfirmed → Confirmed
Revision history for this message
Paul Sladen (sladen) wrote :

This is puzzling; using the 'pre-up' directives, if running 'sudo ifup xyz' from the commandline works as expected, then the 'resume.d' scripts running 'ifup xyz' should do exactly the same.

Puzzling.

Revision history for this message
Steve Langasek (vorlon) wrote :

Reassigning to pm-utils, which now owns resume handling under Ubuntu. I can confirm that pm-utils still doesn't make any effort to restart interfaces configured in /etc/network/interfaces - does it need to do this, though, or does the current setup work today?

affects: acpi-support (Ubuntu) → pm-utils (Ubuntu)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.