6

I'm using Ubuntu 11.10 and every thing was good until few days i try to shutdown my laptop but instead Ubuntu goes to the lightgdm login screen.

Also suspend and hibernate don't complete:

  • in suspend case I have to restart my laptop and
  • in hibernate I have to power off it using the power button.
7
  • OP are you still looking for an answer? If so, you may need to repost your question as this is flagged for closure. =)
    – Ringtail
    Mar 7, 2012 at 3:33
  • do you have the laptop-mode-tools package installed? Mar 7, 2012 at 8:51
  • also do you have any CIFS or SMBFS mounts in your fstab file? Mar 7, 2012 at 8:51
  • 1
    i compiled a new kernel and the problem disappear :) thanks u all.
    – eyadof
    Mar 9, 2012 at 15:25
  • 1
    @FuzzyQ there's a long standing bug that delays shutdown or suspend for Debian distro's when you have any smbfs or cifs mounts. the delay is a shocking 5 minutes and during this time only a hard power off has any effect. (can't find the link to the bug report, will try to post it later) Jun 25, 2012 at 13:09

3 Answers 3

2

(comment from OP solved issue)

I compiled a new kernel and the problem disappear :) thanks u all. – eyadof Mar 9 at 15:25

1
  • 1
    -1 @eyadof a "new kernel" is not specific enough. What version? How did you "compile a new kernel" (what configuration?)
    – Lekensteyn
    Feb 8, 2013 at 15:07
0

Another possibility - hibernate uses your swap partition, and this needs to be big enough to fit the whole of your RAM into. I've got 8GB of RAM but only 1GB of swap, so that could be the problem.

https://help.ubuntu.com/community/SwapFaq#Why_do_I_need_swap.3F

[edit] - Well, I tried this, making sure I had plenty of swap 10GB for my 8GB of RAM - no help...

1
  • my swap is enough i'v 4GB ram and 4GB swap thanks again .
    – eyadof
    Nov 12, 2011 at 9:22
0

I found this, which seems to work for some people - it didn't for me though....

http://thecodecentral.com/2011/01/18/fix-ubuntu-10-10-suspendhibernate-not-working-bug

gksudo gedit /etc/pm/sleep.d/20_custom-ehci_hcd 

or the way you would normally do when creating a file as superuser

Insert the following code into the file you have just created:

#!/bin/sh
#inspired by http://art.ubuntuforums.org/showpost.php?p=9744970&postcount=19
#...and http://thecodecentral.com/2011/01/18/fix-ubuntu-10-10-suspendhibernate-not-working-bug    
# tidied by tqzzaa :)

VERSION=1.1
DEV_LIST=/tmp/usb-dev-list
DRIVERS_DIR=/sys/bus/pci/drivers
DRIVERS="ehci xhci" # ehci_hcd, xhci_hcd
HEX="[[:xdigit:]]"
MAX_BIND_ATTEMPTS=2
BIND_WAIT=0.1

unbindDev() {
  echo -n > $DEV_LIST 2>/dev/null
  for driver in $DRIVERS; do
    DDIR=$DRIVERS_DIR/${driver}_hcd
    for dev in `ls $DDIR 2>/dev/null | egrep "^$HEX+:$HEX+:$HEX"`; do
      echo -n "$dev" > $DDIR/unbind
      echo "$driver $dev" >> $DEV_LIST
    done
  done
}

bindDev() {
  if [ -s $DEV_LIST ]; then
    while read driver dev; do
      DDIR=$DRIVERS_DIR/${driver}_hcd
      while [ $((MAX_BIND_ATTEMPTS)) -gt 0 ]; do
          echo -n "$dev" > $DDIR/bind
          if [ ! -L "$DDIR/$dev" ]; then
            sleep $BIND_WAIT
          else
            break
          fi
          MAX_BIND_ATTEMPTS=$((MAX_BIND_ATTEMPTS-1))
      done  
    done < $DEV_LIST
  fi
  rm $DEV_LIST 2>/dev/null
}

case "$1" in
  hibernate|suspend) unbindDev;;
  resume|thaw)       bindDev;;
esac

that's it folks, ymmv, didn't work for me. see the original link for more info.

http://thecodecentral.com/2011/01/18/fix-ubuntu-10-10-suspendhibernate-not-working-bug

1
  • Whilst this may theoretically answer the question, it would be preferable to include the essential parts of the answer here, and provide the link for reference.
    – fossfreedom
    Dec 29, 2012 at 7:52

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .