GNOME Bugzilla – Bug 785871
Inhibitor falsely claims "Multiple displays attached"
Last modified: 2019-03-20 11:46:29 UTC
When the lid switch is inhibited by having the "lid-close-ac-action" gsetting set to "nothing", "systemd-inhibit --list" shows a block on handle-lid-switch with "Why" set to "Multiple displays attached". This led me down a wild goose chase trying to figure out why gnome-settings-daemon thought I had multiple monitors when on AC power.
Expected: "Why" is set to something that tells me exactly why the lid switch is being ignored, such as "On AC power and disabled by lid close action setting".
Steps to reproduce:
gsettings set org.gnome.settings-daemon.plugins.power lid-close-ac-action nothing
I suggest that the code be simplified by using two separate inhibitors: one for inhibiting based on the setting, and a separate one for inhibiting on multiple monitors attached. Then the inhibitor descriptions would be clear, making debugging much easier.
Using Ubuntu Artful with gnome-settings-daemon 3.24.3-0ubuntu3
As an aside, to my knowledge I'd never set my lid-close-ac-action. I don't have gnome-tweak-tool installed, had never previously used gsettings on this system, and the UI doesn't let me set this setting AFAICT. IIRC, my suspend on lid close stopped working quite recently, well after Ubuntu Artful switched to GNOME. But because I've been following Artful I had Unity installed previously, so perhaps that had influenced something.
-- GitLab Migration Automatic Message --
This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.
You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/gnome-settings-daemon/issues/353.