Unity use unity-settings-daemon which depends on gnome-settings-daemon-schemas and gsetting-ubuntu-schemas for power related settings.
How to reproduce:
1) Log in to unity-session
2) UCC-> Power
3) Choose "Do nothing" for lid is closed option.
It won't work. Certainly not without tweak-tool. But the Ubuntu autostart ignore-lid-switch-tweak (/usr/lib/gnome-tweak-tool/gnome-tweak-tool-lid-inhibitor) which needs to be disabled as well.
The patch only changes inhibit_lid_switch_action behavior. Gnome-shell can have tweak-tool, but other sessions are affected.
In short it's broken
Solution:
----------------
gsettings set org.gnome.settings-daemon.plugins.power.lid-close-ac-action 'nothing'
gsettings set org.gnome.settings-daemon.plugins.power lid-close-suspend-with-external-monitor false
These schemas needs to be set to make it work properly. And we can do that in "ubuntu-settings".
Also when laptop boots with lid-closed it's all gdm before login. So these settings needs to be changed on the behalf of the gdm.
That way there won't be any conflict, both gnome-tweak-tool and unity power settings will work properly.
@Sebastien
Unity use unity-settings- daemon which depends on gnome-settings- daemon- schemas and gsetting- ubuntu- schemas for power related settings.
How to reproduce:
1) Log in to unity-session
2) UCC-> Power
3) Choose "Do nothing" for lid is closed option.
It won't work. Certainly not without tweak-tool. But the Ubuntu autostart ignore- lid-switch- tweak (/usr/lib/ gnome-tweak- tool/gnome- tweak-tool- lid-inhibitor) which needs to be disabled as well.
The patch only changes inhibit_ lid_switch_ action behavior. Gnome-shell can have tweak-tool, but other sessions are affected.
In short it's broken
Solution:
----------------
gsettings set org.gnome. settings- daemon. plugins. power.lid- close-ac- action 'nothing' settings- daemon. plugins. power lid-close- suspend- with-external- monitor false
gsettings set org.gnome.
These schemas needs to be set to make it work properly. And we can do that in "ubuntu-settings".
Also when laptop boots with lid-closed it's all gdm before login. So these settings needs to be changed on the behalf of the gdm.
That way there won't be any conflict, both gnome-tweak-tool and unity power settings will work properly.