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.
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.
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.
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.
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
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.
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.
Created attachment 128715 [details] 05led script with corrected echo redirection
Created attachment 128716 [details] 95led script with corrected echo redirection
Should be fixed in 0.19.1-1