Ubuntu – xubuntu 12.04 restarts after suspend – only from the account

power-managementsuspendxubuntu

After installing a clean xubuntu 12.04 I noticed that when I suspend, the computer suspends and turns itself off (you see the lights go off, and a click sound from the HD or fans), but then about 2 seconds later it turns itself back on again…

The odd thing is that:

  • It doesn't happen when booting from the liveCD
  • I created another user account. When I log onto this account I can suspend fine. The computer stays off until I press the ON button
  • When I remove my .config folder and it's clean – I can also suspend without problem on my account

So it seems that something in my user config is causing this, but I can't work out what it might be. I tried diffing the two .config folders, and also all processes running with one account compared to the other (ps -ef |grep <username>), but couldn't find anything obvious that might be causing this…

UPDATE:

As requested, here's the kern.log – with embeedded comments inside. It shows turning the computer on, logging in as the account that can suspend, suspending successfully, then turning off and on again, this time with my account, suspending (but only for about 2 seconds and then the computer starts again)

and ~/.config contents + dmesg output

Best Answer

I looked thoroughly through your log files and couldn't decipher what the issue was. What I would do in your situation is run a script that removes almost all my .config folders, and replaces them one by one as I successfully test the machine in suspend mode. Something like this:

FOLDERS=$(ls .config | grep -v "gtk" -v "gnome") #Use -v to exclude any folders.
for f in "$FOLDERS"; do
     mv "$f" "$f-" #Instead of deleting folders, we just rename them with a hyphen at the end.
done

for f in "$FOLDERS"; do
    echo "Test putting you system to sleep, then press enter to re-enable the next config folder"
    read i #Reads the enter key.
    mv "$f-" "$f"
    echo "Replaced folder: .config/$f"
    echo "$f" > corruptfolder.txt #This file will remember the last folder incase you forget.
done

Note that if you are successful, this script will not finish running (because your computer powered off). You will have correct the folder names that still have a hyphen at the end. Use this loop to do that:

FOLDERS=$(ls .config)
for f in "$FOLDERS"; do
    tmp=$(echo "$f" | sed 's/-$//')
    [ "$tmp" != "$f" ] && mv "$f" "$tmp"
done
Related Question