S3LEDFlash

S3 LED Flash

Ubuntu Oneiric now includes a patch for x86 platforms to flash the keyboard LEDs once a machine has come out of S3 resume. The LEDs flash fairly early in the S3 resume path in the kernel, hence if this feature is enabled and does not work then one can conclude that the machine probably never returned back to the kernel from suspend, and this generally indicates a firmware bug.

Enabling S3 LED flash

S3 LED flash is enabled by writing 8 to /proc/sys/kernel/acpi_video_flags. However, this value is overwritten by the pm-utils /usr/lib/pm-utils/sleep.d/99video script, so we need to modify this script to ensure we write the setting when suspending.

As root, edit /usr/lib/pm-utils/sleep.d/99video - find function suspend_video() and set local acpi_flag=8

For example suspend_video becomes:

suspend_video()
{
        # 0=nothing, 1=s3_bios, 2=s3_mode, 3=both
        local acpi_flag=8  # force LED flash on S3 resume
        quirk "${QUIRK_S3_BIOS}" &&             acpi_flag=$(($acpi_flag + 1))
        quirk "${QUIRK_S3_MODE}" &&             acpi_flag=$(($acpi_flag + 2))
        sysctl -w kernel.acpi_video_flags=$acpi_flag

        quirk "${QUIRK_NOFB}" &&                die_if_framebuffer
        quirk "${QUIRK_VBESTATE_RESTORE}" &&    vbe_savestate
        quirk "${QUIRK_VBEMODE_RESTORE}" &&     vbe_savemode
        quirk "${QUIRK_RADEON_OFF}" &&          radeon_off
        quirk "${QUIRK_SAVE_PCI}" &&            save_pci
        quirk "${QUIRK_VGA_MODE_3}" &&          vbe vbemode set 3
        quirk "${QUIRK_DPMS_SUSPEND}" &&        vbe dpms suspend
        save_fbcon
}

And then suspend/resume. On resume, the keyboard LEDs will flash on/off 3 times if we enter back into the kernel on resume.

Kernel/Reference/S3LEDFlash (last edited 2011-09-16 14:43:18 by colin-king)