The officially official Devuan Forum!

You are not logged in.

#1 2020-07-29 13:44:39

penguin
Member
Registered: 2019-05-05
Posts: 30  

[Solved] Resume after suspend/hibernation looses eth0 connection

Hi,

I started using new Devuan machine (beowulf/ceres) a week ago. It has annoying network disconnection problem after resume, which I had gotten so used from old Linux system.

> sudo lshw -C network
  *-network
       description: Ethernet interface
       product: RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
       vendor: Realtek Semiconductor Co., Ltd.
       physical id: 0
       bus info: pci@0000:04:00.0
       logical name: eth0
       version: 15
       serial: 04:d4:c4:24:36:f3
       size: 1Gbit/s
       capacity: 1Gbit/s
       width: 64 bits
       clock: 33MHz
       capabilities: pm msi pciexpress msix bus_master cap_list ethernet physical tp aui bnc mii fibre 10bt 10bt-fd 100bt 100bt-fd 1000bt-fd autonegotiation
       configuration: autonegotiation=on broadcast=yes driver=r8169 duplex=full firmware=rtl8168h-2_0.0.2 02/26/15 ip=192.168.219.105 latency=0 link=yes multicast=yes port=MII speed=1Gbit/s
       resources: irq:31 ioport:f000(size=256) memory:f6504000-f6504fff memory:f6500000-f6503fff
sudo /etc/init.d//networking restart
[sudo] password for penguin: 
[....] Running /etc/init.d//networking restart is deprecated because it may not re-[warne some interfaces ... (warning).
[....] Reconfiguring network interfaces...Killed old client process
Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/04:d4:c4:24:36:f3
Sending on   LPF/eth0/04:d4:c4:24:36:f3
Sending on   Socket/fallback
DHCPRELEASE on eth0 to 192.168.219.1 port 67
send_packet: Network is unreachable
send_packet: please consult README file regarding broadcast address.
dhclient.c:2733: Failed to send 300 byte long packet over fallback interface.
Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
Internet Systems Consortium DHCP Client 4.3.5
Copyright 2004-2016 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/04:d4:c4:24:36:f3
Sending on   LPF/eth0/04:d4:c4:24:36:f3
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 12
DHCPREQUEST of 192.168.219.105 on eth0 to 255.255.255.255 port 67
DHCPOFFER of 192.168.219.105 from 192.168.219.1
DHCPACK of 192.168.219.105 from 192.168.219.1
bound to 192.168.219.105 -- renewal in 34062 seconds.
done.

I followed one troubleshooting guide by creating a unload_modules file. But it did not solve the problem.

/etc/pm/config.d$
> more unload_modules 
SUSPEND_MODULES="$SUSPEND_MODULES r8169"

Last edited by penguin (2020-08-03 03:16:25)

Offline

#2 2020-07-29 15:37:05

Vernon
Member
Registered: 2020-07-19
Posts: 89  

Re: [Solved] Resume after suspend/hibernation looses eth0 connection

penguin wrote:

Hi,

I started using new Devuan machine (beowulf/ceres) a week ago. It has annoying network disconnection problem after resume, which I had gotten so used from old Linux system.

What happens when you use ifconfig to manually configure your Ethernet device with an IP address and netmask instead of asking DHCP to do it? Can you ping anything by ip address then?

I believe that Devuan is based on Debian Buster. If something doesn't work in Buster, it probably won't work in Devuan either without tweaking.

Offline

#3 2020-07-29 18:39:14

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: [Solved] Resume after suspend/hibernation looses eth0 connection

penguin wrote:
sudo /etc/init.d//networking restart
[sudo] password for penguin: 
[....] Running /etc/init.d//networking restart is deprecated because it may not re-[warne some interfaces ... (warning).

Rather than restarting the service just bring the interface down then back up again:

# ifdown eth0
# ifup eth0

^ If that works then create an exectuable script at /etc/pm/sleep.d/00fix with this content:

#!/bin/sh
#
# 00fix: bring network back after resuming from suspend

case "$1" in
   thaw|resume)
      /usr/sbin/ifdown eth0
      /usr/sbin/ifup eth0
      ;;
esac

EDIT: have you tried the r8168 driver? That might fix your problem.

https://pkginfo.devuan.org/stage/beowul … .00-1.html

Last edited by Head_on_a_Stick (2020-07-29 18:45:42)


Brianna Ghey — Rest In Power

Offline

#4 2020-07-30 02:25:16

penguin
Member
Registered: 2019-05-05
Posts: 30  

Re: [Solved] Resume after suspend/hibernation looses eth0 connection

@Head_on_a_Stick

I inserted debug line in /etc/rsyslog.conf

#
# __debug__ 7/30/2020 
#
local5.debug			/var/log/debug.log	

#
# Emergencies are sent to everybody logged in.
#
*.emerg				:omusrmsg:*

I created /etc/pm/sleep.d/00fix file.

> more /etc/pm/sleep.d/00fix 
#!/bin/sh
# 
# 00fix: bring network back after resuming from suspend
# 7/30/2020

case "$1" in
     suspend|hibernate)
     logger -p local5.debug "Go into suspend / hibernation"
     ;;
     thaw|resume)
      /usr/sbin/ifdown eth0
      /usr/sbin/ifup eth0
      logger -p local5.debug "Wake up"
      ;;
esac

The weird thing I found was that Xfce's suspend or hibernate would not trigger 00fix file at all. Out of frustration I ran pm-suspend in Xfce terminal, then pm-suspend.log and debug.log were created.

 > sudo more debug.log 
[sudo] password for penguin: 
Jul 30 10:25:30 dev1 penguin: uses /var/log folder
Jul 30 10:59:13 dev1 penguin: Go into suspend / hibernation
Jul 30 10:59:32 dev1 penguin: Wake up

$ tail -n 50 pm-suspend.log 
+ [ -f /var/run/pm-utils/pm-suspend/storage/disable_hook:0kernel-change ]
+ [ -x /usr/lib/pm-utils/sleep.d/000kernel-change ]
+ return 0
+ /usr/lib/pm-utils/sleep.d/000kernel-change resume suspend
+ local status=0
+ log -n /usr/lib/pm-utils/sleep.d/000kernel-change resume suspend: 
+ is_set true
+ return 0
+ local fmt=%s\n
+ [ -n = -n ]
+ fmt=%s
+ shift
+ printf %s /usr/lib/pm-utils/sleep.d/000kernel-change resume suspend: 
/usr/lib/pm-utils/sleep.d/000kernel-change resume suspend: + hook_exit_status 0
+ log success.
+ is_set true
+ return 0
+ local fmt=%s\n
+ [ success. = -n ]
+ printf %s\n success.
success.
+ LAST_HOOK=000kernel-change
+ log 
+ is_set true
+ return 0
+ local fmt=%s\n
+ [  = -n ]
+ printf %s\n 

+ IFS=

+ IFS= 	

+ inhibited
+ [ -f /var/run/pm-utils/pm-suspend/storage/inhibit ]
+ return 0
+ date
+ log Thu 30 Jul 2020 10:59:32 AM KST: Finished.
+ is_set true
+ return 0
+ local fmt=%s\n
+ [ Thu 30 Jul 2020 10:59:32 AM KST: Finished. = -n ]
+ printf %s\n Thu 30 Jul 2020 10:59:32 AM KST: Finished.
Thu 30 Jul 2020 10:59:32 AM KST: Finished.
+ exit 0
+ remove_suspend_lock
+ release_lock pm-suspend.lock
+ local lock=/var/run/pm-utils/locks/pm-suspend.lock
+ rm -f /var/run/pm-utils/locks/pm-suspend.lock
+ return 0

I'm running Xfce 4.12. I suspect that Session Manager (xfce4-session) doesn't properly suspend and hibernate.

Last edited by penguin (2020-07-30 02:38:41)

Offline

#5 2020-07-30 18:49:23

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: [Solved] Resume after suspend/hibernation looses eth0 connection

penguin wrote:

The weird thing I found was that Xfce's suspend or hibernate would not trigger 00fix file at all.

Yup, looks like Xfce uses a custom logout command: https://wiki.archlinux.org/index.php/Xfce#Suspend

You could create a wrapper script at /usr/local/bin/xfce-session-logout, something like:

#!/bin/sh
case "$1" in
   --suspend) /usr/sbin/pm-suspend;;
   --hibernate) /usr/sbin/pm-hibernate;;
   *) /usr/bin/xfce-session-logout "$1";;
esac

Brianna Ghey — Rest In Power

Offline

#6 2020-10-15 21:16:48

kapqa
Member
Registered: 2019-01-02
Posts: 334  

Re: [Solved] Resume after suspend/hibernation looses eth0 connection

hello,

i am having the same problem.

is there a solution yet?

it happens after coming back from suspend; if i just disconnect the ethernet cable and reconnect, nothing happens, and wicd manager shows no ethernet connection at all.

my ethernet seems this one

       product: 82567LM Gigabit Network Connection

Last edited by kapqa (2020-10-15 21:18:55)

Offline

Board footer