0

In KDE, I have set my preferences so that if I unplug my laptop and then close the lid, it will go into sleep mode. However, if I close the lid first and then unplug it, it will not suspend.

More specifically, I have KDE set up to choose one of two profiles based on whether or not the AC adapter is plugged in. (This is the default.) The "plugged-in" profile is set to turn off the screen when the lid is closed, while the "no plugged in" profile is set to go to sleep mode when the lid is closed. If the lid is already closed when I unplug the laptop, it will still switch profiles, but it will not trigger the new action because the lid status has not changed.

So is there a way to trigger the appropriate lid action whenever I plug or unplug the laptop? Alternatively, is there a way to automatically generate a fake lid ACPI event when I plug or unplug the laptop?


Further info: KDE Bug Report

1
  • I think you have already taken the corrective action - filed a bug report!
    – sml
    Jul 20, 2010 at 19:21

2 Answers 2

1

On ACPI events acpid runs a action as specified in the files under /etc/acpi/events (see the acpid man page for more about this). You can use this to run your own action, acpi_listen can help you to find the ACPI event.

I guess you can get the current lid status somewhere under /proc/acpi/

Maybe there's a better way to do this using the KDE power manager but I don't use KDE.

1
  • I would like for KDE to initiate the suspend action, so that it will also perform all the other steps that it does when suspending. Jul 8, 2010 at 16:56
1

According to my Bug Report, this is now fixed.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .