Comment 23 for bug 35213

Revision history for this message
Bart Samwel (bart-samwel) wrote :

Hi everybody,

I've looked through the reports, and there were two things that drew my attention:

 * Hibernation happens as a result of ACPI lid events. laptop-mode-tools also registers an ACPI lid event and calls "/usr/sbin/laptop_mode auto" as a result. This may cause the hibernation and the laptop mode script to run in parallel.

* Michael R. Head noticed that hibernation would take forever when the laptop was unplugged during hibernation. Again, unplugging the laptop triggers an ACPI event registered by laptop-mode-tools, which triggers "/usr/sbin/laptop_mode auto". Again, this may cause the hibernation and the laptop mode script to run in parallel.

Apparently the running of "/usr/sbin/laptop_mode auto" during or close to hibernation is troublesome. I can imagine that this may be the case because it (a) calls lots of programs, and (b) twiddles with the hardware and with kernel settings. Perhpas some of the programs called by laptop mode don't like to be put in the freezer.

Potential solution 1: disable the laptop-mode service during hibernation.
Won't work because: laptop-mode-tools also listens on the lid event, and may therefore run _in parallel_ with the hibernation script.

Potential solution 2: integrate the lid events of laptop-mode-tools and hibernate, so that laptop-mode-tools and hibernate are run serially. Then disable the laptop-mode service during hibernation as well.

Solution (2) would probably work.