LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (http://www.linuxquestions.org/questions/slackware-14/)
-   -   Hibernation and suspend has stopped working. (http://www.linuxquestions.org/questions/slackware-14/hibernation-and-suspend-has-stopped-working-4175451451/)

Arcosanti 02-23-2013 05:55 PM

Hibernation and suspend has stopped working.
 
I've been having some problems with suspend and hibernate lately. They both have have worked fine for six months after I got them working. Now they both are no longer working. Trying either would cause the screen to go black and the system would hang, forcing me to use the power button to power down. They both used to call up the screen saver, lock the screen and either suspend or hibernate. I was able to track one problem down to /usr/local/sbin/run-as-X-user.sh script. Line 14 and some characters missing at the beginning. I restored those characters and now suspend calls up the screen saver, locks the screen and then suspends, but hangs on resume with a black screen with a non flashing cursor in the upper left corner of the screen. Hibernate on the other hand has no change. I'm not sure how this script got messed up like it did since it was fine when I installed it 6 months ago. I am still getting a couple of errors concerning this script on line 13 and a blank line 16 which is at the end of the file. Other than the pm-suspend.log, I am not finding any other errors concerning this problem. I checked the logs in /var/log/ to no avail. To follow my pm-suspend.log and my run-as-X-user.sh files.

Code:

run-as-X-user.sh

#!/bin/bash

LOGGED_IN_USER=`ls -trl /tmp/.ICE-unix/ | tail -n -l | cut -d' ' -f3
NUM_X_USERS=`echo $LOGGED_IN_USER | wc -l`
# SESSION_MANAGER format determined analyzing current variable...
# DBUS_SESSION_BUS_ADDRESS found checking environment of xfce4-panel

if [ $NUM_X_USERS -eq 1 ]; then
su -c "export HOST=`hostname` ;
export SESSION_ID=`ls -t /tmp/.ICE-unix/ | head -nl` ;
export DISPLAY=:0.0 ;
export SESSION_MANAGER=local/$HOST:@/tmp/.ICE-unix/$SESSION_ID,unix/$HOST:/tmp/
export DBUS_SESSION_BUS_ADDRESS=`cat /proc/$(pidof xfce4-panel)/environ | tr '\0' '\n' | grep DBUS_SESSION_BUS_ADDRESS | cut -d '=' -f2-` ;
$*" $LOGGED_IN_USER
fi

Code:

pm-suspend.log

Initial commandline parameters: --quirk-vbemode-restore
--quirk-vbe-post
Sat Feb 23 14:46:34 MST 2013: Running hooks for hibernate.
Running hook /etc/pm/sleep.d/00lockscreen hibernate hibernate:
/usr/local/sbin/run-as-X-user.sh: line 13: unexpected EOF while looking for matching ``'
/usr/local/sbin/run-as-X-user.sh: line 16: syntax error: unexpected end of file

/etc/pm/sleep.d/00lockscreen hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/00logging hibernate hibernate:
Linux brown-dwarf 2.6.38.5D9-6-2012 #1 SMP Thu Sep 6 20:04:19 MST 2012 i686 Intel(R) Pentium(R) M p
Module                  Size  Used by
speedstep_centrino    13382  0
arc4                  12473  4
b43                  284488  0
ssb                    47443  1 b43
mac80211              210456  1 b43 
cfg80211              127813  2 b43,mac80211
slip                  17445  0
lp                    13427  0
i8k                    13447  0
pcmcia                35449  2 b43,ssb
snd_intel8x0          24856  1
snd_ac97_codec        93501  1 snd_intel8x0
joydev                17344  0
btusb                  18336  0
ac97_bus              12642  1 snd_ac97_codec
snd_pcm                68192  2 snd_intel8x0,snd_ac97_codec
i915                  276008  2
firewire_ohci          27295  0
bluetooth              54207  1 btusb
tg3                  105566  0
yenta_socket          23321  0
ppdev                  12843  0   
firewire_core          43917  1 firewire_ohci
pcmcia_rsrc            18276  1 yenta_socket
snd_timer              24403  1 snd_pcm
pcmcia_core            21546  3 pcmcia,yenta_socket,pcmcia_rsrc
dcdbas                14054  0
irda                  156705  0
psmouse                60516  0
parport_pc            28175  1
snd                    52979  6 snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer
crc_itu_t              12627  1 firewire_core
serio_raw              13047  0
parport                32805  3 lp,ppdev,parport_pc
crc_ccitt              12595  1 irda
soundcore              14737  1 snd
mac_hid                13078  0   
shpchp                28275  0   
snd_page_alloc        14119  2 snd_intel8x0,snd_pcm
drm_kms_helper        32603  1 i915
            total      used      free    shared    buffers    cached
Mem:      2061708    371696    1690012          0      55392    181776
-/+ buffers/cache:    134528    1927180
Swap:      8000364          0    8000364

/usr/lib/pm-utils/sleep.d/00logging hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/00powersave hibernate hibernate:

/usr/lib/pm-utils/sleep.d/00powersave hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/01grub hibernate hibernate:

/usr/lib/pm-utils/sleep.d/01grub hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/49bluetooth-generic hibernate hibernate:

/usr/lib/pm-utils/sleep.d/49bluetooth-generic hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/49bluetooth-ibm hibernate hibernate:

/usr/lib/pm-utils/sleep.d/49bluetooth-ibm hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/55NetworkManager hibernate hibernate:
Running hook /usr/lib/pm-utils/sleep.d/55wicd hibernate hibernate:

/usr/lib/pm-utils/sleep.d/55wicd hibernate hibernate: success.
Running hook /etc/pm/sleep.d/66lock hibernate hibernate:

/etc/pm/sleep.d/66lock hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/75modules hibernate hibernate:

/usr/lib/pm-utils/sleep.d/75modules hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/90clock hibernate hibernate:

/usr/lib/pm-utils/sleep.d/90clock hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/94cpufreq hibernate hibernate:

/usr/lib/pm-utils/sleep.d/94cpufreq hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/95led hibernate hibernate:

/usr/lib/pm-utils/sleep.d/95led hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/98video-quirk-db-handler hibernate hibernate:
Kernel modesetting video driver detected, not using quirks.

/usr/lib/pm-utils/sleep.d/98video-quirk-db-handler hibernate hibernate: success.
Running hook /usr/lib/pm-utils/sleep.d/99video hibernate hibernate:

/usr/lib/pm-utils/sleep.d/99video hibernate hibernate: success.
Running hook /etc/pm/sleep.d/pmlog.txt hibernate hibernate:

/etc/pm/sleep.d/pmlog.txt hibernate hibernate: success.
Sat Feb 23 14:46:40 MST 2013: performing hibernate


allend 02-23-2013 07:37 PM

Seems self explanatory
Quote:

/usr/local/sbin/run-as-X-user.sh: line 13: unexpected EOF while looking for matching ``'
If you cleaned up the code in /usr/local/sbin/run-as-X-user.sh it may be easier to see.
Code:

export DBUS_SESSION_BUS_ADDRESS=`cat /proc/$(pidof xfce4-panel)/environ \
  | tr '$*" $LOGGED_IN_USER

Not sure exactly what the tr command is meant to do, but the quoting is incorrect.

Arcosanti 02-23-2013 08:10 PM

Quote:

Originally Posted by allend (Post 4898418)
Seems self explanatory

If you cleaned up the code in /usr/local/sbin/run-as-X-user.sh it may be easier to see.
Code:

export DBUS_SESSION_BUS_ADDRESS=`cat /proc/$(pidof xfce4-panel)/environ \
  | tr '$*" $LOGGED_IN_USER

Not sure exactly what the tr command is meant to do, but the quoting is incorrect.

The line was so long, it all didn't get copied over. I fixed it.The line should be

Code:

export DBUS_SESSION_BUS_ADDRESS=`cat /proc/$(pidof xfce4-panel)/environ | tr '\0' '\n' | grep DBUS_SESSION_BUS_ADDRESS | cut -d '=' -f2-` ;
Sorry about that.

Arcosanti 02-24-2013 04:14 PM

I tracked the problem down to a pcmcia wifi card I am using. It is an EDUP 802.11 b/g that is using the bcm 4312 chipset. It uses the same drivers that my laptop's built-in wifi uses that has the bcm 4306 chipset. Apparently this pcmcia wifi card doesn't handle suspend and hibernate very well. With this card deactived I can suspend and hibernate and resume from both just fine. I'll close this thread out as solved and start a new thread concerning the pcmcia card.

Side note:
I am using this pcmcia card as a work around to some connection problems that I am experiencing with my built in wifi card. The connection problem has been tracked down to my Linksys WRT54G ver 2.2 that was running DD-WRT sp1. I had upgraded the DD-WRT firmware to an sp2 VINT build which caused the connection problem. The problem was tracked down to the SPI firewall blocking dhcp lease renewal packets, resulting in dropped connections. I have put in a firewall rule to allow these packets and so far so good with my built in wifi card.


All times are GMT -5. The time now is 04:24 AM.