0

I have some trouble with suspending ubuntu 18.10. 'systemctl suspend' seems to hang waiting for the network and not reaches a state where executables in '/lib/systemd/system-sleep' are called.

I try to remove the ath10k_pci module before suspending my notebook. Therefore I added a 'ath10k.sh' script to '/lib/systemd/system-sleep' :

#!/bin/bash

if [ "${1}" == "pre" ]; then
   touch /tmp/start_rm_ath10k
   modprobe -fr ath10k_pci
   touch /tmp/end_rm_ath10k
fi

Calling this script on a console with the 'pre' option removes the ath10k_pci module and touches both files in '/tmp'/ like expected. This works flawlessly and the system continues to work normally without network.

Now, if I start 'systemctl suspend' the screen turns off immediately but the 'ath10k.sh' will not be executed and for me it looks like the notebook was not suspended.

As I looked around on the notebook afterwards I notized that the load avarage rises constantly. Additionally a "ps -e v" lists several processes in 'D' status:

  • [kworker/3:1+events_freezable]
  • [kworker/u8:2+events_unbound]
  • /sbin/wpa_supplicant -u -s -O /run/wpa_supplicant
  • /usr/sbin/cups-browsed
  • iw dev wlp2s0 set power_save off
  • ip route show default

'dmesg' shows:

ath10k_pci 0000:02:00.0: firmware crashed!
ath10k_pci 0000:02:00.0: failed to delete WMI vdev 1: -108

If I use pm-utils instead a 'pm-suspend' works flawlessly if I place a corresponding script in '/etc/pm/sleep.d' to remove the ath10k_pci module before suspending.

I also noticed that 'pm-suspend' first executes the script in '/etc/pm/sleep.d' and then turns off the screen whereas 'systemctl suspend' immediately blanks the screen and than seem to hang there - I'm unsure if this is a hint ...

I guess that systemcl calls other things before calling any executables in '/lib/systemd/system-sleep' and by doing this the ath10k firmware crashes accidently before the ath10k_pci module can be removed by my script to circumvent this crash.

So - I need some help with this and my question is: what can I do to be sure that the ath10k_pci module gets removed bofore other things in the chain are started by 'systemctl suspend'? It would be nice if 'modprobe -fr ath10k_pci' is one of the first things that are executed on suspend or hibernate.

0

Here is a different answer, with a solution for my ath10k_pci driver, because I did not get the systemd sleep/resume thing to work.

In my case (Ubuntu 18.04.3, qca6174 hw2.1 firmware), after tearing my hair for 2 days, I was able to solve the problem with an older firmware qca6174 version.

I was not able to unload the ath10k_pci module before suspend automatically, not via a systemd Unit nor with a script in /lib/systemd/system/system-sleep.

A suspend to ram would always make my system freeze before it would go to sleep.

Installing the newest qca6174 firmware also did not help.

What helped was an older firmware version from 2016! Now I have qca6174 hw2.1 version 141 installed, although my notebook runs on 18.04.3 with Kernel 5.

I got that tip from here: https://askubuntu.com/a/978385/1004167 so I got the firmware from there: https://launchpad.net/ubuntu/xenial/amd64/linux-firmware/1.157 and copied the ath10k_pci/QCA6174/hw2.1 files (which my card is using) into my /lib/firmware/ath10k/QCA6174/hw2.1 folder.

After a reboot, I did not have to unload the driver before suspend (removed my scripts).

Going to sleep and resume works for me now, as it did before upgrading from 16.04. The only thing I have to see now is, how to prevent the copied files from being overwritten by an upgrade.

Hope that helps someone :-)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.