Hi, I have a problem with suspending (to disk) in connection with a running alsasound daemon. If I stop the daemon and suspend everything works pretty well. But if alsasound is running suspend fails with an error. For this reason I have added in: POWERSAVE_SUSPEND2DISK_RESTART_SERVICES="alsasound" and in /var/log/suspend2disk.log I got the message: ========we are going to sleep, preparing.======== Stopping services: (alsasound configured) none running. ------------------------------------------------------------------------------ Unloading modules: (ÂŽstir4200 ipw2100 ipw2200 prism54 ath_pciÂŽ configured) trying stir4200 trying ipw2100 trying ipw2200 trying prism54 trying ath_pci ------------------------------------------------------------------------------ prepare_sleep finished for suspend2disk ------------------------------------------------------------------------------ ========we are back from suspend, cleaning up.======== Restoring system clock. From: 11/09/04_10:31:05, To: 11/09/04_10:31:09 Actually alsasound is running. If I do stop it manually, suspending works. Beste regards, Michael -- michael@karbach.org www.karbach.org
On Tue, Nov 09, 2004 at 10:37:19AM +0100, Michael Karbach wrote:
alsasound is running suspend fails with an error. For this reason I have added in:
POWERSAVE_SUSPEND2DISK_RESTART_SERVICES="alsasound"
and in /var/log/suspend2disk.log I got the message:
========we are going to sleep, preparing.======== Stopping services: (alsasound configured) none running.
Actually alsasound is running. If I do stop it manually, suspending works.
yes, i have discovered this myself today. the following patch against /usr/lib/powersave/scripts/sleep_helper_functions will fix it: --- scripts/sleep_helper_functions 28 Sep 2004 17:19:31 -0000 1.10 +++ scripts/sleep_helper_functions 9 Nov 2004 12:06:01 -0000 1.10.2.1 @@ -146,7 +146,7 @@ if [ "$SERVICES_TO_RESTART" ]; then D=false for X in $SERVICES_TO_RESTART; do - /etc/init.d/$X status; RET=$? + /etc/init.d/$X status >/dev/null 2>&1 ; RET=$? # redirect needed to workaround initscript bug. if [ $RET -eq 0 ]; then echo "stopping $X:" >> $LSMOD_LOG /etc/init.d/$X stop 2>&1 | awk '{print "## "$0}' >> $LSMOD_LOG just redirect the '/etc/init.d/$X status' to /dev/null (stdout and stderr) and it will work fine. -- Stefan Seyfried
On Tuesday, 9. November 2004 15:34, Stefan Seyfried wrote:
On Tue, Nov 09, 2004 at 10:37:19AM +0100, Michael Karbach wrote:
alsasound is running suspend fails with an error. For this reason I have added in:
POWERSAVE_SUSPEND2DISK_RESTART_SERVICES="alsasound"
and in /var/log/suspend2disk.log I got the message:
========we are going to sleep, preparing.======== Stopping services: (alsasound configured) none running.
Actually alsasound is running. If I do stop it manually, suspending works.
yes, i have discovered this myself today.
the following patch against /usr/lib/powersave/scripts/sleep_helper_functions will fix it:
--- scripts/sleep_helper_functions 28 Sep 2004 17:19:31 -0000 1.10 +++ scripts/sleep_helper_functions 9 Nov 2004 12:06:01 -0000 1.10.2.1 @@ -146,7 +146,7 @@ if [ "$SERVICES_TO_RESTART" ]; then D=false for X in $SERVICES_TO_RESTART; do - /etc/init.d/$X status; RET=$? + /etc/init.d/$X status >/dev/null 2>&1 ; RET=$? # redirect needed to workaround initscript bug. if [ $RET -eq 0 ]; then echo "stopping $X:" >> $LSMOD_LOG /etc/init.d/$X stop 2>&1 | awk '{print "## "$0}' >> $LSMOD_LOG
just redirect the '/etc/init.d/$X status' to /dev/null (stdout and stderr) and it will work fine. --
Yes, it seems to work so far;-) Thanks, Michael -- michael@karbach.org www.karbach.org
participants (2)
-
Michael Karbach
-
Stefan Seyfried