S3LEDFlash

Differences between revisions 1 and 2
Revision 1 as of 2011-09-16 13:15:06
Size: 1765
Editor: colin-king
Comment:
Revision 2 as of 2011-09-16 13:21:32
Size: 1768
Editor: colin-king
Comment:
Deletions are marked like this. Additions are marked like this.
Line 11: Line 11:
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: As root, edit /usr/lib/pm-utils/sleep.d/99video - find function suspend_video() and set local acpi_flag=8

F
or example suspend_video becomes:

S3 LED Flash

Ubuntu Oneiric now includes a patch 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)