Suspend/Resume

One of the most often cited shortcomings for FreeBSD is for suspend and resume to actually work. Although most people want this feature on portable gear, there is some demand for it on the desktop as well.

This has several aspects:

Unfortunately, commercial hardware is all over the map, and people tend to try suspend/resume once and then not investigate further if it fails. But perhaps we can make some headway on identifying common failure modes, using data instead of anecdotes.

How to test

We don't yet have the necessary infrastructure in place to make suspend to disk work on amd64 or i386. The data collated here is focused on testing suspend to RAM (S3) on amd64.

To limit the number of variables involved when debugging problems, it is advised you test text mode suspend/resume before attempting it from a running X session.

suspend to RAM from text mode

suspend to RAM from X

resume from RAM

Field data

System

Owner

Willing to test?

Test info

Suspend

Resume

uname -mpv

kldstat | awk '{ if (index($5, ".ko")) print $5 }'

pciconf -l | sed 's/[0-9]*@.*//' | sort -u

Notes

text mode

X

text mode

X

Acer Aspire A515-43

peterj

yes

yes

yes

yes

yes

FreeBSD 13.1-STABLE #19 -dirty src13b-c269690-g3529ddcfbe09-dirty: Wed May 4 18:50:22 AEST 2022 root@aspire5.rulingia.com:/usr/obj/usr/src/amd64.amd64/sys/aspire5 amd64 amd64

rtwn.ko if_rtwn_usb.ko ccp.ko amdgpu.ko drm.ko linuxkpi_gplv2.ko ttm.ko amdgpu_picasso_gpu_info_bin.ko amdgpu_picasso_sdma_bin.ko amdgpu_picasso_asd_bin.ko amdgpu_picasso_pfp_bin.ko amdgpu_picasso_me_bin.ko amdgpu_picasso_ce_bin.ko amdgpu_picasso_rlc_bin.ko amdgpu_picasso_mec_bin.ko amdgpu_picasso_mec2_bin.ko amdgpu_picasso_vcn_bin.ko uhid.ko usbhid.ko wmt.ko

ahci ccp hdac hostb intsmb isab none nvme pcib re vgapci xhci

Video restores at full brightness but can be controlled. ntpd needs restarting

Dell Precision 7720

vd

yes

yes

yes

no

no

FreeBSD 12.0-STABLE r342396 SMLE amd64 amd64

zfs.ko opensolaris.ko amdgpu.ko drm.ko linuxkpi.ko linuxkpi_gplv2.ko debugfs.ko amdgpu_polaris10_mc_bin.ko amdgpu_polaris10_pfp_2_bin.ko amdgpu_polaris10_me_2_bin.ko amdgpu_polaris10_ce_2_bin.ko amdgpu_polaris10_rlc_bin.ko amdgpu_polaris10_mec_2_bin.ko amdgpu_polaris10_mec2_2_bin.ko amdgpu_polaris10_sdma_bin.ko amdgpu_polaris10_sdma1_bin.ko amdgpu_polaris10_uvd_bin.ko amdgpu_polaris10_vce_bin.ko amdgpu_polaris10_smc_bin.ko coretemp.ko if_iwm.ko iwm8265fw.ko vboxdrv.ko ums.ko geom_eli.ko uhid.ko ng_ubt.ko netgraph.ko ng_hci.ko ng_bluetooth.ko ng_l2cap.ko ng_btsocket.ko ng_socket.ko pf.ko vboxnetflt.ko ng_ether.ko vboxnetadp.ko linux.ko linux_common.ko linux64.ko mac_ntpd.ko

ahci em hdac hostb isab iwm none nvme pcib vgapci xhci

SMLE is GENERIC + "device evdev" + "options EVDEV_SUPPORT". Suspend works fine. Resume "works", except that the screen stays blank. "sysctl debug.acpi.suspend_bounce=1" followed by "acpiconf -s 3" works, but it does not switch off/on the video. "sysctl debug.acpi.resume_beep=1" produces a beep for about 1 second (ok). None of the following helps in re-enabling the video: hw.acpi.reset_video=1, acpi_video.ko loaded or not loaded, amdgpu.ko loaded or not loaded.

Apple Macbook Core Duo 1.83GHz

ChrisRees

yes

yes

yes

yes

yes

FreeBSD 10.3-RELEASE #0 r297264: Fri Mar 25 03:51:29 UTC 2016 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC i386 i386

splash_pcx.ko ums.ko wsp.ko uhid.ko i915kms.ko drm2.ko iicbus.ko iic.ko iicbb.ko

atapci ath ehci hdac hostb isab mskc none pcib uhci vgapci

Works flawlessly. You could sysctl hw.acpi.lid_switch_state=s3 to make it sleep on lid close.

Asus Eee 1005HA

rpaulo

yes

yes

yes

yes

yes

FreeBSD 10

acpi_video.ko acpi_asus.ko

TBD

You need hw.acpi.reset_video=1

HP Z400 Workstation

lstewart

yes

yes

TBD

no

TBD

FreeBSD 9.0-STABLE #1 r230474: Tue Jan 24 02:22:29 EST 2012 root@lstewart1:/usr/obj/usr/src/sys/S3TEST amd64 amd64

geom_raid.ko zfs.ko opensolaris.ko linprocfs.ko linux.ko

ahci ehci hostb ioapic isab pcib uhci vgapci

- S3TEST is GENERIC minus bge, sound and firewire related devices to minimise attached drivers for test.
- Seems to suspend find, but on resume, turns on, screen stays off and machine is unresponsive to keyboard, network and ACPI power off from button press. Hard reset required to bring it back.
- acpi_hp.ko makes no difference

Toshiba Portege R600 Laptop

lstewart

yes

yes

yes

yes

yes

FreeBSD 8.2-STABLE #8 r224238M: Thu Aug 11 09:54:34 EST 2011 root@lstewart-laptop:/usr/obj/usr/src/sys/GENERIC amd64 amd64

if_wpi.ko snd_hda.ko sound.ko ahci.ko atapicam.ko acpi_toshiba.ko cuse4bsd.ko linux_v4l2wrapper.ko linux.ko vboxdrv.ko sdhci.ko mmc.ko mmcsd.ko zfs.ko opensolaris.ko vboxnetflt.ko netgraph.ko ng_ether.ko vboxnetadp.ko wpifw.ko i915.ko drm.ko

ahci ehci em hdac hostb isab pcib sdhci uhci vgapci wpi

- Need sysctl hw.acpi.reset_video=1
- Used KDE4.6.5 for X test

Lenovo X1

osa

yes

no

yes

no

yes

FreeBSD 9.0-STABLE, FreeBSD 9.1-STABLE, FreeBSD 9.2-STABLE

if_em.ko if_iwn.ko firmware.ko wlan.ko snd_hda.ko sound.ko usb.ko agp.ko acpi_video.ko cuse4bsd.ko iwn1000fw.ko wlan_amrr.ko acpi_ibm.ko vboxdrv.ko vboxnetflt.ko netgraph.ko ng_ether.ko vboxnetadp.ko wlan_wep.ko wlan_tkip.ko wlan_ccmp.ko ipfw.ko linux.ko sysvshm.ko sysvsem.ko sysvmsg.ko fuse.ko linux_adobe.ko i915.ko iicbb.ko iicbus.ko iic.ko drm.ko ng_socket.ko ng_mppc.ko rc4.ko ng_iface.ko ng_ppp.ko ng_tee.ko ng_pptpgre.ko ng_ksocket.ko ng_vjc.ko ehci.ko xhci.ko ums.ko uhid.ko

ahci ehci em hdac hostb isab iwn none pcib vgapci xhci

sdhci needs kldunload/kldload after resume, comment out "options VESA" in the kernel configuration file

Lenovo X1 Carbon

glebius

yes

no

yes

no

yes

FreeBSD head

sdhci needs kldunload/kldload after resume

Dell Latitude E5420

cperciva

yes

yes

yes

yes

yes

FreeBSD 9.2-RELEASE amd64

sdhci.ko mmc.ko mmcsd.ko linsysfs.ko linux.ko linprocfs.ko if_lagg.ko

ahci bge ehci fwohci hdac hostb isab iwn none pcib sdhci vgapci

Video non-functional with GENERIC, but everything works perfectly with GENERIC - "options VESA".

Toshiba Z830 Laptop

emaste

yes

yes

TBD

no

TBD

PC-BSD 9.0

Resume works but video does not come back, with reset_video=0 or reset_video=1

Asus G2K Laptop

jkim

yes

yes

yes

yes

yes

FreeBSD 10.0-CURRENT #0 r233249M: amd64

vesa.ko ataahci.ko ata.ko cam.ko atapci.ko ataati.ko atasiliconimage.ko atajmicron.ko fdescfs.ko linprocfs.ko linux.ko linsysfs.ko firewire.ko sbp.ko lindev.ko if_ath.ko wlan.ko if_lagg.ko if_re.ko miibus.ko sound.ko snd_hda.ko usb.ko amdtemp.ko acpi_video.ko acpi_asus.ko cpuctl.ko cpufreq.ko dpms.ko udf.ko wlan_ccmp.ko wlan_tkip.ko wlan_wep.ko if_ath_pci.ko usb_quirk.ko ohci.ko ehci.ko amdsbwd.ko iic.ko iicbus.ko iicbb.ko iicsmb.ko smbus.ko intpm.ko smb.ko mmc.ko mmcsd.ko sdhci.ko cuse4bsd.ko if_bridge.ko bridgestp.ko ng_ubt.ko ng_hci.ko ng_bluetooth.ko netgraph.ko uhid.ko ng_l2cap.ko ng_btsocket.ko ng_socket.ko linux_adobe.ko logo_saver.ko wlan_xauth.ko

atapci ath fwohci hdac hostb intsmb isab none pcib re sdhci vgapci

I have two more desktops with ATI/AMD GPUs. They all work fine unless I load USB drivers cuse4bsd.ko (ports/multimedia/cuse4bsd-kmod 0.1.23).

Thinkpad T400s

phk

yes

yes

yes

yes

yes

FreeBSD 10.0-CURRENT #0 r238860M amd64

linux.ko linux_adobe.ko i915.ko drm.ko

ahci ath ehci em hostb isab none pcib sdhci uhci vgapci

USB is dead after resume

Thinkpad T450

JasonTubnor

yes

yes

yes

yes

yes

FreeBSD 12.0-BETA3 r340039 GENERIC amd64 amd64

zfs.ko opensolaris.ko i915kms.ko drm.ko linuxkpi.ko linuxkpi_gplv2.ko debugfs.ko if_iwm.ko iwm7265Dfw.ko

ahci ehci em hdac hostb isab iwm none pcib vgapci xhci

Modern i915kms.ko drivers are required for screen to reset after resume. Install drm-next-kmod from packages and then add kld_list="/boot/modules/i915kms.ko" to /etc/rc.conf. Works as it does under OpenBSD. For the lid to operate suspend/resume set: sysctl hw.acpi.lid_switch_state=S3

Thinkpad X200

lme

yes

yes

yes

yes

yes

FreeBSD 10.0-CURRENT #14 r238992M amd64

aio.ko acpi_ibm.ko vboxdrv.ko linprocfs.ko linux.ko tmpfs.ko vboxnetflt.ko netgraph.ko ng_ether.ko vboxnetadp.ko smb.ko smbus.ko ichsmb.ko hwpmc.ko coretemp.ko acpi_dock.ko sem.ko cuse4bsd.ko i915.ko drm.ko umodem.ko ucom.ko if_cdce.ko uether.ko uvhid.ko vkbd.ko linux_adobe.ko tpm.ko

ahci ehci em hdac hostb ichsmb isab iwn none pcib uhci vgapci

USB is dead after 2nd resume, tpm.ko needs to be unloaded before suspending

Thinkpad X200

tyler

yes

yes

yes

yes

yes

FreeBSD 11.0-CURRENT r264387 amd64

zfs.ko opensolaris.ko geom_eli.ko crypto.ko aesni.ko sem.ko iwn5000fw.ko ums.ko ng_ubt.ko netgraph.ko ng_hci.ko ng_bluetooth.ko ng_l2cap.ko ng_btsocket.ko ng_socket.ko vboxnetflt.ko vboxdrv.ko ng_ether.ko vboxnetadp.ko linux.ko i915kms.ko drm2.ko iicbus.ko iic.ko iicbb.ko

ahci ehci em hdac hostb isab iwn none pcib uhci vgapci

NOTE: This kernel build is using a VT kernel. USB is dead after 2nd resume by default, managed to make suspend work by changing sysctls around USB wake based on this mailing list post

Thinkpad T61

trasz

yes

yes

yes

yes

yes

FreeBSD 11.0-CURRENT #5 r267012

acpi_ibm.ko i915kms.ko iicbb.ko iicbus.ko iic.ko drm2.ko acpi_video.ko

ahci atapci cbb ehci em hdac hostb isab iwn none pcib uhci vgapci

NOTE: This kernel build is using a VT kernel. Make sure the "Security -> IO Port Access -> Modem" in BIOS is set to "enabled", otherwise it won't resume. USB is dead after 2nd resume. Don't load tpm.ko.

Thinkpad T43

tyler

yes

yes

yes

yes

no

FreeBSD 11.0-CURRENT #0 r264918 amd64

if_wi.ko iwi_bss.ko radeonkms.ko drm2.ko iicbus.ko iic.ko iicbb.ko radeonkmsfw_R300_cp.ko

atapci bge cbb ehci hostb isab iwi none pcib pcm uhci vgapci

Xorg rendered Gtk+ apps incorrectly after first resume, second suspend/resume cycled resulted in panic and restart

Lenovo Thinkpad X61s

SevanJaniyan

yes

yes

TBD

yes

TBD

FreeBSD 11.0-CURRENT r270990 amd64

zfs.ko opensolaris.ko acpi_ibm.ko i915kms.ko iicbb.so iicbus.ko iic.ko drm2.ko

ahci atapci cbb ehci em hdac hostb isab none pcib ral sdhci_pci uhci vgapci

modem needs to be enabled in BIOS & hw.acpi.reset_video=1 needs to be set

Fujitsu Lifebook E733

AleksanderAlekseev

yes

yes

yes

yes

yes

FreeBSD 11.0-BETA4 r303759 amd64

i915kms.ko iicbb.ko iicbus.ko iic.ko drm2.ko ipfw.ko ums.ko uhid.ko

ahci ehci em hdac hostb isab iwn none pcib uart vgapci xhci

Did't work at first. Not sure whether updating from BETA3 to BETA4 or changing BIOS settings (e.g. disabling Intel Fast Boot) helped. Now works flawlessly. All config files could be found on GitHub.

HP EliteBook 840 G2

brnrd manu

yes

yes

yes

yes

yes

FreeBSD 12.0-CURRENT a7f7424(drm-next) TrueOS

zfs.ko opensolaris.ko geom_eli.ko tmpfs.ko aesni.ko if_iwm.ko iwm7265fw.ko linux.ko linux_common.ko linux64.ko libiconv.ko libmchain.ko msdosfs_iconv.ko if_bwn.ko siba_bwn.ko if_bwi.ko runfw.ko if_run.ko if_rum.ko cuse.ko sem.ko geom_uzip.ko fdescfs.ko linuxkpi.ko iwn4965fw.ko iwn1000fw.ko iwn5000fw.ko iwn5150fw.ko iwn6000fw.ko iwn6000g2afw.ko iwn6000g2bfw.ko iwn6050fw.ko if_urtw.ko if_rtwn.ko acpi_video.ko fuse.ko ums.ko atp.ko i915kms.ko drm.ko debugfs.ko linprocfs.ko ipfw.ko autofs.ko

ahci ehci em hdac hostb isab iwm none pcib vgapci xhci

In UEFI-only mode

Other projects


CategoryProject CategoryLaptop

SuspendResume (last edited 2022-07-24T10:45:44+0000 by PeterJeremy)