Power Management in Linux – Virtual Devices, USB Wake‑Up & Other Peripherals

Peripherals often decide whether suspend/resume is smooth or painful. This guide explains how Linux handles virtual devices, USB wake-up sources, and other hardware; how to inspect and control their power states; and how to diagnose and fix misbehaviour.

Power Management in Linux – Virtual Devices, USB Wake‑Up & Other Peripherals

Table of Contents:

  1. Introduction – Why Peripherals Matter for Suspend/Resume
     1.1 The “Peripheral Problem” in Modern Linux
     1.2 Scope of This Manual
  2. Fundamentals of Linux Power-Management
     2.1 ACPI – The Firmware “Contract”
     2.2 Sleep States – S1-S5 in Practice
     2.3 Runtime Power Management (PM)
      2.3.1 Runtime PM Lifecycle
     2.4 systemd Integration
  3. Virtual Devices
     3.1 virtio Family
     3.2 vhost-net & vhost-scsi
     3.3 VFIO (PCI Passthrough)
     3.4 USBIP (USB over IP)
     3.5 Other Hypervisor-Presented Devices
  4. USB Wake-Up and Suspend
     4.1 Hardware Prerequisites
     4.2 Kernel Configuration
     4.3 sysfs Interface
      4.3.1 Enabling a Device to Wake the System
     4.4 Runtime PM vs. Wake-Up
      4.4.1 Interaction with usbcore
     4.5 Common Troubleshooting Steps
      4.5.1 Check if the Device Is Allowed to Wake
      4.5.2 Verify the Controller’s PME Status
      4.5.3 Inspect the System’s Wake-Up Sources
     4.6 Example: Enabling a USB Keyboard to Wake the System
     4.7 Dealing with “Device Not Allowed to Wake” Errors
     4.8 USB Core Configuration
     4.9 Controlling Autosuspend
     4.10 Example: Enabling Autosuspend for All USB Devices
  5. Network Devices
     5.1 Ethernet (Wired)
     5.2 Wireless (Wi-Fi)
      5.2.1 Enabling WoWLAN
     5.3 Virtual Network Interfaces
     5.4 Ethernet
     5.5 Wireless
     5.6 Wi-Fi (iwlwifi)
     5.7 Bluetooth (btusb)
     5.8 Modem (e.g., qmi_wwan)
  6. Power Management for Display Devices
     6.1 Intel i915 (Integrated GPU)
     6.2 AMDGPU
     6.3 NVIDIA (Proprietary)
     6.4 Backlight Control
  7. Power Management for Input Devices
     7.1 Keyboard & Mouse (HID)
     7.2 Touchpad (Synaptics, Elantech)
     7.3 Keyboard & Mouse (HID) Wake-Up
     7.4 Touchscreen Wake-Up
  8. Power Management for Audio Devices
     8.1 HDA Intel (snd_hda_intel)
     8.2 USB Audio (snd_usb_audio)
     8.3 ALSA Power Management
  9. Power Management for Storage Devices
     9.1 SATA (ahci, libata)
     9.2 NVMe
     9.3 SATA & AHCI
  10. Other Devices
     10.1 Power Management for Sensors & Misc Devices
      10.1.1 Battery & Power Sensors
      10.1.2 Accelerometer (e.g., iio)
     10.2 Power Management for PCI Devices
      10.2.1 General PCI Power Management
      10.2.2 Enabling PME (Power Management Event)
     10.3 PCIe Hot-Plug
     10.4 Power Management for Platform Devices
      10.4.1 ACPI Platform Devices
      10.4.2 Platform Devices Overview
     10.5 Power Management for Embedded Controllers (EC)
     10.6 Power Management for Platform-Specific Subsystems
      10.6.1 Intel-Specific
      10.6.2 AMD-Specific
     10.7 Power Management for Power Supply & Battery
      10.7.1 Power Supply Class
      10.7.2 ACPI Power Supply
     10.8 Power Management for Embedded Devices (e.g., Raspberry Pi)
      10.8.1 Raspberry Pi (BCM2835/BCM2711)
     10.9 Power Management for Embedded Real-Time Clocks (RTC)
      10.9.1 RTC Drivers
      10.9.2 Loop Devices
     10.10 Power Management for Virtual Devices
      10.10.1 Virtual Filesystems (e.g., procfs, sysfs)
     10.11 Power Management for Security Subsystems
      10.11.1 TPM (Trusted Platform Module)
     10.12 Power Management for Video Subsystems
      10.12.1 V4L2 (Video4Linux)

11. Interaction with Systemd & Initramfs
 11.1 Systemd-logind
 11.2 Custom ACPI Wake-Up Overrides

  1. Summary of Key Kernel Config Options
     12.1 Core Power-Management Infrastructure
     12.2 USB Sub-System
     12.3 USB-Device Classes
     12.4 Platform / SoC Devices
     12.5 Embedded Controller (EC) – Keyboard / Power-Key Wake-Up
     12.6 Audio Sub-System
     12.7 Video / Display Sub-System
     12.8 Input Sub-System (Keyboards, Mice, Touchpads)
     12.9 SPI / Audio Codecs (e.g., WM8962, WM8742)
     12.10 Network Sub-System (Ethernet, Wi-Fi, Bluetooth)
     12.11 Power Management Core for Devices (PCI, Platform, etc.)
     12.12 Real-Time Clock (RTC)
     12.13 I²C / SPI / MIPI-CSI / DSI Devices
     12.14 Power-Supply / Battery Management
     12.15 GPIO / Pin Control (for Wake-Up from Pins)
     12.16 MIPI-CSI / Camera Sub-System
     12.17 HDMI / DP / DisplayPort Interfaces
     12.18 Audio Subsystem (ALSA, ASoC, HDMI-Audio)
     12.19 Power Management Options (Fine-Tuning)
  2. Summary of How to Use This Information

1. Introduction – Why peripherals matter for suspend/resume

1.1 The “peripheral problem” in modern Linux

  • Power‑state transitions (S1‑S5, runtime PM, device autosuspend) are global but delegated to individual drivers.
  • A single mis‑behaving peripheral can:
    • Prevent the system from entering a low‑power state (e.g., “Failed to suspend device xyz” in dmesg).
    • Cause a resume failure (kernel panic, device “stuck” in D3, I/O errors).
    • Wake the machine unexpectedly (battery drain on laptops, “phantom wake‑ups” on servers).
Bottom line: Peripherals are the weakest link in the power‑management chain. Understanding how each class of device interacts with ACPI, runtime PM, and the user‑space orchestration layer (systemd) is essential for a reliable suspend/resume experience.

1.2 Scope of this manual

  • Physical peripherals (PCIe, USB, SATA, Thunderbolt, etc.).
  • Virtual devices presented by hypervisors (virtio, vhost, VFIO, USBIP).
  • Both system‑wide sleep states (S0‑S5) and runtime power management (autosuspend).
  • Focus on Linux kernel 6.6+ (the concepts apply to older kernels but some APIs have changed).

2. Fundamentals of Linux Power‑Management

2.1 ACPI – the firmware “contract”

Concept Meaning Linux exposure
S‑states Global system sleep states (S0 = working, S1‑S3 = shallow to deep, S4 = hibernate, S5 = soft‑off). pm-suspend, pm-hibernate, systemctl suspend
D‑states Device power states (D0 = fully on, D1‑D3 = reduced power, D3hot/D3cold). sysfs (/sys/bus/.../device/power/state)
F‑states CPU idle states (C‑states + deeper “Package C‑states”). intel_idle.max_cstate, amd_iommu
_PRW Power Resources for Wake: tells firmware which device can wake the system. Propagated to Linux via ACPI _PRW objects → wake_up flag in sysfs
_OSC Operating System Capabilities: negotiation between OS and firmware (e.g., for native USB wake‑up). Implemented by acpi/osc.c driver.
Tip: acpidump -b -n DSM or acpidump -b -n PRW can be used to inspect the DSDT/SSDT tables for wake‑up capabilities.

2.2 Sleep states – S1‑S5 in practice

State Power consumption Typical use‑case Linux actions
S1 (POS) Low (CPU stops, RAM retained) Quick suspend on desktops suspendacpi_sleep_preparefreeze_devices
S2 (PC10) Lower (CPU & PCIe bus powered down) Rare, mostly legacy BIOS Not widely supported on x86
S3 (Suspend‑to‑RAM) Minimal (only RAM powered) Laptop sleep, most desktops systemctl suspendenter_s3
S4 (Suspend‑to‑Disk) Near‑zero (RAM saved to disk) Hibernation, long‑term “off” systemctl hibernatesnapshot
S5 (Soft‑off) Off (except for wake‑on‑LAN etc.) Power‑off, firmware “off” systemctl poweroff

The kernel always attempts the deepest state the firmware reports as supported (/sys/power/mem_sleep).

2.3 Runtime Power Management (PM)

  • Autosuspend – devices may be put into D3 when idle, independent of system sleep.
  • pm_runtime_ API* – used by drivers (pm_runtime_get_sync(), pm_runtime_put_autosuspend()).
  • pm_qos – quality‑of‑service constraints (e.g., pm_qos_add_request(PM_QOS_CPU_DMA_LATENCY, 10) prevents deep C‑states).

2.3.1 Runtime PM lifecycle

runtime_suspend   → driver->runtime_suspend()
runtime_resume    → driver->runtime_resume()
runtime_idle      → driver->runtime_idle()

The driver must implement runtime_suspend/runtime_resume. If not, the kernel falls back to “always‑on”.

2.4 systemd integration

systemd unit Purpose Key file
systemd-suspend.service Orchestrates S3 transition /usr/lib/systemd/system/systemd-suspend.service
systemd-hibernate.service Orchestrates S4 same
systemd-sleep.conf Global defaults (AllowSuspend=yes, SuspendMode=deep, etc.) /etc/systemd/sleep.conf
systemd-sleep (binary) Executes “pre‑sleep” & “post‑sleep” hooks (/usr/lib/systemd/system-sleep/*) N/A
systemd-logind Handles lid switch, power button, and “inhibit” locks N/A

Hooks in /usr/lib/systemd/system-sleep/ run before the kernel is asked to sleep (argument pre) and after resume (post).

3. Virtual Devices

Virtual devices are presented by a hypervisor (KVM, Xen, VMware, QEMU) but are driven by Linux kernel drivers. Their power‑management behavior is often different from physical hardware because:

  • The underlying physical device may already be powered down.
  • The hypervisor may need to freeze the device’s state (e.g., virtio queue) before the guest suspends.
  • Some virtual devices expose runtime PM hooks that actually forward to the host.

Below we cover the most common classes.

3.1 virtio family

Device Typical use Power‑management hooks Important sysfs knobs
virtio‑blk Block storage (disk) runtime_suspendvirtio_device_stop (queues flushed, host notified) /sys/bus/virtio/devices/<id>/power/control
virtio‑net Network runtime_suspendvhost_net_stop (if using vhost) queue/tx_queue_len, features
virtio‑scsi SCSI target Same as blk, plus scsi_device runtime PM device/power/autosuspend_delay
virtio‑gpu Display May require framebuffer save/restore (virtio_gpu_save/restore) enable_fbdev
virtio‑input Input devices (mouse/keyboard) Usually always‑on; can be autosuspended via hid driver N/A

Key notes

  • The virtio_pci driver (or virtio_mmio) provides the generic pm_runtime callbacks. Ensure CONFIG_VIRTIO_PCI and CONFIG_VIRTIO_MMIO are built as modules (m) for flexibility.
  • For high‑performance networking, many distros set power/control = on on vhost‑net to avoid latency spikes. If you experience suspend failures, try echo auto > .../power/control.
  • Snapshotting (VM suspend to disk) often uses virsh suspend → the guest kernel receives a S3 request; the hypervisor also needs to freeze all virtio devices. Recent QEMU releases have -machine -no-shutdown handling that automatically calls ioctl(VIRTIO_IOTLB_RESET).

3.2 vhost‑net & vhost‑scsi

  • vhost is a kernel‑space implementation of virtio backend that bypasses user‑space for better performance.
  • Power‑management is slightly different because the kernel owns the device:
    • vhost_net_stop() disables the kick‑fd and frees the ring.
    • vhost_net_open() re‑initialises.
  • Potential pitfall: If the host’s NIC driver does not support autosuspend, the vhost device can keep the PCIe link active, preventing the guest from entering S3. Use ethtool -s eth0 wol g on the host to enable wake‑on‑LAN only if needed.

3.3 VFIO (PCI Passthrough)

  • Devices are directly assigned to a guest (e.g., GPU, NIC).
  • VFIO provides vfio-pci driver with runtime_pm callbacks that simply forward pm_runtime_* to the underlying PCI device.
  • Important: When the guest is suspended, the host must also freeze the device:
    • vfio_iommu_type1 implements freeze/unfreeze callbacks.
    • The host’s systemd-suspend.service will call vfio-pci’s runtime_suspend. If the device refuses (e.g., GPU still rendering), the host suspend aborts.

Common work‑arounds

  • Set options vfio-pci disable_idle_d3=1 (kernel module parameter) for devices that cannot enter D3 while the guest is alive.
  • Use virsh edit <domain><features><acpi/></features> to enable ACPI in the guest; the guest’s ACPI tables can then request the host to power down the device.

3.4 USBIP (USB over IP)

  • USBIP allows a remote USB device to appear locally as a virtual USB device.
  • The client kernel registers a usbip-host driver which creates a usbip bus device under /sys/bus/usb/.
  • Power‑management: The underlying physical USB host controller is still managed by the normal USB stack; the virtual usbip device follows the same runtime‑PM rules.

Tip: If a remote USB device is a wake‑up source (e.g., a USB keyboard), you must enable usbip_host wake_up attribute (/sys/bus/usb/devices/<bus>-<port>/power/wakeup). This will forward the remote wake‑up event to the local host.

3.5 Other hypervisor‑presented devices

Device Hypervisor Linux driver Power‑management quirks
vhost‑vsock QEMU/KVM vhost_vsock No runtime PM; keep auto unless you experience high power consumption
virtio‑balloon QEMU virtio_balloon Used for memory over‑commit; must be enabled before suspend to allow host to reclaim memory
xen‑blkfront / xen‑netfront Xen blkfront, netfront These drivers have explicit blkfront_suspend/netfront_suspend hooks; make sure CONFIG_XEN is built as a module for easier debugging
pv‑scsi VMware ESXi (paravirtual) pvscsi Supports autosuspend via pm_runtime; may need pci=noaer on some hardware

4. USB Wake‑Up and Suspend

USB devices are the most frequent source of unexpected wake‑ups on laptops and desktops. The Linux kernel supports wake‑up at several layers:

  1. Controller level (EHCI, xHCI, UHCI/OHCI).
  2. Port level – each physical port can be configured to allow wake‑up.
  3. Device level – the device’s driver may expose wake_up attribute.

4.1 Hardware prerequisites

Requirement What to verify
USB 2.0/3.0 controller with S3 capable lspci -v
BIOS/UEFI option “USB Wake‑on‑Keyboard/Mouse” Must be enabled; otherwise the firmware may block the ACPI _PRW notification.
Power‑good signals For xHCI, the XHCI controller must have a working PME# line.
Pro tip: On many laptops, the BIOS disables USB wake‑up while in “fast‑boot” mode. Disable fast‑boot if you need reliable wake‑up.

4.2 Kernel configuration

Config option Description Recommended
CONFIG_USB Core USB subsystem y
CONFIG_USB_XHCI_HCD xHCI host controller driver m (or y)
CONFIG_USB_EHCI_HCD EHCI driver (USB 2.0) m
CONFIG_USB_UHCI_HCD UHCI (legacy) m
CONFIG_USB_OHCI_HCD OHCI (legacy) m
CONFIG_USB_ACM CDC ACM driver (modems) y
CONFIG_USB_HID Human Interface Device driver y
CONFIG_USB_STORAGE Mass storage driver y
CONFIG_PM_SLEEP Generic PM support y
CONFIG_PM_RUNTIME Runtime PM support y
CONFIG_USB_OTG OTG support (needed for some tablets) y
CONFIG_USB_SUPPORT USB support (overall) y

CONFIG_USB_SUPPORT must be enabled for any USB wake‑up support.

4.3 sysfs interface

  • /sys/bus/usb/devices/<bus>-<port>/power/controlauto or on.
  • /sys/bus/usb/devices/<bus>-<port>/power/wakeupenabled or disabled.
  • /sys/bus/usb/devices/<bus>-<port>/power/autosuspend_delay – delay before autosuspend (seconds).

4.3.1 Enabling a device to wake the system

# Example: enable wake‑up on USB keyboard (port 1‑2)
echo enabled > /sys/bus/usb/devices/1-2/power/wakeup
# Optional: set autosuspend delay to 5 seconds
echo 5 > /sys/bus/usb/devices/1-2/power/autosuspend_delay

If the device driver does not expose a wake_up file, you can still enable port‑level wake‑up via the controller’s sysfs:

# For xHCI, enable PME on the controller
echo enabled > /sys/bus/pci/devices/0000:00:14.0/power/wakeup

4.4 Runtime PM vs. Wake‑up

When a device is autosuspended, it can still generate a wake‑up event. The kernel keeps a list of “wake‑capable” devices (pm_wakeup_pending). On resume, the kernel checks which device triggered the wake‑up and calls the driver’s resume routine.

4.4.1 Interaction with usbcore

  • The USB core maintains a usb_device->do_remote_wakeup flag.
  • usb_autoresume can be invoked by the kernel if the device is required for system functionality after wake‑up.

4.5 Common troubleshooting steps

4.5.1 Check if the device is allowed to wake

cat /sys/bus/usb/devices/1-2/power/wakeup
# Output: enabled / disabled

4.5.2 Verify the controller’s PME status

cat /sys/bus/pci/devices/0000:00:14.0/power/wakeup
# Should be “enabled”

4.5.3 Inspect the system’s wake‑up sources

cat /proc/acpi/wakeup
# Lists devices with “enabled/disabled” status

If your keyboard is not listed, it means ACPI does not expose a _PRW entry for that device. You may need to add a custom ACPI override (see Section 9.2).

4.6 Example: Enabling a USB keyboard to wake the system

# 1. Identify the device
lsusb | grep -i keyboard
# e.g., Bus 001 Device 004: ID 046d:c31c Logitech

# 2. Find its sysfs path
readlink -f /sys/bus/usb/devices/1-4
# → /sys/devices/pci0000:00/0000:00:14.0/usb1/1-4

# 3. Enable wake‑up
echo enabled > /sys/bus/usb/devices/1-4/power/wakeup
# 4. Optionally, disable other ports to reduce spurious wakes
for dev in /sys/bus/usb/devices/*; do
    [ "$dev" = "/sys/bus/usb/devices/1-4" ] && continue
    echo disabled > "$dev/power/wakeup"
done

Verification: Suspend the system (systemctl suspend) and press a key on the keyboard. The system should wake instantly.

4.7 Dealing with “device not allowed to wake” errors

When you attempt to enable wake‑up, the kernel may reject it:

[  123.456789] usb 1-4: device not allowed to wake up (err = -22)

Possible causes:

  • The controller driver (xhci_hcd) does not support PME# on that port (common on cheap boards).
  • The device driver (e.g., usbhid) does not expose wake_up because it does not implement usb_set_device_state().

Solution:

  • Patch the driver to add device_set_wakeup_capable(dev, true). For usbhid, the patch is trivial:
static int usbhid_probe(struct usb_interface *intf, const struct usb_device_id *id)
{
    // existing code …
    device_set_wakeup_capable(&intf->dev, true);
    return 0;
}

Re‑compile the driver as a module and load it.

4.8 USB Core Configuration

  • CONFIG_USB – core USB support.
  • CONFIG_USB_AUTOSUSPEND – enables autosuspend for USB devices.

4.9 Controlling Autosuspend

  • Global autosuspend delay: set via kernel parameter usbcore.autosuspend=5.
  • Per‑device autosuspend: echo 2 > /sys/bus/usb/devices/1-2/power/autosuspend_delay.

4.10 Example: Enabling autosuspend for all USB devices

# Add to /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="usbcore.autosuspend=5"
# Update grub
update-grub

After reboot, all USB devices will be autosuspended after 5 seconds of inactivity.

5. Network Devices

Network interfaces can also be wake‑up sources (via Wake‑on‑LAN, WoWLAN). They are handled by the net subsystem with additional power‑management hooks.

5.1 Ethernet (wired)

Driver PM support Typical sysfs attributes
e1000e Full runtime PM (supports D3cold) /sys/class/net/eth0/device/power/control
r8169 Supports autosuspend, but may have bug on some NICs (r8169: runtime suspend failure). Same
tg3 (Broadcom) May need options tg3 disable_offload=1 for low‑power states N/A
ixgbe (10 GbE) Supports autosuspend_delay (default 5 s) device/power/autosuspend_delay

Enabling Wake‑on‑LAN

ethtool -s eth0 wol g
# Verify
ethtool eth0 | grep Wake-on
# Should show “g”

Note: The host NIC must have PME# line routed to the system’s ACPI wake‑up events. On some laptops, this line is not connected; you can still enable “soft‑wake” via systemd-inhibit --what=handle-power-key but true hardware wake‑up will not work.

5.2 Wireless (Wi‑Fi)

  • Modern mac80211 drivers (iwlwifi, ath10k) support WoWLAN.
  • CONFIG_MAC80211 includes CONFIG_MAC80211_WOWLAN.

5.2.1 Enabling WoWLAN

# Enable WoWLAN for iwlwifi
modprobe iwlwifi wowlan=1
# Or add to /etc/modprobe.d/iwlwifi.conf:
options iwlwifi wowlan=1

After loading, check /sys/class/net/wlan0/device/power/wakeup (should be enabled).

Potential issue: Some firmwares (e.g., Intel) require a special command (iw dev wlan0 set wowlan enable) before the driver will accept wake‑up.

5.3 Virtual network interfaces

  • veth (Linux bridge) – does not support wake‑up (no hardware).
  • tun/tap – same.

If you need a guest network device to wake the host, you must enable wake_on_lan on the host NIC and configure the guest’s virtual NIC to send a magic packet (e.g., via ethtool -s eth0 wol g inside the guest).

5.4 Ethernet

  • CONFIG_NETDEVICES – core network device support.
  • ethtool -s eth0 wol g – enable Wake‑on‑LAN (WOL).

5.5 Wireless

  • iwconfig – set power management mode (iwconfig wlan0 power on).

5.6 Wi‑Fi (iwlwifi)

  • CONFIG_IWLWIFI – includes runtime PM.

Enable power‑save:

# In /etc/modprobe.d/wifi.conf
options iwlwifi power_save=1

5.7 Bluetooth (btusb)

  • Follows USB core autosuspend.

Enable autosuspend:

echo 2 > /sys/bus/usb/devices/1-1/power/autosuspend_delay

5.8 Modem (e.g., qmi_wwan)

  • CONFIG_USB_NET_QMI_WWAN – runtime PM supported.

Disable wake‑up if causing suspend issues:

echo disabled > /sys/bus/usb/devices/1-2/power/wakeup

6. Power Management for Display Devices

Display devices (GPU, backlight) are another common source of failed suspend. Their power‑management behavior differs based on the driver and hardware generation.

6.1 Intel i915 (integrated GPU)

Feature Kernel config Runtime PM Wake‑up
CONFIG_DRM_I915 y runtime_suspendi915_runtime_suspend (puts GPU into RC6) Supports wake‑up via i915_enable_rc6
CONFIG_DRM_I915_FORCE_PROBE Optional (force probing) N/A N/A

The i915 driver supports RC6 (deep power‑down) and RC6on (lightweight). Use i915.enable_rc6=1 kernel parameter to enable.

Enable RC6:

# Add to /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="i915.enable_rc6=1 i915.enable_rc6p=1"

Common suspend issue: Some laptops have a “display off while suspended” bug where the GPU fails to enter RC6, causing the system to stay in S0ix (light‑sleep).

Workaround: Add i915.enable_psr=0 to kernel parameters (disables Panel Self‑Refresh).

6.2 AMDGPU

  • CONFIG_DRM_AMDGPU – supports PowerPlay and DPM.
  • Runtime PM is not fully implemented for all ASICs.

Enabling DPM:

  • Use amdgpu.dc=1 to enable Display Core for better power management.
# In /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="amdgpu.dc=1"

6.3 NVIDIA (proprietary)

  • nvidia driver does not support runtime PM.
  • Use nvidia-suspend scripts from the nvidia-persistenced package.

Alternative: Use the open‑source nouveau driver, which supports runtime PM, but may have poorer performance.

6.4 Backlight control

  • acpi_video0 – generic backlight driver.
  • /sys/class/backlight/intel_backlight/brightness – set brightness.

Power‑saving: Set acpi_backlight=vendor kernel parameter to use vendor‑specific backlight control (often more power‑efficient).

7. Power Management for Input Devices

7.1 Keyboard & Mouse (HID)

  • usbhid driver – supports runtime PM and wake‑up.
  • Use usbhid.mousepoll=0 kernel parameter to reduce power usage.

Customization: For keyboards with extra LEDs, you may need to disable LED control to allow deeper suspend (options hid_apple fnmode=2).

7.2 Touchpad (Synaptics, Elantech)

  • CONFIG_TOUCHSCREEN_SYNAPTICS_I2C – runtime PM supported.

Wake‑up: Usually not needed; disable wake‑up on the port if causing spurious wakes.

7.3 Keyboard & Mouse (HID) Wake-Up

  • usbhid – supports runtime PM and wake‑up.

Enable wake‑up:

modprobe usbhid
echo enabled > /sys/bus/usb/devices/1-3/power/wakeup

For built‑in keyboards (e.g., laptop top‑row), the device may be on the i8042 controller (PS/2). Use i8042.reset and i8042.nomux kernel parameters to ensure proper detection.

7.4 Touchscreen Wake-Up

  • hid-multitouch – supports runtime PM.

Disable wake‑up (if causing spurious wakes):

echo disabled > /sys/bus/usb/devices/1-5/power/wakeup

8. Power Management for Audio Devices

Audio devices can prevent suspend if they hold DMA or interrupts.

8.1 HDA Intel (snd_hda_intel)

Feature Runtime PM Wake‑up
CONFIG_SND_HDA_INTEL Yes (autosuspend after 5 s) Supports pm_runtime_put

Common problem: When headphones are plugged in, the codec may stay active. Use hdajackretask to disable detection of jack events that keep the codec awake.

8.2 USB Audio (snd_usb_audio)

  • Follows USB core’s autosuspend. Enable wake‑up with echo enabled > /sys/bus/usb/devices/1-5/power/wakeup.

8.3 ALSA Power Management

  • Add options snd_hda_intel power_save=1 to /etc/modprobe.d/alsa.conf.
  • Verify with cat /sys/module/snd_hda_intel/parameters/power_save.

9. Power Management for Storage Devices

9.1 SATA (ahci, libata)

  • CONFIG_ATA – includes runtime PM for SATA.
  • autosuspend_delay defaults to 5 seconds.

Enabling SATA link power management (ALPM)

# For a given port
echo min_power > /sys/class/scsi_host/host0/link_power_management_policy

Check /sys/class/scsi_host/host*/link_power_management_policy.

9.2 NVMe

  • CONFIG_NVME_CORE – supports runtime PM (nvme_autosuspend).
  • autosuspend_delay can be set via /sys/block/nvme0n1/device/power/autosuspend_delay.
  • Use nvme_core.default_ps_max_latency_us=0 to enable deepest power‑saving state.

Wake‑up: NVMe devices can generate PCIe wake events; enable with nvme_core.default_ps_max_latency_us=0 kernel parameter.

# In /etc/default/grub
GRUB_CMDLINE_LINUX_DEFAULT="nvme_core.default_ps_max_latency_us=0"

9.3 SATA & AHCI

  • Enable Aggressive Link Power Management (ALPM):
echo min_power > /sys/class/scsi_host/host0/link_power_management_policy

Set libata.force=1.5Gbps if link speed issues cause suspend failures.

10. Other Devices

10.1 Power Management for Sensors & Misc Devices

10.1.1 Battery & Power Sensors

  • acpi – provides battery status (/sys/class/power_supply/BAT0).
  • acpi_fakekey – used to simulate power key events.

11.1.2 Accelerometer (e.g., iio)

  • CONFIG_IIO – Industrial I/O subsystem.
  • Many sensors support runtime PM and can be configured for low‑power mode via iio_dev_attr_*.

Example: Disable wake‑up for an accelerometer

echo disabled > /sys/bus/iio/devices/iio:device0/power/wakeup

10.2 Power Management for PCI Devices

10.2.1 General PCI Power Management

  • CONFIG_PCI_MSI – Message Signaled Interrupts (required for many wake‑up events).
  • CONFIG_PCI – core PCI support.

10.2.2 Enabling PME (Power Management Event)

# Identify the PCI device (e.g., network controller)
lspci -nn | grep Ethernet
# e.g., 00:1f.6 Ethernet controller [0200]: Intel Corporation Ethernet Connection

# Enable wake‑up
echo enabled > /sys/bus/pci/devices/0000:00:1f.6/power/wakeup

10.3 PCIe Hot‑plug

  • CONFIG_PCIEPORTBUS – required for hot‑plug and runtime PM of PCIe devices.

Note: Some laptops expose the EC (Embedded Controller) as a PCI device that must be kept awake for keyboard wake‑up.

10.4 Power Management for Platform Devices

10.4.1 ACPI Platform Devices

  • CONFIG_ACPI – core ACPI support.
  • Platform devices are often enumerated under /sys/devices/platform/.

Example: Disable wake‑up for a platform‑specific USB controller

echo disabled > /sys/devices/platform/ehci-omap/power/wakeup

10.4.2 Platform Devices Overview

  • Enumerated under /sys/devices/platform/.
  • Many SoC‑specific devices (e.g., USB OTG controller, audio codec) are platform devices.

General guideline:

  1. Enable runtime PM (pm_runtime_enable) for each device in its driver probe function.
  2. Set autosuspend delay appropriately (default 5 s is a good compromise).
  3. Control wake‑up via /sys/.../power/wakeup.

10.5 Power Management for Embedded Controllers (EC)

Embedded controllers manage power keys, battery, and many other functions.

  • CONFIG_EC – generic EC support.
  • ec_sysfs – exposes EC registers under /sys/class/ec/.

Enable wake‑up

# Typically the EC is always awake; to allow suspend, add:
echo enabled > /sys/class/ec/ec0/power/wakeup

10.6 Power Management for Platform-Specific Subsystems

10.6.1 Intel‑specific

  • intel_idle.max_cstate=1 – limit deepest C‑state (useful for debugging).
  • intel_iommu=on – required for proper DMA remapping.

10.6.2 AMD‑specific

  • amd_iommu=on – enable AMD IOMMU.

10.7 Power Management for Power Supply & Battery

10.7.1 Power Supply Class

  • Exposed under /sys/class/power_supply/.

Example: Enable wake‑up for AC adapter

echo enabled > /sys/class/power_supply/AC/power/wakeup

10.7.2 ACPI Power Supply

  • Exposed under /sys/class/power_supply/.

Set thresholds for battery charge/discharge to reduce wake‑ups.

10.8 Power Management for Embedded Devices (e.g., Raspberry Pi)

10.8.1 Raspberry Pi (BCM2835/BCM2711)

  • CONFIG_BCM2835_POWER – power management for GPU and VideoCore.
  • CONFIG_ARM_CPUIDLE – ARM idle driver.

Enable deep sleep:

# In /boot/config.txt
dtparam=watchdog=on

10.9 Power Management for Embedded Real‑Time Clocks (RTC)

10.9.1 RTC Drivers

  • CONFIG_RTC_CLASS – generic RTC class.
  • CONFIG_RTC_HCTOSYS – set system clock from RTC at boot.

Enable wake‑up:

echo enabled > /sys/class/rtc/rtc0/power/wakeup

10.10 Power Management for Virtual Devices

10.10.1 Virtual Filesystems (e.g., procfs, sysfs)

  • Not power‑managed; they are always present.

10.9.2 Loop Devices

  • CONFIG_BLK_DEV_LOOP – can be autosuspended if underlying storage supports it.

10.11 Power Management for Security Subsystems

10.11.1 TPM (Trusted Platform Module)

  • CONFIG_TCG_TPM – TPM driver.
  • Can generate wake‑up events; disable if not needed:
echo disabled > /sys/class/tpm/tpm0/power/wakeup

10.12 Power Management for Video Subsystems

10.12.1 V4L2 (Video4Linux)

  • CONFIG_VIDEO_DEV – core video device support.
  • Many webcams support runtime PM.

Disable wake‑up:

echo disabled > /sys/class/video4linux/video0/power/wakeup

11. Interaction with Systemd & Initramfs

Systemd integrates tightly with the kernel’s power‑management features.

11.1 Systemd‑logind

  • logind tracks inhibitors (e.g., systemd-inhibit).
  • It also monitors wake‑up sources via udev events.

11.2 Custom ACPI Wake‑up Overrides

If a device does not expose a proper _PRW entry, you can override ACPI tables at boot:

  1. Create a custom SSDT (e.g., mywakeup.dsl) with the correct _PRW for the device.
DefinitionBlock ("", "SSDT", 2, "OEM", "MYWAK", 0x00000001)
{
    External (\_SB.PCI0.LNK0, DeviceObj)
    Method (_PRW, 0, NotSerialized) {
        Return (Package(){0x02, \_SB.PCI0.LNK0})
    }
}
  1. Compile with iasl:
iasl -tc mywakeup.dsl
# Produces mywakeup.aml
  1. Place the AML file in /boot/firmware/acpi/ and add to the boot loader:
# GRUB
GRUB_CMDLINE_LINUX_DEFAULT="acpi_override=mywakeup.aml"
  1. Update GRUB and reboot.

Verification: After suspend, check /proc/acpi/wakeup – the device should now be listed as enabled.

12. Summary of Key Kernel Config Options

Subsystem Kernel Config Typical Runtime PM Typical Wake‑up
USB Core CONFIG_USB, CONFIG_USB_AUTOSUSPEND ✅ (via usbhid, us

Below is a check‑list that you can copy‑paste into a notebook or a script.
It groups the kernel configuration symbols that must be built into the kernel (or compiled as modules) and the boot‑time kernel parameters that enable the corresponding runtime‑PM / wake‑up features for the major device classes you listed.

How to use itVerify the symbols are present in your current kernel (zcat /proc/config.gz | grep <SYMBOL>).If a symbol is missing, re‑run make menuconfig (or xconfig/kconfig) and enable it (usually under Device Drivers → …).Add the required kernel command‑line options to your boot‑loader (GRUB, systemd‑boot, etc.) and rebuild the initramfs if the option is consumed by an early‑boot script.After reboot, you can query the run‑time defaults under /sys/module/<driver>/parameters/ or /sys/.../power/.

12.1 Core Power‑Management Infrastructure

Symbol Meaning Required for
CONFIG_PM Generic Power‑Management core All devices
CONFIG_PM_SLEEP Suspend/Resume, S3/S4 System suspend
CONFIG_PM_RUNTIME Runtime PM (autosuspend/idle) All drivers that support it
CONFIG_PM_TRACE Optional debug tracing (/sys/kernel/debug/pm_trace) Debug only
CONFIG_DEVICE_POWER_MANAGEMENT Legacy alias for CONFIG_PM (on some kernels) Compatibility

Boot parameter (optional):

pm_trace.enable=1          # enable runtime‑PM tracing (debug)

12.2 USB Sub‑system

Symbol Runtime‑PM / Wake‑up Typical driver
CONFIG_USB USB core All USB
CONFIG_USB_XHCI_HCD xHCI (USB 3.x) Runtime PM, PME
CONFIG_USB_EHCI_HCD EHCI (USB 2.0) Runtime PM, PME
CONFIG_USB_OHCI_HCD OHCI (USB 1.1) Runtime PM
CONFIG_USB_UHCI_HCD UHCI (USB 1.1) Runtime PM
CONFIG_USB_XHCI_PCI PCI‑host bridge for xHCI PME on PCI
CONFIG_USB_AUTOSUSPEND USB autosuspend support (default 5 s)
CONFIG_USB_SUSPEND Allows USB devices to stay suspended across S3

Boot parameters:

usbcore.autosuspend=5          # default autosuspend delay (seconds)
usbcore.authorized_default=1  # allow autosuspend of newly‑added devices
usbcore.noirq=0                # keep IRQ wake‑up support

12.3 USB‑Device Classes

Category Driver(s) Needed symbols Runtime‑PM default Wake‑up control
USB‑HID (keyboards, mice, gamepads) usbhid (module) CONFIG_USB_HID ✅ (pm_runtime_enabled) ✅ (/sys/.../power/wakeup)
USB‑Mass‑Storage usb-storage, uas CONFIG_USB_STORAGE, CONFIG_USB_UAS ✅ (if CONFIG_USB_AUTOSUSPEND)
USB‑Audio snd-usb-audio CONFIG_SND_USB_AUDIO
USB‑Video (UVC) uvcvideo CONFIG_VIDEO_USBTV (or CONFIG_USB_VIDEO_CLASS)
USB‑Ethernet (CDC‑ECM, RNDIS, QMI‑WWAN, etc.) cdc_ether, rndis_host, qmi_wwan CONFIG_USB_NET_CDCETHER, CONFIG_USB_NET_RNDIS_HOST, CONFIG_USB_NET_QMI_WWAN ✅ (via USB autosuspend)
Wi‑Fi (iwlwifi, ath9k, rtlwifi…) iwlwifi, ath9k, rtlwifi CONFIG_IWLMVM/CONFIG_ATH9K etc. + CONFIG_PM ✅ (power_save=1 module param) ✅ (via pm_runtime)
Bluetooth (btusb) btusb CONFIG_BTUSB ✅ (USB autosuspend)

Typical runtime‑PM tuning (after the driver is loaded):

# Example for any USB device
dev=/sys/bus/usb/devices/1-1   # change to the correct BDF
echo auto   > $dev/power/control      # enable autosuspend
echo 2       > $dev/power/autosuspend_delay   # 2 s (or 5 s default)
echo enabled > $dev/power/wakeup       # allow wake‑up (or “disabled” to block)

12.4 Platform / SoC Devices

Symbol Sub‑system What it enables
CONFIG_ACPI ACPI platform enumeration /sys/devices/platform/*
CONFIG_ACPI_SLEEP ACPI S3/S4 support System suspend
CONFIG_EC_SYSFS Embedded Controller (EC) sysfs interface /sys/class/ec/
CONFIG_EC Generic EC driver Keyboard / power‑key wake‑up
CONFIG_PLATFORM_DEVICE Generic platform‑device core All platform drivers
CONFIG_OF Device‑Tree support (needed on many ARM/embedded platforms) Platform devices
CONFIG_I2C I²C core (needed for many SoC peripherals) I²C‑based devices
CONFIG_SPI SPI core (needed for many audio/codecs) SPI‑based devices

Boot‑time parameters (most are optional but useful on laptops/embedded boards):

acpi=force                 # force ACPI on platforms that support it
acpi_osi=Linux             # tell BIOS we are a Linux system (helps WOL)
acpi_no_static_ssdt=y      # ignore static SSDTs that may keep devices awake
intel_idle.max_cstate=1   # (debug) limit deepest C‑state
intel_iommu=on             # required for many Intel platforms
amd_iommu=on               # same for AMD

12.5 Embedded Controller (EC) – Keyboard / Power‑Key Wake‑up

Symbol Driver Runtime‑PM Wake‑up
CONFIG_EC ec_core (built‑in) ✅ (pm_runtime_enable in driver) ✅ (/sys/class/ec/ec0/power/wakeup)
CONFIG_EC_SYSFS ec_sysfs ✅ (exposes wakeup attribute)

Typical steps:

# Enable EC as a wake source (most laptops need this)
echo enabled > /sys/class/ec/ec0/power/wakeup

12.6 Audio Sub‑System

Symbol Driver(s) Runtime‑PM Wake‑up
CONFIG_SND ALSA core
CONFIG_SND_SOC SoC audio ✅ (via codec driver)
CONFIG_SND_SOC_INTEL_HDA_DSP Intel HDA DSP ✅ (i915.enable_rc6=1)
CONFIG_SND_USB_AUDIO USB audio class
CONFIG_SND_SOC_I2S I²S controller
CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM Generic DMA PCM

Boot parameters (optional):

snd_hda_intel.power_save=1        # Intel HDA power‑save
snd_hda_intel.enable_rc6=1       # Enable RC6 (deep idle)
snd_hda_intel.enable_rc6p=1

12.7 Video / Display Sub‑System

Symbol Driver Runtime‑PM Wake‑up
CONFIG_DRM_I915 Intel i915 ✅ (RC6/RC6p) ✅ (i915.enable_rc6=1)
CONFIG_DRM_AMDGPU AMDGPU ✅ (S3 resume) ✅ (amdgpu.dc=1)
CONFIG_DRM_RCAR_DU Renesas R-Car Display Unit
CONFIG_DRM_PANEL Panel drivers (DSI/HDMI)
CONFIG_DRM_KMS_HELPER KMS helper (includes runtime‑PM)
CONFIG_DRM_PANEL_ORIENTATION_QUIRKS Panel orientation quirks

Kernel parameters:

i915.enable_rc6=1                # Intel RC6 deep idle
i915.enable_rc6p=1               # RC6p (more aggressive)
amdgpu.dc=1                      # Enable AMD Display Core (better power‑save)
drm.debug=0x1e                   # (optional) see suspend/resume messages in dmesg

12.8 Input Sub‑system (Keyboards, Mice, Touchpads)

Symbol Driver Runtime‑PM Wake‑up
CONFIG_INPUT Generic input core
CONFIG_INPUT_KEYBOARD atkbd, i8042 ✅ (/sys/class/input/.../power/wakeup)
CONFIG_INPUT_MOUSE PS/2 mouse, psmouse
CONFIG_INPUT_TOUCHSCREEN Touchscreen drivers
CONFIG_INPUT_EVDEV evdev user‑space interface
CONFIG_SERIO Serial I/O (used by many keyboards)
CONFIG_SERIO_I8042 i8042 controller (PS/2)
CONFIG_SERIO_LIBPS2 Generic PS/2 library
CONFIG_SERIO_RAW Raw serio (debug)

Typical runtime‑PM tuning:

# Enable autosuspend for the PS/2 controller (usually platform device)
dev=/sys/devices/platform/i8042/serio0
echo auto   > $dev/power/control
echo enabled > $dev/power/wakeup   # allow wake‑up from this device

12.9 SPI / Audio Codecs (e.g., WM8962, WM8742)

Symbol Driver Runtime‑PM Wake‑up
CONFIG_SND_SOC_WM8962 WM8962 codec driver
CONFIG_SND_SOC_WM8742 WM8742 DAC driver
CONFIG_SND_SOC_WM8960 WM8960 codec
CONFIG_SND_SOC_TLV320AIC31XX TLV320 codec
CONFIG_SPI_MASTER SPI master controller
CONFIG_SPI_SLAVE SPI slave (rare)
CONFIG_SPI_GPIO Bit‑bang SPI via GPIO (some audio codecs)

Example:

# For any SPI device
dev=/sys/bus/spi/devices/spi0.0
echo auto   > $dev/power/control
echo enabled > $dev/power/wakeup

12.10 Network Sub‑system (Ethernet, Wi‑Fi, Bluetooth)

Symbol Driver Runtime‑PM Wake‑up
CONFIG_NET Core networking
CONFIG_E1000E Intel 82575/82576 Ethernet ✅ (/sys/class/net/.../power/wakeup)
CONFIG_R8169 Realtek 8169
CONFIG_IXGBE Intel 10 GbE
CONFIG_IXGBEVF Virtual function of 10 GbE
CONFIG_ATH9K Atheros 802.11n ✅ (pm_runtime)
CONFIG_IWLMVM Intel Wireless ✅ (power_save=1)
CONFIG_BRCMFMAC Broadcom Wi‑Fi
CONFIG_WLAN Generic WLAN core
CONFIG_WLAN_VENDOR_INTEL Intel WLAN drivers
CONFIG_B43 Broadcom 43xx

Network‑related parameters:

net.ifnames=0                 # keep classic ethX names (some BIOSes keep them awake)

12.11 Power Management Core for Devices (PCI, Platform, etc.)

Symbol What it adds
CONFIG_PM Core power‑management (runtime & system‑sleep)
CONFIG_PM_SLEEP Sleep states (S3/S4)
CONFIG_PM_CLK Clock framework (used by many SoC devices)
CONFIG_PM_GENERIC_DOMAINS Generic power domains
CONFIG_PM_OPP Operating‑point framework (for CPU, GPU, etc.)
CONFIG_PM_DEVFREQ Device‑frequency scaling
CONFIG_CPU_FREQ CPU frequency scaling (also a wake source)
CONFIG_CPU_IDLE CPU idle driver (deep C‑states)
CONFIG_PM_AUTOSLEEP Auto‑suspend of idle devices (default 2 s)
CONFIG_PM_WAKEIRQ Allow IRQs to wake the system
CONFIG_PCIEASPM ASPM (Active State Power Management) for PCIe
CONFIG_PCIEPORTBUS PCIe port bus driver (required for PME)
CONFIG_PCIE_DPC PCIe Data‑Link Layer Power Management

Boot parameters:

no_console_suspend            # keep console active during suspend (debug)
pcie_aspm=force               # force ASPM on (may improve power)
pcie_aspm_policy=performance  # or “powersave”

12.12 Real‑Time Clock (RTC)

Symbol Driver Runtime‑PM Wake‑up
CONFIG_RTC_CLASS Generic RTC core
CONFIG_RTC_DRV_EFI EFI/ACPI RTC
CONFIG_RTC_DRV_CMOS Legacy CMOS RTC
CONFIG_RTC_DRV_SI7020 I²C/SMBus RTC
CONFIG_RTC_INTF_DEV /dev/rtc* interface

Typical use:

# Enable wake‑up from RTC alarm
dev=/sys/class/rtc/rtc0
echo enabled > $dev/power/wakeup

12.13 I²C / SPI / MIPI‑CSI / DSI Devices

Symbol Sub‑system Runtime‑PM Wake‑up
CONFIG_I2C I²C core ✅ (if controller supports)
CONFIG_I2C_HID HID over I²C (e.g., touchscreens)
CONFIG_I2C_DESIGNWARE_PLATFORM DesignWare I²C
CONFIG_I2C_SMBUS SMBus support
CONFIG_SPI SPI core
CONFIG_MIPI_DSI DSI host controller
CONFIG_DRM_MIPI_DSI MIPI‑DSI bridge
CONFIG_MIPI_DSI_DW DesignWare DSI
CONFIG_VIDEO_MIPI_CSI2 CSI‑2 camera interface
CONFIG_V4L2_FWNODE Firmware node for complex devices (used by many SoC cameras)

Boot parameters (often used on ARM platforms):

mipi_dsi.enable=1            # enable DSI runtime‑PM (if supported)
dwc_otg.lpm_enable=0        # disable Link Power Management for USB‑OTG (if causing wake‑ups)

12.14 Power‑Supply / Battery Management

Symbol Driver Runtime‑PM Wake‑up
CONFIG_POWER_SUPPLY Power‑supply core
CONFIG_BATTERY Battery class
CONFIG_BATTERY_MAX17040 Maxim MAX17040/17043
CONFIG_BATTERY_SBS Smart Battery System
CONFIG_CHARGER Charger core
CONFIG_CHARGER_MANAGER Charger manager (e.g., charger_manager)
CONFIG_CHARGER_BQ2415X BQ2415x charger driver
CONFIG_USB_GADGET USB gadget (used on some power‑delivery devices)

Parameters:

acpi_battery=poll_interval=60   # poll battery every 60 s (optional)

12.15 GPIO / Pin Control (for wake‑up from pins)

Symbol Driver Runtime‑PM Wake‑up
CONFIG_GPIOLIB Generic GPIO core ✅ (/sys/class/gpio/.../power/wakeup)
CONFIG_PINCTRL Pin control subsystem
CONFIG_PINCTRL_AMD AMD pinctrl
CONFIG_PINCTRL_INTEL Intel pinctrl
CONFIG_PINCTRL_RCAR Renesas R‑Car pinctrl
CONFIG_GPIO_WATCHDOG GPIO watchdog (debug)
CONFIG_GPIO_SYSFS Expose GPIOs to user‑space (/sys/class/gpio)

Example: enable a GPIO as a wake source:

# Suppose GPIO 23 is exported as /sys/class/gpio/gpio23
echo enabled > /sys/class/gpio/gpio23/power/wakeup

12.16 MIPI‑CSI / Camera Sub‑system

Symbol Driver Runtime‑PM Wake‑up
CONFIG_VIDEO_MXC_CAPTURE MXC CSI driver (Freescale)
CONFIG_VIDEO_OV5640 OV5640 camera sensor
CONFIG_VIDEO_V4L2_SUBDEV_API V4L2 sub‑device API
CONFIG_VIDEO_V4L2_FWNODE Firmware node for cameras
CONFIG_VIDEO_MIPI_CSI2 MIPI CSI‑2 host

Tuning:

# Autosuspend the CSI host controller
dev=/sys/bus/platform/devices/mipi-csi0
echo auto > $dev/power/control
echo enabled > $dev/power/wakeup

12.17 HDMI / DP / DisplayPort Interfaces

Symbol Driver Runtime‑PM Wake‑up
CONFIG_DRM_DP_AUX_CHARDEV DP aux channel char device
CONFIG_DRM_EDID EDID handling
CONFIG_DRM_HDMI HDMI bridge (e.g., hdmi-bridge)
CONFIG_DRM_DISPLAY_CONNECTOR Generic display connector
CONFIG_DRM_KMS_HELPER KMS helper (required for DP)
CONFIG_DRM_I2C_NXP_TDA998X NXP TDA998x HDMI transmitter
CONFIG_DRM_ITE_IT66121 ITE IT66121 HDMI driver
CONFIG_DRM_RCAR_DU Renesas R‑Car Display Unit
CONFIG_DRM_PANEL Panel drivers (e.g., panel-ssd1306)

Example:

# Enable wake‑up from the DP/HDMI controller
dev=/sys/bus/platform/devices/rcar-du
echo enabled > $dev/power/wakeup

12.18 Audio Subsystem (ALSA, ASoC, HDMI‑audio)

Symbol Driver Runtime‑PM Wake‑up
CONFIG_SND Core ALSA sound system
CONFIG_SND_SOC ASoC core
CONFIG_SND_HDA_INTEL Intel HDA controller
CONFIG_SND_USB_AUDIO USB Audio class driver
CONFIG_SND_SOC_DMIC Digital Mic Interface
CONFIG_SND_HDA_CODEC_REALTEK Realtek codecs
CONFIG_SND_HDA_GENERIC Generic HDA driver
CONFIG_SND_USB_AUDIO USB audio
CONFIG_SND_PCM_IEC958 IEC958 (S/PDIF) support
CONFIG_SND_DUMMY Dummy sound driver (useful for testing)

Typical:

# Autosuspend the HDA controller
dev=/sys/bus/pci/devices/0000:00:1f.3
echo auto > $dev/power/control
echo enabled > $dev/power/wakeup

12.19 Power Management Options (Fine‑tuning)

Kernel config Description
CONFIG_PM Enables runtime power management and system‑sleep.
CONFIG_PM_SLEEP Enables system‑sleep (S3/S4).
CONFIG_PM_AUTOSLEEP Auto‑suspend idle devices after a timeout (default 2 s).
CONFIG_PM_WAKEIRQ Allows IRQs to wake the system (required for most wake‑sources).
CONFIG_PM_OPP Operating‑point (frequency/voltage) scaling.
CONFIG_PM_CLK Clock framework integration (for SoC devices).
CONFIG_PM_GENERIC_DOMAINS Generic power domains (e.g., for GPU).
CONFIG_PM_DEBUG Debugging facilities for PM (useful for troubleshooting).
CONFIG_PM_TEST_SUSPEND Test suspend/resume via sysfs.
CONFIG_CPU_IDLE CPU idle driver (C‑states).
CONFIG_CPU_FREQ CPU frequency scaling (governors).
CONFIG_CPU_FREQ_GOV_POWERSAVE Powersave governor (helps wake‑up).
CONFIG_SUSPEND_FREEZER Freezer subsystem for processes.
CONFIG_PM_GENERIC_DOMAINS Power domain framework for devices.
CONFIG_PM_QOS Quality‑of‑Service for latency and power.
CONFIG_PM_DEBUG Enable detailed PM debugging output.

System‑wide kernel boot parameters for power management:

no_console_suspend
intel_idle.max_cstate=1          # limit deepest C‑state (useful on some hardware)
acpi=noirq                      # disable ACPI IRQ routing (debug)
acpi_osi=Linux                  # set OSI string (helps some laptops)
acpi_backlight=vendor           # for backlight control (may affect wake‑up)
acpi=force                      # force ACPI even if BIOS reports otherwise

13. Summary of How to Use This Information

  1. Identify the device you want to be a wake source (e.g., a USB keyboard, a GPIO pin, a camera, an HDMI hot‑plug event, etc.).
  2. Check that the driver is compiled with the appropriate CONFIG_… option (most modern kernels have them enabled by default; if you are building a custom kernel, make sure they are not disabled).
  3. For GPIO‑based wake‑up, export the GPIO and set the wake‑up flag.
  4. For RTC alarms, set the alarm time via /dev/rtc0 or the sysfs interface and enable wake‑up.

Test the configuration with:

systemctl suspend
# or
echo mem > /sys/power/state

Then trigger the device (press a key, move the mouse, toggle the GPIO, etc.) and verify that the system wakes.

Enable the wake‑up if it is not already:

echo enabled > /sys/<bus>/<device>/power/wakeup

Verify the device’s runtime‑PM and wake‑up attributes in /sys:

cat /sys/<bus>/<device>/power/control   # should be "auto" or "on"
cat /sys/<bus>/<device>/power/wakeup    # should be "enabled"

By ensuring that the relevant kernel configuration options are enabled (as listed above) and that the appropriate power/wakeup sysfs attribute is set to enabled, you can make almost any supported device—USB, I²C, SPI, HDMI, DisplayPort, camera, network, audio codec, battery, or GPIO—act as a wake‑source from suspend.

Read next

Testing OpenGL Performance on CPU nouveau driver

While waiting for the right NVLink bridge, I decided to see how my dual RTX 2080 Ti setup performs without them—by turning the GPUs off entirely. The result? A deep dive into OpenGL on CPU using the humble Nouveau driver, where even spinning gears tell a story about patience and pixels.