16

I'm using Ubuntu 12.04 & everything about it is great except that it just won't resume after suspend. I've tried the suggestions listed in this thread Entire system freezing after pressing "Suspend" but none worked. I'm using Lenovo Y510P. I'm new to Ubuntu, or unix for that matter, so please let me know if there's anymore information that I should be posting. Thanks.

update

I tried the suggestion by Dima on this post How to enable hibernation?. The machine wakes up from hibernation but immediately the screen gives a screen like this

enter image description here

Wondering if this is an issue with the graphics card or something.

mindreader
  • 1,077
  • 1
    its obviously common lenovo problem, i have same issue with UBUNTU 14.10 and LENOVO Z50 70 – Jiří Doubravský Mar 26 '15 at 16:42
  • Maybe the problem is an old kernel. Check http://unix.stackexchange.com/questions/296423/linux-mint-18-suspend-issue –  Jan 16 '17 at 16:25

1 Answers1

14

A lot of graphic resume problems could be solved by doing the suspend/resume from the virtual console, so that after the resume a "refresh" is forced by the graphic drivers.

Check if the system suspend correctly from a virtual console:

  1. switch to a virtual console with CtrlAltF1

  2. login with your user and password

  3. suspend the system (either using the suspend key-combo for your system, or issuing the command sudo /usr/sbin/pm-suspend)

  4. resume -> you should have a working prompt (exactly the same screens as before), otherwise see FAIL

  5. switch to the graphic console with CtrlAltF7

  6. if all is ok, problem solved! You can follow the instruction below (from this answer) to make the switch automatic; otherwise, see FAIL

If something is still wrong...

FAIL: So the problem is another one --- I do not have that laptop so I can't really help a lot more. Maybe studying the content of file /var/log/pm-suspend.log can shed some light.


How to make the switch automatic
  1. edit/create the file

    gksudo gedit /etc/pm/sleep.d/01_switchvt

  2. Put this content in it:

    #!/bin/sh
    
    # Switch to a VC before suspending and back after resume
    
    case "$1" in
        resume|thaw)
            chvt 7
        ;;
        suspend|hibernate)
            chvt 1
        ;;
    esac
    
  3. save and exit

  4. make it executable:

    sudo chmod 755 /etc/pm/sleep.d/01_switchvt

Notice in step 2, most of the installations will need the command chvt 7 --- this is the same as pushing ctrl-alt-F7 to go back to the graphic screen. If you need another key combo, change the "7" there accordingly.

Rmano
  • 31,947
  • I'm able to recover from virtual console. However, I wasn't able to make the switch automatic. But I guess I'll be using virtual console for the time being. Thanks for the help – mindreader Mar 19 '14 at 16:01
  • 3
    Ah yes! I realized that's what I was missing. I've now used chmod 755 to set permissions of the file & it works perfectly fine! Thanks a ton :) – mindreader Mar 19 '14 at 16:07
  • 2
    I tried both upvoting and adding a comment but I don't have enough reputation on this flavor of stackexchange yet. – mindreader Mar 19 '14 at 16:14
  • 1
    with LENOVO Z50 70 same problem, but i cant even switch to console ctrl+alt+f1 when it happens ... display is turned on, but nothing shows up until i turn it off and on – Jiří Doubravský Mar 26 '15 at 16:43
  • same problem with hybernation and suspend ... – Jiří Doubravský Mar 26 '15 at 16:44
  • Had a similar problem in 14.04 on a Macbook with the Nouveau driver, and unfortunately this did not work. This did let me get to a login screen, whereas before I only saw my desktop background, but once logged in, everything was frozen. Trying to kill/restart gnome-shell was unsuccessful. – Cerin Apr 21 '15 at 04:22
  • 1
    Thank you so very much! Although that auto script doesn't work for me, the above solution does (LENOVO Z50 70, with nvidia proprietary drivers). You sir made my day – Mathlight Jan 30 '16 at 07:17
  • @Mathlight I have the same problem with the same computer. Can you help me? – omerfarukdogan May 08 '17 at 12:44
  • 1
    In more recent versions of Ubuntu use /lib/systemd/system-sleep/ instead of /etc/pm/sleep.d/ – cob Aug 11 '18 at 08:16