Ok, I've found the problem.
This was due to a setting I had enabled in "Gnome Tweak Tool": "Suspend
when laptop lid is closed" to OFF
Setting this option to OFF (the default is ON) adds an autostart link in
.config/autostart/ignore-lid-switch-tweak.desktop, which runs the
/usr/lib/gnome-tweak-tool/gnome-tweak-tool-lid-inhibitor utility, which
creates a logind inhibitor:
systemd-inhibit --list
[...]
Who: gnome-tweak-tool-lid-inhibitor (UID 1000/learts, PID
22291/gnome-tweak-too)
What: handle-lid-switch
Why: user preference
Mode: block
[...]
"Mode: block" means that the signal is blocked and not passed to the
other parts which may be handling the lid switch, including what I
assume is the standard code handling the screen poweroff.
By toggling the option to ON, the inhibitor goes away and the screen is
turned off when I close the lid.
Therefore, I advise everyone against using the "Suspend when laptop lid is
closed" option in gnome tweak tools. A much better way to diisable suspend on
lid cose is to edit /etc/systemd/logind.conf
and set HandleLidSwitch=ignore.
There are also the additional options of HandleLidSwitchDocked and
HandleLidSwitchExternalPower (this one since systemd 238) to set a different
action to take on lid close when the laptop is connected to an external monitor
or AC power, respectively.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1754862
Title:
Screen remains active on lid close
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1754862/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs