Ubuntu – Upgraded Ubuntu 16.04 sometimes fails to sleep

16.04power-managementsuspendxfce4-power-managerxubuntu

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.

Best Answer

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

Related Question