You are not logged in.

#1 2017-09-09 16:19:30

pabloski
Member
Registered: 2007-03-14
Posts: 31

Gnome 3 and suspend with external monitor

Hi, I have just installed Archlinux on a laptop that I use with an external monitor connected. Gnome 3 is the DE I have installed and I know that ( for some strange reason ) the developers have a lot of options hardcoded, one of which is the behaviour when closing the lid when the laptop is docked.

So i am stuck with a machine that doesn't go to sleep when I close the lid, because I have an external monitor attached. Previously I had Ubuntu gnome installed and it worked. The difference between the two systems is that Ubuntu has a bunch of options in /usr/share/glib-2.0/schemas/org.gnome.settings-daemon.plugins.power.gschema.xml, in particular

<key type="b" name="lid-close-suspend-with-external-monitor">
      <default>true</default>
      <summary>Laptop lid, when closed, will suspend even if there is an external monitor plugged in</summary>
      <description>With no external monitors plugged in, closing a laptop's lid
	will suspend the machine (as set by the lid-close-battery-action and
	lid-close-ac-action keys).  By default, however, closing the lid when
	an external monitor is present will not suspend the machine, so that one can keep
	working on that monitor (e.g. for docking stations or media viewers).  Set this
	key to False to keep the default behavior, or to True to suspend the laptop whenever the
	lid is closed and regardless of external monitors.</description>
    </key>

Also the executables /usr/lib/gnome-settings-daemon/gsd-power are different between the two distros. Ubuntu gnome uses Gnome 3.24, the same as Arch. But it looks like it is a customized version.

I tried to add the above key to the xml file, but it doesn't work. Gnome-tweak-tool doesn't even start anymore, it crashes with this error message

(gnome-tweak-tool:3434): GLib-GIO-ERROR **: Settings schema 'org.gnome.settings-daemon.plugins.power' does not contain a key named 'lid-close-suspend-with-external-monitor'

Why?

It looks like there is no way ( other than customizing Gnome 3 ) to let Gnome change the default behaviour. The only sane option is to let Systemd handle the events, but Gnome prevents it to do so. Maybe there is a way to let Systemd handle the lid closed events?

Last edited by pabloski (2017-09-09 16:21:16)

Offline

#2 2017-09-09 17:32:16

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: Gnome 3 and suspend with external monitor

If ubuntu has that feature, just grab the patch from them and rebuild gnome-settings-daemon package to your liking.

Patches are here, I'd imagine the 'ubuntu-lid-close-suspend.patch' is be all you need, but can't be sure..

Offline

#3 2017-09-10 09:42:35

pabloski
Member
Registered: 2007-03-14
Posts: 31

Re: Gnome 3 and suspend with external monitor

Thanks for the hint. I was hoping for a less invasive solution, something like dethroning Gnome and let Systemd handle lid-related acpi events. It has two options just for this.

What I don't really get is the rationale behind the Gnome team decisions. They think that everyone with a laptop and an external monitor or docked is using the laptop as a desktop pc? Is it that bad to have a bunch of user configurable options?

Offline

#4 2017-09-10 11:02:14

ooo
Member
Registered: 2013-04-10
Posts: 1,638

Re: Gnome 3 and suspend with external monitor

Gnome creates 'handle-lid-switch' inhibit lock which prevents logind.conf event handlers from working. If you can figure out a way to preven't that from happening, overriding the inhibit lock, or make logind ignore the lock, then lid close events should get handled according to logind.conf settings.

There's probably some way to achieve that, but it looks to me like patching gnome-settings-daemon might be easier solution.

I don't think these forums are the right channel to discuss Gnome's development rationales. Also, Gnome team has explained time and time again their decision of not having every possible configuration option available. Here's a recent blog post from Allan Day that explains at least some of that: https://blogs.gnome.org/aday/2017/08/08/the-gnome-way/

If you want that option re-introduced, you should request it from Gnome developers via appropriate channels.

Offline

Board footer

Powered by FluxBB