suspend/resume wired



The patch below fixes the problem that I had with suspend to ram. When it starts, NM normally brings up both wired and wireless interfaces and they remain up. After a suspend/resume, the wired inteface is not brought up by the system or by NM but the driver is loaded. This causes NM to default to a wireless connection even if a wire is plugged in.

Setup: IBM T42, network drivers: e1000, ipw2200, FC4 updated.

Acpi suspend/resume script

#!/bin/sh

/usr/bin/dbus-send --system --dest=org.freedesktop.NetworkManager --type=method_call /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.sleep

/sbin/hwclock --systohc
echo -n mem > /sys/power/state
/sbin/hwclock --hctosys

/usr/bin/dbus-send --system --dest=org.freedesktop.NetworkManager --type=method_call /org/freedesktop/NetworkManager org.freedesktop.NetworkManager.wake

After an acpi suspend/resume, both e1000 and ipw2200 drivers are loaded but the wired interface is not up. The patch fixes this by bringing up all devices when NM wakes.

I am not sure if this is the best solution, but it works.

patch fot HEAD 1.409
_______________________
--- nm-dbus-nm.c_orig    2005-06-29 21:23:37.000000000 -0400
+++ nm-dbus-nm.c    2005-06-29 21:42:36.000000000 -0400
@@ -433,6 +433,16 @@
    {
        app_data->asleep = FALSE;

+                /* Physically up all devices */
+                nm_lock_mutex (app_data->dev_list_mutex, __FUNCTION__);
+ for (elt = app_data->dev_list; elt; elt = g_slist_next (elt))
+                {
+                        NMDevice        *dev = (NMDevice *)(elt->data);
+
+                        nm_device_bring_up (dev);
+                }
+                nm_unlock_mutex (app_data->dev_list_mutex, __FUNCTION__);
+
        nm_schedule_state_change_signal_broadcast (app_data);
        nm_policy_schedule_device_change_check (data->data);
    }

--
Bill Moss
Professor, Mathematical Sciences
Clemson University




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]