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.
htorque
  • 66,086
eyadof
  • 1,494

3 Answers3

2

(comment from OP solved issue)

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

Ringtail
  • 16,285
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

hwjp
  • 1,457
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...

hwjp
  • 1,457