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
  • 64,798
eyadof
  • 1,484
  • 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 07 '12 at 03:33
  • do you have the laptop-mode-tools package installed? – Dirk Hartzer Waldeck Mar 07 '12 at 08:51
  • also do you have any CIFS or SMBFS mounts in your fstab file? – Dirk Hartzer Waldeck Mar 07 '12 at 08:51
  • 1
    i compiled a new kernel and the problem disappear :) thanks u all. – eyadof Mar 09 '12 at 15:25
  • If I had any CIFS or SMBFS mounts in my fstab configuration, what would it matter, @DirkHartzerWaldeck? I'm asking because I also have problems suspending. – FuzzyQ Jun 22 '12 at 14:36
  • 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
  • Thank you for your answer, @DirkHartzerWaldeck! Luckily, I managed to reenable suspend again by downgrading my display drivers. – FuzzyQ Jun 25 '12 at 13:37

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,127
  • 1
    -1 @eyadof a "new kernel" is not specific enough. What version? How did you "compile a new kernel" (what configuration?) – Lekensteyn Feb 08 '13 at 15:07
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,387
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,387