Comment 5 for bug 1349056

flux242 (flux242) wrote :

Hi Sean,

now the status. For the lid close event handler to work correctly with the xfce4-power-manager package version 1.2.0-3ubuntu4.1 one has to do the following:

1. Deifne the HandleLidSwitch=ignore in the /etc/systemd/logind.conf. If this is not done then logind will handle the event no matter what setting are effective in the xfce4-power-manager dialog.

2. Call xfconf-query -c xfce4-power-manager -p /xfce4-power-manager/logind-handle-lid-switch -s true
note the true predicate, because logic is inverted:
++ if ( LOGIND_RUNNING() )
++ {
++ g_object_get (G_OBJECT (manager->priv->conf),
++ LOGIND_HANDLE_LID_SWITCH, &logind_handle_lid_switch,
++ NULL);
++
++ if (!logind_handle_lid_switch)
++ return;
++ }