SOLVING Suspend Problems

openSUSE is a good distribution (especially for a newbie like me) … :wink:

I installed the s2ram package called ‘suspend’ in openSUSE distro via a) webpin search and b) added the repository so I think it installed via yast

Then as root I called s2ram

Suspend to RAM - openSUSE

I found with -n parameter that my machine not in database so I tried a --force which forced suspend to ram

Getting it back up I had to hit the power button which worked.

PCMCIA USB etc all fine

Restarting internet required ifdown eth0
then ifup eth0 (I am using ifup and not network manager (ref Network Settings)

All I need now is to learn how to knock up some simple bash scripts and what to do with them and geronimo!!! rotfl!

Maybe I could just associate these simple commands to some keys and/or run the script on wake

Could also investigate later at leisure pm-utils hooks etc to find cleaner ways or better just email to get my machine on the s2ram whitelist. :smiley:

I have 2 routers and apparently all flavours and current versions of linux find this a problem.

Computer(s) >> Local Safecom 4 Port Cable/DSL Broadband Router (e.g. for WAN sharing) >> ethernet/powerline >> Netgear Broadband Cable Modem Router >> ISP

Both routers have NAT hardware firewall if that is relevant. Until I can figure out how to edit my config somewhere so that both routers and DNS etc are accommodated I have removed the local Safecom router which resolves the problem. Without the extra router I am now using Network Manager (or ifup if I want) and can suspend and hibernate without too much difficulty.

One thing I have done is to add a command to a hook file called 99mylocal I created (and made executable) in /etc/pm/sleep.d to refresh the network. Here is the text of 99mylocal:

#!/bin/bash


case $1 in
    hibernate)
        echo "Hibernating... suspending to Disk... ;>}"
	echo "Unmounting external disks..."
	umount -l  /dev/sdb1 /dev/sdc1 /dev/sdc2
	echo "Taking eth0 down before hibernation..."
	/sbin/ifdown eth0
	;;

    suspend)
        echo "Suspending to RAM... ;>}"
	echo "Unmounting external disks..."
	umount -l  /dev/sdb1 /dev/sdc1 /dev/sdc2
	echo "Taking down eth0 before suspend ..."
	/sbin/ifdown eth0
        ;;

    thaw)
        echo "Suspend to disk is over, we are resuming..."
	echo "Mounting disks..."
	mount -a
	echo "Renewing eth0 "
	/sbin/rcnetwork restart
	echo "network restarted"
        ;;

    resume)
        echo "Suspend to RAM seems to be over..."
	echo "Mounting disks..."
	mount -a
	echo "Renewing eth0 "
	/sbin/rcnetwork restart
	echo "network restarted"
        ;;

    *)  echo "somebody is calling me totally wrong."
        ;;
esac

Without creating the hookfile I could get the same result by opening and then closing the Network Settings control panel in Yast after resuming from suspend or hibernate - since closing the cp runs rcnetwork restart

smudger