Ubuntu

/etc/network/run/ifstate incorrect?

Reported by Lethe on 2008-11-08
16
This bug affects 1 person
Affects Status Importance Assigned to Milestone
acpi-support (Ubuntu)
Low
Unassigned
Nominated for Intrepid by cmcginty
Nominated for Jaunty by cmcginty

Bug Description

Intrepid 2.7.27

I noticed that on 'sleep', my NIC was never getting ifup'ed at resume (I had to restart by hand)... and error message in console reports /etc/network/run/ifstate file not found.

Investigating, in /etc/acpi/suspend.d/55-down-interfaces.sh are two lines:

IFDOWN_INTERFACES="`cat /etc/network/run/ifstate | sed 's/=.*//'`"
IFUP_INTERFACES="`cat /etc/network/run/ifstate`"

I believe these are wrong (and confuses the scripts somewhat) and should be:

IFDOWN_INTERFACES="`cat /var/run/network/ifstate | sed 's/=.*//'`"
IFUP_INTERFACES="`cat /var/run/network/ifstate`"

Testing with this change, my eth0 now does come back online after resume.

Nick

Lethe (nick-ukfsn) wrote :

Duh. Timelord, eh? I meant Intrepid with kernel 2.6.27

Chris Coulson (chrisccoulson) wrote :

Thank you for your bug report. Assigning to acpi-support.

Just out of curiosity, how are you suspending your machine? I'm just surprised that changing the script fixes your issues, as the acpi-support scripts aren't used for suspend on a normal Ubuntu desktop install

Lethe (nick-ukfsn) wrote :

I use Fluxbox, and have mapped the fn+F1 key to my own little script that calls /etc/acpi/sleep.sh

Basically I have had to do this as I do not run/have installed Gnome/KDE at all.

All works good now.

Nick

Chris Coulson (chrisccoulson) wrote :

Thanks, that explains why this works for you then

Hi. I use sleep key on my notebook and this bug affects me too.

too hard to fix 2 lines of code? 2 month left :)

Chris Coulson (chrisccoulson) wrote :

It's not that hard to fix, but it's just that no-one has shown interest in writing a patch, and there are more important issues. I added the bitesize tag to this report, as it is a good place for a new contributor to start. You're more than welcome to provide a patch :)

What kind of patch is applicable? Diff between deb-src packages or
something completely different? Is there short developer howto?

On Wed, 28 Jan 2009 11:43:09 +0200, Chris Coulson
<email address hidden> wrote:

> It's not that hard to fix, but it's just that no-one has shown interest
> in writing a patch, and there are more important issues. I added the
> bitesize tag to this report, as it is a good place for a new contributor
> to start. You're more than welcome to provide a patch :)
>
> ** Tags added: bitesize
>

--
ISP CrIS, Softwarium

Chris Coulson (chrisccoulson) wrote :

Hi,

I'm at work at the moment. If you're around later (maybe 1900ish UTC), then I'll help prepare a patch :)

I will be at home around 17:00 UTC, my JID <email address hidden>, or contact me by
email. Thanks for help.

On Wed, 28 Jan 2009 14:06:53 +0200, Chris Coulson
<email address hidden> wrote:

> Hi,
>
> I'm at work at the moment. If you're around later (maybe 1900ish UTC),
> then I'll help prepare a patch :)
>

--
ISP CrIS, Softwarium

Here a patch:

diff -urN acpi-support-0.115.orig/suspend.d/55-down-interfaces.sh acpi-support-0.115/suspend.d/55-down-interfaces.sh
--- acpi-support-0.115.orig/suspend.d/55-down-interfaces.sh 2008-09-26 03:28:34.000000000 +0300
+++ acpi-support-0.115/suspend.d/55-down-interfaces.sh 2009-01-28 20:53:05.832224111 +0200
@@ -10,8 +10,8 @@
 # managed by other tools, such as NetworkManager, and will be brought up
 # automatically). Due to logical interfaces, the interfaces that we pass to
 # ifdown are DIFFERENT than those that we pass to ifup, see Debian BTS #475002.
-IFDOWN_INTERFACES="`cat /etc/network/run/ifstate | sed 's/=.*//'`"
-IFUP_INTERFACES="`cat /etc/network/run/ifstate`"
+IFDOWN_INTERFACES="`cat /var/run/network/ifstate | sed 's/=.*//'`"
+IFUP_INTERFACES="`cat /var/run/network/ifstate`"

 must_control_interface()
 {

Steve Langasek (vorlon) on 2009-02-06
Changed in acpi-support:
status: Triaged → Fix Committed
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package acpi-support - 0.120

---------------
acpi-support (0.120) jaunty; urgency=low

  [ Alexander Solodukhin ]
  * Correct suspend.d/55-down-interfaces.sh to point to
    /var/run/network/ifstate rather than /etc/network/run/ifstate.
    LP: #295544.

  [ Martin Pitt ]
  * Drop lib/*.config: I committed all sleep quirks to hal-info now
    (upstream, and in Jaunty). The ACPI_SLEEP whitelisting, as well as
    acpi-support's suspend/resume handling itself is not used by
    default any more, and almost all laptops support suspend/resume
    nowadays, so keeping a whitelist is the wrong approach.
    LP: #37303, #44781.
  * lib/device-funcs: Drop reading of .config files.
  * Drop vbesave, resume.d/17-video-restore.sh, suspend.d/
    80-video-pci-state.sh, suspend.d/80-video-vesa-state.sh:
    pm-utils and hal-info handle VBE/PCI status quirks.

  [ Scott James Remnant ]
  * suspend.d/88-time.sh, resume.d/50-time.sh: Remove since the kernel
    keeps the system clock in sync with the hardware clock over a
    suspend/resume cycle. LP: #312486, #218120, #158358, #157936.
  * debian/preinst: Remove on upgrade.
  * Remove the toshiba_acpi.modprobe file; this sets a kernel option that's
    been the default for ages.

 -- Scott James Remnant <email address hidden> Tue, 03 Mar 2009 17:29:01 +0000

Changed in acpi-support:
status: Fix Committed → Fix Released
Akkana Peck (akkzilla) wrote :

Any chance of pushing this to Intrepid? I just upgraded to Intrepid, hit this problem and worked out the fix, and the very first two people I mentioned it to both said "Oh! That must be why my network doesn't work after suspending since I installed Intrepid! What's the fix?"

It's a very simple and very safe fix for something fairly important (networking after resume).

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Duplicates of this bug

Other bug subscribers