Announcement

Collapse
No announcement yet.

Cannot reassign IP after resume [from suspend to RAM]

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    Cannot reassign IP after resume [from suspend to RAM]

    Well, I must say 13.04 is a great release! Thumbs up to all those who contributed! :cool:

    I currently have 11.10, cuz the past versions all had some significantly important issues to me so that I couldn't get them fixed. But 13.04 is pretty good! I hope I will upgrade soon I am testing it on my backup HDD right now.

    The one I am trying to fix here is worse than it was in 11.10. In 11.10 when I suspend to RAM and then resume, I lose my network eth0 connection, but simply adding
    Code:
    service network-manager restart
    in a script in /etc/pm/sleep.d fixes the issue.

    However that does not work in 13.04, it seems to be the only thing blocking me from upgrading. I must say I suspend to RAM 6 days out of 7 so rebooting each time is a show stopper for me. Loging out and back in does not help in any way.

    When I resume, I get this

    Code:
    ~$ ifconfig
    eth0      Link encap:Ethernet  HWaddr 00:21:91:21:d5:0d  
              inet6 addr: fe80::221:91ff:fe21:d50d/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:4438 errors:0 dropped:0 overruns:0 frame:0
              TX packets:4273 errors:4 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:4355203 (4.3 MB)  TX bytes:612818 (612.8 KB)
    
    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:65536  Metric:1
              RX packets:606 errors:0 dropped:0 overruns:0 frame:0
              TX packets:606 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:0 
              RX bytes:59902 (59.9 KB)  TX bytes:59902 (59.9 KB)
    But in eth0 it should show like this

    Code:
    eth0      Link encap:Ethernet  HWaddr 00:21:91:21:d5:0d  
    [B]          inet addr:1.2.3.4  Bcast:1.225.255.255  Mask:255.255.0.0 (the IP address has been changed for posting)[/B]
              inet6 addr: fe80::221:91ff:fe21:d50d/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:235 errors:0 dropped:0 overruns:0 frame:0
              TX packets:279 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:36696 (36.6 KB)  TX bytes:27691 (27.6 KB)
    [B]          Interrupt:18 Base address:0x6c00 [/B]

    Not sure if that's normal, but I also get this

    Code:
    ~$ sudo ifup eth0                                                                                                                                                    
    Ignoring unknown interface eth0=eth0.
    Unknown interface, how come it's listed in ifconfig and unknown lolll, obviously I am not that much an expert in networking under linux.


    Yes I did check pm-suspend.log, here it is! :cool:

    Code:
    pm-suspend.log
    
    Mon Jun  3 16:34:17 EDT 2013: Awake.
    Mon Jun  3 16:34:17 EDT 2013: Running hooks for resume
    Running hook /etc/pm/sleep.d/novatel_3g_suspend resume suspend:
    
    /etc/pm/sleep.d/novatel_3g_suspend resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/99video resume suspend:
    /usr/lib/pm-utils/sleep.d/99video: 22: /usr/lib/pm-utils/sleep.d/99video: shopt: not found
    
    /usr/lib/pm-utils/sleep.d/99video resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler resume suspend:
    
    /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/95led resume suspend:
    
    /usr/lib/pm-utils/sleep.d/95led resume suspend: not applicable.
    Running hook /usr/lib/pm-utils/sleep.d/95hdparm-apm resume suspend:
    
    /usr/lib/pm-utils/sleep.d/95hdparm-apm resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/95anacron resume suspend:
    
    /usr/lib/pm-utils/sleep.d/95anacron resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/94cpufreq resume suspend:
    
    /usr/lib/pm-utils/sleep.d/94cpufreq resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/90clock resume suspend:
    
    /usr/lib/pm-utils/sleep.d/90clock resume suspend: not applicable.
    Running hook /usr/lib/pm-utils/sleep.d/75modules resume suspend:
    Reloaded unloaded modules.
    
    /usr/lib/pm-utils/sleep.d/75modules resume suspend: success.
    Running hook /usr/lib/pm-utils/sleep.d/60_wpa_supplicant resume suspend:
    
    /usr/lib/pm-utils/sleep.d/60_wpa_supplicant resume suspend: not executable.
    Running hook /etc/pm/sleep.d/11custom resume suspend:
     * Stopping fan speed regulator fancontrol
       ...done.
    network-manager stop/waiting
    network-manager start/running, process 3824
     * Starting fan speed regulator fancontrol
       ...done.
    I couldn't find the command line actions to completely stop networking and completely resume it. I could simply add it in my sleep.d script and it should do the job, but all I could find was that network-manager restart and it doesn't help.

    I am clueless here... any thoughts?

    tnx!
    Frank
    Kubuntu 19.10/20.04
    AMD Ryzen 7 3700x
    Gigabyte X570 AORUS ELITE

    #2
    I am linking this thread with this one http://www.kubuntuforums.net/showthr...t/page1http://

    I think it may be similar. 3yo and not fixed in the Kubuntu releases.

    I have logged a bug at https://bugs.launchpad.net/ubuntu/+s...e/+bug/1187530
    Frank
    Kubuntu 19.10/20.04
    AMD Ryzen 7 3700x
    Gigabyte X570 AORUS ELITE

    Comment


      #3
      Also
      Code:
      sudo ifconfig eth0 down
      and
      Code:
      sudo ifconfig eth0 up
      does not help at all.

      It brings back eth0 at the exact point it is, which without an IP assigned.
      I am unable to get the IP assigned to the interface.

      Any ideas how?
      Frank
      Kubuntu 19.10/20.04
      AMD Ryzen 7 3700x
      Gigabyte X570 AORUS ELITE

      Comment


        #4
        Originally posted by FrankKubuntu;329654f
        It brings back eth0 at the exact point it is, which without an IP assigned.
        I am unable to get the IP assigned to the interface.
        Perhaps you need this somewhere in your script:
        Code:
        sudo dhclient eth0

        Comment


          #5
          Didn't work either.

          It brings up eth0 but doesn't assign an IP (v4). Curiously when I type sudo dhclient eth0 and phit enter, it does a carriage return but stays there, no output and not going back to ~$.

          I tried
          Code:
          sudo dhclient -4 eth0
          and same thing.

          I also tried
          Code:
          sudo ifconfig eth0 down
          sudo service network-manager stop
          then suspending to RAM.
          Then resuming from RAM and typing
          Code:
          sudo ifconfig eth0 up
          sudo network-manager start
          Still exact same result.
          This is really weird, something must hang somewhere, even if the interface is totally shut before I suspend to RAM.
          Frank
          Kubuntu 19.10/20.04
          AMD Ryzen 7 3700x
          Gigabyte X570 AORUS ELITE

          Comment


            #6
            I got it!!!!!!!!!!!

            I have to create
            Code:
            /etc/pm/config.d/modules
            file and include my eth0 module in the following line
            Code:
            SUSPEND_MODULES="[interface module]"
            I took this advice from those who sometimes have issues with pm-suspend and wifi modules.
            They say in some cases, it is possible that running pm-suspend causes hangs or other issues. This may be due to specific "misbehaving" modules.

            God that was really a shot in the dark!

            Hopefully this can help others.
            Frank
            Kubuntu 19.10/20.04
            AMD Ryzen 7 3700x
            Gigabyte X570 AORUS ELITE

            Comment


              #7
              Originally posted by FrankKubuntu View Post
              God that was really a shot in the dark!
              Here's a dirty little secret: it is for the rest of us, too. Sssshhhhhh! Don't tell anyone!

              Good find. Thanks for letting us know.

              Comment

              Working...
              X