5

I am running Ubuntu 16.04 LTS on a Dell XPS 15 9550 (16 GB RAM, FHD screen, 512 GB SSD, Intel i7-6700HQ). It is dual booted with Windows, for which I followed the instructions in this thread.

Almost everything works very well. However, when I suspend either by closing the lid, or using systemctl suspend sometimes (about 50% of the time) Ubuntu doesn't suspend. The screen goes dark as if it is about to suspend, but then it flashes back directly to the login screen.

I believe the issue must be related to my Broadcom wifi card/driver. The output of dmesg during a failed suspend is:

[36482.669029] PM: Syncing filesystems ... done.
[36482.697429] PM: Preparing system for sleep (mem)
[36482.698220] vgaarb: this pci device is not a vga device
[36483.937858] Freezing user space processes ... (elapsed 0.002 seconds) done.
[36483.940227] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done.
[36483.941564] PM: Suspending system (mem)
[36483.941623] Suspending console(s) (use no_console_suspend to debug)
[36487.637784] brcmf_pcie_suspend: Timeout on response for entering D3 substate
[36487.637802] pci_legacy_suspend(): brcmf_pcie_suspend+0x0/0x1b0 [brcmfmac] returns -5
[36487.637808] dpm_run_callback(): pci_pm_suspend+0x0/0x140 returns -5
[36487.637813] PM: Device 0000:02:00.0 failed to suspend async: error -5
[36487.637902] PM: Some devices failed to suspend, or early wake event detected
[36487.641932] rtc_cmos 00:02: System wakeup disabled by ACPI
[36488.017866] ata2: SATA link down (SStatus 4 SControl 300)
[36488.149475] PM: resume of devices complete after 511.560 msecs
[36488.158754] PM: Finishing wakeup.

There is also the message

brcmfmac 0000:02:00.0: Direct firmware load for brcm/brcmfmac43602-pcie.txt failed with error -2

whenever I boot or resume from a [successful] suspend. Also to note: when suspend fails, my wifi stops working (I believe it says "no device"). The only ways to get it to work again are to either reboot, or:

sudo rmmod brcmfmac
sudo modprobe brcmfmac

Here is the output of a wifi info script. Any help at all would be very much appreciated! Thank you in advance, and let me know if any more information would be helpful.

EDIT: Issue has returned after upgrade to 18.04. The previously accepted answer no longer seems to work because systemd does not unload modules from suggested file before suspending.

4

I had the exact same problem. The solution is to create a file in /etc/pm/config.d/ with just one line:

SUSPEND_MODULES="brcmfmac"
  • Thank you for the response! Two questions: 1. Does the file need to follow any naming conventions? 2. I assume I need to change the permissions on the file, is this correct? I notice the files in /etc/pm/sleep.d have permissions 755, is this adequate for the file I create? – Daniel Hathcock Jul 24 '17 at 2:23
  • I tried implementing your fix 1 day ago, and the very first suspend failed, but no suspend has failed since then. I suppose that could just be chance. Any idea if having the first suspend fail can be explained? – Daniel Hathcock Jul 25 '17 at 4:54
  • I recently upgraded to 18.04, and the issue came back. I realized the file I had created was deleted, so I recreated it, but this time it did not fix the issue. After some research I believe it is related to the difference between suspending through systemd and pm. systemd does not remove modules using that config file. Do you know of a way to fix the issue that works in 18.04 using systemctl suspend? – Daniel Hathcock Jul 10 '18 at 20:33
1

The solution suggested by @user716336 works for me as well. You should give the created file the right permissions though:

sudo chmod 777 /etc/pm/config.d/suspend_broardcom

(I called the file suspend_broardcom)

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.