Bug 179420 - blink suspend light on ThinkPad laptops
Summary: blink suspend light on ThinkPad laptops
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: pm-utils
Version: 4
Hardware: i386
OS: Linux
medium
medium
Target Milestone: ---
Assignee: Phil Knirsch
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2006-01-31 07:16 UTC by Ben Liblit
Modified: 2015-03-05 01:15 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2006-09-28 21:27:21 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
LED blinker script, 1 of 2 (153 bytes, application/octet-stream)
2006-01-31 07:18 UTC, Ben Liblit
no flags Details
LED blinker script, 2 of 2 (122 bytes, application/octet-stream)
2006-01-31 07:19 UTC, Ben Liblit
no flags Details
05led script with corrected echo redirection (204 bytes, text/plain)
2006-05-07 19:39 UTC, Ben Liblit
no flags Details
95led script with corrected echo redirection (156 bytes, text/plain)
2006-05-07 19:40 UTC, Ben Liblit
no flags Details

Description Ben Liblit 2006-01-31 07:16:06 UTC
On ThinkPads with a crescent-moon "sleep" or "suspend" LED, it would be nice to
blink this indicator during suspend or resume preparation so as to provide a
clear indicator of the pending state change.  I will attach a pair of scripts to
this report that implement the requested feature, at least for my ThinkPad X40.

Comment 1 Ben Liblit 2006-01-31 07:18:30 UTC
Created attachment 123898 [details]
LED blinker script, 1 of 2

This is one of two scripts that implement the desired blinking on my ThinkPad
X40.  This script starts the blinking at the start of suspend and stops the
blinking at the end of resume.

Comment 2 Ben Liblit 2006-01-31 07:19:28 UTC
Created attachment 123899 [details]
LED blinker script, 2 of 2

This is one of two scripts that implement the desired blinking on my ThinkPad
X40.  This script restarts the blinking at the start of resume, since the
blinking status is apparently not retained or restored automatically.

Comment 3 Ben Liblit 2006-01-31 07:28:51 UTC
Two general notes about these scripts:

First, as I do not have access to multiple laptops, I cannot guarantee that LED
7 corresponds to the crescent-moon-shaped indicator across models.  That's what
it does for my ThinkPad X40, at least.

Second, the unfortunate names of the scripts (000led and 99led) are necessary to
get these scripts to run respectively before 00NetworkManager and after 99clock
on suspend (reverse that on resume, of course).  I've filed a distinct bug
179421 to suggest that 00NetworkManager and 99clock be renumbered to make it
easier to add new first & last scripts such as those proposed here.

Comment 4 Phil Knirsch 2006-02-24 11:27:07 UTC
The problem is that this is very IBM laptop specific.

I'll modifiy the scripts so that they only do something if the needed file can
be found. That should limit it to at least IBM notebooks with ACPI support and
not break any other laptops.

Will be in next build.

Read ya, Phil


Comment 5 Ben Liblit 2006-02-24 20:20:47 UTC
I certainly recognize that the scripts are very IBM laptop specific.  However,
they should fail silently in a reasonable manner on other machines.  If
"/proc/acpi/ibm/led" is missing, the echo commands will fail.  The scripts
already redirect errors to /dev/null and always "exit 0" even if the echos fail.

That said, if you feel it would be cleaner to have an explicit test before even
attempting to write into "/proc/acpi/ibm/led", I won't object.

Comment 6 Ben Liblit 2006-05-07 19:38:04 UTC
The modified scripts as included with pm-utils-??-?? for FC5 are broken.  They
contain echo statements with two redirections: first into ?? (correct) and then
into /dev/null (incorrect).  The second redirection replaces the first, meaning
the echo statements have no real effect at all.

I'll attach a pair of replacement scripts that correct this problem.

Comment 7 Ben Liblit 2006-05-07 19:39:37 UTC
Created attachment 128715 [details]
05led script with corrected echo redirection

Comment 8 Ben Liblit 2006-05-07 19:40:15 UTC
Created attachment 128716 [details]
95led script with corrected echo redirection

Comment 9 Peter Jones 2006-09-28 21:27:21 UTC
Should be fixed in 0.19.1-1


Note You need to log in before you can comment on or make changes to this bug.