Bart Samwel wrote: > There would be a good explanation for all of this if the script > /etc/init.d/laptop-mode is failing somehow. The startup calls and the > on-resume calls to laptop mode tools are done through this script, > the remove-AC-while-up-and-running situation goes through another > path. Could you check that this script is still there, and that it is > working? And that there is a link to the script in /etc/rc2.d?
There is a link to the script in /etc/rc2.d (S20laptop-mode) and that looks present and correct. As for the script in /etc/init.d/laptop-mode that is also present and correct. It passed my test of functionality; I booted on AC and unplugged the cord to get the machine into LTM running on battery. Once the hard disk had spun down I did: R2:/etc/init.d# invoke-rc.d laptop-mode stop Disabling laptop mode...done (disabled, not active.). Then I waited for the HDD to spin down and it never did. Then I did: R2:/etc/init.d# invoke-rc.d laptop-mode start Enabling laptop mode...done (enabled, active.). .. and the HDD spun down not that long after. So from that test I would be confident to say that all the scripts seems ok in principle, so I now need to look at what exactly calls that specific script when my laptop comes back from suspend (S3) or hibernate (S4). What is interesting however is when I'm running on battery (with LTM working) and suspend and resume. (At this point the spindown won't function:) But looks what happens when I run the following commands in sequence: R2:/etc/rc2.d# invoke-rc.d laptop-mode stop Disabling laptop mode...done (disabled, not active.). R2:/etc/rc2.d# invoke-rc.d laptop-mode stop Disabling laptop mode...done (disabled, not active [unchanged]). R2:/etc/rc2.d# It interested me that running the command twice did appear to leave at least some 'change' somewhere in the first run. I can also confirm that although resuming from S3 or S4 results in LTM not spinning down the disk, if the laptop is on AC and suspended (S3), and then I pull the plug WHILE suspended, on resume LTM functions correctly!! If however the laptop is on AC from a fresh boot and hibernate (S4) it, upon resume LTM doesn't work at all, and doesn't appear to get run at all because: Readahead states: /dev/hda2: 128 kB /dev/hda1: 128 kB Which should be around the 3.1mb level as per the default in the script (all the other tests I've tried to carry the 3.1mb setting over). If I then put the power back in, and then pull it back out again, it does however spindown the disk and set the readahead to 3172kb, further confirming that the 'on-AC LTM script' is working correctly. Woe is laptop-mode-tools and ACPI! IMO the problem is looking more ACPI-support related than anything else as it's just not looking after LTM's scripts as it should. I'm going to see if I can deepen my understanding over the weekend, however I'm unconfident the ACPI framework in Debian is sophisticated enough at this point to handle all the possible scenarios that a modern laptop can encounter. -- Regards, Sheridan Hutchinson [EMAIL PROTECTED]
signature.asc
Description: OpenPGP digital signature