On Sat, Sep 21, 2013 at 10:57:23PM +0530, Ritesh Raj Sarraf wrote: > On Saturday 21 September 2013 07:52 PM, Adam Lee wrote: > > However, one more question. I only found rules.d/99-laptop-mode.rules > >> > ACTION=="change", SUBSYSTEM=="power_supply", RUN+="lmt-udev auto" > >> > ACTION=="add|remove", SUBSYSTEM=="machinecheck", RUN+="lmt-udev auto" > >> > ACTION=="add|remove", SUBSYSTEM=="usb", RUN+="lmt-udev force > >> > modules=usb-autosuspend devices=%k" > > What if I just suspend and resume without change of power_supply? That > > rule is not triggered, apm_level will be changed on my laptop even with > > pm-utils purged. > > From what I recollect, on every suspend / resume operation, the > machinecheck subsystem generates an event. The suspend/resume action for > LMT is handled through it. > The power_supply subsystem is triggered only when your power status > changes. > > What do you mean when you say "rule is not triggered" ?? > LMT needs to be just invoked. What the status of the machine is, it > determines by itself. It uses udev/systemd, just for the kernel events.
Oh, the "machinecheck" rule triggers it, get it now. But, because the power state is not changed, LMT doesn't reload. I have to change RUN to "lmt-udev auto force" to make the apm level setting works again after resume. (it has a side effect, which takes much longer time during suspend and resume.) Anyway, thanks for your help, will try to fix it in kernel space. -- Adam Lee http://adam8157.info -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org