7

I upgraded my system from 15.10 (Ubuntu + xfce = XUbuntu) to 16.04 and afterwards it happens 50% that when I send system to Sleep through "start menu > turn off > sleep" that screens go blank and hardware keeps running (I hear fans are turning). I can't change to console (ctrl + alt + f2) or do anything else. I'm looking for way how to trace this problem down. I did not find anytihng in following logs:

/var/log/syslog.1

May  1 01:05:01 lampa CRON[7380]: (root) CMD (command -v debian-sa1 > /dev/null && debian-sa1 1 1)
May  1 01:14:27 lampa NetworkManager[884]: <info>  [1462058067.4749] manager: sleep requested (sleeping: no  enabled: yes)
May  1 01:14:27 lampa NetworkManager[884]: <info>  [1462058067.4749] manager: sleeping...
May  1 01:14:27 lampa whoopsie[796]: [01:14:27] offline
May  1 01:14:27 lampa NetworkManager[884]: <info>  [1462058067.4750] manager: NetworkManager state is now ASLEEP
May  1 01:14:27 lampa systemd[1]: Reached target Sleep.
May  1 01:14:27 lampa systemd[1]: Starting Suspend...
May  1 01:14:27 lampa systemd-sleep[7497]: Failed to connect to non-global ctrl_ifname: (nil)  error: No such file or directory
May  1 01:14:27 lampa systemd-sleep[7499]: /lib/systemd/system-sleep/wpasupplicant failed with error code 255.
May  1 01:14:27 lampa systemd-sleep[7497]: Suspending system...

/var/log/pm-suspend.log.1

Last line is too old, from: Tue Apr 26 19:44:13 CEST 2016: Finished. File 'pm-suspend.log' is empty.

/var/log/kern.log

...
Apr 30 21:26:34 lampa kernel: [ 8420.249061] Key type cifs.idmap registered
May  1 01:14:27 lampa NetworkManager[884]: <info>  [1462058067.4749] manager: sleep requested (sleeping: no  enabled: yes)
May  1 01:14:27 lampa NetworkManager[884]: <info>  [1462058067.4749] manager: sleeping...
May  1 01:14:27 lampa NetworkManager[884]: <info>  [1462058067.4750] manager: NetworkManager state is now ASLEEP
May  1 08:01:21 lampa kernel: [    0.000000] Initializing cgroup subsys cpuset
...

I was looking for a Xorg log, but I don't know which log lines belong to this moment in time. When I lookged on it by file date (files Xorg.0.log and Xorg.0.log.old) these files are quite short and without errors, they end up with:

[    11.084] (II) This device may have been added with another device file.
[    12.912] (II) RADEON(0): Allocate new frame buffer 2048x768 stride 2048
[    12.912] (II) RADEON(0): VRAM usage limit set to 931309K
[  1258.032] (II) AIGLX: Suspending AIGLX clients for VT switch
[  1259.227] (II) AIGLX: Resuming AIGLX clients after VT switch

and

[    10.176] (II) RADEON(0): Allocate new frame buffer 2048x768 stride 2048
[    10.176] (II) RADEON(0): VRAM usage limit set to 931309K

dmesg

I can't find dmesg.0 on my system, I see only 'dmesg' and it is empty.

Where to look next?

Edit: I found that it happends only after I run 'wine emulator with battle.net a game StarCraft 2'. I tried to kill all those processes that spawn and remain after I play the game. I'm wondering if my graphic card does not switch to some mode that can't sleep.

4 Answers 4

4

I still have this problem, but have tested many possible fixes. The essence of the problem is that the suspend job fails, hangs.

I've tried fishing through kernel logs line by line, still don't know for sure what is causing this. I thought problem was video, but now suspect it is network and/or USB-C support.

When the suspend fails, log in again, open a terminal. If in ps aux output, you see something like this, then you are in same situation.

$ ps aux | grep sus
root     22926  0.0  0.0   8668   840 ?        Ss   23:07   0:00 /lib/systemd/systemd-sleep suspend

That job, 22926, can be killed, which will cause the PC to suspend immediately.

$ sudo kill -9 22926

This week, I've found a pretty good way to avoid this. Create a script file like this:

sudo /etc/init.d/network-manager stop
sudo /etc/init.d/networking stop
sudo systemctl suspend

For me, this reduces the delay when suspending and it has never failed yet

When you restart, you need to remember to re-start network manually.

sudo /etc/init.d/network-manager stop
sudo /etc/init.d/networking stop
sudo /etc/init.d/networking start
sudo /etc/init.d/network-manager start

This again tells network to close down, just for fun, and restarts it.

This is a high level solution. I've been into the weeds, changing lots of details within suspend scripts. Nothing has worked as well as this.

The other interesting thread I found on this was that the hardware devices are malfunctioning and causing a false wakeup. I tried that, but no benefit. I do not think the suspend job would still be failed if this were the real issue.

Quite a few people have this same problem, seems like there might be many possible causes. Check out this Ask Ubuntu search. Some of my favorites:

3
  • Which version of kernel do you have? (you can find it out by "uname -a"), maybe you have also bugged 4.4.0-21? Aug 29, 2016 at 18:06
  • After several months, I still have this problem, using all kinds of kernels... Linux delllap-16 4.8.0-32-generic #34-Ubuntu SMP Tue Dec 13 14:30:43 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
    – pauljohn32
    Jan 12, 2017 at 16:53
  • Can't believe your lengthy research efforts had no up-votes. +1 and well done. Apr 8, 2017 at 10:56
2

You are likely experiencing this bug.

To fix, try installing a new kernel.

Commands for 64 bit system:

cd /tmp

wget \
kernel.ubuntu.com/~kernel-ppa/mainline/v4.5.2-wily/linux-headers-4.5.2-040502_4.5.2-040502.201604200335_all.deb \
kernel.ubuntu.com/~kernel-ppa/mainline/v4.5.2-wily/linux-headers-4.5.2-040502-generic_4.5.2-040502.201604200335_amd64.deb \
kernel.ubuntu.com/~kernel-ppa/mainline/v4.5.2-wily/linux-image-4.5.2-040502-generic_4.5.2-040502.201604200335_amd64.deb

sudo dpkg -i linux-headers-4.5*.deb linux-image-4.5*.deb

source: Padraig Galvin, bug report comment #26

1
  • Exactly. I have core 4.4.0-21. Fixed by rebooting into older available core (in my case '4.2.0-30'). May 27, 2016 at 20:36
0

This worked for me (Xubuntu 16.04):

sudo apt-get remove light-locker
sudo apt-get install xscreensaver
3
  • 1
    Can you edit your answer and add how exactly you did it ?
    – storm
    Jul 27, 2016 at 8:36
  • 1
    This would not help me because I was already using xscreensaver instead of light-locker. I did that change it before the problem. Aug 3, 2016 at 6:58
  • This one solves the "I can't see my cursor after a suspend and resume cycle". It doesn't affect the problem that there hung program.
    – pauljohn32
    Aug 28, 2016 at 4:17
0

I had the same issue.

Sep 26 17:26:15 pavel-kjsdfk systemd-sleep[8022]: Failed to connect to non-global ctrl_ifname: (nil)  error: No such file or directory
Sep 26 17:26:15 pavel-kjsdfk systemd-sleep[8023]: /lib/systemd/system-sleep/wpasupplicant failed with error code 255.

So, I was searching for any solutions about all day and nothing has helped me. Then I found a questionable solution, but it works!

Open /lib/systemd/system-sleep/wpasupplicant

Remove /sbin/wpa_cli and resume from the file such that:

#!/bin/sh
set -e

if [ "$2" = "suspend" ] || [ "$2" = "hybrid-sleep" ]; then
    case "$1" in
        pre) /sbin/wpa_cli suspend ;;
        post) /sbin/wpa_cli resume ;;
    esac
fi

becomes:

#!/bin/sh
set -e

if [ "$2" = "suspend" ] || [ "$2" = "hybrid-sleep" ]; then
    case "$1" in
        pre) suspend ;;
        post) ;;
    esac
fi

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .