Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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.
share|improve this question
    
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 '12 at 3:33
    
do you have the laptop-mode-tools package installed? –  Dirk Hartzer Waldeck Mar 7 '12 at 8:51
    
also do you have any CIFS or SMBFS mounts in your fstab file? –  Dirk Hartzer Waldeck Mar 7 '12 at 8:51
1  
i compiled a new kernel and the problem disappear :) thanks u all. –  eyadof Mar 9 '12 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) –  Dirk Hartzer Waldeck Jun 25 '12 at 13:09

3 Answers 3

(comment from OP solved issue)

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

share|improve this answer
1  
-1 @eyadof a "new kernel" is not specific enough. What version? How did you "compile a new kernel" (what configuration?) –  Lekensteyn Feb 8 '13 at 15:07

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...

share|improve this answer
    
my swap is enough i'v 4GB ram and 4GB swap thanks again . –  eyadof Nov 12 '11 at 9:22

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

share|improve this answer
    
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 '12 at 7:52

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.