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.

<!> a far more complete page for laptops is at https://laptop.bsdgroup.de/freebsd/index.html (FLCL). MarkLinimon was not aware that this page was still active before starting this one. Perhaps we should be using it for the dmesg reference instead?

How to test

We don't yet have the necessary infrastructure in place to make suspend to disk work on amd64. i386 lacks significant features, e.g., multiprocessor system support is missing, important machine-specific registers (MSRs) are not restored, and FPU state is lost. As such, 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

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 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 10.0-BETA3 #3 r258761 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 ulpt.ko ng_l2cap.ko ng_btsocket.ko ng_socket.ko linux.ko i915.ko drm.ko

ahci ehci em hdac hostb isab iwn none pcib uhci vgapci

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

Other projects

SuspendResume (last edited 2013-12-02 05:46:23 by RTylerCroy)