[SOLVED] Laptop cannot resume from sleep

Hello,

It's been several month my laptop cannot wake up from sleep, the keyboard is lighted up but the screen remains black and everything is unresponsive; i have to perform hard reset. I cannot access the TTY either.
I've reinstalled today , but the issue persists.

Any idea how I can fix it or figure out the problem.
Thank you.

$ inxi -Fxz
System:
  Host: nitro Kernel: 4.19.8-2-MANJARO x86_64 bits: 64 compiler: gcc 
  v: 8.2.1 Desktop: Gnome 3.30.2 Distro: Manjaro Linux 
Machine:
  Type: Laptop System: Acer product: Aspire VN7-791G v: V1.11 
  serial: <filter> 
  Mobo: Acer model: Aspire VN7-791G v: V1.11 serial: <filter> UEFI: Insyde 
  v: 1.11 date: 01/09/2015 
Battery:
  ID-1: BAT0 charge: 40.2 Wh condition: 40.2/52.5 Wh (77%) 
  model: LGC AC14A8L status: Not charging 
CPU:
  Topology: Quad Core model: Intel Core i7-4720HQ bits: 64 type: MT MCP 
  arch: Haswell rev: 3 L2 cache: 6144 KiB 
  flags: lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 41523 
  Speed: 1197 MHz min/max: 800/3600 MHz Core speeds (MHz): 1: 1197 2: 1197 
  3: 1197 4: 1198 5: 1197 6: 1198 7: 1197 8: 1201 
Graphics:
  Device-1: Intel 4th Gen Core Processor Integrated Graphics 
  vendor: Acer Incorporated ALI driver: i915 v: kernel bus ID: 00:02.0 
  Device-2: NVIDIA GM107M [GeForce GTX 960M] driver: N/A bus ID: 01:00.0 
  Display: x11 server: X.org 1.20.3 driver: N/A 
  resolution: <xdpyinfo missing> 
  OpenGL: renderer: Mesa DRI Intel Haswell Mobile v: 4.5 Mesa 18.2.6 
  direct render: Yes 
Audio:
  Device-1: Intel Xeon E3-1200 v3/4th Gen Core Processor HD Audio 
  vendor: Acer Incorporated ALI driver: snd_hda_intel v: kernel 
  bus ID: 00:03.0 
  Device-2: Intel 8 Series/C220 Series High Definition Audio 
  vendor: Acer Incorporated ALI driver: snd_hda_intel v: kernel 
  bus ID: 00:1b.0 
  Sound Server: ALSA v: k4.19.8-2-MANJARO 
Network:
  Device-1: Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter 
  vendor: Lite-On driver: ath10k_pci v: kernel port: 4040 bus ID: 07:00.0 
  IF: wlp7s0 state: up mac: <filter> 
  Device-2: Broadcom and subsidiaries NetLink BCM57780 Gigabit Ethernet PCIe 
  vendor: Acer Incorporated ALI driver: tg3 v: 3.137 port: 4040 
  bus ID: 08:00.0 
  IF: enp8s0 state: down mac: <filter> 
Drives:
  Local Storage: total: 585.00 GiB used: 7.07 GiB (1.2%) 
  ID-1: /dev/sda vendor: Kingston model: RBU-SNS8100S3128GD size: 119.24 GiB 
  ID-2: /dev/sdb vendor: Seagate model: ST500LT012-1DG142 size: 465.76 GiB 
Partition:
  ID-1: / size: 107.92 GiB used: 7.07 GiB (6.6%) fs: ext4 dev: /dev/sda2 
  ID-2: swap-1 size: 8.80 GiB used: 0 KiB (0.0%) fs: swap dev: /dev/sda3 
Sensors:
  System Temperatures: cpu: 59.0 C mobo: N/A 
  Fan Speeds (RPM): N/A 
Info:
  Processes: 266 Uptime: 6m Memory: 7.71 GiB used: 1.49 GiB (19.3%) 
  Init: systemd Compilers: gcc: N/A Shell: bash v: 4.4.23 inxi: 3.0.28 
2 Likes

Have you tried hibernation instead of sleep.

i have just tried 'systemctl hibernate' and i could access the login screen (usually I cannot) and after entering my password, it was the same, screen remained black

EDIT: i did the same with systemctl suspend' and it could only access the login screen for like 2 second, i didnt have time to enter my password, so It was probably the same with hibernate, I was just quicker to enter it.

I found this thread by searching my laptop model https://archived.forum.manjaro.org/t/solved-qca6174-freez-after-suspend

I didnt know it was related to wifi but indeed by turning off network-manager I didnt have the issue anymore.
So i followed your solution by modifying the scripts according to this post and it seems to work fine for now, except network manager stopped once unexpectedly.

I still don't understand why or how this occurs. Shall I fill a bug report somewhere? where?

EDIT: Actually it doesn't seem to work, I had the issue again.

Hey, this came in handy on a little lenovo yoga I was toying with. Couldnt get the darn thing to wake from suspend on kernels higher than 4.4 ... then it decided it wouldnt actually go to sleep (=dead lappy) on 4.4 ... and yup, twas a pesky ath10k_pci card. The systemd services fixed it up :slight_smile:

1 Like

What fixed it exactly? I've just had the issue again, so what I did actually didn't work... I don't know why I thought this was fixed...

First, an easy way to test it is to start with a clean boot ...
Then run
nmcli networking off
Then try to
systemctl suspend
...does it work ? Then go through normal suspend procedures like from the menu or closing the lid.
Do those work with network off?
( you can turn networking back on with nmcli networking on )

1 Like
nmcli networking off

nmcli networking on

Using only those two options in the service will probably only work in the minority of cases. It is a a good way to run a quick test, but generally more is required in a lot of cases.

You may have to try the following as well:

Stop/start network Manager

Unload/load your network adapter

Unload/load your network modules.

There are many examples of systemd suspend services written to correct this issue on the forum here are a bunch of links with related information:

I have many other posts on this topic if you search the forum.

https://archived.forum.manjaro.org/t/kernel-4-19-0-3-not-network-after-suspending-gnome-edition/63544/2

https://archived.forum.manjaro.org/t/wifi-adapter-tp-link-tl-wn823n-must-be-reconnected-for-it-to-work/52968/19

https://archived.forum.manjaro.org/t/surface-pro-1796-wifi-not-resuming-after-suspend/48133/47

https://archived.forum.manjaro.org/t/thinkpad-x230t-wont-suspend-under-kernel-419rc4-4-18-4-17-4-14-4-9/59798/21

Here are some external links with excellent systemd reference material:

The ArchWiki - systemd

Red Hat - systemd-targets

Red Hat - systemd unit files

Systemd manpage

Thank you both for your help, but I'm a bit lost.

The problem is I cannot identified when the problem occurs.

Since I used the fix; it is a lot better, my laptop resumes after suspend but not consistently.
I left it overnight and this morning I could login (It never happened before).
But after letting it on a few hours; same problem occurred. After restarting I had no wifi; I think this is a new issue due to the fix (because it didn't resume from suspend; so it stayed off).

If I do 'systemctl suspend' or 'systemctl hibernate', now everything works fine, whether or not the wifi is on.

Try installing kernel 4.18 with Manjaro Settings Manager. This has worked for some others with this issue.

alright, I'll try that, thanks. Should I revert the fix before?
If so, how? just by deleting the services I have created, right?

You can simply change the extension on the service to ".bak", then you can simply rename it back to its original name if you want to use it again. Disable the service as well.

I tried linux418 and linux414 and systemctl suspend did not work for any of them.

Then I tried to follow your post here:

[g@nitro ~]$ sudo systemctl stop NetworkManager; sleep 2
[sudo] Mot de passe de g : 
[g@nitro ~]$ sudo rfkill block all; sleep 2
[g@nitro ~]$ sudo nmcli r all off; sleep 2
Erreur : NetworkManager n'est pas lancé.
[g@nitro ~]$ sudo ip link set wlp3s0 down; sleep 2
Cannot find device "wlp3s0"
[g@nitro ~]$ sudo modprobe –r iwlmvm; sleep 2
modprobe: FATAL: Module –r not found in directory /lib/modules/4.19.8-2-MANJARO
[g@nitro ~]$ sudo modprobe -r iwldvm; sleep 2
[g@nitro ~]$ sudo modprobe -r iwlwifi; sleep 2
[g@nitro ~]$ sudo ip link set enp0s25 down; sleep 2
Cannot find device "enp0s25"
[g@nitro ~]$ sudo modprobe –r e1000e; sleep 2
modprobe: FATAL: Module –r not found in directory /lib/modules/4.19.8-2-MANJARO
[g@nitro ~]$ sudo systemctl stop bluetooth; sleep 2
[g@nitro ~]$ sudo modprobe –r btusb; sleep 2
modprobe: FATAL: Module –r not found in directory /lib/modules/4.19.8-2-MANJARO

systemctl suspend did work after that.

since $ sudo nmcli r all on; sleep 2; sudo rfkill unblock all gave the error
Erreur : NetworkManager n'est pas lancé.

I restarted it with sudo systemctl start NetworkManager, then did another sudo nmcli r all on; sleep 2; sudo rfkill unblock all

and surpringly, systemctl suspend worked after that

Very nice, some improvement then.

You must alter any script that I post to reflect your adapters ID and your modules. If you run a script custom tailored to others hardware you will rarely find it works with your hardware. The script must be altered, substituting your hardware specifics.

If you run this command it will return the information you need to substitute:

hwinfo --netcard --wlan --bluetooth | grep -Ei "model\:|driver\:|status\:|cmd\:|file\:|detected\:" | grep -v "Config Status" 

so suspend did not work once i tried again, after the successful attempt.

Then I did the same by modifying your commands for my hardware, it did not change the outcome, here are the results:

 [g@nitro ~]$ sudo systemctl stop NetworkManager; sleep 2
[sudo] Mot de passe de g : 
[g@nitro ~]$ sudo rfkill block all; sleep 2
[g@nitro ~]$ sudo nmcli r all off; sleep 2
Erreur : NetworkManager n'est pas lancé.
[g@nitro ~]$ sudo ip link set wlp7s0 down; sleep 2
[g@nitro ~]$ sudo modprobe –r iwlmvm; sleep 2
modprobe: FATAL: Module –r not found in directory /lib/modules/4.19.8-2-MANJARO
[g@nitro ~]$ sudo modprobe -r iwldvm; sleep 2
[g@nitro ~]$ sudo modprobe -r iwlwifi; sleep 2
[g@nitro ~]$ sudo ip link set enp8s0 down; sleep 2
[g@nitro ~]$ sudo modprobe –r e1000e; sleep 2
modprobe: FATAL: Module –r not found in directory /lib/modules/4.19.8-2-MANJARO
[g@nitro ~]$ sudo systemctl stop bluetooth; sleep 2
[g@nitro ~]$ sudo modprobe –r btusb; sleep 2
modprobe: FATAL: Module –r not found in directory /lib/modules/4.19.8-2-MANJARO
[g@nitro ~]$ systemctl suspend 

suspend OK

[g@nitro ~]$ sudo nmcli r all on; sleep 2; sudo rfkill unblock all
Erreur : NetworkManager n'est pas lancé.
[g@nitro ~]$ sudo systemctl start NetworkManager
[g@nitro ~]$ sudo nmcli r all on; sleep 2; sudo rfkill unblock all
[g@nitro ~]$ systemctl suspend 

Suspend OK
then right after:

[g@nitro ~]$ systemctl suspend 

Does not work.

So it seems Suspend works only once, which might explain why I couldn't figure out exactly when the problemn occurs.

You are using the wrong script, and you did not substitute your modules. You need to separate the script into to halves. One script you run before suspending and the other script you run after resuming.

Please post the output of tbe following command:

hwinfo --netcard --wlan --bluetooth | grep -Ei "model\:|driver\:|status\:|cmd\:|file\:|detected\:" | grep -v "Config Status" 
$ hwinfo --netcard --wlan --bluetooth | grep -Ei "model\:|driver\:|status\:|cmd\:|file\:|detected\:" | grep -v "Config Status" 
  Model: "Broadcom NetLink BCM57780 Gigabit Ethernet PCIe"
  Driver: "tg3"
  Device File: enp8s0
  Link detected: no
    Driver Status: tg3 is active
    Driver Activation Cmd: "modprobe tg3"
  Model: "Qualcomm Atheros QCA6174 802.11ac Wireless Network Adapter"
  Driver: "ath10k_pci"
  Device File: wlp7s0
  Link detected: yes
    Driver Status: ath10k_pci is active
    Driver Activation Cmd: "modprobe ath10k_pci"
  Model: "Lite-On Bluetooth Device"
  Driver: "btusb"
    Driver Status: btusb is active
    Driver Activation Cmd: "modprobe btusb"

1 Like

Run the following commands before suspending:

su

enter the systems root password.

Then paste in the following commands and execute them:

sudo nmcli r all off
sleep 2
sudo systemctl stop NetworkManager
sleep 2
sudo ip link set wlp7s0 down
sleep 2
sudo modprobe -r ath10k_pci
sleep 2
sudo modprobe -r ath10k_core
sleep 2
sudo rfkill unblock all 
exit 

Run the following commands after resuming:

su

enter the systems root password.

Then paste in the following commands and execute them:

sudo modprobe ath10k_pci
sleep 2
sudo rfkill unblock all
sleep 2
sudo ip link set wlp7s0 up
sleep 2
sudo systemctl start NetworkManager
sleep 2 
sudo rfkill unblock wifi
sleep 2 
sudo nmcli r all on
sleep 2 
exit

Please post the inputs and outputs of all commands.

[nitro g]# su
[nitro g]# sudo nmcli r all off
[nitro g]# sleep 2
[nitro g]# sudo systemctl stop NetworkManager
[nitro g]# sleep 2
[nitro g]# sudo ip link set wlp7s0 down
[nitro g]# sleep 2
[nitro g]# sudo modprobe -r ath10k_pci
[nitro g]# sleep 2
[nitro g]# sudo modprobe -r ath10k_core
[nitro g]# sleep 2
[nitro g]# sudo rfkill unblock all 
[nitro g]# exit 
exit
[nitro g]# systemctl suspend

Suspend worked fine.


[nitro g]# su
[nitro g]# sudo modprobe ath10k_pci
[nitro g]# sleep 2
[nitro g]# sudo rfkill unblock all
[nitro g]# sleep 2
[nitro g]# sudo ip link set wlp7s0 up
[nitro g]# sleep 2
[nitro g]# sudo systemctl start NetworkManager
[nitro g]# sleep 2 
[nitro g]# sudo rfkill unblock wifi
[nitro g]# sleep 2 
[nitro g]# sudo nmcli r all on
[nitro g]# sleep 2 
[nitro g]# exit
exit

Suspend did not work.

Please clarify.

The second group of commands is to be run after coming out of resume. Do you mean that after running the second series of commands that you could not enter suspend again.

That would be normal because you would have to run the first set of commands again before going into suspend again.

Forum kindly sponsored by