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 Desktop
Packages, which is subscribed to gnome-shell in Ubuntu.
https://bugs.launchpad.net/bugs/1754862
Title:
Screen remains active on lid close
Status in gnome-shell package in Ubuntu:
New
Bug description:
I have a Dell XPS 13 9370 (early 2018 model) with Ubuntu 17.04
installed. I use the Gnome on XOrg session.
When I close the laptop lid, I can see through the small (< 1mm) hairline
crack that the screen is still active, showing the entire desktop. This happens
only once I am logged in to the gnome shell session, I tried closing the lid
before logging and the screen is correctly blanked.
---
ApportVersion: 2.20.7-0ubuntu3.7
Architecture: amd64
CurrentDesktop: GNOME
DisplayManager: gdm3
DistroRelease: Ubuntu 17.10
InstallationDate: Installed on 2018-03-01 (11 days ago)
InstallationMedia: Ubuntu 17.10 "Artful Aardvark" - Release amd64 (20180105.1)
Package: gnome-shell 3.26.2-0ubuntu0.1
PackageArchitecture: amd64
ProcVersionSignature: Ubuntu 4.13.0-36.40-generic 4.13.13
Tags: artful
Uname: Linux 4.13.0-36-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: adm cdrom dip docker lpadmin plugdev sambashare sudo
_MarkForUpload: True
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gnome-shell/+bug/1754862/+subscriptions
--
Mailing list: https://launchpad.net/~desktop-packages
Post to : [email protected]
Unsubscribe : https://launchpad.net/~desktop-packages
More help : https://help.launchpad.net/ListHelp