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.
sudo rmmod brcmfmac
first. After unsuspending, I can get wifi working again withsudo modprobe brcmfmac
. (After doing this, future suspends seem to work fine so far, though I assume it'll stop working again at some point and a more permanent fix will be needed.) – tobek Jan 20 '21 at 07:30