Ubuntu – 13.10 hangs on waking from suspend except when suspended from console

13.10fglrxfreezepower-managementsuspend

I know waking from suspend is an issue, but this looks like a separate bug.

When I suspend 13.10 on HP Pavillion dv6 (AMD 6770M/fglrx 13.10.10) from x, it suspends normally but freezes when waking. I get a black screen with a frozen cursor.

But when I suspend from console with sudo pm-suspend, it wakes normally, and I can then get back my x with Ctrl+Alt+F7.

If I suspend by closing lid under x, also freezes when waking up. If I suspend by closing lid under console, it wakes up into the x (?) login, then into a clean session.

UPDATE. I checked my syslog, kern.log and pm-suspend.log, they appear to show a standard suspend procedure which is completed normally, then followed by many blank lines (000s), then normal start procedure after hard reset. I may be wrong but looks like kernel panic to me.

Also, if I suspend with dbus (How can I suspend/hibernate from command line?) instead of pm-suspend, outcome is same.

Best Answer

Seems I have same issue and with help of your testing I found workaround. Make a script that switch to console before suspend and switch back after resume.

In a terminal run sudoedit /etc/pm/sleep.d/fglrx-fix and paste in the following script. Afterwards make it executable by running sudo chmod u+x /etc/pm/sleep.d/fglrx-fix

Script:

#!/bin/bash
#Script kills autofs when going into standby to eliminate issues with it
case $1 in

suspend)
#suspending to RAM
    chvt 1
    echo "Going to sleep"
    sleep 1
;;
resume)
#resume from suspend 
    echo "try to resume"
    sleep 1
    chvt 7
;;       
esac