Suspend doesn't work on my laptop. When the laptop tries to suspend, the screen turns off briefly, some system-looking text appears for a bit, the screen turns off again, then the screen turns back on and I am at a locked-screen prompt.
I tried:
- The suspend button on the unity menu
sudo pm-suspend
sudo acpitool -s
dbus-send --system --print-reply --dest="org.freedesktop.UPower" /org/freedesktop/UPower org.freedesktop.UPower.Suspend
- Deleting
/etc/pm/sleep.d
(as suggested here) sudo modprobe -r tpm_tis
- Modfying /proc/acpi/wakeup to switch everything but the power button to disabled.
- Putting
SUSPEND_MODULES="alx"
into /etc/pm/config.d/modules - Writing a script that forces the graphic card to reboot itself using a "kick" from chvt1 and chvt7 and putting it in
/etc/pm/sleep.d/20_custom-ehci_hcd
(@Sushantp606's answer below) - Trying the same thing as #9 in a different way (the third part of @Sushantp606's answer below)
sudo s2ram
This kernel doesn't have KMS support. Machine is unknown. This machine can be identified by: sys_vendor = "Hewlett-Packard" sys_product = "HP Pavilion dv4 Notebook PC" sys_version = "F.24" bios_version = "F.24"
None of these solved the problem. #9 changed the behavior a little (it cycled more quickly between trying to go to sleep and waking up).
Any suggestions what I can look at doing next?
This page may help: https://help.ubuntu.com/community/SwapFaq
Hibernation (suspend-to-disk) The hibernation feature (suspend-to-disk) writes out the contents of RAM to the swap partition before turning off the machine. Therefore, your swap partition should be at least as big as your RAM size. The hibernation implementation currently used in Ubuntu, swsusp, needs a swap or suspend partition. It cannot use a swap file on an active file system.
Now as you have tried almost everything,it worth an good and effective anser . Well this issue is some how related to Graphic Card , it does not goes to suspend and thats why nothing works.So there are to solutions I have mentioned to concur that try it one by one.
Create a file modules under /etc/pm/config.d by -
and paste the following command into it -
This will force the alx module to be unloaded and reloaded with suspend , and your problem will be solved by this , if not delete that line and go to the next part.
This one will work for sure . as it forces the graphic card to reboot itself using a good old kick from chvt1 and chvt7.So lets start it by starting with 20_custom-ehci_hcd as follows -
provide you password and paste the following into gedit
Save it and then Provide the permission by -
Reboot by-
and now check. it will work for sure but if your kernel refuses for that script then replace the entire code with the following -
your suspend would be working by now, this answer is gathered from UbuntuForum.
Last Work Arround for this you need to install a small application that is uswsusp , install it by following command-
After Installation Completes check it suspend by the following -
Your PC must goes to suspend by now.
And for hibernation -
Now if it works then remove the previously default Scripts and commands by following but before doing anything make backup by-
Now lets replace the old files and commands by-
then
and paste the following into it -
and for hibernate-
and paste the following into it -
Hope this time it helped you.
Ubuntu community help page suggests the following to enable Hibernation with encrypted swap partition:
Preparation:
Your computer must already be set up for encryption. If not, follow instructions in Post Installation Encryption first.
Think of a password (or passphrase) for your swap partition. You can use the same as your log-in — but don't do that if other people have accounts on your computer!
Find out which is your encrypted swap partition.
You should see output similar to:
If you do not see cryptswap1, the partition is either unencrypted or is not encrypted to Ubuntu's standard,
Now,
Output should be similar to
Make a note of the device. The one in the example says
/dev/sda1
— but yours could be something else, e.g./dev/sdb3
.Back up.
How to Set Up Hibernation
Turn off swap.
Undo the existing mapping.
Set up swap again, but this time with your chosen passphrase. The command will prompt you, twice, for your passphrase. Replace
/dev/sdXN
with the device from Preparation point 4. (The following command wraps on the browser screen, but it is a single command that you need to type.)Output should be:
Type YES and enter your passphrase twice as prompted.
Re-map the swap. Replace
/dev/sdXN
with the device from Preparation point 4.Set up the partition as swap.
Turn on the swap (so it starts working again).
Check that it is working.
You should see output similar to this (the numbers may differ).
Using
gksudo
with your favourite editor (the default for Ubuntu isgedit
), edit the file/etc/crypttab
(e.g. rungksudo gedit /etc/crypttab
). Comment out the existing line by adding#
to the front (or just delete the line), and add the following line. Replace/dev/sdXN
with the device from Preparation point 4.Edit the file
/usr/share/initramfs-tools/scripts/local-top/cryptroot
. Search for the following line (should be line 288, but this could change over time):Skip to the next blank line (should be 291, before FSTYPE=''), and insert the following line. Replace
/dev/sdXN
with the device from Preparation point 4.Edit the file
/etc/acpi/hibernate.sh
. At the first blank line, insert the following line.Edit the file
/etc/initramfs-tools/conf.d/resume
. Replace the existing RESUME line with the following line.Register these changes.
Ubuntu disables the Hibernate option in the menu. Restore it as follows. Create (using gksudo with your favorite editor) the file:
/etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
(e.g. rungksudo gedit /etc/polkit-1/localauthority/50-local.d/com.ubuntu.enable-hibernate.pkla
)Fill the file with the following text and save.
Reboot the machine.
Modify /proc/acpi/wakeup
Change everything to disabled except for PWRB (or equivelent) so that the only thing that can wake up your PC is the power button.
Enjoy
check your kernel there is a bug in kernels(https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1133835) previous to I think it is 3.11 which causes this problem. You can update the kernel without up dating the system How to update kernel to the latest mainline version without any Distro-upgrade?